execute if score @s MaxHealth matches 20 run attribute @s minecraft:generic.max_health base set 20
execute if score @s MaxHealth matches 21 run attribute @s minecraft:generic.max_health base set 21
execute if score @s MaxHealth matches 22 run attribute @s minecraft:generic.max_health base set 22