make an upgradable item generator of when a block is placed it spits out that item. For eg. Diamond block placed down spits out diamonds every few seconds. make this into a /sell option which the prices can be edited in script and have the /sell option open a gui so the player can choose which item to sell and how much of that item