summon minecraft:marker ~ ~ ~ {Tags:[copyname],data:{UUID:[]}}
data modify entity @n[tag=copyname] data.UUID set from entity @s UUID
function survivalplus:tools/capturebag/selector_name with entity @n[tag=copyname] data
kill @n[tag=copyname]