title @s title {"text": "NG+"}
title @s[predicate=!survivalplus:sneaking] subtitle {"text": "Crouch to confirm"}
title @s[predicate=survivalplus:sneaking] subtitle {"text": "Stay crouched to confirm","color": "green"}
#title @s actionbar {"text": "You'll only be able to keep your Hotbar, Off-Hand, and your Ender chest!"}
title @s actionbar {"text": "Shulkers are prohibited!"}
title @s times 0 .5s 2t
execute at @s[predicate=survivalplus:sneaking] run particle minecraft:instant_effect ~ ~ ~ .1 0 .1 0 5
execute if entity @s[predicate=survivalplus:sneaking] run scoreboard players add @s timer 1
execute if score @s timer matches 20 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 1 .8
execute if score @s timer matches 40 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 1 1
execute if score @s timer matches 60 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 1 1.2

execute if score @s timer matches 21..40 run title @s actionbar {"text": "3"}
execute if score @s timer matches 41..60 run title @s actionbar {"text": "2"}
execute if score @s timer matches 61..80 run title @s actionbar {"text": "1"}
execute if score @s timer matches 81..100 run title @s actionbar {"text": "Good Luck!"}
execute if score @s timer matches 80 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 1 .8
execute if score @s timer matches 80 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 1 1
execute if score @s timer matches 80 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 1 1.2
execute if score @s timer matches 100 run function survivalplus:tools/newgame/intoportal
execute if score @s timer matches 100 run scoreboard players reset @s timer
execute as @s[predicate=!survivalplus:sneaking] run scoreboard players reset @s timer