Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- username = "Your Username"
- password = "Your Password"
- write("Welcome please enter your username and password")
- term.setCursorPos(12,5) -- put screen cords here
- print("Username: ")
- term.setCursorPos(12,6) -- and here
- print("Password: ")
- term.setCursorPos(23,5) -- same as first ones but over right
- input = read()
- if input == username then
- term.setCursorPos(23,6) -- and here
- else
- term.setCursorPos(23,6)
- input = read
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- write("Username Or Password Incorrrect Try Again")
- sleep(2)
- os.reboot()
- end
- input = read()
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Access Granted!")
- sleep(2)
- term.clear()
- term.setCursorPos(1,1)
- end
- else
- term.clear()
- term.setCursorPos(1,1)
- print("Access Denied, System Shutting Down!!!")
- sleep(2)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement