execute if score intro cutscenes matches 0..80 run scoreboard players add intro cutscenes 1
execute if score intro cutscenes matches 119..180 run scoreboard players add intro cutscenes 1
execute if score intro cutscenes matches 200..1225 run scoreboard players add intro cutscenes 1


execute if score intro cutscenes matches 2 run function tsm:reset_game
execute if score intro cutscenes matches 2 run scoreboard players set arm map 1

execute if score intro cutscenes matches 0..160 run tp @a -5 -21 35 0 0
execute if score intro cutscenes matches 80 run title @a times 20 999999 0
execute if score intro cutscenes matches 80 run scoreboard players set lobby map 0
execute if score intro cutscenes matches 80 run title @a title "\uE002"
execute if score intro cutscenes matches 80 run kill @e[name=car]

execute if score intro cutscenes matches 80..95 as @e[tag=interaction_play1] at @s if data entity @s interaction run scoreboard players set intro cutscenes 119

execute if score intro cutscenes matches 120 run title @a times 20 40 20
execute if score intro cutscenes matches 120 run scoreboard players set gamemode map 1
execute if score intro cutscenes matches 120 run scoreboard players set camera_movement map 1
execute if score intro cutscenes matches 120 run title @a title "\uE001"
execute if score intro cutscenes matches 140 run effect clear @p night_vision

execute if score intro cutscenes matches 160..180 run tp @a -27 -33.5 -227 -90 4.5
execute if score intro cutscenes matches 120 run scoreboard players set arm map 1
execute if score intro cutscenes matches 170 run scoreboard players set arm map 2
execute if score intro cutscenes matches 170 run scoreboard players set street map 1
execute if score intro cutscenes matches 180 run playsound minecraft:background3 master @a ~ ~ ~ 99999999

execute if score intro cutscenes matches 180..190 as @a[x=-9,y=-34,z=-227,distance=..2] at @s run scoreboard players set intro cutscenes 200
execute if score intro cutscenes matches 201 as @p at @s run summon armor_stand ~ ~ ~ {Silent:1b,Invulnerable:1b,Marker:1b,Invisible:1b,NoBasePlate:1b,PersistenceRequired:1b,Tags:["camera"],DisabledSlots:4144959}

execute if score intro cutscenes matches 201..1225 as @e[tag=camera] at @s run teleport @a ~ ~ ~
execute if score intro cutscenes matches 1225 run kill @e[tag=camera]
execute if score intro cutscenes matches 201 run scoreboard players set arm map 0
execute if score intro cutscenes matches 201 run playsound phone_calling master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 221 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:10,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 226 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:1,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 240 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:11,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 245 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:12,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 270 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:13,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 275 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:14,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 280 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:15,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 285 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:1,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}

execute if score intro cutscenes matches 285 run stopsound @a master phone_calling

execute if score intro cutscenes matches 300 run playsound phone1 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 300..310 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"Hey Mark."}]

execute if score intro cutscenes matches 325 run playsound phone2 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 325..350 run title @a actionbar ["",{"text":"Mark: ","bold":true,"color":"gray"},{"text":"Hey, Josh. So, are you going to the pub today? "}]

execute if score intro cutscenes matches 400 run playsound phone3 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 400..470 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"No, I'm tired. Work really drained me today."}]
execute if score intro cutscenes matches 470..550 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"I'm just going to buy some food and head home. My car is still not fixed."}]
execute if score intro cutscenes matches 550..570 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"At least I'll take a short walk. "}]

execute if score intro cutscenes matches 600 run playsound phone4 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 600..640 run title @a actionbar ["",{"text":"Mark: ","bold":true,"color":"gray"},{"text":"Well, I'd be careful walking, if I were you. "}]

execute if score intro cutscenes matches 650 run playsound phone5 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 650..660 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"Why?"}]

execute if score intro cutscenes matches 680 run playsound phone6 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 680..720 run title @a actionbar ["",{"text":"Mark: ","bold":true,"color":"gray"},{"text":"Haven't you read about what happened last week?"}]

execute if score intro cutscenes matches 750 run playsound phone7 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 750..780 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"I don't read newspapers."}]

execute if score intro cutscenes matches 830 run playsound phone8 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 830..925 run title @a actionbar ["",{"text":"Mark: ","bold":true,"color":"gray"},{"text":"Last week in this city, some guy being chased by the man who smiles and stares above,"}]
execute if score intro cutscenes matches 926..945 run title @a actionbar ["",{"text":"Mark: ","bold":true,"color":"gray"},{"text":"and wanted to attack him."}]
execute if score intro cutscenes matches 950..960 run title @a actionbar ["",{"text":"Mark: ","bold":true,"color":"gray"},{"text":"They still haven't found that crazy guy. "}]

execute if score intro cutscenes matches 1010 run playsound phone9 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 1010..1040 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"Well, I think he was just drunk."}]
execute if score intro cutscenes matches 1050..1090 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"Oh well, I'm just going to buy some food. "}]

execute if score intro cutscenes matches 1130 run playsound phone10 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 1130..1150 run title @a actionbar ["",{"text":"Mark: ","bold":true,"color":"gray"},{"text":"Alright, see you tomorrow. "}]

execute if score intro cutscenes matches 1160 run playsound phone11 master @a ~ ~ ~ 99999999
execute if score intro cutscenes matches 1160..1170 run title @a actionbar ["",{"text":"Josh: ","bold":true},{"text":"Bye."}]


execute if score intro cutscenes matches 1185 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:16,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 1190 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:17,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}

execute if score intro cutscenes matches 1195 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:18,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}

execute if score intro cutscenes matches 1200 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:1,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 1220 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:10,AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1203807664,-558677241,-1402295879,-300386117]}]}
execute if score intro cutscenes matches 1225 run item replace entity @a weapon.mainhand with charcoal{display:{Name:'{"text":""}'},CustomModelData:2}

execute if score intro cutscenes matches 1225 run scoreboard players set arm map 2
