Code:
on right click:
if name of player's held item contains "&egamingsword":
if {pl::%player's uuid%} is not set:
set {pl::%player's uuid%} to true
set {_damage3} to 500
send "&4Dagger thrown!" to player
play sound "ENTITY_PLAYER_ATTACK_SWEEP" at volume 1 to player
spawn armor stand at location 2 meters infront of player with nbt from "{Invisible:1}"
set last spawned entity's helmet to stone sword
set name of last spawned entity to "%player's name%"
push last spawned entity in direction of player at speed 1.2
loop 1 times:
wait 10 ticks
make 1 of explosion at location 1 meters behind and 1.5 meter above last spawned entity
loop all mobs in radius 5 around last spawned entity:
make player damage loop-mob by {_damage3}
kill last spawned entity
play sound "block_anvil_land" at volume 1 to player
delete {pl::%player's uuid%}
Hi, I am trying to create a throwable dagger type item, how would I add a cooldown to this, whenever I try to add one it works but it spawns multiple of the sword when I only want it to spawn one.