i want to make a code that instantly kills a ghast whenever it takes damage.
i also tried doing:
Code:
on damage:
victim is ghast:
world is "work":
kill victim
drop 5 golden nugget named "&6&l&oCoin" at location of victim
play sound "entity.experience_orb.pickup" to attacker
chance of 15%:
give 1 diamond to attacker
send "&b&lYou got a diamond!" to attacker
i also tried doing:
Code:
on damage of ghast:
world is "world":
chance of 15%:
kill victim
give 1 diamond to attacker
send "&b&lYou got a diamond!" to attacker
play sound "entity.experience_orb.pickup" to attacker
stop
else:
drop 5 golden nugget named "&6&l&oCoin" at location of victim
play sound "entity.experience_orb.pickup" to attacker
kill victim
Last edited: