Advertisement
nnimos

Untitled

May 5th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. -- Startup code for Sending PC
  2.  
  3. function HomeScreen()
  4. term.setTextColor(colors.blue)
  5. print("Welcome to The Bank Of Nimrodia")
  6. term.setTextColor(colors.white)
  7. print("Please select an option from below:")
  8. print("")
  9. print("1 - Access Account")
  10. print("2 - Deposit into Safety Box")
  11. print("3 - View Account details")
  12. end
  13.  
  14. function ChoiceSelection()
  15. write("Please enter the number of your choice: ")
  16. choice = tonumber(read())
  17. end
  18.  
  19.  
  20.  
  21. HomeScreen()
  22. ChoiceSelection()
  23. print(type(choice))
  24. print(choice)
  25.  
  26. function HomeChoice(choice1)
  27. print(choice1)
  28. if choice1 == 1 then
  29. write("You have selected: ")
  30. wait(5)
  31. term.setTextColor(colors.green)
  32. write("Access account")
  33. wait(10)
  34. term.setTextColor(colors.white)
  35. print("Please wait... ")
  36. wait(10)
  37. os.reboot
  38. elseif choice1 == 2 then
  39. write("You have selected: ")
  40. wait(5)
  41. term.setTextColor(colors.green)
  42. write("Deposit into safety box")
  43. wait(10)
  44. term.setTextColor(colors.white)
  45. print("Please wait... ")
  46. wait(10)
  47. os.reboot
  48. -- shell.run("BoxDeposit")
  49. elseif choice1 == 3 then
  50. write("You have selected: ")
  51. wait(5)
  52. term.setTextColor(colors.green)
  53. write("View Account details")
  54. wait(10)
  55. term.setTextColor(colors.white)
  56. print("Please wait... ")
  57. wait(10)
  58. os.reboot
  59. elseif
  60. term.setTextColor(colors.red)
  61. textutils.slowPrint("Choice is not correct, please try again")
  62. term.setTextColor(colors.white)
  63. wait(2)
  64. ChoiceSelection()
  65. end
  66.  
  67. end
  68.  
  69. HomeChoice(choice)
  70. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement