Advertisement
Guest User

startup

a guest
Mar 8th, 2014
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. local pullEvent = os.pullEvent
  2. local password = "penis"
  3. rednet.open("left")
  4.  
  5. while true do
  6.   term.clear()
  7.   term.setCursorPos(1,1)
  8.   print("Passwort: ")
  9.   input = read("*")
  10.     if input == password then
  11.       id,message = rednet.receive()
  12.       if id == 6 and message == "is open" then
  13.         rs.setOutput("bottom",false)
  14.         rednet.send(6,"is closed")
  15.       elseif id == 6 and message == "is closed" then
  16.         rs.setOutput("bottom",true)
  17.         rednet.send(6,"is open")
  18.       end
  19.     else
  20.       print("Falsches Passwort")
  21.     end
  22.   sleep(1)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement