Advertisement
Guest User

ControlloBarre

a guest
Jan 23rd, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. local sInputSide = "left" -- change to the side of the redstone input (where the wire is)
  2.  
  3. local count = 0
  4. local lastInput = false
  5.  
  6. while true do
  7. os.pullEvent("redstone")
  8. local input = rs.getInput(sInputSide)
  9. if input ~= lastInput then
  10. if input then
  11. term.clear()
  12. count = count + 10
  13. print(count)
  14. end
  15. lastInput = input
  16. end
  17. end
  18.  
  19.  
  20.  
  21. local sInputSide2 = "right" -- change to the side of the redstone input (where the wire is)
  22.  
  23.  
  24. while true do
  25. os.pullEvent("redstone")
  26. local input = rs.getInput(sInputSide2)
  27. if input ~= lastInput then
  28. if input then
  29. term.clear()
  30. count = count - 10
  31. print(count)
  32. end
  33.  
  34. end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement