scoreboard players add @s pay 5
scoreboard players remove @s pay.legal 5
clear @s minecraft:emerald[minecraft:custom_data~{5:1}] 1
execute at @s run summon minecraft:area_effect_cloud ~ ~0.3 ~ {CustomName:'{"color":"dark_green","text":"+5$"}',CustomNameVisible:1b,Duration:20}
execute at @s run playsound minecraft:entity.arrow.hit_player player @s ~ ~ ~ 100
execute at @s run particle minecraft:happy_villager ~ ~2 ~ 0.2 0.2 0.2 10 10