
execute if score intro1 scenes matches 1 run scoreboard players set gamemode map 1
execute if score intro1 scenes matches 1 run scoreboard players set time map 1
execute if score intro1 scenes matches 1 run scoreboard players set ambient map 4
execute if score intro1 scenes matches 1 run summon marker 261.510 73.2 14.37 {OnGround:1b,NoGravity:1b,Silent:1b,Invulnerable:1b,Rotation:[-90F,-45F],Tags:["pov_camera"]}
execute if score intro1 scenes matches 1 run tp @e[type=interaction,tag=door_blocked1] 265 74 13
execute if score intro1 scenes matches 1 run summon interaction 264.9 75.25 12.5 {NoGravity:1b,Silent:1b,width:0.5f,height:0.5f,response:0b,Tags:["light_switch_blocked"]}
execute if score intro1 scenes matches 20 run scoreboard players set phone_wakey map 1
execute if score intro1 scenes matches 20 run data merge entity @e[type=item_display,limit=1,tag=phone_wakey] {item:{id:"minecraft:coal",Count:1b,tag:{CustomModelData:91}}}
execute if score intro1 scenes matches 100 run title @a title "\uE001"
execute if score intro1 scenes matches 100 run title @a times 0 0 20

execute if score intro1 scenes matches 160..220 as @e[tag=pov_camera] at @s run tp @s ~ ~ ~ ~-1.3 ~0.78

execute if score intro1 scenes matches 300 run title @a title "\uE001"
execute if score intro1 scenes matches 300 run title @a times 20 60 20
execute if score intro1 scenes matches 370 run function slender:scripts/interactions/light_switch/bedroom_on

execute if score intro1 scenes matches 350 run scoreboard players set phone_wakey map 0
execute if score intro1 scenes matches 350 run stopsound @a master phone_vibration
execute if score intro1 scenes matches 350 as @p at @s run playsound phone_switch master @a ~ ~ ~ 1 1
execute if score intro1 scenes matches 350 run data merge entity @e[type=item_display,limit=1,tag=phone_wakey] {item:{id:"minecraft:air",Count:1b}}
execute if score intro1 scenes matches 350 run kill @e[tag=pov_camera]
execute if score intro1 scenes matches 350 run tp @e[type=interaction,tag=door_blocked1] 265 74 13

execute if score intro1 scenes matches 350..370 run tp @p 263.59 74 14.24 -170 10


# Wearing the suit

execute if score intro1 scenes matches 500 run summon marker 264.125 74 12.468 {OnGround:1b,NoGravity:1b,Silent:1b,Invulnerable:1b,Rotation:[46F,15F],Tags:["pov_camera"]}
execute if score intro1 scenes matches 500 run tp @e[type=interaction,tag=door_blocked1] 265 100 13
execute if score intro1 scenes matches 500 run title @a title "\uE001"
execute if score intro1 scenes matches 500 run title @a times 20 9999999 0
execute if score intro1 scenes matches 550 run playsound wear_suit master @a ~ ~ ~ 999999999999999999
execute if score intro1 scenes matches 530 run summon marker 264.125 74 12.468 {OnGround:1b,NoGravity:1b,Silent:1b,Invulnerable:1b,Rotation:[46F,15F],Tags:["pov_camera"]}
execute if score intro1 scenes matches 530 as @p at @s run playsound minecraft:block.chest.open master @a ~ ~ ~ 1 0.25

execute if score intro1 scenes matches 620 run title @a title "\uE001"
execute if score intro1 scenes matches 620 run title @a times 0 0 20
execute if score intro1 scenes matches 620 run scoreboard players set equipment map 0

execute if score intro1 scenes matches 650 run playsound cloth master @a ~ ~ ~ 99999999 1
execute if score intro1 scenes matches 620..640 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:120,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 640..650 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:121,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 650..655 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:122,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 655..660 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:123,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 660..665 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:124,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 670..700 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:125,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}

execute if score intro1 scenes matches 660 run title @a title "\uE001"
execute if score intro1 scenes matches 660 run title @a times 20 999555 0

# Washing hands

execute if score intro1 scenes matches 720 run function slender:scripts/interactions/light_switch/bathroom_on
execute if score intro1 scenes matches 720 run kill @e[tag=light_switch_blocked]
execute if score intro1 scenes matches 720 run scoreboard players set light_switch map 2
execute if score intro1 scenes matches 720 run playsound minecraft:water_sink master @a 271 74 11 1 1
execute if score intro1 scenes matches 800 run title @a title "\uE001"
execute if score intro1 scenes matches 800 run title @a times 0 0 20
execute if score intro1 scenes matches 700 as @e[tag=pov_camera] at @s run tp @s 272.0 74 11.925 179 28

execute if score intro1 scenes matches 750 run clone 265 85 13 269 84 13 265 74 13 filtered minecraft:mangrove_door


execute if score intro1 scenes matches 845..885 as @e[tag=pov_camera] at @s run tp @s ~ ~ ~ ~-3.2 ~-0.5

execute if score intro1 scenes matches 800..810 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:130,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 810..820 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:131,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 820..830 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:130,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 830..840 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:131,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 840..850 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:130,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}

execute if score intro1 scenes matches 850..855 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:132,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1090025130,1358908139,-1534670053,665698212]}]}
execute if score intro1 scenes matches 855..900 run item replace entity @p weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:10}

execute if score intro1 scenes matches 860 run title @a title "\uE001"
execute if score intro1 scenes matches 860 run title @a times 20 20 20

execute if score intro1 scenes matches 900 run scoreboard players set equipment map 2
execute if score intro1 scenes matches 900 run kill @e[tag=pov_camera]
execute if score intro1 scenes matches 900 run scoreboard players set objectives bossbar 6
execute if score intro1 scenes matches 900 run scoreboard players set ticks bossbar 1

execute if score intro1 scenes matches 620..900 run item replace entity @p weapon.offhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:10}

execute if score intro1 scenes matches 0..350 run tp @p @e[tag=pov_camera,limit=1]
execute if score intro1 scenes matches 520..900 run tp @p @e[tag=pov_camera,limit=1]

execute if score intro1 scenes matches 1..370 run scoreboard players add intro1 scenes 1
execute if score intro1 scenes matches 500..900 run scoreboard players add intro1 scenes 1