#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#tp player
execute if entity @e[tag=spawnpoint1,tag=selected_spawnpoin] run tp @s 10 149 114 0 0
execute if entity @e[tag=spawnpoint2,tag=selected_spawnpoin] run tp @s -13 148 85 0 0
execute if entity @e[tag=spawnpoint3,tag=selected_spawnpoin] run tp @s 5 149 63 0 0
execute if entity @e[tag=spawnpoint4,tag=selected_spawnpoin] run tp @s 28 148 136 0 0
execute if entity @e[tag=spawnpoint5,tag=selected_spawnpoin] run tp @s 29 141 81 0 0
execute if entity @e[tag=spawnpoint6,tag=selected_spawnpoin] run tp @s 21 150 30 0 0
execute if entity @e[tag=spawnpoint7,tag=selected_spawnpoin] run tp @s 57 148 119 0 0
execute if entity @e[tag=spawnpoint8,tag=selected_spawnpoin] run tp @s 58 149 76 0 0
execute if entity @e[tag=spawnpoint9,tag=selected_spawnpoin] run tp @s 48 149 56 0 0

#effect
execute unless score $game_type main matches 2 run playsound minecraft:item.chorus_fruit.teleport master @s ~ ~ ~ 300
scoreboard players set @s kill-timer 0
effect clear @s
effect give @s minecraft:blindness 1 1 true
effect give @s minecraft:nausea 4 1 true

tag @s remove jump