tag @s remove LuckDubItems
execute as @s[nbt={Inventory:[{id:"minecraft:golden_apple"}]},nbt=!{Inventory:[{id:"minecraft:golden_apple",Count:1b}]},nbt={Inventory:[{id:"minecraft:ghast_tear"}]},nbt=!{Inventory:[{id:"minecraft:ghast_tear",Count:1b}]},nbt=!{Inventory:[{id:"minecraft:golden_apple",Count:2b}]},nbt=!{Inventory:[{id:"minecraft:golden_apple",Count:3b}]},scores={health=5..}] run tag @s add LuckDubItems
clear @s[tag=LuckDubItems] ghast_tear 4
clear @s[tag=LuckDubItems] golden_apple 4
#do void damage
tag @s[tag=LuckDubItems] add DoVoid

execute as @s[tag=LuckDubItems] run scoreboard players set @s KyuVoid -10
execute if entity @s[tag=LuckDubItems] run function zzzzdonotuse:misc/activatevoiddamage
give @s[tag=LuckDubItems] sunflower{kyutrinket:1b,kyudubloon:1b,display:{Name:"{\"text\":\"Lucky Dubloon\"}",Lore:["\"Allows you to access the rare drop table\"","\"randomly, at any time. Also gives +1 luck.\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:4}]}
tag @s remove LuckDubItems





