execute store result score random itemcount run random value 1..2
execute if score random itemcount matches 1 run data modify entity @s Offers.Recipes append value {maxUses:3,buy:{id:emerald,components:{item_name:"Flawless Emerald",custom_data:{flawless:tag},max_stack_size:1,rarity:uncommon,enchantment_glint_override:true}},sell:{id:emerald,count:20}}
execute if score random itemcount matches 2 run data modify entity @s Offers.Recipes append value {maxUses:1,buy:{id:diamond,components:{item_name:"Flawless Diamond",custom_data:{flawless:tag},max_stack_size:1,rarity:uncommon,enchantment_glint_override:true}},sell:{id:emerald,count:40}}