#Project created by the koncept

execute store result storage bingo.macro space int 1 run scoreboard players get @s bingo.space

execute store result storage bingo.macro number_id_player int 1 run scoreboard players get @s bingo.number.id.player

execute as @s[tag=bingo.actionbar.bottom] at @s run data modify storage minecraft:bingo.macro top_or_bottom set value bottom
execute as @s[tag=bingo.actionbar.top] at @s run data modify storage minecraft:bingo.macro top_or_bottom set value top

execute as @s[tag=bingo.actionbar.bottom,scores={bottom.gui.Scale=1}] at @s run data modify storage minecraft:bingo.macro height set value "height_1/"
execute as @s[tag=bingo.actionbar.bottom,scores={bottom.gui.Scale=2}] at @s run data modify storage minecraft:bingo.macro height set value "height_2/"
execute as @s[tag=bingo.actionbar.bottom,scores={bottom.gui.Scale=3}] at @s run data modify storage minecraft:bingo.macro height set value "height_3/"
execute as @s[tag=bingo.actionbar.bottom,scores={bottom.gui.Scale=4}] at @s run data modify storage minecraft:bingo.macro height set value "height_4/"
execute as @s[tag=bingo.actionbar.bottom,scores={bottom.gui.Scale=5}] at @s run data modify storage minecraft:bingo.macro height set value "height_5/"
execute as @s[tag=bingo.actionbar.bottom,scores={bottom.gui.Scale=6}] at @s run data modify storage minecraft:bingo.macro height set value "height_6/"
execute as @s[tag=bingo.actionbar.top] at @s run data modify storage minecraft:bingo.macro height set value ""

execute as @s[team=gold.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/gold with storage minecraft:bingo.macro
execute as @s[team=green.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/green with storage minecraft:bingo.macro
execute as @s[team=aqua.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/aqua with storage minecraft:bingo.macro
execute as @s[team=blue.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/blue with storage minecraft:bingo.macro
execute as @s[team=dark_red.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/dark_red with storage minecraft:bingo.macro
execute as @s[team=light_purple.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/light_purple with storage minecraft:bingo.macro
execute as @s[team=red.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/red with storage minecraft:bingo.macro
execute as @s[team=white.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/white with storage minecraft:bingo.macro
execute as @s[team=yellow.bingo] at @s run function koncept.bingo:bingo/bossbar/file_selection/yellow with storage minecraft:bingo.macro