scoreboard players add @a[team=Ingame] Wins 1
scoreboard players add @a[team=Ingame] Coins 15
scoreboard players add @a[team=Spectators,scores={MidJoin=0}] Coins 5
advancement grant @a[team=Ingame,tag=archer] only ultimate_spleef:marksman
advancement grant @a[team=Ingame,tag=gymnast] only ultimate_spleef:like_a_cat
advancement grant @a[team=Ingame,tag=pacifist] only ultimate_spleef:meditation_noises
advancement grant @a[team=Ingame,tag=spy] only ultimate_spleef:meet_the_spy
advancement grant @a[team=Ingame,tag=brute] only ultimate_spleef:raaahhrg
advancement grant @a[team=Ingame,tag=crazed_fisherman] only ultimate_spleef:a_good_haul
scoreboard players set Detection LastManStanding 0
scoreboard players set Yes started 0
execute as @e[type=marker] at @s if score Yes started matches 0 run fill ~-16 ~-16 ~-16 ~15 ~15 ~15 air replace emerald_block
execute as @a[team=Ingame] at @s run title @a title [{"selector":"@s","bold": true,"color": "dark_green"}]
title @a subtitle {"text": "has won!","bold": true,"color": "dark_green"}
team join lobby @a
gamemode adventure @a
tp @a 9.0 41 6.0
clear @a
execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 1 1
scoreboard players set @a[scores={MidJoin=1}] Midjoin 0
scoreboard players set Yes LobbyTime 1
scoreboard players set @a FishingRod 0
scoreboard players set @a CarrotSticky 0
tag @a remove used
tag @a remove waiting
scoreboard players set @a Ability_Cooldown 0
scoreboard players set @a MidJoin 0
effect clear @a
experience set @a 0 levels
schedule clear usdp:10
schedule clear usdp:9
schedule clear usdp:8
schedule clear usdp:7
schedule clear usdp:6
schedule clear usdp:5
schedule clear usdp:4
schedule clear usdp:3
schedule clear usdp:2
schedule clear usdp:1
schedule clear usdp:go

setblock 0 25 -10 minecraft:redstone_block
setblock -13 33 -7 minecraft:redstone_block
setblock -9 33 -11 minecraft:redstone_block
setblock -7 33 -11 minecraft:redstone_block
setblock -4 33 -8 minecraft:redstone_block
setblock -6 33 -4 minecraft:redstone_block