execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 if score world InIntermission matches 1 run bossbar set daytime players @a
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run bossbar set daytime visible true

execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run summon area_effect_cloud 0 0.5 0 {Particle:{type:"dust_pillar",block_state:"minecraft:redstone_block"},Radius:0f,RadiusPerTick:1f,Duration:40}
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run particle explosion_emitter 0 1 0 1 25 1 0 50
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run playsound minecraft:entity.generic.explode master @a 0 1 0 10 2
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run playsound entity.warden.roar master @a 0 5 0 1 0
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run playsound entity.fox.screech master @a 0 5 0 1 0
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run playsound minecraft:entity.ender_dragon.growl master @a 0 5 0 1 0
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run playsound minecraft:block.respawn_anchor.deplete master @a ~ ~ ~ 10000 0.3 1
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run effect give @a nausea 3 1 true
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run effect give @a darkness 3 1 true
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run function kiwi2:run_dimension/start_wave_titles
execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run playsound minecraft:entity.arrow.hit_player master @a ~ ~ ~ 10000 2 1
# execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run tellraw @a {"text": "A chest has generated in the center!","color": "yellow"}
# execute if score world ongoing_run matches 1 if score world Run_Active matches 1 if score world InIntermission matches 1 run setblock 0 1 0 chest{LootTable:"kiwi2:blocks/starter_chest"}
execute if score world ongoing_run matches 1 run scoreboard players set world InIntermission 0
