Resource icon
Free Minehut leak Enjoy
Code for it so legit
#==============================================================================================
#BEGINNING OF ADVANCED RTP CONFIG
#==============================================================================================
options:
#Created and Developed By Tresre
#Required addons: None
#Version: 1
#Set this to the maximum block distance you want people to be able to random tp to. 100000 is default.
FurthestDistance: 100000
#Set this to the world you want the command to be able to run in.
RunInWorld: world
#Set this to the cooldown in minutes that you want between using the random tp command.
RTPCooldown: 60
#==============================================================================================
#END OF ADVANCED RTP CONFIG, DO NOT EDIT CODE BELOW
#==============================================================================================
command /rtp:
trigger:
if world of player is "{@RunInWorld}":
if {rtp::used::%uuid of player%} is set:
set {_last} to {rtp::used::%uuid of player%}
set {_diff} to difference between {_last} and now
if {_diff} < {@RTPCooldown} minutes:
send "&d[&5RTP&d] &cYou cant use this for %difference between {@RTPCooldown} minutes and {_diff}%&c!"
stop
else:
set {_x} to round(random integer between -{@FurthestDistance} and {@FurthestDistance})
set {_z} to round(random integer between -{@FurthestDistance} and {@FurthestDistance})
set {_loc} to block at location {_x}, 50, {_z}
loop 10 times:
loop all blocks above {_loc}:
if loop-block is air:
if block below loop-block is not air or lava or fire:
if block above loop-block is air:
teleport player to loop-block
send "&d[&5RTP&d] &aYou have been teleported to a random location!"
set {rtp::used::%uuid of player%} to now
stop
loop all blocks below {_loc}:
if loop-block is not air:
if loop-block is not lava or fire:
teleport player to location of block above loop-block
send "&d[&5RTP&d] &aYou have been teleported to a random location!"
set {rtp::used::%uuid of player%} to now
stop
send "&d[&5RTP&d] &cNo available locations found to teleport to. Please try again."
else:
set {_x} to round(random integer between -{@FurthestDistance} and {@FurthestDistance})
set {_z} to round(random integer between -{@FurthestDistance} and {@FurthestDistance})
set {_loc} to block at location {_x}, 50, {_z}
loop 10 times:
loop all blocks above {_loc}:
if loop-block is air:
if block below loop-block is not air or lava or fire:
if block above loop-block is air:
teleport player to loop-block
send "&d[&5RTP&d] &aYou have been teleported to a random location!"
set {rtp::used::%uuid of player%} to now
stop
loop all blocks below {_loc}:
if loop-block is not air:
if loop-block is not lava or fire:
teleport player to location of block above loop-block
send "&d[&5RTP&d] &aYou have been teleported to a random location!"
set {rtp::used::%uuid of player%} to now
stop
send "&d[&5RTP&d] &cNo available locations found to teleport to. Please try again."
Code for it so legit
#==============================================================================================
#BEGINNING OF ADVANCED RTP CONFIG
#==============================================================================================
options:
#Created and Developed By Tresre
#Required addons: None
#Version: 1
#Set this to the maximum block distance you want people to be able to random tp to. 100000 is default.
FurthestDistance: 100000
#Set this to the world you want the command to be able to run in.
RunInWorld: world
#Set this to the cooldown in minutes that you want between using the random tp command.
RTPCooldown: 60
#==============================================================================================
#END OF ADVANCED RTP CONFIG, DO NOT EDIT CODE BELOW
#==============================================================================================
command /rtp:
trigger:
if world of player is "{@RunInWorld}":
if {rtp::used::%uuid of player%} is set:
set {_last} to {rtp::used::%uuid of player%}
set {_diff} to difference between {_last} and now
if {_diff} < {@RTPCooldown} minutes:
send "&d[&5RTP&d] &cYou cant use this for %difference between {@RTPCooldown} minutes and {_diff}%&c!"
stop
else:
set {_x} to round(random integer between -{@FurthestDistance} and {@FurthestDistance})
set {_z} to round(random integer between -{@FurthestDistance} and {@FurthestDistance})
set {_loc} to block at location {_x}, 50, {_z}
loop 10 times:
loop all blocks above {_loc}:
if loop-block is air:
if block below loop-block is not air or lava or fire:
if block above loop-block is air:
teleport player to loop-block
send "&d[&5RTP&d] &aYou have been teleported to a random location!"
set {rtp::used::%uuid of player%} to now
stop
loop all blocks below {_loc}:
if loop-block is not air:
if loop-block is not lava or fire:
teleport player to location of block above loop-block
send "&d[&5RTP&d] &aYou have been teleported to a random location!"
set {rtp::used::%uuid of player%} to now
stop
send "&d[&5RTP&d] &cNo available locations found to teleport to. Please try again."
else:
set {_x} to round(random integer between -{@FurthestDistance} and {@FurthestDistance})
set {_z} to round(random integer between -{@FurthestDistance} and {@FurthestDistance})
set {_loc} to block at location {_x}, 50, {_z}
loop 10 times:
loop all blocks above {_loc}:
if loop-block is air:
if block below loop-block is not air or lava or fire:
if block above loop-block is air:
teleport player to loop-block
send "&d[&5RTP&d] &aYou have been teleported to a random location!"
set {rtp::used::%uuid of player%} to now
stop
loop all blocks below {_loc}:
if loop-block is not air:
if loop-block is not lava or fire:
teleport player to location of block above loop-block
send "&d[&5RTP&d] &aYou have been teleported to a random location!"
set {rtp::used::%uuid of player%} to now
stop
send "&d[&5RTP&d] &cNo available locations found to teleport to. Please try again."