I wanted to see if I could put a 10 second cooldown on the right click of a compass. I also added code where it would remove the compass after 3 uses.
Here's what I have so far
on right-click with compass:
if name of tool of player is "Teleport":
add 1 to {n.%player%}
execute console command "msg SrirachaMC &e3"
wait 1 seconds
execute console command "msg SrirachaMC &c2"
wait 1 seconds
execute console command "msg SrirachaMC &41"
wait 1 seconds
make player execute command "tp SrirachaMC"
wait 10 seconds
if {n.%player%} = 3:
remove compass named "Teleport" from player's inventory
delete {n.%player%}
on respawn:
give player compass named "Teleport"
EDIT: Already solved, @Nikd0 helped in Discord
Here's what I have so far
on right-click with compass:
if name of tool of player is "Teleport":
add 1 to {n.%player%}
execute console command "msg SrirachaMC &e3"
wait 1 seconds
execute console command "msg SrirachaMC &c2"
wait 1 seconds
execute console command "msg SrirachaMC &41"
wait 1 seconds
make player execute command "tp SrirachaMC"
wait 10 seconds
if {n.%player%} = 3:
remove compass named "Teleport" from player's inventory
delete {n.%player%}
on respawn:
give player compass named "Teleport"
EDIT: Already solved, @Nikd0 helped in Discord
Last edited: