#position is/should be where the map is #scoreboard players add #max emk-race 1 (not needed) forceload add ~-2 ~-7 ~2 ~ execute store result score @e[tag=emk-map,distance=..500,limit=1] emk-id if entity @a[tag=emk-queue] tag @r[tag=emk-queue] add emk-sel2 tp @a[tag=emk-sel2] ~2 ~ ~ execute as @a[tag=emk-sel2] positioned ~2 ~ ~ run function emk:kart/summon execute positioned ~2 ~ ~ run scoreboard players set @e[tag=emk-kart,sort=nearest,distance=...5,limit=1] emk-chkpnt 7 tag @a[tag=emk-sel2] remove emk-queue tag @a remove emk-sel2 tag @r[tag=emk-queue] add emk-sel2 tp @a[tag=emk-sel2] ~ ~ ~-1 execute as @a[tag=emk-sel2] positioned ~ ~ ~-1 run function emk:kart/summon execute positioned ~ ~ ~-1 run scoreboard players set @e[tag=emk-kart,sort=nearest,distance=...5,limit=1] emk-chkpnt 6 tag @a[tag=emk-sel2] remove emk-queue tag @a remove emk-sel2 tag @r[tag=emk-queue] add emk-sel2 tp @a[tag=emk-sel2] ~-2 ~ ~-2 execute as @a[tag=emk-sel2] positioned ~-2 ~ ~-2 run function emk:kart/summon execute positioned ~-2 ~ ~-2 run scoreboard players set @e[tag=emk-kart,sort=nearest,distance=...5,limit=1] emk-chkpnt 5 tag @a[tag=emk-sel2] remove emk-queue tag @a remove emk-sel2 tag @r[tag=emk-queue] add emk-sel2 tp @a[tag=emk-sel2] ~ ~ ~-1 execute as @a[tag=emk-sel2] positioned ~ ~ ~-1 run function emk:kart/summon execute positioned ~ ~ ~-1 run scoreboard players set @e[tag=emk-kart,sort=nearest,distance=...5,limit=1] emk-chkpnt 4 tag @a[tag=emk-sel2] remove emk-queue tag @a remove emk-sel2 tag @r[tag=emk-queue] add emk-sel2 tp @a[tag=emk-sel2] ~-2 ~ ~-2 execute as @a[tag=emk-sel2] positioned ~-2 ~ ~-2 run function emk:kart/summon execute positioned ~-2 ~ ~-2 run scoreboard players set @e[tag=emk-kart,sort=nearest,distance=...5,limit=1] emk-chkpnt 3 tag @a[tag=emk-sel2] remove emk-queue tag @a remove emk-sel2 tag @r[tag=emk-queue] add emk-sel2 tp @a[tag=emk-sel2] ~ ~ ~-1 execute as @a[tag=emk-sel2] positioned ~ ~ ~-1 run function emk:kart/summon execute positioned ~ ~ ~-1 run scoreboard players set @e[tag=emk-kart,sort=nearest,distance=...5,limit=1] emk-chkpnt 2 tag @a[tag=emk-sel2] remove emk-queue tag @a remove emk-sel2 tag @r[tag=emk-queue] add emk-sel2 tp @a[tag=emk-sel2] ~-2 ~ ~-2 execute as @a[tag=emk-sel2] positioned ~-2 ~ ~-2 run function emk:kart/summon execute positioned ~-2 ~ ~-2 run scoreboard players set @e[tag=emk-kart,sort=nearest,distance=...5,limit=1] emk-chkpnt 1 tag @a[tag=emk-sel2] remove emk-queue tag @a remove emk-sel2 tag @r[tag=emk-queue] add emk-sel2 tp @a[tag=emk-sel2] ~-2 ~ ~-2 execute as @a[tag=emk-sel2] positioned ~-2 ~ ~-2 run function emk:kart/summon execute positioned ~-2 ~ ~-2 run scoreboard players set @e[tag=emk-kart,sort=nearest,distance=...5,limit=1] emk-chkpnt 0 tag @a[tag=emk-sel2] remove emk-queue tag @a remove emk-sel2 scoreboard players set @e[tag=emk-map,distance=..500,limit=1] emk-timer 170 forceload remove ~-2 ~-7 ~2 ~