I want to give something to the player that did the most damage to a mob
Code:
every 1 hour:
send title "&c&lBOSS" with subtitle "&fBoss just spawned! /boss" to all players for 5 seconds
play sound "entity.lightning_bolt.impact" with volume 70 to all players
spawn 1 of zombie at will put it later
equip last spawned zombie with diamond chestplate of protection 2
equip last spawned zombie with diamond leggings of protection 2
equip last spawned zombie with netherite boots of protection 3
set last spawned zombie's held item to iron sword of sharpness 3
set last spawned zombie's max health to 100
set last spawned zombie's health to 100
set display name of last spawned zombie to "&c&lBoss Zombie"
on death:
if display name of victim is "&c&lBoss Zombie":
set {_r} to random integer between 500 and 5000
cancel drops
#give {r} of emerald to %player who did most damage%