Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("top")
- o = "back"
- gre = false
- lib = false
- bro = false
- yel = false
- pur = false
- pin = true
- lig = true
- mag = false
- ora = false
- whi = false
- m.clear()
- function fillTable()
- button.setTable("Auto Spawner", green, 2,17,5,7)
- button.setTable("Witch", lightblue, 2,17,9,11)
- button.setTable("Zombie", brown, 2,17,13,15)
- button.setTable("Blaze", yellow, 22,37,5,7)
- button.setTable("Villager", purple, 22,37,9,11)
- button.setTable("Off", turnoff, 15,24,2,4)
- button.setTable("<- Door", doorleft, 1,10,1,3)
- button.setTable("Door ->", doorright, 29,39,1,3)
- button.setTable("Wither Skeleton", magenta, 22,37,13,15)
- button.setTable("Pink Slime", white, 2,17,17,19)
- button.setTable("Light", orange, 15,25,21,23)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function turnoff()
- button.flash("Off")
- if gre then
- button.toggleButton("Auto Spawner")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.green))
- gre = false
- end
- if lib then
- button.toggleButton("Witch")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.lightBlue))
- lib = false
- end
- if bro then
- button.toggleButton("Zombie")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.brown))
- bro = false
- end
- if yel then
- button.toggleButton("Blaze")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.yellow))
- yel = false
- end
- if pur then
- button.toggleButton("Villager")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.purple))
- pur = false
- end
- if mag then
- button.toggleButton("Wither Skeleton")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.magenta))
- mag = false
- end
- if whi then
- button.toggleButton("Pink Slime")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.white))
- whi = false
- end
- end
- function doorleft()
- if pin then
- print("pink is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.pink))
- else
- print("pink is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.pink))
- end
- button.toggleButton("<- Door")
- pin = not pin
- end
- function doorright()
- if lig then
- print("lightGray is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.lightGray))
- else
- print("lightGray is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.lightGray))
- end
- button.toggleButton("Door ->")
- lig = not lig
- end
- function green()
- if gre then
- print("green is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.green))
- else
- print("green is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.green))
- end
- button.toggleButton("Auto Spawner")
- gre = not gre
- end
- function lightblue()
- if lib then
- print("light blue is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.lightBlue))
- else
- print("light blue is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.lightBlue))
- end
- button.toggleButton("Witch")
- lib = not lib
- end
- function brown()
- if bro then
- print("brown is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.brown))
- else
- print("brown is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.brown))
- end
- button.toggleButton("Zombie")
- bro = not bro
- end
- function yellow()
- if yel then
- print("yellow is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.yellow))
- else
- print("yellow is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.yellow))
- end
- button.toggleButton("Blaze")
- yel = not yel
- end
- function purple()
- if pur then
- print("purple is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.purple))
- else
- print("purple is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.purple))
- end
- button.toggleButton("Villager")
- pur = not pur
- end
- function magenta()
- if mag then
- print("magenta is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.magenta))
- else
- print("magenta is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.magenta))
- end
- button.toggleButton("Wither Skeleton")
- mag = not mag
- end
- function orange()
- if ora then
- print("orange is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.orange))
- else
- print("orange is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.orange))
- end
- button.toggleButton("Light")
- ora = not ora
- end
- function white()
- if whi then
- print("white is now inactive")
- rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.white))
- else
- print("white is now active")
- rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.white))
- end
- button.toggleButton("Pink Slime")
- whi = not whi
- end
- fillTable()
- button.heading("Spawning Control")
- rs.setBundledOutput(o,320)
- button.toggleButton("Door ->")
- button.toggleButton("<- Door")
- button.label(2,22,"Cursed Room:")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement