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

execute if score timer time matches 99 run team modify teamname7 suffix {"text":" 1:39","bold":true,"color":"white"}
execute if score timer time matches 98 run team modify teamname7 suffix {"text":" 1:38","bold":true,"color":"white"}
execute if score timer time matches 97 run team modify teamname7 suffix {"text":" 1:37","bold":true,"color":"white"}
execute if score timer time matches 96 run team modify teamname7 suffix {"text":" 1:36","bold":true,"color":"white"}
execute if score timer time matches 95 run team modify teamname7 suffix {"text":" 1:35","bold":true,"color":"white"}
execute if score timer time matches 94 run team modify teamname7 suffix {"text":" 1:34","bold":true,"color":"white"}
execute if score timer time matches 93 run team modify teamname7 suffix {"text":" 1:33","bold":true,"color":"white"}
execute if score timer time matches 92 run team modify teamname7 suffix {"text":" 1:32","bold":true,"color":"white"}
execute if score timer time matches 91 run team modify teamname7 suffix {"text":" 1:31","bold":true,"color":"white"}
execute if score timer time matches 90 run team modify teamname7 suffix {"text":" 1:30","bold":true,"color":"white"}

execute if score timer time matches 89 run team modify teamname7 suffix {"text":" 1:29","bold":true,"color":"white"}
execute if score timer time matches 88 run team modify teamname7 suffix {"text":" 1:28","bold":true,"color":"white"}
execute if score timer time matches 87 run team modify teamname7 suffix {"text":" 1:27","bold":true,"color":"white"}
execute if score timer time matches 86 run team modify teamname7 suffix {"text":" 1:26","bold":true,"color":"white"}
execute if score timer time matches 85 run team modify teamname7 suffix {"text":" 1:25","bold":true,"color":"white"}
execute if score timer time matches 84 run team modify teamname7 suffix {"text":" 1:24","bold":true,"color":"white"}
execute if score timer time matches 83 run team modify teamname7 suffix {"text":" 1:23","bold":true,"color":"white"}
execute if score timer time matches 82 run team modify teamname7 suffix {"text":" 1:22","bold":true,"color":"white"}
execute if score timer time matches 81 run team modify teamname7 suffix {"text":" 1:21","bold":true,"color":"white"}
execute if score timer time matches 80 run team modify teamname7 suffix {"text":" 1:20","bold":true,"color":"white"}

execute if score timer time matches 79 run team modify teamname7 suffix {"text":" 1:19","bold":true,"color":"white"}
execute if score timer time matches 78 run team modify teamname7 suffix {"text":" 1:18","bold":true,"color":"white"}
execute if score timer time matches 77 run team modify teamname7 suffix {"text":" 1:17","bold":true,"color":"white"}
execute if score timer time matches 76 run team modify teamname7 suffix {"text":" 1:16","bold":true,"color":"white"}
execute if score timer time matches 75 run team modify teamname7 suffix {"text":" 1:15","bold":true,"color":"white"}
execute if score timer time matches 74 run team modify teamname7 suffix {"text":" 1:14","bold":true,"color":"white"}
execute if score timer time matches 73 run team modify teamname7 suffix {"text":" 1:13","bold":true,"color":"white"}
execute if score timer time matches 72 run team modify teamname7 suffix {"text":" 1:12","bold":true,"color":"white"}
execute if score timer time matches 71 run team modify teamname7 suffix {"text":" 1:11","bold":true,"color":"white"}
execute if score timer time matches 70 run team modify teamname7 suffix {"text":" 1:10","bold":true,"color":"white"}

execute if score timer time matches 69 run team modify teamname7 suffix {"text":" 1:09","bold":true,"color":"white"}
execute if score timer time matches 68 run team modify teamname7 suffix {"text":" 1:08","bold":true,"color":"white"}
execute if score timer time matches 67 run team modify teamname7 suffix {"text":" 1:07","bold":true,"color":"white"}
execute if score timer time matches 66 run team modify teamname7 suffix {"text":" 1:06","bold":true,"color":"white"}
execute if score timer time matches 65 run team modify teamname7 suffix {"text":" 1:05","bold":true,"color":"white"}
execute if score timer time matches 64 run team modify teamname7 suffix {"text":" 1:04","bold":true,"color":"white"}
execute if score timer time matches 63 run team modify teamname7 suffix {"text":" 1:03","bold":true,"color":"white"}
execute if score timer time matches 62 run team modify teamname7 suffix {"text":" 1:02","bold":true,"color":"white"}
execute if score timer time matches 61 run team modify teamname7 suffix {"text":" 1:01","bold":true,"color":"white"}
execute if score timer time matches 60 run team modify teamname7 suffix {"text":" 1:00","bold":true,"color":"white"}

execute if score timer time matches 60 as @a at @s run playsound minecraft:block.stone_button.click_on master @s ~ ~ ~ 1 0.3
execute if score timer time matches 60 run title @a title {"text":"1","color":"red","bold":true}
execute if score timer time matches 60 run title @a subtitle {"translate":"game.time.minute","color":"yellow"}

execute if score timer time matches 59 run team modify teamname7 suffix {"text":" 0:59","bold":true,"color":"white"}
execute if score timer time matches 58 run team modify teamname7 suffix {"text":" 0:58","bold":true,"color":"white"}
execute if score timer time matches 57 run team modify teamname7 suffix {"text":" 0:57","bold":true,"color":"white"}
execute if score timer time matches 56 run team modify teamname7 suffix {"text":" 0:56","bold":true,"color":"white"}
execute if score timer time matches 55 run team modify teamname7 suffix {"text":" 0:55","bold":true,"color":"white"}
execute if score timer time matches 54 run team modify teamname7 suffix {"text":" 0:54","bold":true,"color":"white"}
execute if score timer time matches 53 run team modify teamname7 suffix {"text":" 0:53","bold":true,"color":"white"}
execute if score timer time matches 52 run team modify teamname7 suffix {"text":" 0:52","bold":true,"color":"white"}
execute if score timer time matches 51 run team modify teamname7 suffix {"text":" 0:51","bold":true,"color":"white"}
execute if score timer time matches 50 run team modify teamname7 suffix {"text":" 0:50","bold":true,"color":"white"}

execute if score timer time matches 49 run team modify teamname7 suffix {"text":" 0:49","bold":true,"color":"white"}
execute if score timer time matches 48 run team modify teamname7 suffix {"text":" 0:48","bold":true,"color":"white"}
execute if score timer time matches 47 run team modify teamname7 suffix {"text":" 0:47","bold":true,"color":"white"}
execute if score timer time matches 46 run team modify teamname7 suffix {"text":" 0:46","bold":true,"color":"white"}
execute if score timer time matches 45 run team modify teamname7 suffix {"text":" 0:45","bold":true,"color":"white"}
execute if score timer time matches 45 as @a at @s run playsound minecraft:block.stone_button.click_on master @s ~ ~ ~ 1
execute if score timer time matches 45 run title @a title {"text":"45","color":"red","bold":true}
execute if score timer time matches 45 run title @a subtitle {"translate":"game.time.seconds","color":"yellow"}
execute if score timer time matches 44 run team modify teamname7 suffix {"text":" 0:44","bold":true,"color":"white"}
execute if score timer time matches 43 run team modify teamname7 suffix {"text":" 0:43","bold":true,"color":"white"}
execute if score timer time matches 42 run team modify teamname7 suffix {"text":" 0:42","bold":true,"color":"white"}
execute if score timer time matches 41 run team modify teamname7 suffix {"text":" 0:41","bold":true,"color":"white"}
execute if score timer time matches 40 run team modify teamname7 suffix {"text":" 0:40","bold":true,"color":"white"}

execute if score timer time matches 39 run team modify teamname7 suffix {"text":" 0:39","bold":true,"color":"white"}
execute if score timer time matches 38 run team modify teamname7 suffix {"text":" 0:38","bold":true,"color":"white"}
execute if score timer time matches 37 run team modify teamname7 suffix {"text":" 0:37","bold":true,"color":"white"}
execute if score timer time matches 36 run team modify teamname7 suffix {"text":" 0:36","bold":true,"color":"white"}
execute if score timer time matches 35 run team modify teamname7 suffix {"text":" 0:35","bold":true,"color":"white"}
execute if score timer time matches 34 run team modify teamname7 suffix {"text":" 0:34","bold":true,"color":"white"}
execute if score timer time matches 33 run team modify teamname7 suffix {"text":" 0:33","bold":true,"color":"white"}
execute if score timer time matches 32 run team modify teamname7 suffix {"text":" 0:32","bold":true,"color":"white"}
execute if score timer time matches 31 run team modify teamname7 suffix {"text":" 0:31","bold":true,"color":"white"}
execute if score timer time matches 30 run team modify teamname7 suffix {"text":" 0:30","bold":true,"color":"white"}
execute unless score timer click matches 1 if score timer time matches 30 as @a at @s run playsound minecraft:block.stone_button.click_on master @s ~ ~ ~ 1
execute unless score timer click matches 1 if score timer time matches 30 run title @a title {"text":"30","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 30 run title @a subtitle {"translate":"game.time.seconds","color":"yellow"}

execute if score timer time matches 29 run team modify teamname7 suffix {"text":" 0:29","bold":true,"color":"white"}
execute if score timer time matches 28 run team modify teamname7 suffix {"text":" 0:28","bold":true,"color":"white"}
execute if score timer time matches 27 run team modify teamname7 suffix {"text":" 0:27","bold":true,"color":"white"}
execute if score timer time matches 26 run team modify teamname7 suffix {"text":" 0:26","bold":true,"color":"white"}
execute if score timer time matches 25 run team modify teamname7 suffix {"text":" 0:25","bold":true,"color":"white"}
execute if score timer time matches 24 run team modify teamname7 suffix {"text":" 0:24","bold":true,"color":"white"}
execute if score timer time matches 23 run team modify teamname7 suffix {"text":" 0:23","bold":true,"color":"white"}
execute if score timer time matches 22 run team modify teamname7 suffix {"text":" 0:22","bold":true,"color":"white"}
execute if score timer time matches 21 run team modify teamname7 suffix {"text":" 0:21","bold":true,"color":"white"}
execute if score timer time matches 20 run team modify teamname7 suffix {"text":" 0:20","bold":true,"color":"white"}

execute unless score timer click matches 1 if score timer time matches 20 as @a at @s run playsound minecraft:block.stone_button.click_on master @s ~ ~ ~ 1
execute unless score timer click matches 1 if score timer time matches 20 run title @a title {"text":"20","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 20 run title @a subtitle {"translate":"game.time.seconds","color":"yellow"}

execute if score timer time matches 19 run team modify teamname7 suffix {"text":" 0:19","bold":true,"color":"white"}
execute if score timer time matches 18 run team modify teamname7 suffix {"text":" 0:18","bold":true,"color":"white"}
execute if score timer time matches 17 run team modify teamname7 suffix {"text":" 0:17","bold":true,"color":"white"}
execute if score timer time matches 16 run team modify teamname7 suffix {"text":" 0:16","bold":true,"color":"white"}
execute if score timer time matches 15 run team modify teamname7 suffix {"text":" 0:15","bold":true,"color":"white"}

execute unless score timer click matches 1 if score timer time matches 15 as @a at @s run playsound minecraft:block.stone_button.click_on master @s ~ ~ ~ 1
execute unless score timer click matches 1 if score timer time matches 15 run title @a title {"text":"15","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 15 run title @a subtitle {"translate":"game.time.seconds","color":"yellow"}

execute if score timer time matches 14 run team modify teamname7 suffix {"text":" 0:14","bold":true,"color":"white"}
execute if score timer time matches 13 run team modify teamname7 suffix {"text":" 0:13","bold":true,"color":"white"}
execute if score timer time matches 12 run team modify teamname7 suffix {"text":" 0:12","bold":true,"color":"white"}
execute if score timer time matches 11 run team modify teamname7 suffix {"text":" 0:11","bold":true,"color":"white"}
execute if score timer time matches 10 run team modify teamname7 suffix {"text":" 0:10","bold":true,"color":"gold"}

execute if score timer time matches 9 run team modify teamname7 suffix {"text":" 0:09","bold":true,"color":"gold"}
execute if score timer time matches 8 run team modify teamname7 suffix {"text":" 0:08","bold":true,"color":"gold"}
execute if score timer time matches 7 run team modify teamname7 suffix {"text":" 0:07","bold":true,"color":"gold"}
execute if score timer time matches 6 run team modify teamname7 suffix {"text":" 0:06","bold":true,"color":"gold"}
execute if score timer time matches 5 run team modify teamname7 suffix {"text":" 0:05","bold":true,"color":"gold"}
execute if score timer time matches 4 run team modify teamname7 suffix {"text":" 0:04","bold":true,"color":"gold"}
execute if score timer time matches 3 run team modify teamname7 suffix {"text":" 0:03","bold":true,"color":"red"}
execute if score timer time matches 2 run team modify teamname7 suffix {"text":" 0:02","bold":true,"color":"red"}
execute if score timer time matches 1 run team modify teamname7 suffix {"text":" 0:01","bold":true,"color":"red"}
execute if score timer time matches 0 run team modify teamname7 suffix {"translate":"score.time.end","bold":true,"color":"red"}
execute if score timer click matches 1 if score timer time matches 0 run team modify teamname7 suffix {"text":" 0:00","bold":true,"color":"red"}

execute unless score timer click matches 1 if score timer time matches 10 run effect give @a minecraft:night_vision 10 1 true
execute unless score timer click matches 1 if score timer time matches 10 run title @a title {"text":"10","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 9 run title @a title {"text":"9","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 8 run title @a title {"text":"8","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 7 run title @a title {"text":"7","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 6 run title @a title {"text":"6","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 5 run effect give @a minecraft:speed 5 2 true
execute unless score timer click matches 1 if score timer time matches 5 run title @a title {"text":"5","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 4 run title @a title {"text":"4","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 3 run title @a title {"text":"3","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 2 run title @a title {"text":"2","color":"red","bold":true}
execute unless score timer click matches 1 if score timer time matches 1 run title @a title {"text":"1","color":"red","bold":true}

execute unless score timer click matches 1 if score timer time matches 2..10 run title @a subtitle {"translate":"game.time.seconds","color":"yellow"}
execute unless score timer click matches 1 if score timer time matches 1 run title @a subtitle {"translate":"game.time.second","color":"yellow"}
execute unless score timer click matches 1 if score timer time matches 1..10 as @a at @s run playsound minecraft:block.note_block.pling master @s ~ ~ ~ 1
execute if score timer click matches 1 if score timer time matches 1..3 as @a at @s run playsound minecraft:block.note_block.hat master @s ~ ~ ~ 1

#Set hide and seek timer
execute if score timer click matches 1 if score timer time matches 0 run function f:game/game_type/hide_and_seek/start_seekers
