summon marker ~ ~ ~ {Tags:["MeteorStormSpawn"]}
#execute as @e[distance=..3,type=marker,tag=MeteorStormSpawn,tag=!GotTag] run execute at @s run function zzzzdonotuse:randomevent/meteorstorm/summonmeteor2

#limit the number of active meteors in any given area to a max of 50
execute as @e[type=marker,distance=..2,tag=MeteorStormSpawn,tag=!GotTag] run execute at @e[distance=..150,type=fireball,tag=EventMeteor] run scoreboard players add @s KyuDummy3 1
execute as @e[type=marker,distance=..2,tag=MeteorStormSpawn,tag=!GotTag] run tag @s[scores={KyuDummy3=50..}] add NoSpawn


execute as @e[type=marker,distance=..2,tag=MeteorStormSpawn,tag=!GotTag,tag=!NoSpawn] run execute at @s run function zzzzdonotuse:randomevent/meteorstorm/summonmeteor2
execute as @e[type=marker,distance=..2,tag=MeteorStormSpawn,tag=!GotTag,tag=NoSpawn] run kill @s