daily pastebin goal
91%
SHARE
TWEET

startup

a guest Jul 12th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("button")
  2. m = peripheral.wrap("top")
  3. m.clear()
  4. redstone.setOutput("right", false)
  5. redstone.setOutput("left", false)
  6. redstone.setOutput("front", false)
  7. redstone.setOutput("back", false)
  8. function fillTable()
  9.   button.setTable("Pulverizer", pulverizer, 10,20,3,5)
  10.   button.setTable("Furnace", furnace, 10,20,7,9)
  11.   button.screen()
  12. end
  13.  
  14. function getClick()
  15.   event,side,x,y = os.pullEvent("monitor_touch")
  16.   button.checkxy(x,y)
  17. end
  18.  
  19. function pulverizer()
  20.   button.toggleButton("Pulverizer")
  21.   if redstone.getOutput("right") == true then
  22.   redstone.setOutput("right", false)
  23.   elseif redstone.getOutput("right") == false then
  24.   redstone.setOutput("right", true)
  25.    end
  26. end
  27. function furnace()
  28.   button.toggleButton("Furnace")
  29. end
  30.  
  31. fillTable()
  32. button.heading("Controller")
  33.  
  34. while true do
  35.   getClick()
  36. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top