trinkmuetze

mc_password_door

Jul 31st, 2021
750
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local side = "left"
  2. local password = "191119"
  3. local opentime = 5
  4.  
  5. while true do
  6.  term.clear()
  7.  term.setCursorPos(1,1)
  8.  write("Password: ")
  9.  local input = read("*")
  10.  
  11.  if input == password then
  12.   term.clear()
  13.   term.setCursorPos(1,1)
  14.  
  15.   print("<3")
  16.   rs.setOutput(side,true)
  17.   sleep(opentime)
  18.   rs.setOutput(side,false)
  19.  
  20.  else
  21.   print("):")
  22.   sleep(2) -- Waits 2 seconds
  23.  end
  24. end
RAW Paste Data