execute if score electric_water ambient matches 1..16 at @p if entity @e[tag=stairwell_water,distance=..2] run scoreboard players set electric_water map 1

execute if score electric_water map matches 1 run title @a times 0 99999999 0
execute if score electric_water map matches 1 run title @a title "\uE001"
execute if score electric_water map matches 1 if score checkpoint map matches 1 run scoreboard players set electric_water ambient 0
execute if score electric_water map matches 1 run playsound scare2 master @a ~ ~ ~ 99999999999999
execute if score electric_water map matches 1 run playsound minecraft:entity.player.hurt_on_fire master @a ~ ~ ~ 99999999 0
execute if score electric_water map matches 100 run title @a times 0 0 20
execute if score electric_water map matches 100 run title @a title "\uE001"

# Beginning Checkpoint
    execute if score electric_water map matches 1..100 if score checkpoint map matches 1 run tp @a 21 46 -55 90 0
    execute if score electric_water map matches 100 if score checkpoint map matches 1 run scoreboard players set electric_water ambient 1

# Chase/Ending Checkpoint

    execute if score electric_water map matches 1 if score checkpoint map matches 2 run bossbar set obj_detail visible false
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run function slender:reset_chase_doors
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run scoreboard players set chase_music map 0
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run scoreboard players set gamemode map 2
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run scoreboard players set ambient map 0
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run setblock 18 44 -66 minecraft:oak_fence
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run setblock 20 45 -66 air
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run scoreboard players set el_1 scenes 0
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run execute as @e[tag=1,name=elevator_door_left] at @s run tp @s 18.5 ~ -65.5
    execute if score electric_water map matches 1 if score checkpoint map matches 2 run execute as @e[tag=1,name=elevator_door_right] at @s run tp @s 18.5 ~ -65.5
    execute if score electric_water map matches 50 if score checkpoint map matches 2 run tp @e[type=minecraft:interaction,tag=door_unlockable1] 5.5 100 -79.5
    execute if score electric_water map matches 50 if score checkpoint map matches 2 run scoreboard players set banging_door scenes 0
    execute if score electric_water map matches 100 if score checkpoint map matches 2 run scoreboard players set el_button_allow map 1
    execute if score electric_water map matches 100 if score checkpoint map matches 2 run scoreboard players set footsteps map 0
    execute if score electric_water map matches 100 if score checkpoint map matches 2 run scoreboard players set ambient map 2
    execute if score electric_water map matches 100 if score checkpoint map matches 2 run scoreboard players set encounter2 scenes 0

    execute if score electric_water map matches 1..100 if score checkpoint map matches 2 run tp @a 52 43 -72 90 0

execute if score electric_water map matches 1..100 run scoreboard players add electric_water map 1