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