Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Items = {"minecraft:coal_ore","minecraft:iron_ore","minecraft:gold_ore","minecraft:redstone"}
- local Payment = {"currency:hundred_dollar_bill"}
- local Amount = {64,16,2,32}
- local function start()
- Menu()
- Options()
- os.reboot()
- end
- local function Buy(ID)
- if commands.exec("clear @p currency:hundred_dollar_bill 1") == true then commands.exec("give @p "..Items[ID].." "..Amount[ID]) end
- end
- function Menu()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- print("Import Shop - everything for $100")
- end
- function Options()
- local n = 0
- local T = 1
- local a, b, c
- repeat
- for i = 1, #Items do
- term.setCursorPos(1,i + 1)
- if T == i then term.write(">> "..i.." - "..Items[i].." x"..Amount[i]) else term.write(i.." - "..Items[i].." x"..Amount[i]) end
- end
- a, b, c = os.pullEvent("key")
- if b == keys.w and T > 1 then T = T - 1 end
- if b == keys.s and T < #Items then T = T + 1 end
- if b == keys.enter then n = T end
- until n ~= 0
- Buy(n)
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement