Advertisement
Guest User

startup

a guest
May 7th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. chat = peripheral.wrap("bottom")
  2. function drs()
  3. if rs.getOutput("right") == true then
  4. rs.setOutput("left", false)
  5. rs.setOutput("right", false)
  6. else
  7. rs.setOutput("left", true)
  8. rs.setOutput("right", true)
  9. end
  10. end
  11. while true do
  12. a, b, c = os.pullEvent("chat")
  13. var = string.match(c, "door")
  14. if var == "door" then
  15. drs()
  16. else
  17. var1 = string.match(c, "Door")
  18. if var1 == "Door" then
  19. drs()
  20. end
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement