Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- usernames = {test}
- passwords = {12345}
- PIN = {000000}
- breakclause = true
- while breakclause do
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome to VolcBank's Automated Teller System.")
- print("Please Select an option.")
- print("[1] Login")
- print("[2] Create a New Account")
- local startinput = read()
- if startinput == "CactiJammer" then
- print("Terminated")
- breakclause = false
- elseif startinput == "1" then
- term.clear()
- term.setCursorPos(1,1)
- print("Please Login Below.")
- write("Username: ")
- user = read()
- write("Password: ")
- pass = read("*")
- for i,v in ipairs(usernames) do
- if user == usernames[i] then
- validuser = true
- break
- else
- break
- end
- if validuser == true then
- if pass == passwords[i] then
- print("Logging in...")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- print("What would you like to do today, "..usernames[i].."?")
- else
- print("Invalid username or password. Please try again.")
- sleep(2)
- end
- else
- print("User not found. Please try again.")
- sleep(2)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement