#built using mc-build (https://mcbuild.dev/)

execute if entity @a[tag=inround] run clear @a[tag=inround]
execute if entity @a[tag=inround] run title @a[tag=inround] times 0 80 5
execute if entity @a[tag=inround] run title @a[tag=inround] title {"text":"You Failed!","color":"red"}
execute if entity @a[tag=inround] run playsound minecraft:entity.generic.explode master @a 11 6 14 10 1
execute if entity @a[tag=inround] run playsound minecraft:entity.generic.explode master @a 8 6 14 10 1
execute if entity @a[tag=inround] run playsound minecraft:entity.generic.explode master @a 4 6 14 10 1
execute if entity @a[tag=inround] run particle minecraft:explosion 8 6 14 10 6 7 0.01 750 normal
execute if entity @a[tag=inround] if score $map mapselect matches 1 run fill 3 6 17 13 11 11 air
execute if score $map mapselect matches 2 run setblock 8 0 8 minecraft:structure_block
execute if score $map mapselect matches 2 run data modify block 8 0 8 mode set value "LOAD"
execute if score $map mapselect matches 2 run data modify block 8 0 8 name set value "minecraft:duo"
execute if score $map mapselect matches 2 run data modify block 8 0 8 posX set value -14
execute if score $map mapselect matches 2 run data modify block 8 0 8 posY set value 3
execute if score $map mapselect matches 2 run data modify block 8 0 8 posZ set value -10
setblock 9 0 8 minecraft:redstone_block
setblock 9 0 8 minecraft:stone
execute if entity @a[tag=inround] run team join ingame @a[tag=inround]
tag @a[tag=inround] remove DoubleJumper
execute if entity @a[tag=inround] run tp @a[tag=inround] -15.5 6.00 8.5 270 2
execute if score $map mapselect matches 2 run scoreboard players set @a[scores={id=1}] id 0
execute if score $map mapselect matches 2 run scoreboard players set @a[scores={id=2}] id 0
execute if score $map mapselect matches 2 run scoreboard players set @a[scores={id=3}] id 0
execute if entity @a[tag=inround] run tag @a[tag=inround] remove sep
execute if entity @a[tag=inround] run tag @a[tag=inround] remove inround
bossbar set minecraft:time visible false
bossbar set time name [{"text":" "}]
execute store result score max id if entity @a[tag=ready]
execute if score order id = max id run scoreboard players set order id 0
scoreboard players add order id 1
scoreboard players set #execute LANG_MC_INTERNAL 0
execute if score $map mapselect matches 1 as @a[team=ingame] if score @s id = order id run function main:fail/__generated__/conditional/0
execute if score #execute LANG_MC_INTERNAL matches 0 run function main:fail/__generated__/conditional/1
execute if score $map mapselect matches 2 run function main:duoportalstart