for any one heaving problems with this bug if you want to control player heath heath boost is a good work around it will display to hafe heart and dosent glitch
effect give @s minecraft:health_boost 1 3 true
attribute @s[scores={health=1}] minecraft:generic.max_health base set 1 X20
effect clear @s minecraft:health_boost attribute @s minecraft:generic.max_health base set 20
for any one heaving problems with this bug
if you want to control player heath
heath boost is a good work around
it will display to hafe heart and dosent glitch
effect give @s minecraft:health_boost 1 3 true
attribute @s[scores={health=1}] minecraft:generic.max_health base set 1
X20
effect clear @s minecraft:health_boost
attribute @s minecraft:generic.max_health base set 20