Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw -- Prevents CTRL+T shortcut
- term.clear() -- Clears the screen
- term.setCursorPos(1, 1) -- This places the print position to the top of screen
- username = {"Jayden"}
- password = {"password"}
- write("Username: ")
- user = read()
- write("Password: ")
- pass = read('*') -- This prevents people from reading the password as you put it in
- for i=1, #username do -- Starts a loop
- if user == username[i] and pass == password[i] then
- access = true
- end
- end
- if access == true then
- print("Logging in...")
- sleep(1)
- print("Welcome "..user)
- else
- print("Incorrect username and password combination")
- sleep(2)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement