# When Laura catch you
     execute if score chase scenes matches 0 at @a if entity @e[type=zombie,tag=laura,distance=..2] run scoreboard players set chase scenes 1

     execute if score chase scenes matches 1 run data merge entity @e[type=zombie,tag=laura,limit=1] {NoAI:1b}
     execute if score chase scenes matches 1 as @p at @s run summon marker ~ ~ ~ {OnGround:1b,NoGravity:1b,Silent:1b,Invulnerable:1b,CustomNameVisible:1b,Tags:["pov_camera"]} 
     execute if score chase scenes matches 1 as @e[type=marker,tag=pov_camera] at @s run teleport @s ~ ~ ~ facing entity @e[type=zombie,tag=laura,limit=1]
     execute if score chase scenes matches 1..16 as @p at @s run teleport @e[type=zombie,tag=laura,limit=1] ^ ^ ^0.75 facing entity @e[type=marker,tag=pov_camera,limit=1]
     execute if score chase scenes matches 1 run execute as @e[tag=aj.laura_enemy.root] run function animated_java:laura_enemy/animations/running/stop
     execute if score chase scenes matches 1 run execute as @e[tag=aj.laura_enemy.root] run function animated_java:laura_enemy/animations/kill/play
     execute if score chase scenes matches 1 run playsound scare2 master @a ~ ~ ~ 99999999999999
     execute if score chase scenes matches 1 run bossbar set obj_detail visible false
     execute if score chase scenes matches 1 run scoreboard players set chase_music map 0
     execute if score chase scenes matches 1 run playsound stabbing master @a ~ ~ ~ 99999999999999
     execute if score chase scenes matches 16 run scoreboard players set ambient map 0
     execute if score chase scenes matches 16 run title @a actionbar ""
     execute if score chase scenes matches 16 run title @a times 0 9999 0
     execute if score chase scenes matches 16 run title @a title "\uE001"
     execute if score chase scenes matches 25 run function animated_java:laura_enemy/remove/all
     execute if score chase scenes matches 25 run function slender:reset_chase_doors
     execute if score chase scenes matches 25 run kill @e[type=zombie,tag=laura]
     execute if score chase scenes matches 60 run kill @e[type=marker,tag=pov_camera]
     execute if score chase scenes matches 60..70 run tp @a 52 43 -72 90 0
     execute if score chase scenes matches 70 run title @a times 0 0 20
     execute if score chase scenes matches 70 run title @a title "\uE001"
     execute if score chase scenes matches 70 run scoreboard players set gamemode map 2
     execute if score chase scenes matches 70 run scoreboard players set footsteps map 0
     execute if score chase scenes matches 70 run scoreboard players set ambient map 2
     execute if score chase scenes matches 70 run scoreboard players set encounter2 scenes 0
     


     execute if score chase scenes matches 1..70 run tp @a @e[type=marker,tag=pov_camera,limit=1]

# Laura doors opening

     execute if score chase scenes matches 0 as @e[tag=laura,type=zombie,x=41,y=43,z=-90,distance=..1.5] at @s if block ^ ^ ^1 spruce_door[open=false] run function slender:scripts/chase/door_open1
     execute if score chase scenes matches 0 as @e[tag=laura,type=zombie,x=41,y=43,z=-90,distance=..1.5] at @s if block ^ ^ ^ spruce_door[open=false] run function slender:scripts/chase/door_open1

     execute if score chase scenes matches 0 as @e[tag=laura,type=zombie,x=43,y=43,z=-65,distance=..1.5] at @s if block ^ ^ ^1 spruce_door[open=false] run function slender:scripts/chase/door_open2
     execute if score chase scenes matches 0 as @e[tag=laura,type=zombie,x=43,y=43,z=-65,distance=..1.5] at @s if block ^ ^ ^ spruce_door[open=false] run function slender:scripts/chase/door_open2

     execute if score chase scenes matches 0 as @e[tag=laura,type=zombie,x=43,y=43,z=-108,distance=..1.5] at @s if block ^ ^ ^1 spruce_door[open=false] run function slender:scripts/chase/door_open3
     execute if score chase scenes matches 0 as @e[tag=laura,type=zombie,x=43,y=43,z=-108,distance=..1.5] at @s if block ^ ^ ^ spruce_door[open=false] run function slender:scripts/chase/door_open3
     
     execute if score chase scenes matches 0 as @e[tag=laura,type=zombie,x=48,y=43,z=-72,distance=..1.5] at @s if block ^ ^ ^1 spruce_door[open=false] run function slender:scripts/chase/door_open4
     execute if score chase scenes matches 0 as @e[tag=laura,type=zombie,x=48,y=43,z=-72,distance=..1.5] at @s if block ^ ^ ^ spruce_door[open=false] run function slender:scripts/chase/door_open4

     execute if score chase scenes matches 1..70 run scoreboard players add chase scenes 1

# Locking Door
   execute if entity @p[x=5,y=43,z=-79.0,distance=..1] if score chase scenes matches 0 run scoreboard players set chase scenes 1000
    execute if score chase scenes matches 1000 run summon marker 5.6 43 -78.7 {Rotation:[0F,0F],OnGround:1b,NoGravity:1b,Silent:1b,Invulnerable:1b,CustomNameVisible:1b,Tags:["pov_camera"]} 
    execute if score chase scenes matches 1000 run tp @e[type=minecraft:interaction,tag=door_unlockable1] 5.5 43 -79.5
    execute if score chase scenes matches 1000 run kill @e[type=zombie,tag=laura]
    execute if score chase scenes matches 1000 run scoreboard players set footsteps map 0
    execute if score chase scenes matches 1000 run function animated_java:laura_enemy/remove/all
    execute if score chase scenes matches 1000 run playsound minecraft:entity.zombie.attack_wooden_door master @a 5 43 -79 1.2 1
    execute if score chase scenes matches 1000 run setblock 5 44 -80 air
    execute if score chase scenes matches 1000 run setblock 5 44 -80 spruce_door[facing=north,half=upper,hinge=right,open=false]
    execute if score chase scenes matches 1000 run setblock 5 43 -80 spruce_door[facing=north,half=lower,hinge=right,open=false]
    execute if score chase scenes matches 1015 run playsound locking master @a ~ ~ ~ 9999999999
    
    execute if score chase scenes matches 1035 run scoreboard players set banging_door scenes 1
    execute if score chase scenes matches 1035 run scoreboard players set el_button_allow map 1
    execute if score chase scenes matches 1000..1009 as @e[type=marker,tag=pov_camera] at @s run tp @s ~ ~ ~ ~14.2 ~
    execute if score chase scenes matches 1040..1049 as @e[type=marker,tag=pov_camera] at @s run tp @s ~ ~ ~ ~-14.2 ~
    execute if score chase scenes matches 1049 run scoreboard players set shes_crazy scenes 1
    execute if score chase scenes matches 1049 run scoreboard players set objectives bossbar 7
    execute if score chase scenes matches 1049 run scoreboard players set ticks bossbar 1

    execute if score chase scenes matches 1049 run kill @e[type=marker,tag=pov_camera]

   execute if score chase scenes matches 1000..1049 run tp @a @e[type=marker,tag=pov_camera,limit=1]
   execute if score chase scenes matches 1000..1049 run scoreboard players add chase scenes 1
