Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. os.unloadAPI("buttons")
  2. os.loadAPI("buttons")
  3.  
  4. local running = true
  5. local guiButtons = {}
  6.  
  7. pigman = function()
  8. buttons.setColor(guiButtons.buttonPm, colors.white, colors.lime)
  9. buttons.setText(guiButtons.buttonPm, "Pigman(ON)")
  10. end
  11.  
  12. enderman = function()
  13. buttons.setColor(guiButtons.buttonEm, colors.white, colors.lime)
  14. buttons.setText(guiButtons.buttonEm, "Enderman(ON)")
  15. end
  16.  
  17. withers = function()
  18. buttons.setColor(guiButtons.buttonWs, colors.white, colors.lime)
  19. buttons.setText(guiButtons.buttonWs, "Wither skeleton(ON)")
  20. end
  21.  
  22. guiButtons.buttonPm = buttons.register(3, 2, 23, 3, colors.white, colors.red, "Pigman(OFF)", pigman)
  23. guiButtons.buttonEm = buttons.register(3, 6, 23, 3, colors.white, colors.red, "Enderman(OFF)", enderman)
  24. guiButtons.buttonWs = buttons.register(3, 10, 23, 3, colors.white, colors.red, "Wither skeleton(OFF)", withers)
  25.  
  26.  
  27. buttons.draw()
  28. while running do
  29. local eventArray = {os.pullEvent()}
  30. buttons.event(eventArray)
  31. buttons.draw()
  32. end
  33.  
  34. os.unloadAPI("buttons")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement