Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- -- Made By derekseitz
- -- feel free to edit anything red between the
- -- two green lines
- --------------------------------------------------
- -- first user login info
- un1 = "admin" -- change the word admin to what you
- -- want the username to be
- cPass1 = "admin" -- change the word admin to what
- -- you want the password to be
- -- start and welcome messages
- startMsg = "Welcome, please enter your username and password."
- welcomeMsg = ("Correct! Welcome "..un1)
- -- put "--" infront of
- -- "os.pullEvent = os.pullEventRaw" to enable
- -- using (CTRL + T) to terminate the password lock
- os.pullEvent = os.pullEventRaw
- --------------------------------------------------
- function start()
- term.clear()
- term.setCursorPos(1, 1)
- print(startMsg)
- sleep(1)
- print()
- print()
- print("Username:")
- print("Password:")
- sleep(0.5)
- term.setCursorPos(10, 4)
- sleep(0.3)
- --username code below
- ui = read()
- if ui == un1 then
- term.setCursorPos(10, 5)
- else
- term.setCursorPos(1, 7)
- print("That user does not exist!")
- sleep(2)
- start()
- end
- --password code below
- passi = read("*")
- if passi == cPass1 then
- term.setCursorPos(1, 7)
- print(welcomeMsg)
- sleep(1)
- if cPass1 == "admin" then
- print()
- print()
- print("I see you have not changed password.")
- print("Did you know that you can type")
- print("'edit disk/startup' and change the username")
- print("and password?")
- print("you should try it to make your computer")
- print("even more secure.")
- sleep(6)
- end
- term.clear()
- else
- term.setCursorPos(1, 7)
- print("Incorrect Password! Please try again!")
- sleep(2)
- start()
- end
- end
- -- end of start function!
- start()
- sleep(1)
- term.setCursorPos(1, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement