scoreboard players add @e[distance=..3,type=marker,tag=GlitchingHourEvent] KyuDummy 1
scoreboard players add @e[distance=..3,type=marker,tag=GlitchingHourEvent] KyuDummy2 1
#execute as @e[distance=..3,type=marker,tag=GlitchingHourEvent,scores={KyuDummy2=150..}] run function zzzzdonotuse:randomevent/glitchinghour/glitchinghour
execute as @e[distance=..3,type=marker,tag=GlitchingHourEvent,scores={KyuDummy=..3590}] run execute as @e[type=#suhc:hostiles,tag=!CadeyrnTP,tag=!BossMob] run function zzzzdonotuse:randomevent/glitchinghour/glitchinghourmobeffect

execute if entity @e[distance=..3,type=marker,tag=GlitchingHourEvent,scores={KyuDummy=3600..}] run execute in overworld run data merge block 999982 128 999978 {auto:0b}
execute if entity @e[distance=..3,type=marker,tag=GlitchingHourEvent,scores={KyuDummy=3600..}] run tellraw @a[team=P] ["",{"text":"The Glitching Hour has ended.","color":"gray","italic":true}]
execute if entity @e[distance=..3,type=marker,tag=GlitchingHourEvent,scores={KyuDummy=3600..}] run kill @e[distance=..3,type=marker,tag=GlitchingHourEvent,scores={KyuDummy=3600..}]

execute if entity @e[distance=..3,type=marker,tag=GlitchingHourEvent,scores={KyuDummy=..3600}] run execute at @e[type=creeper,tag=CackleCreeper] run execute if predicate suhc:25percent run execute if predicate suhc:10percent run playsound minecraft:entity.witch.celebrate hostile @a[distance=..25] ~ ~ ~ 1 2


execute unless entity @e[distance=..3,type=marker,tag=GlitchingHourEvent] run execute in overworld run data merge block 999982 128 999978 {auto:0b}
