Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on = "[ ON ]"
- off = "[ OFF ]"
- state = off
- state1 = off
- function main()
- local menu = gg.choice({state.." Hack 1", state1.." Hack 2", "Exit"}, nil, "On-Off button demo")
- if menu == 1 then
- if state == off then
- state = on
- else
- state = off
- end
- hack1()
- elseif menu == 2 then
- if state1 == off then
- state1 = on
- else
- state1 = off
- end
- hack2()
- elseif menu == 3 then
- os.exit()
- end
- end
- function hack1()
- if state == on then
- -- Enable Hack 1
- gg.toast("Success Enable Hack 1")
- else
- -- Disable Hack 1
- gg.toast("Success Disable Hack 1")
- end
- main()
- end
- function hack2()
- if state1 == on then
- -- Enable Hack 2
- gg.toast("Success Enable Hack 2")
- else
- -- Disable Hack 2
- gg.toast("Success Disable Hack 2")
- end
- main()
- end
- while true do
- if gg.isVisible() then
- gg.setVisible(false)
- main()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement