kill @e[tag=End]
kill @e[tag=Crep]

#OldWin
execute if score win winmap matches 0 run tp @a[team=Enderman] 129 7 -102
execute if score win winmap matches 0 run tp @a[team=Creeper] 129 6 -75
execute if score win winmap matches 0 run tp @a[team=!Enderman,team=!Creeper] 130.00 22.00 -89.50

#NewWin
execute if score win winmap matches 1 run tp @a[team=Enderman] 129 6 460
execute if score win winmap matches 1 run tp @a[team=Creeper] 129 6 422
execute if score win winmap matches 1 run tp @a[team=!Enderman,team=!Creeper] 129 21 436

gamemode adventure @a[team=!Enderman,team=!Creeper]
gamemode survival @a[team=Enderman]
gamemode adventure @a[team=Creeper]
scoreboard players set win win 1

#Game off
scoreboard players set game settings 0
clear @a
effect clear @a
effect give @a resistance 1000000 100 true

tag @a[team=Creeper] add loser
scoreboard objectives setdisplay sidebar


fill 126 86 167 126 86 167 minecraft:warped_button[facing=east]
fill 126 86 168 126 86 168 minecraft:crimson_button[facing=east]

execute if score win winmap matches 1 run summon firework_rocket 109 20 453 {LifeTime:6,FireworksItem:{id:firework_rocket,Count:1,tag:{Fireworks:{Flight:6,Explosions:[{Type:1,Trail:1b,Colors:[I;8073150,1973019]}]}}}}
execute if score win winmap matches 1 run summon firework_rocket 149 20 453 {LifeTime:6,FireworksItem:{id:firework_rocket,Count:1,tag:{Fireworks:{Flight:6,Explosions:[{Type:1,Trail:1b,Colors:[I;8073150,1973019]}]}}}}

execute if score win winmap matches 0 run summon firework_rocket 144 20 -90 {LifeTime:6,FireworksItem:{id:firework_rocket,Count:1,tag:{Fireworks:{Flight:6,Explosions:[{Type:1,Trail:1b,Colors:[I;8073150,1973019]}]}}}}
execute if score win winmap matches 0 run summon firework_rocket 115 20 -90 {LifeTime:6,FireworksItem:{id:firework_rocket,Count:1,tag:{Fireworks:{Flight:6,Explosions:[{Type:1,Trail:1b,Colors:[I;8073150,1973019]}]}}}}

give @a[tag=!loser] firework_rocket{Fireworks:{Flight:2,Explosions:[{Type:1,Trail:1b,Colors:[I;8073150,1973019]}]},display:{Name:'[{"text":"Zapp...","italic":true,"color":"dark_purple","bold":true}]'},Enchantments:[{id:knockback,lvl:1}],HideFlags:1} 576