name of player's tool is "&1&l&ka45s &c&lOne Shot &1&l&ka45s":
if {%player's uuid%.aresSword.lastUsed} is not set:
send action bar "test" to player
if difference between now and {%player's uuid%.aresSword.lastUsed} is less than 5 seconds:
if clicked entity is a player:
message "&cYou are on cooldown!" to player
else:
if clicked entity is a player:
kill clicked player
set {%player's uuid%.aresSword.lastUsed} to now```
I am trying to do one shot sword with 5 sec cooldown but my problem is that I don't know how to do this: ``` if {%player's uuid%.aresSword.lastUsed} is not set:
send action bar "test" to player``` There are not any errors but it doesn't send me the action bar
#cooldown
1 messages · Page 1 of 1 (latest)
just use skbee's item cooldown
Skript Hub - Documentation
Get/set a cooldown on the specified material for a certain timespan.
Cooldowns are used by the server for items such as ender pearls and shields to prevent them from being used repeatedly.
Note that cooldowns will not by themselves stop an item from being used for attacking.
This is per player and per MATERIAL, not per actual item.