Guest User

startup

a guest
Aug 10th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.99 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. term.clear()
  3. term.setCursorPos(1, 1)
  4. print("Welcome to bank Prototype B")
  5. sleep(1.5)
  6. term.setCursorPos(1, 1)
  7. print("Please Type your Artifical 5 digit Pin")
  8. local input = read("*")
  9. if input == ("OR-197") then
  10. elseif input == ("Potato") then
  11. print("welcome [USER] to your bank!")
  12. print("Would you like to:")
  13. print("Withdraw: Type W")
  14. print("Deposit: Type D")
  15. sleep(1)
  16. local input = read()
  17. if input == "D" then
  18. term.clear()
  19. term.setCursorPos(1, 1)
  20. print("Deposits")
  21. print("What would you like to deposit?")
  22. print("Ingots: I")
  23. print("Tools: T")
  24. print("Food: F")
  25. print("Miscellaneous: M")
  26. local input = read()
  27. if input == "I" then
  28. rs.setBundledOutput("back", colours.lightGrey)
  29. print("Type S to stop")
  30. local input = read()
  31. if input == "S" then
  32. os.reboot()
  33. else
  34. print("Sorry that is not a valid answer!")
  35. sleep(1)
  36. os.reboot()
  37. end
  38. elseif input == "T" then
  39. rs.setBundledOutput("back", colours.pink)
  40. print("Type S to stop.")
  41. local input = read()
  42. if input == "S" then
  43. os.reboot()
  44. else
  45. print("Sorry that is not a valid answer!")
  46. sleep(1)
  47. os.reboot()
  48. end
  49. elseif input == "F" then
  50. rs.setBundledOutput("back", colours.grey)
  51. print("Type S to stop")
  52. local input = read()
  53. if input == "S" then
  54. os.reboot()
  55. else
  56. print("Sorry that is not a valid answer!")
  57. os.reboot()
  58. end
  59. elseif input == "M" then
  60. rs.setBundledOutput("back", colours.lime)
  61. print("To stop press S")
  62. local input = read()
  63. if input == "S" then
  64. os.reboot()
  65. else
  66. print("Sorry that is not a valid answer")
  67. sleep(1)
  68. os.reboot()
  69. end
  70. else
  71. print("Sorry that is not a valid answer!")
  72. sleep(1)
  73. os.reboot()
  74. end
  75.  
  76.  
  77. elseif input == "W" then
  78. term.clear()
  79. term.setCursorPos(1, 1)
  80. print("Withdrawls")
  81. print("What would you like to withdraw?")
  82. print("Ingots: I")
  83. print("Tools: T")
  84. print("Food: F")
  85. print("Miscellaneous: M")
  86. sleep(1)
  87. local input = read()
  88. if input == "I" then
  89. rs.setBundledOutput("back", colours.white)
  90. print("Type S to stop ore pumping.")
  91. local input = read()
  92. if input == "S" then
  93. os.reboot()
  94. else
  95. print("Sorry that is not a vaild answer!")
  96. sleep(1)
  97. os.reboot()
  98. end
  99. elseif input == "T" then
  100. rs.setBundledOutput("back", colours.red)
  101. print("To stop press S")
  102. local input = read()
  103. if input == "S" then
  104. os.reboot()
  105. else
  106. print("Sorry that is not a valid answer!")
  107. sleep(1)
  108. os.reboot()
  109. end
  110. elseif input == "F" then
  111. rs.setBundledOutput("back", colours.black)
  112. print("To stop press S")
  113. local input = read()
  114. if input == "S" then
  115. sleep(1)
  116. os.reboot()
  117. else
  118. print("Sorry that is not a vailid answer")
  119. os.reboot()
  120. end
  121. elseif input == "M" then
  122. rs.setBundledOutput("back", colours.green)
  123. print("To stop press S")
  124. local input = read()
  125. if input == "S" then
  126. os.reboot()
  127. else
  128. print("Sorry that is not a vialid answer")
  129. sleep(1)
  130. os.reboot()
  131. end
  132. else
  133. print("Sorry that is not a valid answer!")
  134. sleep(1)
  135. os.reboot()
  136. end
  137. else
  138. print("Sorry that is not a valid answer!")
  139. sleep(1)
  140. os.reboot()
  141. end
  142. else
  143. print("sorry that is not a valid answer!")
  144. sleep(1)
  145. os.reboot()
  146. end
Advertisement
Add Comment
Please, Sign In to add comment