options:
sekundy = 5
command /spawn:
trigger:
set {_x} to x coordinate of player
set {_y} to y coordinate of player
set {_t} to 10
loop {@sekundy} times:
wait 1 seconds
remove 1 from {_n}
if "%{_x}%" is not equal to "%x coordinate of player%":
stop loop
send "&cPrzerwano teleportacje, poniewaz sie ruszyles!"
else if "%{_y}%" is not equal to "%y coordinate of player%":
stop loop
send "&cPrzerwano teleportacje, poniewaz sie ruszyles!"
stop
else:
send "&7Teleportacja nastapi za &8[&e%{_t}%&8] &7sekund"
teleport player to 0, 0, 0
send "&aZostales przeteleportowany na spawn!"