scoreboard players add @e[type=armor_stand,name=console] lvl7_mc_timer 1

execute as @e[type=armor_stand,scores={lvl7_mc_timer=1}] run summon minecart -96 47 196 {CustomName:"{\"text\":\"lvl7minecart\"}",CustomDisplayTile:1,DisplayState:{Name:"minecraft:tnt"},DisplayOffset:6,PortalCooldown:80}
execute as @e[type=armor_stand,scores={lvl7_mc_timer=15}] run summon minecart -100 45 170 {CustomName:"{\"text\":\"lvl7minecart\"}",CustomDisplayTile:1,DisplayState:{Name:"minecraft:tnt"},DisplayOffset:6,PortalCooldown:65}

execute as @e[type=minecart,name=lvl7minecart] at @s if block ~ ~ ~ rail run data merge entity @s {Motion:[-1.0,0.0,0.0]}

execute as @a at @s run tag @e[type=minecart,name=lvl7minecart,distance=..1] add explode
tag @e[type=minecart,name=lvl7minecart,nbt={PortalCooldown:0}] add explode
execute as @e[type=minecart,name=lvl7minecart,tag=explode] at @s run function parkour_pyramid:levels/level7/minecarthit

scoreboard players reset @e[scores={lvl7_mc_timer=50..}] lvl7_mc_timer

