Advertisement
TomWaa

[LUA] (TOGGLE) Computercraft Advanced Password lock [V1.4]

Jul 15th, 2013
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. while true do
  2. Shell.run("clear")
  3. os.pullEvent = os.pullEventRaw
  4. textutils.slowPrint("Password to open/Close the door")
  5. input = read("*")
  6. open = "pass" --Password HERE (OPEN)
  7. close = "pass2" --Password HERE (CLOSE)
  8. Developer = "dev" -- Change if you want to
  9.  
  10. if input == (Developer) then
  11. Shell.run("clear")
  12. break
  13. end
  14.  
  15. if input == (open) then
  16. textutils.slowPrint("Opened the door")
  17. rs.setOutput("side", true) -- Change the side where the redstone output is
  18. end
  19.  
  20. if input == (Close) then
  21. textutils.slowPrint("Closed the door")
  22. rs.setOutput("bottom", false)
  23. sleep(3)
  24. end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement