Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Lock Ver 2.0; script by fxstriker.
- function reset()
- term.clear()
- term.setCursorPos(1,1)
- end
- function lockout()
- l = l + 1
- reset()
- print("-1 of 3 Attempt's")
- sleep(1)
- if l == 3 then
- reset()
- wait = 60
- while wait > 0 do
- sleep(1)
- reset()
- print("System Locked.")
- rednet.open("right")
- rednet.broadcast("qsdry")
- print(wait)
- wait = wait - 1
- end
- else
- loginUser()
- end
- loginUser()
- end
- --loginUser()
- function loginUser()
- reset()
- print("Please enter username: ")
- username = read()
- if username == "admin" then --username goes here change "Admin" w/quotes
- print("Correct.")
- sleep(1)
- loginPw()
- else
- reset()
- print("Wrong Username")
- lockout()
- end
- end
- function loginPw()
- reset()
- print("Please enter password: ")
- password = read("*")
- if password == "rkwe3x2" then --password goes here change "password" w/ quotes
- print("Login sucesfull.")
- sleep(1)
- else
- reset()
- print("Wrong Password.")
- lockout()
- end
- end
- os.pullEvent = os.pullEventRaw
- l = 0
- loginUser()
- reset()
- --Code to run after authentication goes here.
Advertisement
Add Comment
Please, Sign In to add comment