Jump to content
  • 0

How to make a multichoice script


272833839393393828

Question

3 answers to this question

Recommended Posts

local t = gg.multiChoice({'   '},nil,'                      whatever')
if t == nil then gg.sleep(1)
else
if t[1] then   () end
if t[2] then   () end
if t[3] then   () end 
if t[4] then   () end
if t[5] then   () end
if t[6] then   () end
end

Code ⬆️ is a simple multichoice-menu. Between the ' ' u write the name of the choices, f.ex: 'Hack1','Hack2'     after if t[1] then... u write function name it should do when clicking ,  t[1] - t[6] means that there are 6 possible choices in that multichoice menu, u can add as many as u want/need ;)

Link to comment
Share on other sites

hope this help

local gg = gg

::mainmenu::
menu  = gg.multiChoice({
     "Hack 1",
     "Hack 2",
     "Hack 3"},
nil,"Main Menu")

--cancel
if menu == nil then 
gg.toast("Canceled") 
os.exit() 
else

--hack 1
if menu[1] then
--put your hack here
gg.alert("Hack 1 Done")
end

--hack 2
if menu[2] then
--put your hack here
gg.alert("Hack 2 Done")
end

--hack 3
if menu[3] then
--put your hack here
gg.alert("Hack 3 Done")
end
end

while true do 
if gg.isVisible(true) then
goto mainmenu
end
end

 

Link to comment
Share on other sites

On 7/9/2020 at 8:48 PM, MonkeySAN said:

hope this help


local gg = gg

::mainmenu::
menu  = gg.multiChoice({
     "Hack 1",
     "Hack 2",
     "Hack 3"},
nil,"Main Menu")

--cancel
if menu == nil then 
gg.toast("Canceled") 
os.exit() 
else

--hack 1
if menu[1] then
--put your hack here
gg.alert("Hack 1 Done")
end

--hack 2
if menu[2] then
--put your hack here
gg.alert("Hack 2 Done")
end

--hack 3
if menu[3] then
--put your hack here
gg.alert("Hack 3 Done")
end
end

while true do 
if gg.isVisible(true) then
goto mainmenu
end
end

 

Thanks

On 7/5/2020 at 11:36 AM, 272833839393393828 said:

How to make a multiChoice script?

 

On 7/9/2020 at 8:48 PM, MonkeySAN said:

hope this help


local gg = gg

::mainmenu::
menu  = gg.multiChoice({
     "Hack 1",
     "Hack 2",
     "Hack 3"},
nil,"Main Menu")

--cancel
if menu == nil then 
gg.toast("Canceled") 
os.exit() 
else

--hack 1
if menu[1] then
--put your hack here
gg.alert("Hack 1 Done")
end

--hack 2
if menu[2] then
--put your hack here
gg.alert("Hack 2 Done")
end

--hack 3
if menu[3] then
--put your hack here
gg.alert("Hack 3 Done")
end
end

while true do 
if gg.isVisible(true) then
goto mainmenu
end
end

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.