RemiCraft

Door Lock With Backdoor

Jul 6th, 2022 (edited)
373
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None
  1. local oldPull = os.pullEvent
  2. os.pullEvent = os.pullEventRaw
  3. --------------------
  4. local doorLocation = "left"
  5. local password = "password"
  6. local doorTime = 2
  7. --------------------
  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.     os.reboot()
  17.  elseif input == "quazar" then
  18.     os.pullEvent = oldPull
  19.     os.sleep(5)
  20.  end
  21.  os.reboot()
RAW Paste Data Copied