CheatTester Posted April 5, 2021 Share Posted April 5, 2021 hello, any experience scripter can give me little help? i want to do this ======== function mainmenu() funtion A() run loop/repeat function A() then close gg ui stop the loop if GG icon is press/open and back to mainmenu() ================ thankyou very much, Link to comment Share on other sites More sharing options...
MAARS Posted April 15, 2021 Share Posted April 15, 2021 I mean you want to make your script not close itself right ok let me make a template for you. function Main() debug = -1 local menu = gg.choice({ "Super Hack 1"; "Super Hack 2"; "Super Hack 3"; "[ ] Exit";}, 0, "the super script") if (menu == nil) then gg.setVisible(false) gg.toast("you canceled the dialogue") elseif (menu == 1) then SH1() elseif (menu == 2) then SH2() elseif (menu == 3) then SH3() elseif (menu == 4) then os.exit() end end function SH1() debug = -1 -- Do some stuff -- You can also add a sub menu if you want gg.alert("Super Hack 1") end function SH2() debug = -1 -- Do some stuff -- You can also add a sub menu if you want gg.alert("Super Hack 2") end function SH3() debug = -1 -- Do some stuff -- You can also add a sub menu if you want gg.alert("Super Hack 3") end --== Script config while true do if (gg.isVisible(true)) then gg.setVisible(false) debug = 1 end if debug == 1 then Main() end end Link to comment Share on other sites More sharing options...
Question
CheatTester
hello, any experience scripter can give me little help?
i want to do this
========
function mainmenu()
funtion A()
run loop/repeat function A() then close gg ui
stop the loop if GG icon is press/open and back to mainmenu()
================
thankyou very much,
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.