Advertisement
Guest User

mydick

a guest
Jul 30th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. print("Running my dick")
  2.  
  3. os.loadAPI("touchpoint")
  4. mon = peripheral.wrap("top")
  5. mon.clear()
  6.  
  7.  
  8. local t = touchpoint.new("top")
  9.  
  10. function pulseRedstone(side, buttonName)
  11.   redstone.setOutput(side,true)
  12.   t:toggleButton(buttonName)
  13.   sleep(1)
  14.   redstone.setOutput(side,false)
  15.   t:toggleButton(buttonName)
  16. end
  17.  
  18.  
  19. t:add("Device1", function() pulseRedstone("left","Device1") end, 2, 2, 14, 11, colors.red, colors.lime)
  20. t:add("Device2", function() pulseRedstone("right","Device2") end, 16, 2, 28, 11, colors.red, colors.lime)
  21.  
  22. t:draw()
  23. t:run()
  24.  
  25. --while true do
  26.   --      local event, p1 = t:handleEvents(os.pullEvent())
  27.     --    if event == "button_click" then
  28.       --          t:toggleButton(p1)
  29.                -- rs.setOutput(p1, not rs.getOutput(p1))
  30.        -- end
  31. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement