execute store result storage gold x float 0.0005 run random value -100..100
execute store result storage gold z float 0.0005 run random value -100..100

$summon item ~ ~1 ~ {Age:-32768,Motion:[$(x),0.5,$(z)],Tags:["gold"],Item:{id:"minecraft:copper_ingot",count:1,components:{"minecraft:item_model":"minecraft:gold_10"}}}

scoreboard players remove @s gold 10
execute if score @s gold matches 10.. run return run function main:mechanics/damage/enemy/gold_drop_2 with storage gold
scoreboard players remove @s gold 1
execute if score @s gold matches 1..9 run function main:mechanics/damage/enemy/gold_drop_1 with storage gold