execute at @s run function survivalplus:tools/upgrade_effect
data remove entity @s Offers.Recipes[{buy:{id:"minecraft:rabbit_foot",components:{"minecraft:custom_data":{del:"tag"}}}}]
data modify entity @s Offers.Recipes append value {maxUses:2,buy:{id:emerald,count:8},buyB:{id:rabbit_foot},sell:{id:emerald,count:1,components:{custom_data:{luckycoin:tag},item_name:{"text":"Lucky Coin","italic":false,"color":"green"},lore:[{"text":"You feel inclined to flip it","color":"yellow"}],attribute_modifiers:[{type:"luck",amount:1,slot:offhand,operation:add_value,id:"-124487530175616-15060"}],rarity:uncommon,enchantment_glint_override:1b}}}
tag @s add cointrinket
execute at @s run kill @n[type=item,tag=cointrinket]