scoreboard players add @s HealthSap 0

attribute @s minecraft:generic.max_health modifier remove 5D6F0BA2-1186-46AC-BBBBB-AAAAA
attribute @s[scores={HealthSap=30..69}] minecraft:generic.max_health modifier add 5D6F0BA2-1186-46AC-BBBBB-AAAAA MinusHP -2 add
attribute @s[scores={HealthSap=70..109}] minecraft:generic.max_health modifier add 5D6F0BA2-1186-46AC-BBBBB-AAAAA MinusHP -4 add
attribute @s[scores={HealthSap=110..149}] minecraft:generic.max_health modifier add 5D6F0BA2-1186-46AC-BBBBB-AAAAA MinusHP -6 add
attribute @s[scores={HealthSap=150..}] minecraft:generic.max_health modifier add 5D6F0BA2-1186-46AC-BBBBB-AAAAA MinusHP -8 add

