1x1 Posted May 15, 2022 Share Posted May 15, 2022 Hello, so i wanted to make a save multiChoice checkbox after executing. So i have the code for gg.choice: function START() local Menu = gg.choice({"Button 1", "Button 2", "Exit"}, abc, 'Hello button") if Menu == 1 then abc = 1 end if Menu == 2 then abc = 2 end if Menu == 3 then os.exit(print("Bye")) end abc = 0 while(true) do if gg.isVisible(true) then gg.setVisible(false) Start() end end But the problem is, i don't know how to do the same thing like Choice but in multiChoice. Please help Link to comment Share on other sites More sharing options...
Lover1500 Posted May 16, 2022 Share Posted May 16, 2022 local selection = {false, false} function start() local multiMenu = gg.multiChoice({'hack health', 'hack mana', 'Exit'}, selection) if not multiMenu then return end if multiMenu[3] then print('Exited') os.exit() end selection = multiMenu end while true do if gg.isVisible(true) then gg.setVisible(false) start() end end Link to comment Share on other sites More sharing options...
1x1 Posted May 16, 2022 Author Share Posted May 16, 2022 1 hour ago, Lover1500 said: local selection = {false, false} function start() local multiMenu = gg.multiChoice({'hack health', 'hack mana', 'Exit'}, selection) if not multiMenu then return end if multiMenu[3] then print('Exited') os.exit() end selection = multiMenu end while true do if gg.isVisible(true) then gg.setVisible(false) start() end end Thank you very much Lover1500 Link to comment Share on other sites More sharing options...
HEROGAMEOfficial Posted May 16, 2022 Share Posted May 16, 2022 Try: me.lua @Enybyi can't inset Lua program in here. Link to comment Share on other sites More sharing options...
MAARS Posted May 16, 2022 Share Posted May 16, 2022 You can even make it remember the state after restart as shown here Link to comment Share on other sites More sharing options...
Question
1x1
Hello, so i wanted to make a save multiChoice checkbox after executing.
So i have the code for gg.choice:
function START()
local Menu = gg.choice({"Button 1", "Button 2", "Exit"}, abc, 'Hello button")
if Menu == 1 then
abc = 1
end
if Menu == 2 then
abc = 2
end
if Menu == 3 then
os.exit(print("Bye"))
end
abc = 0
while(true) do
if gg.isVisible(true) then
gg.setVisible(false)
Start()
end
end
But the problem is, i don't know how to do the same thing like Choice but in multiChoice.
Please help
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.