Advertisement
nnimos

Untitled

May 6th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. function piston1O() -- Piston 1 Open -- Starts closed
  2. redstone.setOutput("left", true)
  3. end
  4.  
  5. function piston1C() -- Piston 1 Close
  6. redstone.setOutput("left", false)
  7. end
  8.  
  9. function piston2C() -- Piston 2 Close
  10. redstone.setOutput("back", true)
  11. end
  12.  
  13. function piston2O() -- Piston 2 Open
  14. redstone.setOutput("back", false)
  15. end
  16.  
  17. function piston3C() -- Piston 3 Close
  18. redstone.setOutput("right", true)
  19. end
  20.  
  21. function piston3O() -- Piston 3 Open
  22. redstone.setOutput("right", false)
  23. end
  24.  
  25. function piston4C() -- Piston 4 Close
  26. redstone.setOutput("front", true)
  27. end
  28.  
  29. function piston4O() -- Piston 4 Open
  30. redstone.setOutput("front", false)
  31. end
  32.  
  33. function run()
  34.  
  35. count = 0
  36.  
  37. while count<5 do
  38. piston4O()
  39. sleep(1)
  40. piston4C()
  41. sleep(1)
  42. piston4O()
  43. sleep(1)
  44. piston4C()
  45. sleep(1)
  46. piston3O()
  47. sleep(1)
  48. piston2O()
  49. sleep(7)
  50. piston2C()
  51. sleep(1)
  52. piston1O()
  53. sleep(1)
  54. piston1C()
  55. piston3C()
  56. count = count+1
  57. end
  58. end
  59.  
  60.  
  61. -- Program
  62. run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement