Advertisement
gunny576

RedStone Signal Toggle

Apr 7th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. function left ()
  2.     redstone.setOutput("left", (not redstone.getOutput("left")))
  3.     end
  4. function right ()
  5.     redstone.setOutput("right", (not redstone.getOutput("right")))
  6.     end
  7. function up ()
  8.     redstone.setOutput("top", (not redstone.getOutput("up")))
  9.     end
  10. function down ()
  11.     redstone.setOutput("bottom", (not redstone.getOutput("down")))
  12.     end
  13. function front ()
  14.     redstone.setOutput("front", (not redstone.getOutput("front")))
  15.     end
  16. function back ()
  17.     redstone.setOutput("back", (not redstone.getOutput("back")))
  18.     end
  19.  
  20. arg = {...}
  21. arg[1]=arg[1]+0
  22. if (arg[1]==4) then
  23.     left()
  24.     end
  25. if (arg[1]==2) then
  26.     right()
  27.     end
  28. if (arg[1]==5) then
  29.     up()
  30.     end
  31. if (arg[1]==6) then
  32.     down()
  33.     end
  34. if (arg[1]==1) then
  35.     front()
  36. end
  37. if (arg[1]==3) then
  38.     back()
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement