SHARE
TWEET

Lock

a guest Aug 25th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. local doorLocation = "side_goes_here"
  4. local password = "password_goes_here"
  5. local sleepTime = time_in_seconds
  6.  
  7. while true do
  8.  write("Enter the password: ")
  9.  input = read("*")
  10.  if input == password then
  11.         print("Password Correct!")
  12.         redstone.setOutput(doorLocation, true)
  13.         sleep(sleepTime)
  14.         redstone.setOutput(doorLocation, false)
  15.         term.clear()
  16.         term.setCursorPos(1,1)
  17.  else
  18.         print("Incorrect Password! Try again!")
  19.         sleep(sleepTime)
  20.         term.clear()
  21.         term.setCursorPos(1,1)
  22.  end
  23. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top