tellraw @s [{"text":"[Free Cam] ","color":"dark_green"},{"text":"wurde aktiviert. ","color":"gray"},{"text":"✔","color":"dark_green"},{"text":" (deaktivieren)","color":"dark_gray","clickEvent":{"action":"run_command","value":"/execute if entity @s[tag=free_cam] run trigger free_cam"}}]
tag @s add free_cam
gamemode spectator
summon piglin ~ ~ ~ {NoGravity:1b,Silent:1b,Invulnerable:1b,NoAI:1b,IsImmuneToZombification:1b,Tags:["player_dummy","new_dummy"]}
execute as @e[tag=new_dummy,distance=...1] run tp @s ~ ~ ~ ~ ~
scoreboard players operation @e[tag=new_dummy,limit=1] player = @s player
loot replace entity @e[tag=new_dummy,distance=...1] armor.head kill @s
item replace entity @e[tag=new_dummy,distance=...1] armor.chest from entity @s armor.chest
item replace entity @e[tag=new_dummy,distance=...1] armor.legs from entity @s armor.legs
item replace entity @e[tag=new_dummy,distance=...1] armor.feet from entity @s armor.feet
item replace entity @e[tag=new_dummy,distance=...1] weapon.mainhand from entity @s weapon.mainhand
item replace entity @e[tag=new_dummy,distance=...1] weapon.offhand from entity @s weapon.offhand
execute as @e[tag=new_dummy,distance=...1] run tag @s remove new_dummy
tp @s ^ ^1 ^-2
scoreboard players reset @s free_cam