execute at @n[type=item,nbt={Item:{id:"minecraft:copper_ingot",components:{"minecraft:custom_data":{revive:tag}}}}] as @p[distance=..2,scores={death=1..}] at @s if block ~ ~2 ~ #survivalplus:respawnable if block ~ ~3 ~ #survivalplus:respawnable run spawnpoint @s ~ ~2 ~
execute at @n[type=item,nbt={Item:{id:"minecraft:copper_ingot",components:{"minecraft:custom_data":{revive:tag}}}}] as @p[distance=..2,scores={death=1..}] at @s if block ~ ~1 ~ #survivalplus:respawnable if block ~ ~2 ~ #survivalplus:respawnable run spawnpoint @s ~ ~1 ~
execute at @n[type=item,nbt={Item:{id:"minecraft:copper_ingot",components:{"minecraft:custom_data":{revive:tag}}}}] as @p[distance=..2,scores={death=1..}] at @s if block ~ ~ ~ #survivalplus:respawnable if block ~ ~1 ~ #survivalplus:respawnable run spawnpoint @s ~ ~ ~
execute at @n[type=item,nbt={Item:{id:"minecraft:copper_ingot",components:{"minecraft:custom_data":{revive:tag}}}}] as @p[distance=..2,scores={death=1..}] at @s unless block ~ ~2 ~ #survivalplus:respawnable unless block ~ ~1 ~ #survivalplus:respawnable unless block ~ ~ ~ #survivalplus:respawnable run tellraw @p {"text":"Couldn't find suitable respawn point, sending you back to your old one!"}
execute as @n[type=item,nbt={Item:{id:"minecraft:copper_ingot",components:{"minecraft:custom_data":{revive:tag}}}}] at @s run particle item{item:copper_ingot} ~ ~ ~ 0 0 0 .1 10
execute as @n[type=item,nbt={Item:{id:"minecraft:copper_ingot",components:{"minecraft:custom_data":{revive:tag}}}}] at @s run playsound entity.item.break neutral @a ~ ~ ~
execute as @n[type=item,nbt={Item:{id:"minecraft:copper_ingot",components:{"minecraft:custom_data":{revive:tag}}}}] at @s run kill @s