Advertisement
nnimos

Untitled

May 5th, 2015
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 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. term.setTextColor(colors.green)
  31. write("Access account")
  32. term.setTextColor(colors.white)
  33. print("Please wait... ")
  34. wait(2)
  35. else
  36. term.setTextColor(colors.red)
  37. print("Choice is not correct, please try again")
  38. term.setTextColor(colors.white)
  39. wait(2)
  40. end
  41.  
  42. end
  43.  
  44. HomeChoice(choice)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement