execute if score @s MaxHealth matches 17 run attribute @s minecraft:generic.max_health base set 17
execute if score @s MaxHealth matches 18 run attribute @s minecraft:generic.max_health base set 18
execute if score @s MaxHealth matches 19 run attribute @s minecraft:generic.max_health base set 19
