Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = "left"
- local password = "passord"
- local adminpassword = "adminpassord"
- local opentime = 5
- while true do
- term.clear()
- term.setCursorPos(1,1)
- os.pullEvent = os.pullEventRaw
- write("Passord, takk! ")
- local input = read(".")
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Riktig passord! Velkommen inn.")
- rs.setOutput(side,true)
- sleep(opentime)
- rs.setOutput(side,false)
- else if input == adminpassword then
- term.clear()
- term.setCursorPos(1,1)
- write("Adminmodus aktivert...")
- else
- term.clear()
- term.setCursorPos(1,1)
- write("Feil passord!")
- sleep(2)
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement