execute store result score @s maxhp run scoreboard players get @s health

# execute if entity @s[type=#healthbars:low-height] at @s run function healthbars:apply-healthbar-low
execute as @s[tag=!boss] at @s run function healthbars:apply-healthbar-normal
execute as @s[tag=boss] at @s run function healthbars:apply-healthbar-boss
execute as @s[tag=ally] at @s run function healthbars:apply-healthbar-ally

# execute if entity @s[type=#healthbars:tall-height] at @s run function healthbars:apply-healthbar-high
# execute if entity @s[type=#healthbars:very-tall-height] at @s run function healthbars:apply-healthbar-very-high
# execute if entity @s[type=#healthbars:huge-size] at @s run function healthbars:apply-healthbar-huge

tag @s add healthbar_applied