$execute unless entity @e[scores={map_id=$(map_id)}] run return run tellraw @s {"text":"There is no map with ID $(map_id)","color":"red"}

scoreboard players add #confirm temp 1
execute if score #confirm temp matches 1 run tellraw @s ["",{"text":"ARE YOU SURE?","bold":true,"color":"yellow"},{"text":"\n\n"},{"text":"This will destroy the entire map, including anything you built there","color":"dark_red"},{"text":"\n\n"},{"text":"Type this command again within 5 seconds to confirm","color":"red"}]
execute if score #confirm temp matches 1 run return run schedule function pctf:create_game_object/map/reset_confirm 5s

$data modify storage pctf:destroy input.map_id set value $(map_id)
$function pctf:create_game_object/block_clearer_instant/spawn_destroyer {map_id: "$(map_id)"}
$tellraw @s {"text":"DESTROYED ENTIRE MAP $(map_id) MARKERS AND SCOREBOARD `game$(map_id)!`","color":"dark_red"}
$scoreboard objectives remove game$(map_id)

function pctf:logic/lobby/cycle/sign