Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- username = "-Zoru"
- password = "ZainabHeartsKevin"
- secretuser = "KevinHeartsZainab"
- attempt = 1
- function attemptCheck()
- if attempt > 2 then
- term.clear()
- term.setCursorPos(1,1)
- textutils.slowPrint("Non authorized user detected..")
- textutils.slowPrint("Please enter your backup password if authorized")
- auth = read("*")
- special = "KevinxZainab"
- if(auth == special) then
- textutils.slowPrint("You have been authorized successfully")
- else
- textutils.slowPrint("NON AUTHORIZED USER DETECTED... SENDING WARNING")
- sleep(60)
- os.reboot()
- end
- end
- end
- function login()
- attemptCheck()
- term.clear()
- textutils.slowPrint("Attempt #" ..attempt)
- textutils.slowPrint("Username: ")
- input = read("*")
- if input == secretuser then
- textutils.slowPrint("---")
- textutils.slowPrint("Logging in...")
- else
- if input == username then
- textutils.slowPrint("Password: ")
- input = read("*")
- if input == password then
- textutils.slowPrint ("You have been authorized successfully")
- rs.setOutput("bottom", true)
- sleep(2)
- rs.setOutput("bottom", false)
- term.setCursorPos(1,1)
- login()
- else
- textutils.slowPrint ("Incorrect Password")
- sleep(1)
- textutils.slowPrint ("Try again")
- attempt = attempt + 1
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- login()
- end
- else
- textutils.slowPrint ("Invalid Username")
- sleep(1)
- textutils.slowPrint ("Try again")
- attempt = attempt + 1
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- login()
- end
- end
- end
- login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement