I am requesting an RTP script that will teleport you randomly to the world "world" even if you are in another world, (My spawn is in the world "spawn"). I would also like it to take 5 seconds before you teleport while if you move or get damaged during that time it will cancel, I would also like a 120-second cooldown for the RTP script that will not activate if the teleport gets canceled. My spawn script has an example of the delay
Thank you.
Code:
if {spawn} is set:
send "{@Prefix} Teleporting In 5 Seconds! Don't Move!" to player
set {_x} to x-coordinate of player
set {_z} to z-coordinate of player
loop 5 times:
send action bar "{@Prefix} Teleporting in %6-loop-value%" to player
if "%x-coordinate of player% - %z-coordinate of player%" != "%{_x}% - %{_z}%":
send "{@Prefix} You moved!"
stop
wait 1 second
teleport player to {spawn}