scoreboard players remove @s countdown 1

execute if score @s countdown matches 400 run function pctf:logic/game/end/end_stats/kills/init

execute if score .apocalypse settings matches 1 if score @s countdown matches 350 run function pctf:logic/game/end/end_stats/zombie_kills/init

execute if score @s countdown matches 300 run function pctf:logic/game/end/end_stats/stolen_flags/init

execute if score @s countdown matches 200 run function pctf:logic/game/end/end_stats/deaths/init

execute if score @s countdown matches 100 as @a[distance=..250,team=!spectating] at @s run function pctf:logic/game/end/rewards/calc
$execute if score @s countdown matches 100 run function pctf:logic/game/clear_objects {map_id: "$(map_id)"}