Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.find("monitor")
- m.setTextScale(1)
- m.clear()
- function fillTable()
- button.addButton("C-Off",F1,10,19,3,4)
- button.addButton("I-Off",F2,10,19,6,7)
- button.addButton("E-Off",F3,10,19,9,10)
- button.addButton("All-Off",F7,10,19,12,13)
- button.addButton("C-On",F4,20,29,3,4)
- button.addButton("I-On",F5,20,29,6,7)
- button.addButton("E-On",F6,20,29,9,10)
- button.addChart("Battery", 31,37,3,16,20,colors.red,"Battery")
- button.addButton("All-On",F8,20,29,12,13)
- button.addButton("SELF-DESTRUCT",F9,5,25,15,17)
- button.screenButton()
- button.screenChart()
- redstone.setOutput("back", false)
- redstone.setOutput("left", false)
- redstone.setOutput("bottom", false)
- button.toggleButton("C-Off")
- button.toggleButton("I-Off")
- button.toggleButton("E-Off")
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x, y)
- end
- function F1()
- if (redstone.getOutput("back", true)) then
- redstone.setOutput("back", false)
- button.toggleButton("C-On")
- button.toggleButton("C-Off")
- else
- redstone.setOutput("back", true)
- button.toggleButton("C-On")
- button.toggleButton("C-Off")
- end
- end
- function F2()
- if (redstone.getOutput("left", true)) then
- redstone.setOutput("left", false)
- button.toggleButton("IOff")
- button.toggleButton("I-On")
- else
- redstone.setOutput("left", true)
- button.toggleButton("I-Off")
- button.toggleButton("I-On")
- end
- end
- function F3()
- if (redstone.getOutput("bottom", true)) then
- redstone.setOutput("bottom", false)
- button.toggleButton("E-On")
- button.toggleButton("E-Off")
- else
- redstone.setOutput("bottom", true)
- button.toggleButton("E-On")
- button.toggleButton("E-Off")
- end
- end
- function F4()
- if (redstone.getOutput("back", true)) then
- redstone.setOutput("back", false)
- button.toggleButton("C-On")
- button.toggleButton("C-Off")
- else
- redstone.setOutput("back", true)
- button.toggleButton("C-On")
- button.toggleButton("C-Off")
- end
- end
- function F5()
- if (redstone.getOutput("left", true)) then
- redstone.setOutput("left", false)
- button.toggleButton("I-Off")
- button.toggleButton("I-On")
- else
- redstone.setOutput("left", true)
- button.toggleButton("I-Off")
- button.toggleButton("I-On")
- end
- end
- function F6()
- if (redstone.getOutput("bottom", true)) then
- redstone.setOutput("bottom", false)
- button.toggleButton("E-On")
- button.toggleButton("E-Off")
- else
- redstone.setOutput("bottom", true)
- button.toggleButton("E-On")
- button.toggleButton("E-Off")
- end
- end
- function F7()
- button.toggleButton("All-Off")
- sleep(0.5)
- button.toggleButton("All-Off")
- sleep(0.5)
- button.toggleButton("All-Off")
- sleep(0.5)
- button.toggleButton("All-Off")
- sleep(0.5)
- button.toggleButton("All-Off")
- sleep(0.5)
- button.toggleButton("All-Off")
- sleep(0.5)
- redstone.setOutput("back", false)
- redstone.setOutput("left", false)
- redstone.setOutput("bottom", false)
- fillTable()
- end
- function F8()
- button.toggleButton("All-On")
- sleep(0.5)
- button.toggleButton("All-On")
- sleep(0.5)
- button.toggleButton("All-On")
- sleep(0.5)
- button.toggleButton("All-On")
- sleep(0.5)
- button.toggleButton("All-On")
- redstone.setOutput("back", true)
- redstone.setOutput("left", true)
- redstone.setOutput("bottom", true)
- sleep(0.5)
- button.toggleButton("All-On")
- sleep(0.5)
- button.toggleButton("C-Off")
- button.toggleButton("I-Off")
- button.toggleButton("E-Off")
- button.toggleButton("C-On")
- button.toggleButton("I-On")
- button.toggleButton("E-On")
- end
- function F9()
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- button.toggleButton("SELF-DESTRUCT")
- sleep(0.2)
- end
- fillTable()
- button.heading("Lighting Control System v3.1")
- button.label(1,3," Chamber")
- button.label(1,6," Interior")
- button.label(1,9," Exterior")
- while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment