execute if entity @s[type=player,tag=!nopoly,nbt=!{Health:0f}] run function survivalplus:tools/poly/polymorphed
execute if entity @s[type=#survivalplus:polyable,type=!villager,type=!player,tag=!nopoly,nbt=!{Health:0f}] run function survivalplus:tools/poly/polymorph
execute if entity @s[type=villager,tag=!nopoly,nbt=!{Health:0f}] run function survivalplus:tools/poly/polyvill