Advertisement
Guest User

My lock

a guest
Feb 23rd, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw -- makes it so no one can terminate the program
  2. pass = "Baer" -- replace "norway240" with your password
  3. while true do
  4.  term.clear()
  5.  term.setCursorPos(12,5)
  6.  print("Please Enter The Password")
  7.  term.setCursorPos(12,6)
  8.  input = read("*")
  9.  if input == pass then
  10.  rs.setOutput("back",true) -- replace "left" with the side the door is connected to
  11.  sleep(2)
  12.  rs.setOutput("back",false) -- once again replace "left with the side the door is connected to
  13.  else
  14.  term.setCursorPos(12,7)
  15.  print("WRONG PASSWORD")
  16.  sleep(2)
  17.  end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement