Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.unloadAPI("buttons")
- os.loadAPI("buttons")
- local running = true
- local guiButtons = {}
- pigman = function()
- buttons.setColor(guiButtons.buttonPm, colors.white, colors.lime)
- buttons.setText(guiButtons.buttonPm, "Pigman(ON)")
- end
- enderman = function()
- buttons.setColor(guiButtons.buttonEm, colors.white, colors.lime)
- buttons.setText(guiButtons.buttonEm, "Enderman(ON)")
- end
- withers = function()
- buttons.setColor(guiButtons.buttonWs, colors.white, colors.lime)
- buttons.setText(guiButtons.buttonWs, "Wither skeleton(ON)")
- end
- guiButtons.buttonPm = buttons.register(3, 2, 23, 3, colors.white, colors.red, "Pigman(OFF)", pigman)
- guiButtons.buttonEm = buttons.register(3, 6, 23, 3, colors.white, colors.red, "Enderman(OFF)", enderman)
- guiButtons.buttonWs = buttons.register(3, 10, 23, 3, colors.white, colors.red, "Wither skeleton(OFF)", withers)
- buttons.draw()
- while running do
- local eventArray = {os.pullEvent()}
- buttons.event(eventArray)
- buttons.draw()
- end
- os.unloadAPI("buttons")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement