#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#


#Score blue
scoreboard players set §1§a score_blue 10
scoreboard players set §1§9 score_blue 9
scoreboard players set §1§8 score_blue 8
scoreboard players set §1§7 score_blue 7
scoreboard players set §1§6 score_blue 6
scoreboard players set §1§5 score_blue 5
scoreboard players set §1§4 score_blue 4
scoreboard players set §1§3 score_blue 3
scoreboard players set §1§2 score_blue 2
scoreboard players set §1§1 score_blue 1
scoreboard players set §1§0 score_blue 0

team join teamname17 §1§a
team leave §1§9
team join teamname §1§8
team leave §1§7
team join teamname19 §1§6
team join teamname3 §1§5
team join teamname4 §1§4
team join teamname5 §1§3
team join teamname6 §1§2
team leave §1§1
team join teamname20 §1§0

#Score red
scoreboard players set §1§a score_red 10
scoreboard players set §1§9 score_red 9
scoreboard players set §2§8 score_red 8
scoreboard players set §1§7 score_red 7
scoreboard players set §1§6 score_red 6
scoreboard players set §2§5 score_red 5
scoreboard players set §2§4 score_red 4
scoreboard players set §1§3 score_red 3
scoreboard players set §1§2 score_red 2
scoreboard players set §1§1 score_red 1
scoreboard players set §1§0 score_red 0

team join teamname9 §2§8
team join teamname10 §2§5
team join teamname11 §2§4

#Score green
scoreboard players set §1§a score_green 10
scoreboard players set §1§9 score_green 9
scoreboard players set §3§8 score_green 8
scoreboard players set §1§7 score_green 7
scoreboard players set §1§6 score_green 6
scoreboard players set §2§5 score_green 5
scoreboard players set §1§4 score_green 4
scoreboard players set §3§3 score_green 3
scoreboard players set §1§2 score_green 2
scoreboard players set §1§1 score_green 1
scoreboard players set §1§0 score_green 0

team join teamname12 §3§8
team join teamname13 §3§3

#Score yellow
scoreboard players set §1§a score_yellow 10
scoreboard players set §1§9 score_yellow 9
scoreboard players set §4§8 score_yellow 8
scoreboard players set §1§7 score_yellow 7
scoreboard players set §1§6 score_yellow 6
scoreboard players set §2§5 score_yellow 5
scoreboard players set §1§4 score_yellow 4
scoreboard players set §1§3 score_yellow 3
scoreboard players set §4§2 score_yellow 2
scoreboard players set §1§1 score_yellow 1
scoreboard players set §1§0 score_yellow 0

team join teamname14 §4§8
team join teamname15 §4§2

#Score spec
scoreboard players set §1§a score_spec 8
scoreboard players set §1§9 score_spec 7
scoreboard players set §1§6 score_spec 6
scoreboard players set §2§5 score_spec 5
scoreboard players set §1§4 score_spec 4
scoreboard players set §1§3 score_spec 3
scoreboard players set §1§2 score_spec 2
scoreboard players set §1§1 score_spec 1
scoreboard players set §1§0 score_spec 0

scoreboard players set timer time 1000000

#Settings
execute if score option_kills pumpkins matches -2 run team modify teamname20 suffix ["",{"text":" 5 ","bold":true,"color":"white"},{"translate":"score.target.kill","color":"gray"}]
execute if score option_kills pumpkins matches -1 run team modify teamname20 suffix ["",{"text":" 10 ","bold":true,"color":"white"},{"translate":"score.target.kill","color":"gray"}]
execute if score option_kills pumpkins matches 0 run team modify teamname20 suffix ["",{"text":" 25 ","bold":true,"color":"white"},{"translate":"score.target.kill","color":"gray"}]
execute if score option_kills pumpkins matches 1 run team modify teamname20 suffix ["",{"text":" 50 ","bold":true,"color":"white"},{"translate":"score.target.kill","color":"gray"}]
execute if score option_kills pumpkins matches 2 run team modify teamname20 suffix ["",{"text":" 100 ","bold":true,"color":"white"},{"translate":"score.target.kill","color":"gray"}]
execute if score option_kills pumpkins matches -2 run scoreboard players set option_kills kills 5
execute if score option_kills pumpkins matches -1 run scoreboard players set option_kills kills 10
execute if score option_kills pumpkins matches 0 run scoreboard players set option_kills kills 25
execute if score option_kills pumpkins matches 1 run scoreboard players set option_kills kills 50
execute if score option_kills pumpkins matches 2 run scoreboard players set option_kills kills 100

#Powerup
schedule function f:game/powerup/summon 30t append

#Disable alarm
function f:game/start/disable_alarm