Advertisement
denvys5

Password

Nov 14th, 2013
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.55 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. correct = "pass" -- Put your password in between the ""
  3. print("Iron Door Security Lock By Denvys5 and Pro") -- Name of the program
  4. write("Password: ") -- writes out "Password: "on your computer
  5. password = read()
  6. if password == (correct) then -- If it equals what you password up the top then it will
  7. print("Access Granted.") -- Print "Access Granted." on your computer
  8. redstone.setOutput("left", true) -- emits a redstone pulse to the LEFT side of the computer
  9. sleep(5) -- holds the redstone pulse for 5 extra seconds
  10. redstone.setOutput("left", false) -- this stops the redstone pulse
  11. os.shutdown() -- shuts down the computer
  12. else -- if you don't enter the password the first time then
  13. print("Alert!!!") -- Print "Alert" on your computer
  14. redstone.setOutput("right", true) -- emits a redstone pulse to the RIGHT side of the computer
  15. sleep(10) -- holds the redstone pulse for 5 extra seconds
  16. redstone.setOutput("right", false) -- this stops the redstone pulse
  17. repeat -- it will repeat the proccess
  18. write("Password: ") -- writes out "Password: "on your monitor
  19. password = read()
  20. until password == (correct) -- it will repeat until it equals what you password up the top then it will
  21. print("Access Granted.") -- Print "Access Granted." on your computer
  22. redstone.setOutput("left", true) -- emits a redstone pulse to the LEFT side of the computer
  23. sleep(5) -- holds the redstone pulse for 5 extra seconds
  24. redstone.setOutput("left", false) -- this stops the redstone pulse
  25. os.shutdown() -- shuts down the computer
  26. end -- ends the program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement