execute store result bossbar husk_king max run attribute @e[tag=husk_king,limit=1] max_health get
execute store result bossbar husk_king value run data get entity @e[tag=husk_king,limit=1] Health
execute if entity @e[tag=husk_king] run bossbar set husk_king visible true
execute at @e[tag=husk_king] run bossbar set husk_king players @a[distance=..50]
execute as @e[tag=husk_king] if score @s time < @e[tag=husk_king,limit=1,sort=arbitrary] time run function survivalplus:bossbar/multibossfix/husk_king

#execute if score hardmode hardmode matches 1 at @e[tag=husk_king] run effect give @e[distance=..10,type=husk,tag=!boss] resistance 1 0
#execute if score hardmode hardmode matches 1 at @e[tag=husk_king] run particle block{block_state:{Name:sand}} ~ ~ ~ 8 8 8 .005 5 normal