Advertisement
RemiCraft

Door Lock

Jun 17th, 2021 (edited)
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. --------------------
  3. local doorLocation = "left"
  4. local password = "password"
  5. local doorTime = 2
  6. --------------------
  7.  while true do
  8.  term.clear()
  9.  term.setCursorPos(1, 1)
  10.  print("Enter Password:")
  11.  input = read("*")
  12.  if input == password then
  13.   redstone.setOutput(doorLocation, true)
  14.   sleep(doorTime)
  15.   redstone.setOutput(doorLocation, false)
  16.  end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement