execute at @s positioned ~ 250 ~ run loot spawn ~ ~ ~ loot minecraft:talkingsword/talkchances
execute at @s positioned ~ 250 ~ run execute at @e[sort=nearest,limit=1,type=item,distance=..3,nbt={Item:{id:"minecraft:paper",Count:1b,tag:{display:{Lore:["\"TalkGeneral\""]}}}}] run function zzzzdonotuse:trinketeffect/sword/sworddiageneral
execute at @s[tag=!SwordTalked] positioned ~ 250 ~ run execute at @e[sort=nearest,limit=1,type=item,distance=..3,nbt={Item:{id:"minecraft:paper",Count:1b,tag:{display:{Lore:["\"TalkDay\""]}}}}] run function zzzzdonotuse:trinketeffect/sword/sworddiaday
execute at @s[tag=!SwordTalked] positioned ~ 250 ~ run execute at @e[sort=nearest,limit=1,type=item,distance=..3,nbt={Item:{id:"minecraft:paper",Count:1b,tag:{display:{Lore:["\"TalkMob\""]}}}}] run function zzzzdonotuse:trinketeffect/sword/sworddiamob

execute at @s positioned ~ 250 ~ run kill @e[type=item,distance=..3]