# Vent transitions in/out
execute if score vent_ticks map matches 1 run title @a actionbar ""
execute if score vent_ticks map matches 1 run scoreboard players set phone_light map 0
execute if score vent_ticks map matches 1 run title @a times 0 69 20
execute if score vent_ticks map matches 1 run title @a title "\uE001"
execute if score vent_ticks map matches 1 run scoreboard players set gamemode map 1
execute if score vent_ticks map matches 5 as @p at @s run playsound vent master @a ~ ~ ~ 1
execute if score vent_ticks map matches 15 as @p at @s run playsound vent master @a ~ ~ ~ 1
execute if score vent_ticks map matches 25 as @p at @s run playsound vent master @a ~ ~ ~ 1
execute if score vent_ticks map matches 35 as @p at @s run playsound vent master @a ~ ~ ~ 1
execute if score vent_ticks map matches 45 as @p at @s run playsound vent master @a ~ ~ ~ 1
execute if score vent_ticks map matches 55 as @p at @s run playsound vent master @a ~ ~ ~ 1
execute if score vent_ticks map matches 60 as @p at @s run playsound vent master @a ~ ~ ~ 1

#Vent in
execute if score vent map matches 1 if score vent_ticks map matches 30 run effect give @p blindness infinite 1 true
execute if score vent map matches 1 if score vent_ticks map matches 30 run effect give @p night_vision infinite 1 true
execute if score vent map matches 1 if score vent_ticks map matches 30 run scoreboard players set ambient map 3

execute if score vent map matches 3 if score vent_ticks map matches 30 run effect give @p blindness infinite 1 true
execute if score vent map matches 3 if score vent_ticks map matches 30 run effect give @p night_vision infinite 1 true
execute if score vent map matches 3 if score vent_ticks map matches 30 run scoreboard players set ambient map 3
execute if score vent map matches 3 if score vent_ticks map matches 30 run scoreboard players set equipment map 5

execute if score vent map matches 6 if score vent_ticks map matches 30 run effect give @p blindness infinite 1 true
execute if score vent map matches 6 if score vent_ticks map matches 30 run effect give @p night_vision infinite 1 true
execute if score vent map matches 6 if score vent_ticks map matches 30 run scoreboard players set ambient map 3

#Out

execute if score vent map matches 2 if score vent_ticks map matches 30 run effect clear @p blindness
execute if score vent map matches 2 if score vent_ticks map matches 30 run effect clear @p night_vision
execute if score vent map matches 2 if score vent_ticks map matches 30 run scoreboard players set phone_light map 1
execute if score vent map matches 2 if score vent_ticks map matches 30 run scoreboard players set gamemode map 2
execute if score vent map matches 2 if score vent_ticks map matches 30 run scoreboard players set ambient map 1
execute if score vent map matches 2 if score vent_ticks map matches 90 run scoreboard players set hallu ambient 20

execute if score vent map matches 4 if score vent_ticks map matches 30 run effect clear @p blindness
execute if score vent map matches 4 if score vent_ticks map matches 30 run effect clear @p night_vision
execute if score vent map matches 4 if score vent_ticks map matches 30 run scoreboard players set gamemode map 2
execute if score vent map matches 4 if score vent_ticks map matches 30 run scoreboard players set phone_light map 0
execute if score vent map matches 4 if score vent_ticks map matches 30 run scoreboard players set ambient map 2
execute if score vent map matches 4 if score vent_ticks map matches 30 run scoreboard players set equipment map 4

execute if score vent map matches 5 if score vent_ticks map matches 30 run effect clear @p blindness
execute if score vent map matches 5 if score vent_ticks map matches 30 run effect clear @p night_vision
execute if score vent map matches 5 if score vent_ticks map matches 30 run scoreboard players set phone_light map 1
execute if score vent map matches 5 if score vent_ticks map matches 30 run scoreboard players set gamemode map 2
execute if score vent map matches 5 if score vent_ticks map matches 30 run scoreboard players set ambient map 1

execute if score vent map matches 1 if score vent_ticks map matches 10..70 run tp @p 25.5 44.0625 -40 -0.3 5
execute if score vent map matches 2 if score vent_ticks map matches 10..70 run tp @p 24 12 -47 90 0
execute if score vent map matches 3 if score vent_ticks map matches 10..70 run tp @p -1 13 -32 90 0
execute if score vent map matches 4 if score vent_ticks map matches 10..70 run tp @p 53 43 -73 90 0
execute if score vent map matches 5 if score vent_ticks map matches 10..70 run tp @p 23 35 -65 90 0
execute if score vent map matches 6 if score vent_ticks map matches 10..70 run tp @p 25 24 -64 -90 0



execute if score vent map matches 1..6 if score vent_ticks map matches 0..90 run scoreboard players add vent_ticks map 1