Teleport_tool:
type: task
script:
- if <player.has_flag[cooldown]>:
- playsound <player> [sound:block.note_block.bass] (volume:10)
- actionbar "<red>Wait <player.flag_expiration[cooldown].from_now.formatted>"
- else:
- flag player cooldown expire:5m
- playsound <player.location> [sound:entity.enderman.teleport] (volume:10)
- teleport <player> <player.cursor_on>
Teleport_tool2:
type: world
events:
on player right clicks block with::
- run teleport_tool