Heyy! I just wrote a code which makes a specific item shoot a wither skull, and I wanted to add a cooldown message, but when I try it it just returns with "In cooldown for <none> seconds, here's the code.
"
Code:
on rightclick holding wither rose:
if player is holding a wither rose named "&c&lSKULLSHOOTER":
if {wither.%player's uuid%} < 1:
shoot wither skull at speed 1
add 1 to {wither.%player's uuid%}
set {_cooldown} to difference between {withercd.%player's uuid%} and now
play sound "entity.wither.shoot" with volume 0.5 to the player
wait 2 seconds
send action bar "&2&lReady to use!" to player
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
set {wither.%player's uuid%} to 0
else:
send action bar "&c&lIn cooldown for %difference between 2 seconds and {_cooldown}% seconds." to player