Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Startup code for Sending PC
- function HomeScreen()
- term.setTextColor(colors.blue)
- print("Welcome to The Bank Of Nimrodia")
- term.setTextColor(colors.white)
- print("Please select an option from below:")
- print("")
- print("1 - Access Account")
- print("2 - Deposit into Safety Box")
- print("3 - View Account details")
- ChoiceSelection()
- end
- function ChoiceSelection()
- write("Please enter the number of your choice: ")
- choice = read("")
- end
- function HomeChoice(choice)
- if choice == 1 then
- write("You have selected: ")
- term.setTextColor(colors.green)
- write("Access account")
- term.setTextColor(colors.white)
- print("Please wait... ")
- HomeScreen() -- Add in the shell
- if choice == 2 then
- write("You have selected: ")
- term.setTextColor(colors.green)
- write("Deposit into safety box")
- term.setTextColor(colors.white)
- print("Please wait... ")
- -- shell.run("BoxDeposit")
- if choice == 3 then
- write("You have selected: ")
- term.setTextColor(colors.green)
- write("View Account details")
- term.setTextColor(colors.white)
- print("Please wait... ")
- else
- term.setTextColor(colors.red)
- print("Choice is not correct, please try again")
- term.setTextColor(colors.white)
- ChoiceSelection()
- end
- end
- end
- -- actual program
- HomeScreen()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement