MatthewGB

Lua Door Rednet 2

Jan 6th, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. rednet.open("back")
  2. pw = "lab404"
  3. rs.setOutput("right", false)
  4. rs.setOutput("bottom", false)
  5. write("Enter password: ")
  6. awn = read('*')
  7. if awn == pw then
  8.     rs.setOutput("right", true)
  9.     rednet.broadcast("A")
  10. else
  11.     rs.setOutput("bottom", true)
  12.     rednet.broadcast("B")
  13. end
  14. sleep(2)
  15. rednet.close("back")
  16. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment