Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("BryButtonAPI")
- monitor = peripheral.find("monitor")
- monitor.setTextScale(1)
- monitor.setBackgroundColor(colors.black)
- --Define the colors used in the program
- black = colors.black
- white = colors.white
- red = colors.red
- green = colors.green
- --Define the functions used in the program
- function disableRedstone()
- rs.setOutput("left", false)
- rs.setOutput("right", false)
- rs.setOutput("back", false)
- rs.setOutput("front", false)
- rs.setOutput("top", false)
- rs.setOutput("down", false)
- end
- function Enderfarm(state)
- if state then
- rs.setOutput("left", true)
- else
- rs.setOutput("left", false)
- end
- end
- function Blazefarm(state)
- if state then
- rs.setOutput("right", true)
- else
- rs.setOutput("right", false)
- end
- end
- function Witherfarm(state)
- if state then
- rs.setOutput("back", true)
- else
- rs.setOutput("back", false)
- end
- end
- --Define the buttons used in the program
- Mobfarm1 = BryButtonAPI.createButton(2,2,"Enderman"red, green, true, Enderfarm)
- Mobfarm2 = BryButtonAPI.createButton(2,4,"Blaze"red, green, true, Blazefarm)
- Mobfarm3 = BryButtonAPI.createButton(2,6,"Wither Skeleton"red, green, true, Witherfarm)
- --Make ButtonList
- list={Mobfarm1,Mobfarm2,Mobfarm3}
- --Draw Buttons on the screen
- BryButtonAPI.drawButton(monitor,list)
- while true do
- BryButtonAPI.checkButtons(monitor,list, 0, print)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement