Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- username = {"okguess", "admin", "user", "guest"} --[[This is the usernames]]--
- password = {"password", "admin", "user", "guest"} --[[This is the passwords for the users]]--
- os.pullEvent = os.pullEventRaw
- write("Username: ")
- user = read()
- for i=1, #username do
- if user == username[i] then
- print("User found")
- sleep(1.5)
- write("Password: ")
- pass = read()
- if pass == password[i] then
- access = true
- else print("Incorrect")
- sleep(1)
- os.reboot()
- end
- end
- end
- if access == true then
- print("Logging in...")
- sleep(1)
- print("Welcome user")
- else
- print("Incorrect username and/or password")
- sleep(2)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment