#Project created by the koncept
scoreboard objectives remove bingo.count.object

$tellraw @a[tag=bingo.game.player,tag=96969] [{"translate":"bingo.collected.the.item_chat_$(x)","color":"$(x)"},{"translate":"bingo.win_team_chat","color":"#ffcc64"},{"text":" "},{"selector":"@a[team=$(x).bingo]"}]

execute if score m bingo.timer.game matches 0 if score h bingo.timer.game matches 0 run tellraw @a[tag=bingo.game.player,tag=96969] [{"translate":"bingo.timer","color":"#ffcc64"},{"text":"s:","color":"#FFE254"},{"score":{"name":"s","objective":"bingo.timer.game"},"color":"#FFE254"}]

execute if score m bingo.timer.game matches 1.. if score h bingo.timer.game matches 0 run tellraw @a[tag=bingo.game.player,tag=96969] [{"translate":"bingo.timer","color":"#ffcc64"},{"text":"m","color":"#FFE254"},{"score":{"name":"m","objective":"bingo.timer.game"},"color":"#FFE254"},{"text":" ","color":"#FFE254"},{"text":"s","color":"#FFE254"},{"score":{"name":"s","objective":"bingo.timer.game"},"color":"#FFE254"}]

execute if score h bingo.timer.game matches 1.. run tellraw @a[tag=bingo.game.player,tag=96969] [{"translate":"bingo.timer","color":"#ffcc64"},{"text":"h","color":"#FFE254"},{"score":{"name":"h","objective":"bingo.timer.game"},"color":"#FFE254"},{"text":" ","color":"#FFE254"},{"text":"m","color":"#FFE254"},{"score":{"name":"m","objective":"bingo.timer.game"},"color":"#FFE254"},{"text":" ","color":"#FFE254"},{"text":"s","color":"#FFE254"},{"score":{"name":"s","objective":"bingo.timer.game"},"color":"#FFE254"}]

function koncept.bingo:bingo/timer/reset

tag @a[tag=bingo.game.player] remove bingo.game.visibility

tag @a[tag=96969] remove 96969

team leave @a[tag=bingo.game.player]
$team join $(x).bingo @a[tag=bingo.game.player]

execute as @a[tag=bingo.game.player] at @s run function koncept.bingo:bingo/bossbar/start
execute as @a[tag=bingo.game.player] at @s run function koncept.bingo:bingo/bossbar/visible_false/start1

function koncept.bingo:bingo/win/restart