# Fuse Box

execute if score fuse_section scenes matches 0 if entity @p[x=21,y=12,z=-7,distance=..2] run scoreboard players set fuse_section scenes 1

execute if score fuse_section scenes matches 1 run playsound dialogy_fred6 master @a ~ ~ ~ 99999999
execute if score fuse_section scenes matches 1..20 run title @a actionbar {"text":"I have to find all the fuses and put them in the panel."}
execute if score fuse_section scenes matches 1 run scoreboard players set obj_fuse map 0
execute if score fuse_section scenes matches 1 run bossbar set objectives visible true
execute if score fuse_section scenes matches 1 run bossbar set fuse players @a
execute if score fuse_section scenes matches 1 run bossbar set fuse visible true
execute if score fuse_section scenes matches 1 run scoreboard players set vents2 ambient 0

# Collected all fuses

execute if score fuse_section scenes matches 100 run bossbar set fuse visible false
execute if score fuse_section scenes matches 100 run title @a actionbar ""
execute if score fuse_section scenes matches 100 run data merge entity @e[type=item_display,tag=fuse_panel,limit=1] {item:{id:"minecraft:coal",Count:1b,tag:{CustomModelData:38}}}
execute if score fuse_section scenes matches 100 run bossbar set fuse visible false
execute if score fuse_section scenes matches 100 run scoreboard players set mass map 0
execute if score fuse_section scenes matches 100 run playsound minecraft:fuse_box master @a 20 13 -7 1
execute if score fuse_section scenes matches 100 run scoreboard players set obj_fuse map 0
execute if score fuse_section scenes matches 100 run playsound minecraft:lights_up master @a 22.41 14.19 -2.00 1
execute if score fuse_section scenes matches 126 run scoreboard players set phone_light map 0
execute if score fuse_section scenes matches 126 run scoreboard players set mass_rustle map 0
execute if score fuse_section scenes matches 126 run tp @e[type=interaction,tag=vent4] 54 44.5 -72.5
execute if score fuse_section scenes matches 126 run execute as @e[tag=door_jammed2] at @s run tp @s ~ 100 ~
execute if score fuse_section scenes matches 126 run scoreboard players set hallu ambient 0
execute if score fuse_section scenes matches 126 run scoreboard players set nose_bleeding scenes 0
execute if score fuse_section scenes matches 126 run data merge entity @e[type=item_display,tag=mass,limit=1] {item:{id:"air",Count:1b,}}
execute if score fuse_section scenes matches 126 run scoreboard players set equipment map 2
execute if score fuse_section scenes matches 126 run function slender:scripts/light_up
execute if score fuse_section scenes matches 127 run function slender:scripts/light_off
execute if score fuse_section scenes matches 128 run function slender:scripts/light_up
execute if score fuse_section scenes matches 129 run function slender:scripts/light_off
execute if score fuse_section scenes matches 130 run function slender:scripts/light_up


execute if score fuse_section scenes matches 1..49 run scoreboard players add fuse_section scenes 1
execute if score fuse_section scenes matches 100..200 run scoreboard players add fuse_section scenes 1