Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. local side = "left"
  2. local password = "passord"
  3. local adminpassword = "adminpassord"
  4. local opentime = 5
  5.  
  6. while true do
  7. term.clear()
  8. term.setCursorPos(1,1)
  9. os.pullEvent = os.pullEventRaw
  10. write("Passord, takk! ")
  11. local input = read(".")
  12. if input == password then
  13. term.clear()
  14. term.setCursorPos(1,1)
  15. print("Riktig passord! Velkommen inn.")
  16. rs.setOutput(side,true)
  17. sleep(opentime)
  18. rs.setOutput(side,false)
  19. else if input == adminpassword then
  20. term.clear()
  21. term.setCursorPos(1,1)
  22. write("Adminmodus aktivert...")
  23. else
  24. term.clear()
  25. term.setCursorPos(1,1)
  26. write("Feil passord!")
  27. sleep(2)
  28. os.reboot()
  29. end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement