Advertisement
Guest User

Password_Locking_System

a guest
Jan 17th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.82 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. print ("Hello user, please imput password")
  3. write("")
  4. password = io.read()
  5.  
  6. if password == "789789" then
  7. print ("Password is ok")
  8. rs.setOutput ("right", true )
  9. sleep(3)
  10. rs.setOutput ("right", false )
  11. else
  12. print ("Password is wrong, try again")
  13. write("")
  14. password = io.read()
  15. if password == "789789" then
  16. print ("Password is ok")
  17. rs.setOutput ("right", true )
  18. sleep(3)
  19. rs.setOutput ("right", false )
  20. else
  21. print ("Failed again! Activating Alarm failsafe mode")
  22. repeat
  23. rs.setOutput ("top", true)
  24. print ("Please input failsafe alarm deactivation password")
  25. write("Failsafe Password:")
  26. failsafe = io.read()
  27. if failsafe == "A-0125-A" then
  28. rs.setOutput ("top", false )
  29. break
  30. else
  31. print ("Sorry, please contact Admin or Failsafe password")
  32. end
  33. until i==3
  34.  
  35.  
  36. end
  37. end
  38. os.shutdown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement