How can I have players sell items?

I am trying to make a device to have players sell items for different amounts of cash depending on the item. What device should I use and how should I do this in general?

(Coming back just for this one help topics, gotta help)

The best 2 devices are either the vending machine, but if you want a more sleek, less space, and more memory efficient, the crafting table is also great. (Pair this with the crafting table recipe device!)


You can also make vending machines invisible.

I mean a system that players can sell items to, not the other way around.

look at post @OGKingGimMasterX 's post (#3)