Advertisement
Al_Tasin

ON OF

Apr 19th, 2020
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. on = "[ ON ]"
  2. off = "[ OFF ]"
  3. state = off
  4. state1 = off
  5.  
  6. function main()
  7. local menu = gg.choice({state.." Hack 1", state1.." Hack 2", "Exit"}, nil, "On-Off button demo")
  8. if menu == 1 then
  9. if state == off then
  10. state = on
  11. else
  12. state = off
  13. end
  14. hack1()
  15. elseif menu == 2 then
  16. if state1 == off then
  17. state1 = on
  18. else
  19. state1 = off
  20. end
  21. hack2()
  22. elseif menu == 3 then
  23. os.exit()
  24. end
  25. end
  26.  
  27. function hack1()
  28. if state == on then
  29. -- Enable Hack 1
  30. gg.toast("Success Enable Hack 1")
  31. else
  32. -- Disable Hack 1
  33. gg.toast("Success Disable Hack 1")
  34. end
  35. main()
  36. end
  37.  
  38. function hack2()
  39. if state1 == on then
  40. -- Enable Hack 2
  41. gg.toast("Success Enable Hack 2")
  42. else
  43. -- Disable Hack 2
  44. gg.toast("Success Disable Hack 2")
  45. end
  46. main()
  47. end
  48.  
  49. while true do
  50. if gg.isVisible() then
  51. gg.setVisible(false)
  52. main()
  53. end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement