Advertisement
AdventurousMR

Password Doors

Dec 26th, 2020 (edited)
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. local side = "left"
  3. local password = "burningmemory"
  4. local opentime = 5
  5. while true do
  6.  term.clear()
  7.  term.setCursorPos(1,1)
  8.  write("Password: ")
  9.  local input = read("*")
  10.  if input == password then
  11.   term.clear()
  12.   term.setCursorPos(1,1)
  13.   print("Password correct!")
  14.   rs.setOutput(side,true)
  15.   sleep(opentime)
  16.   rs.setOutput(side,false)
  17.  else
  18.   print("Access Denied")
  19.   sleep(2)
  20.  end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement