#I need Help with a cooldown
1 messages · Page 1 of 1 (latest)
this is my skript: ```on inventory click:
name of event-item is compass named "&eBack to spawn" with lore "&7<click>"
if {cooldown.%player%} is true:
send "&4&lError: &cYou need to wait more then 5 seconds to execute this again!"
cancel event
if {cooldown.%player%} isn't set:
set {cooldown.%player%} to false
if {cooldown,%player%} is false:
set {cooldown.%player%} to true
cancel event
close player's inventory
player command "/spawn"
play sound "block.note_block.bell" to player
wait 5 seconds
set {cooldown.%player%} to false
its not working
I got it
Here is my new skript:
name of event-item is "&eBack to spawn"
if {cooldown.%player%} is true:
send "&4&lError: &cYou need to wait more then 3 seconds to execute this again!"
cancel event
name of event-item is "&eBack to spawn"
if {cooldown.%player%} isn't set:
set {cooldown.%player%} to false
name of event-item is "&eBack to spawn"
if {cooldown.%player%} is false:
set {cooldown.%player%} to true
cancel event
close player's inventory
player command "/spawn"
play sound "block.note_block.bell" to player
wait 3 seconds
set {cooldown.%player%} to false