Advertisement
meuced

Door

Dec 30th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. local oldPull = os.pullEvent;
  2.  
  3. os.pullEvent = os.pullEventRaw;
  4.  
  5. term.clear()
  6. term.setCursorPos(1,1)
  7.  
  8. correctpass = "tonpwd"
  9.  
  10. write("Enter Password: ")
  11. pass = read("*")
  12. if pass == (correctpass) then
  13.     write("Opening Door")
  14.     redstone.setOutput("left", true )
  15.     sleep(3)
  16.     redstone.setOutput("left", false )
  17.     os.shutdown()
  18. end
  19. write("Incorrect Password")
  20. sleep(3)
  21. term.clear()
  22. term.setCursorPos(1,1)
  23. textutils.slowPrint("Intruder Alert Activating Alarm!")
  24. --sleep(1)
  25. --redstone.setOutput("back",true )
  26. s--leep(3)
  27. --redstone.setOutput("back",false )
  28. os.shutdown()
  29. os.pullEvent = oldPull;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement