I think I understand what you saying
function HOME()
while true do
if gg.isVisible(true) then
sys = 1
gg.setVisible(false)
end
if sys == 1 then
H = gg.multiChoice({
"test",
"EXIT SCRIPT",},nil,"")
if H == nil then else
if H[1] == true then test() end
if H[2] == true then os.exit() end
end
sys = -1
end
end
end
function test()
while true do
if gg.isVisible(true) then
sys = 1
gg.setVisible(false)
end
if sys == 1 then
L = gg.multiChoice({
"test 2",
"BACK TO MAIN MENU",},nil,"")
if L == nil then else
if L[1] == true then test2() end
if L[2] == true then HOME() end
end
sys = -1
end
end
end
function test2()
gg.alert("hello")
end
while true do
if gg.isVisible(true) then
sys = 1
gg.setVisible(false)
end
if sys == 1 then
HOME()
end
end