Sayomie550

Untitled

Jan 17th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. --[[
  2.     Generator Room Door Lock
  3. --]]
  4. --os.pullEvent = os.pullEventRaw
  5. local password = ("open")
  6.  
  7. while true do
  8.     term.clear()
  9.     term.setCursorPos(1,1)
  10.     write("Input Generator Room Door Password: ")
  11.     local input = read("*")
  12.     if input == password then
  13.         term.clear()
  14.         term.setCursorPos(1,1)
  15.         print("Door Open")
  16.         rs.setOutput(left,true)
  17.         rs.setOutput(top,false)
  18.         sleep(5)
  19.         rs.setOutput(left,false)
  20.     else
  21.         term.clear()
  22.         term.setCursorPos(1,1)
  23.         print("Password Incorrect!")
  24.         rs.setOutput(top,true)
  25.     end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment