execute if score @s MaxHealth matches 7 run attribute @s minecraft:generic.max_health base set 7
execute if score @s MaxHealth matches 8 run attribute @s minecraft:generic.max_health base set 8
execute if score @s MaxHealth matches 9 run attribute @s minecraft:generic.max_health base set 9