Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- function dispCount()
- while intBreak == 0 do
- local mon = peripheral.wrap("left")
- id,count = rednet.receive()
- mon.write(count)
- end
- end
- function getUser()
- write("Input username:")
- local username = read()
- function passGet()
- write("Input password:")
- local passowrd = read(*)
- end
- function greeting()
- while intUser == 0 do
- getUser()
- passGet()
- if username == "Rainemaker" and password == "Dragonite" then
- textutil.slowPrint("Hello Rainemaker, what would admin command you like to perform?")
- answer = read()
- if answer == "Cease" then
- intBreak = 1
- end
- if answer == "Cancel" then
- intUser == 0
- intUser == 1
- greeting()
- end
- end
- end
- textutils.slowPrint("Hello" ..username.. ", what can I do for you?")
- print("Available actions are:")
- print("Withdraw")
- print("Deposit")
- print("Cancel")
- local transact = read()
- if transact == "Withdraw" then
- print("How much would you like to withdraw?")
- local intWAmt = read()
- rednet.send(36, WithdrawSequence)
- rednet.send(36, intWAmt)
- end
- if transact == "Deposit" then
- print("Please place your Industrial Credits into the provided turtle on your right.")
- rednet.send(34, DepositSequence)
- textutils.slowWrite("Counting")
- sleep(3)
- print(count)
- print("Funds counted depositing in vault")
- os.pullEvent("redstone")
- print("Funds deposited")
- if transact == "Cancel" then
- intUser == 0
- intUser == 1
- greeting()
- end
- end
- paralell.waitForAll(dispCount,greeting)
Add Comment
Please, Sign In to add comment