execute align xz run tp @s ~0.5 ~ ~0.5
$execute at @s if entity @n[scores={map_id=$(map_id)},distance=..1] run return run tellraw @s ["",{"text":"There is already a marker here! (","color":"red"},{"selector":"@n[scores={map_id=$(map_id)},distance=..1]","color":"yellow"},{"text":")","color":"red"}]
$kill @n[tag=red_spawn,scores={map_id=$(map_id)}]
$execute at @s run summon marker ~ ~ ~ {Tags:["spawn","red_spawn","new"],CustomName:{"color":"red","text":"red_spawn$(map_id)"}}
$scoreboard players set @n[tag=new] map_id $(map_id)
tag @n[tag=new] remove new
$tellraw @s {"text":"Placed new red spawn for map $(map_id)","color":"red"}