Guest User

Untitled

a guest
Sep 18th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. rednet.open("top")
  2. function dispCount()
  3. while intBreak == 0 do
  4. local mon = peripheral.wrap("left")
  5. id,count = rednet.receive()
  6. mon.write(count)
  7. end
  8. end
  9. function getUser()
  10. write("Input username:")
  11. local username = read()
  12. function passGet()
  13. write("Input password:")
  14. local passowrd = read(*)
  15. end
  16. function greeting()
  17. while intUser == 0 do
  18. getUser()
  19. passGet()
  20. if username == "Rainemaker" and password == "Dragonite" then
  21. textutil.slowPrint("Hello Rainemaker, what would admin command you like to perform?")
  22. answer = read()
  23. if answer == "Cease" then
  24. intBreak = 1
  25. end
  26. if answer == "Cancel" then
  27. intUser == 0
  28. intUser == 1
  29. greeting()
  30. end
  31. end
  32. end
  33. textutils.slowPrint("Hello" ..username.. ", what can I do for you?")
  34. print("Available actions are:")
  35. print("Withdraw")
  36. print("Deposit")
  37. print("Cancel")
  38. local transact = read()
  39. if transact == "Withdraw" then
  40. print("How much would you like to withdraw?")
  41. local intWAmt = read()
  42. rednet.send(36, WithdrawSequence)
  43. rednet.send(36, intWAmt)
  44. end
  45. if transact == "Deposit" then
  46. print("Please place your Industrial Credits into the provided turtle on your right.")
  47. rednet.send(34, DepositSequence)
  48. textutils.slowWrite("Counting")
  49. sleep(3)
  50. print(count)
  51. print("Funds counted depositing in vault")
  52. os.pullEvent("redstone")
  53. print("Funds deposited")
  54. if transact == "Cancel" then
  55. intUser == 0
  56. intUser == 1
  57. greeting()
  58. end
  59. end
  60. paralell.waitForAll(dispCount,greeting)
Add Comment
Please, Sign In to add comment