Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- M = peripheral.wrap("monitor_1")
- M.clear()
- C = peripheral.wrap("container_chest_3")
- E = peripheral.wrap("ender_chest_0")
- function fillTable()
- button.setTable("Grinder", grinder, 10, 20, 3, 5)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function grinder()
- button.toggleButton("Grinder")
- toggleRedstoneColor(colors.black)
- end
- function toggleRedstoneColor(myColor)
- value = redstone.getBundledOutput("bottom")
- if redstone.testBundledInput("bottom",myColor) then
- redstone.setBundledOutput("bottom",value-myColor)
- else
- redstone.setBundledOutput("bottom",value+myColor)
- end
- end
- function resetMachines()
- redstone.setBundledOutput("bottom",colors.black+colors.yellow)
- C.pullItem("up",1)
- E.pullItem("up",1)
- end
- resetMachines()
- fillTable()
- button.heading("MOB KILLER 9000")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement