execute if score @s MaxHealth matches 1 run attribute @s minecraft:generic.max_health base set 1
execute if score @s MaxHealth matches 2 run attribute @s minecraft:generic.max_health base set 2
execute if score @s MaxHealth matches 3 run attribute @s minecraft:generic.max_health base set 3