Advertisement
CCninja86

Advanced Password Program

Mar 24th, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. -- AdvancedPasswordProgram
  2.  
  3. os.pullEvent = os.pullEventRaw
  4.  
  5. print ("Please enter password: ")
  6. local password = io.read()
  7.  
  8. lettersTyped = {}
  9.  
  10. event, character = os.pullEvent("char")
  11. event, scancode = os.pullEvent("key")
  12.  
  13. position = 1
  14. repeat
  15. if character ~= "" then
  16. table.insert(lettersTyped, position, character)
  17. print ("*")
  18. position = position + 1
  19. until scancode == "28"
  20.  
  21. if lettersTyped[1] == "4"
  22. and lettersTyped[2] == "9"
  23. and lettersTyped[3] == "e"
  24. and lettersTyped[4] == "7"
  25. and lettersTyped[5] == "F"
  26. and lettersTyped[6] == "r"
  27. and lettersTyped[7] == "y"
  28. and lettersTyped[8] == "O" then
  29. rs.setOutput("left", true)
  30. sleep(2)
  31. rs.setOutput("left", false)
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement