data remove entity @n[tag=miner.sell,type=interaction] interaction
execute unless entity @s[team=miner] run return 0
execute unless score @s miner.collectedore matches 1.. run return run tellraw @s {"translate":"miner.nothingtosell","color":"red"}
tellraw @s [{"text":" /// ","color":"gray"},{"translate":"miner.result"},{"text":" /// "}]
function ws:work/misc/tier2/miner/sold/check
execute if score @s miner.collectedore matches 100.. run function ws:work/misc/tier2/miner/sold/bonus
tellraw @s [{"text":" /// /// /// /// /// ","color":"gray"}]
execute at @s run playsound minecraft:entity.player.levelup player @s
execute at @s run particle minecraft:happy_villager ~ ~2 ~ 0.1 0.1 0.1 1 10
scoreboard players operation @s pay += @s miner.pay
scoreboard players reset @s miner.pay
scoreboard players reset @s miner.collectedore