Advertisement
mrgreaper2004

Untitled

Mar 28th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local monitor = peripheral.wrap("right")
  2. function upd()
  3. monitor.clear()
  4. monitor.write("platform moving up")
  5. sleep(1)
  6. end
  7. function downd()
  8. monitor.clear()
  9. monitor.write("platform moving down")
  10. sleep(1)
  11. end
  12. function fwdd()
  13. monitor.clear()
  14. monitor.write("platform moving")
  15. sleep(1)
  16. end
  17. while true do
  18. os.pullEvent('redstone')
  19. if rs.getBundledInput("back") == 1 then
  20. downd()
  21. elseif rs.getBundledInput("back") == 16384 then
  22. upd()
  23. elseif rs.getBundledInput("back") == 2 then
  24. else print("error")
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement