scoreboard players add @e[type=marker,tag=black_hole] sound 1
scoreboard players set @e[type=marker,tag=black_hole,scores={sound=21..}] sound 0
execute as @e[type=marker,tag=black_hole,scores={sound=20}] at @s run playsound minecraft:ambient.crimson_forest.mood master @a ~ ~ ~ 1 0
execute as @e[type=marker,tag=black_hole] at @s run particle minecraft:dust_color_transition 0 0 0 10 0 0 0 ~ ~ ~ 1 1 1 0 1 force
execute as @e[type=marker,tag=black_hole] at @s run particle minecraft:portal ~ ~ ~ 10 8 10 0 20 force

execute at @e[type=marker,tag=black_hole] run kill @e[nbt=!{Item:{id:"mekanism:pellet_antimatter"}},type=!marker,type=!corpse:corpse,gamemode=!creative,gamemode=!spectator,distance=..4]
execute at @e[type=marker,tag=black_hole] run effect give @a[distance=..8] wither 5 5

scoreboard players add @e[type=marker,tag=black_hole] blackholetime 1
execute as @e[type=marker,tag=black_hole] at @s unless block ~ ~ ~ antiblocksrechiseled:bright_black run function backrooms:blackhole_collapse
execute as @e[type=marker,tag=black_hole,scores={blackholetime=601..}] run function backrooms:blackhole_collapse