# s
execute as @s[tag=stopwatch,scores={stopwatch_m=0,stopwatch_h=0}] at @s run tellraw @a [{"selector":"@s","color":"#FFE254"},{"text":" completed the game in ","color":"#FFE254"},{"text":"s","color":"#FFE254"},{"score":{"name":"@s","objective":"stopwatch_s"},"color":"#FFE254"}]

# m, s
execute as @s[tag=stopwatch,scores={stopwatch_m=1..}] at @s run execute as @s[tag=stopwatch,scores={stopwatch_h=0}] at @s run tellraw @a [{"selector":"@s","color":"#FFE254"},{"text":" completed the game in ","color":"#FFE254"},{"text":"m","color":"#FFE254"},{"score":{"name":"@s","objective":"stopwatch_m"},"color":"#FFE254"},{"text":", ","color":"#FFE254"},{"text":"s","color":"#FFE254"},{"score":{"name":"@s","objective":"stopwatch_s"},"color":"#FFE254"}]
# h, m, s
execute as @s[tag=stopwatch,scores={stopwatch_h=1..}] at @s run tellraw @a [{"selector":"@s","color":"#FFE254"},{"text":" completed the game in ","color":"#FFE254"},{"text":"h","color":"#FFE254"},{"score":{"name":"@s","objective":"stopwatch_h"},"color":"#FFE254"},{"text":", ","color":"#FFE254"},{"text":"m","color":"#FFE254"},{"score":{"name":"@s","objective":"stopwatch_m"},"color":"#FFE254"},{"text":", ","color":"#FFE254"},{"text":"s","color":"#FFE254"},{"score":{"name":"@s","objective":"stopwatch_s"},"color":"#FFE254"}]

execute as @s[tag=stopwatch,scores={stopwatch_h=2,stopwatch_m=..30}] at @s run title @s title {"text":"Rank A","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=2,stopwatch_m=..30}] at @s run tellraw @a [{"text":"Rank A","color":"#FFE254"}]
execute as @s[tag=stopwatch,scores={stopwatch_h=1}] at @s run title @s title {"text":"Rank A","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=1}] at @s run tellraw @a [{"text":"Rank A","color":"#FFE254"}]
execute as @s[tag=stopwatch,scores={stopwatch_h=0,stopwatch_m=..60}] at @s run title @s title {"text":"Rank A","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=0,stopwatch_m=..60}] at @s run tellraw @a [{"text":"Rank A","color":"#FFE254"}]

execute as @s[tag=stopwatch,scores={stopwatch_h=2,stopwatch_m=31..}] at @s run title @s title {"text":"Rank B","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=2,stopwatch_m=31..}] at @s run tellraw @a [{"text":"Rank B","color":"#FFE254"}]

execute as @s[tag=stopwatch,scores={stopwatch_h=3,stopwatch_m=..30}] at @s run title @s title {"text":"Rank C","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=3,stopwatch_m=1..30}] at @s run tellraw @a [{"text":"Rank C","color":"#FFE254"}]
execute as @s[tag=stopwatch,scores={stopwatch_h=3,stopwatch_m=0}] at @s run title @s title {"text":"Rank C","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=3,stopwatch_m=0}] at @s run tellraw @a [{"text":"Rank C","color":"#FFE254"}]

execute as @s[tag=stopwatch,scores={stopwatch_h=3,stopwatch_m=31..}] at @s run title @s title {"text":"Rank D","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=3,stopwatch_m=31..}] at @s run tellraw @a [{"text":"Rank D","color":"#FFE254"}]

execute as @s[tag=stopwatch,scores={stopwatch_h=4,stopwatch_m=..30}] at @s run title @s title {"text":"Rank D-","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=4,stopwatch_m=1..30}] at @s run tellraw @a [{"text":"Rank D-","color":"#FFE254"}]
execute as @s[tag=stopwatch,scores={stopwatch_h=4,stopwatch_m=0}] at @s run title @s title {"text":"Rank D-","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=4,stopwatch_m=0}] at @s run tellraw @a [{"text":"Rank D-","color":"#FFE254"}]

execute as @s[tag=stopwatch,scores={stopwatch_h=4,stopwatch_m=31..}] at @s run title @s title {"text":"Rank F","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=4,stopwatch_m=31..}] at @s run tellraw @a [{"text":"Rank F","color":"#FFE254"}]

execute as @s[tag=stopwatch,scores={stopwatch_h=5..}] at @s run title @s title {"text":"Rank F","color":"dark_aqua"}
execute as @s[tag=stopwatch,scores={stopwatch_h=5..}] at @s run tellraw @a [{"text":"Rank F","color":"#FFE254"}]


tag @s remove stopwatch
tag @s add stopwatch_no