Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Save this file as startup on your computer.
- --The default password is "test", you can change it by modifying the pass = "yourpassword".
- --I might create a better verstion after.
- --Fixed all flaws, and it's working perfect now, have fun.
- os.pullEvent = os.pullEventRaw
- term.clear()
- term.setCursorPos(1,5)
- while true do
- print(" +-----------------+")
- print(" : Security System :")
- print(" : By Exploder :")
- print(" +-----------------+")
- print(" :1.Access Computer:")
- print(" :2.Exit :")
- print(" +-----------------+")
- term.setCursorPos(1,5)
- event, param1, param2 = os.pullEvent()
- if event == "char" and param1 == "1" then access() end
- if event == "char" and param1 == "2" then quit() end
- function access()
- term.clear()
- term.setCursorPos(1,1)
- pass = "test" --Here you can type your own password.
- print("Enter Password")
- term.setCursorPos(1,3)
- write("Password:")
- input = read("*")
- if input == pass then
- term.setCursorPos(1,5)
- print("Password is correct, granting access.")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- error()
- else
- term.setCursorPos(1,5)
- print("Password is incorrect.")
- sleep(2)
- os.shutdown()
- end
- end
- function quit()
- os.shutdown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement