Advertisement
minecraft_tyler

[Lua] Password lock (Emits Redstone signals)

Dec 18th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. --Note please don’t say you made this give me some credit please
  2. os.pullEvent = os.pullEventRaw
  3. pass = "[Put password here]" -- replace [Put password here] with your own password
  4. while true do
  5.     term.clear()
  6.     term.setCursorPos(12,5)
  7.     print("Please Enter The Password")
  8.     term.setCursorPos(12,6)
  9.     input = read("*")
  10.     if input == pass then
  11.      rs.setOutput("left",true) -- replace "left" with the side the door or redstone is connected to
  12.      sleep(2)
  13.      rs.setOutput("left",false) -- once again replace "left with the side the door or redstone is connected to
  14.     else
  15.      term.setCursorPos(12,7)
  16.      print("WRONG PASSWORD")
  17.      sleep(2)
  18.     end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement