execute in minecraft:the_end positioned 0 64 0 run bossbar set minecraft:endcrystal_bossbar players @a[distance=..120]
execute in minecraft:the_end as @e[type=minecraft:end_crystal,nbt={ShowBottom:1b}] run tag @s add crystal_boss
execute store result bossbar minecraft:endcrystal_bossbar value run execute in minecraft:the_end if entity @e[tag=crystal_boss]
execute in minecraft:the_end unless entity @e[tag=crystal_boss] run bossbar set minecraft:endcrystal_bossbar visible false
execute in minecraft:the_end if entity @e[tag=crystal_boss] run bossbar set minecraft:endcrystal_bossbar visible true
execute in minecraft:the_end at @e[tag=crystal_boss] run particle enchant ~ ~1 ~ 0.5 0.5 0.5 1 1 force
execute in minecraft:the_end at @e[tag=crystal_boss] unless entity @e[tag=crystal_stand,distance=..1] run summon armor_stand ~ ~ ~ {Marker:1,Invisible:1,Tags:["crystal_stand"]}
execute in minecraft:the_end as @e[tag=crystal_stand] at @s run particle end_rod ^ ^ ^6 0 0 0 0 1 force
execute in minecraft:the_end as @e[tag=crystal_stand] at @s run tp @s ~ ~ ~ ~5 ~
execute in minecraft:the_end as @e[tag=crystal_stand] at @s unless entity @e[tag=crystal_boss,distance=..1] run kill @s