title @s[scores={respawn=60}] subtitle ["",{"translate":"respawn.respawning","color":"red","bold":true}]
title @s[scores={respawn=60}] title ["",{"text":"3","color":"red"}]
title @s[scores={respawn=40}] title ["",{"text":"2","color":"gold"}]
title @s[scores={respawn=20}] title ["",{"text":"1","color":"green"}]
title @s[scores={respawn=5}] title ["",{"translate":"respawn.respawned","color":"green"}]
execute as @s[scores={respawn=60}] at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 2
execute as @s[scores={respawn=40}] at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 2
execute as @s[scores={respawn=20}] at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 2
execute as @s[scores={respawn=0}] at @s run playsound minecraft:entity.evoker.prepare_summon master @s ~ ~ ~ 10 1.6
execute as @s[scores={respawn=0}] run function mctsts:game/respawn
scoreboard players remove @s respawn 1