Advertisement
Guest User

ControlloBarre

a guest
Jan 23rd, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 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. count = count + 10
  12. print(count)
  13. end
  14. lastInput = input
  15. end
  16. end
  17.  
  18.  
  19.  
  20. local sInputSide2 = "right" -- change to the side of the redstone input (where the wire is)
  21.  
  22. local count = 0
  23. local lastInput = false
  24.  
  25. while true do
  26. os.pullEvent("redstone")
  27. local input = rs.getInput(sInputSide2)
  28. if input ~= lastInput then
  29. if input then
  30. count = count - 10
  31. print(count)
  32. end
  33. lastInput = input
  34. end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement