summon minecraft:armor_stand ~ ~ ~ {NoGravity:1,Invulnerable:1,Invisible:1b,Silent:1b,Tags:["KillGold"]}
execute as @e[type=armor_stand,tag=KillGold,sort=nearest,limit=1,distance=..1] run function zzzzdonotuse:misc/replacegoldblock2