Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local manager = peripheral.find("inventoryManager")
- local deposit = fs.open(manager.getOwner(),"w")
- local data = tonumber(deposit.readAll))
- term.clear()
- term.setCursorPos(1,1)
- print("1. Copper Block")
- print("2. Zinc Block")
- print("3. Brass Block")
- print("4. Diamond Block")
- print("5. Netherite Block")
- local event2, key2 = os.pullEvent("key")
- if key2 == keys.one then
- term.clear()
- term.setCursorPos(1,1)
- print("How many?")
- local amount = read()
- local copper = tonumber(amount)
- print ("What kind?")
- print ("1. Create")
- print ("2. Thermal")
- print ("3. Mystical")
- local event3, key3 = os.pullEvent("key")
- if key3 == keys.one then manager.removeItemFromPlayer("DOWN", 114, copper, "create:copper_block") end
- if key3 == keys.two then manager.removeItemFromPlayer("DOWN", 114, copper, "thermal:copper_block") end
- if key3 == keys.three then manager.removeItemFromPlayer("DOWN", 114, copper, "mysticalworld:copper_block") end
- depositamount = copper * .5
- deposit.write(data + depositamount)
- deposit.close()
- elseif key2 == keys.two then
- term.clear()
- term.setCursorPos(1,1)
- print("How many?")
- local amount = read()
- local zinc = tonumber(amount)
- manager.removeItemFromPlayer("DOWN", 114, zinc, "create:zinc_block")
- depositamount = zinc * 1
- deposit.write(data + depositamount)
- deposit.close()
- elseif key2 == keys.three then
- term.clear()
- term.setCursorPos(1,1)
- print("How many?")
- local amount = read()
- local brass = tonumber(amount)
- manager.removeItemFromPlayer("DOWN", 114, brass, "create:zinc_block")
- depositamount = brass * 2
- deposit.write(data + depositamount)
- deposit.close()
- elseif key2 == keys.four then
- term.clear()
- term.setCursorPos(1,1)
- print("How many?")
- local amount = read()
- local diamond = tonumber(amount)
- manager.removeItemFromPlayer("DOWN", 114, diamond, "minecraft:diamond_block")
- depositamount = diamond * 3
- deposit.write(data + depositamount)
- deposit.close()
- elseif key2 == keys.five then
- term.clear()
- term.setCursorPos(1,1)
- print("How many?")
- local amount = read()
- local netherite = tonumber(amount)
- manager.removeItemFromPlayer("DOWN", 114, netherite, "minecraft:diamond_block")
- depositamount = netherite * 5
- deposit.write(data + depositamount)
- deposit.close()
- end
Add Comment
Please, Sign In to add comment