Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("top")
- m.clear()
- redstone.setOutput("right", false)
- redstone.setOutput("left", false)
- redstone.setOutput("front", false)
- redstone.setOutput("back", false)
- function fillTable()
- button.setTable("Pulverizer", pulverizer, 10,20,3,5)
- button.setTable("Furnace", furnace, 10,20,7,9)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function pulverizer()
- button.toggleButton("Pulverizer")
- if redstone.getOutput("right") == true then
- redstone.setOutput("right", false)
- elseif redstone.getOutput("right") == false then
- redstone.setOutput("right", true)
- end
- end
- function furnace()
- button.toggleButton("Furnace")
- end
- fillTable()
- button.heading("Controller")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement