I made a taser skript:
on shoot:
name of shooter's tool is "&eTaser":
shoot snowball from shooter at speed 2
cancel event
set metadata "&eTaser" of last spawned snowball to true
on projectile hit:
event-projectile is a snowball
metadata "&eTaser" of event-projectile is true
apply slowness to victim for 10 seconds
if {cooldown::%shooter's uuid%::event} is greater than now:
# Cancel the event since the cooldown is not yet over
cancel event
set {_waited} to difference between {cooldown::%shooter's uuid%::event} and now
message "&cTry Again in{cooldown::%shooter's uuid%::event}"
else:
set {cooldown::%shooter's uuid%::event} to 3 seconds from now
it works but when i shoot it spawns 10 billion snowballs and crashes my server
please help!
on shoot:
name of shooter's tool is "&eTaser":
shoot snowball from shooter at speed 2
cancel event
set metadata "&eTaser" of last spawned snowball to true
on projectile hit:
event-projectile is a snowball
metadata "&eTaser" of event-projectile is true
apply slowness to victim for 10 seconds
if {cooldown::%shooter's uuid%::event} is greater than now:
# Cancel the event since the cooldown is not yet over
cancel event
set {_waited} to difference between {cooldown::%shooter's uuid%::event} and now
message "&cTry Again in{cooldown::%shooter's uuid%::event}"
else:
set {cooldown::%shooter's uuid%::event} to 3 seconds from now
it works but when i shoot it spawns 10 billion snowballs and crashes my server
please help!