execute if entity @p[x=23,y=43,z=-44,distance=..1.5] if score vent_breaking map matches 0 run scoreboard players set vent_breaking map 1

execute if score vent_breaking map matches 1 run scoreboard players set objectives bossbar 5
execute if score vent_breaking map matches 1 run scoreboard players set ticks bossbar 1

execute if score vent_breaking map matches 1 run scoreboard players add vent_breaking map 1

# Vent Breaking In
execute if score vent_breaking map matches 50 run execute as @e[type=interaction,tag=vent_open] at @s run teleport @s ~ 100 ~
execute if score vent_breaking map matches 50 run title @a times 10 9999 0
execute if score vent_breaking map matches 50 run title @a title "\uE001"
execute if score vent_breaking map matches 50 run summon marker ~ ~ ~ {OnGround:1b,NoGravity:1b,Silent:1b,Invulnerable:1b,CustomNameVisible:1b,Tags:["pov_camera"]} 
execute if score vent_breaking map matches 50 run teleport @e[type=marker,tag=pov_camera] @p

execute if score vent_breaking map matches 70 run function slender:scripts/interactions/vent_open

execute if score vent_breaking map matches 120 run title @a times 0 0 10
execute if score vent_breaking map matches 120 run title @a title "\uE001"

execute if score vent_breaking map matches 130 run kill @e[type=marker,tag=pov_camera]
execute if score vent_breaking map matches 50..130 run tp @a @e[type=marker,tag=pov_camera,limit=1]

execute if score vent_breaking map matches 130 run tp @e[type=interaction,tag=vent1] 25.5 44.5 -42

execute if score vent_breaking map matches 50..130 run scoreboard players add vent_breaking map 1