
# -> Reset loop existence
scoreboard players set #or.shooting_star_can_loop OverlyRealistic.General.ArbitraryData 0

# -> Operate on shooting stars
execute as @e[type=text_display,tag=OverlyRealistic.Celestial.IsShootingStar,x=0] at @s run \
    function overly_realistic:general/celestial_bodies/shooting_star/shooting_star_looping_operate

# -> If entities don't exist then return and stop loop
execute if score #or.shooting_star_can_loop OverlyRealistic.General.ArbitraryData matches 0 run \
    return fail

# -> Loop
schedule function overly_realistic:general/celestial_bodies/shooting_star/shooting_star_loop 3t