scoreboard players reset @s die
gamemode spectator @s
execute in minecraft:overworld run tp @s 1022.83 20.69 1023.66 91.10 90.00


#If spectator stops
    execute if entity @s[tag=spectating] run return fail

#If ending
    execute if score gameStatus gameInfoValues matches 3 run return run function subchronos:game/end/die

#If player, animation
    tag @s add spectating
    team join spectator @s

    title @s times 5 60 40
    title @s title {text:"☠","color":"#b4b4b4","shadow_color":-16777215}
    title @s subtitle {"fallback":"Yᴏᴜ ᴅɪᴇᴅ!",translate:"subchronos.game.die","color":"#797979","shadow_color":-16777215}

    execute at @s run playsound minecraft:entity.sniffer.death ambient @s ~ ~ ~ 0.7 2
    execute at @s run playsound minecraft:entity.skeleton.converted_to_stray master @s ~ ~ ~ 0.7 2