execute store result score @s maxhp on vehicle run scoreboard players get @s maxhp
execute store result score @s barhp on vehicle run scoreboard players get @s health
scoreboard players operation @s maxhp /= .Scale maxhp
scoreboard players operation @s barhp /= @s maxhp
execute if score @s barhp matches 7.. run data modify entity @s text set value '[{"text":"\\uE000","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE002","color":"red","font":"minecraft:enemy"}]'
execute if score @s barhp matches 6 run data modify entity @s text set value '[{"text":"\\uE000","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE005","color":"red","font":"minecraft:enemy"}]'
execute if score @s barhp matches 5 run data modify entity @s text set value '[{"text":"\\uE000","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE005","color":"red","font":"minecraft:enemy"}]'
execute if score @s barhp matches 4 run data modify entity @s text set value '[{"text":"\\uE000","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE005","color":"red","font":"minecraft:enemy"}]'
execute if score @s barhp matches 3 run data modify entity @s text set value '[{"text":"\\uE000","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE005","color":"red","font":"minecraft:enemy"}]'
execute if score @s barhp matches 2 run data modify entity @s text set value '[{"text":"\\uE000","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE005","color":"red","font":"minecraft:enemy"}]'
execute if score @s barhp matches 1 run data modify entity @s text set value '[{"text":"\\uE000","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE001","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE005","color":"red","font":"minecraft:enemy"}]'
execute if score @s barhp matches 0 run data modify entity @s text set value '[{"text":"\\uE000","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE004","color":"red","font":"minecraft:enemy"},{"translate":"space.-1","font":"default"},{"text":"\\uE005","color":"red","font":"minecraft:enemy"}]'

