execute unless score .path camera matches 2.. run clear @a
execute unless score .path camera matches 2.. as @a at @s run summon marker ~ ~ ~ {Tags:["last_pos"]}
execute unless score .path camera matches 2.. as @e[type=marker,tag=last_pos] at @p run rotate @s ~ ~
kill @e[type=item_display,tag=camera]
tag @s add camera_spectate
scoreboard players set .path camera 1
scoreboard players set .path_max camera 2
$function main:mechanics/camera/paths/$(folder)/$(id)
$data modify storage camera id set value $(id)
$data modify storage camera folder set value $(folder)