I've had this issue for a while, i don't know how to make it so when a player dies they get Random tools / items after they respawn aswell as random armor equipped with random enchants like prot, unb etc.
A friend tried doing this but it unfortunately didn't work.
on respawn: equip player with leather or chainmail or iron or gold or diamond or netherite helmet of protection or projectile protection or fire protection of 1 or 2 or 3 or 4 equip player with leather or chainmail or iron or gold or diamond or netherite chestplate of protection or projectile protection or fire protection of 1 or 2 or 3 or 4 equip player with leather or chainmail or iron or gold or diamond or netherite leggings of protection or projectile protection or fire protection of 1 or 2 or 3 or 4 equip player with leather or chainmail or iron or gold or diamond or netherite boots of protection or projectile protection or fire protection of 1 or 2 or 3 or 4
// thank you in advance!