SHARE
TWEET

06300630

a guest Jan 24th, 2020 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local pw = "1234" -- password
  2. local time = 3.5 -- seconds the redstone output stays activated (right password)
  3. local fime = 2 -- seconds you get if you enter wrong password
  4. local side = "right" -- side of redstone output
  5.  
  6. -- THE PROGRAM
  7. rs.setOutput(side, false)
  8. while true do
  9.   term.clear()
  10.   term.setCursorPos(1, 1)
  11.   write("Password: ")
  12.   t = read("*")
  13.   if t == pw then
  14.     print("Right password. You have " .. time .. " seconds.")
  15.     rs.setOutput(side, true)
  16.     sleep(time)
  17.     rs.setOutput(side, false)
  18.   else
  19.     rs.setOutput(side, false)
  20.     print("Wrong password.")
  21.   end
  22. 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