Jump to content
  • 0

how to execute a function on start up of a script


animehack

Question

3 answers to this question

Recommended Posts

i got this from someone sometime ago.

you can try it.

--script will do this first before entering main menu upon execute the script--
gg.setVisible(false)
gg.searchNumber("0",gg.TYPE_DWORD)
local t = gg.getResults(1)
gg.addListItems(t)
gg.clearResults()
gg.toast("Done")

function main()
gg.setVisible(false)
local menu = gg.choice({
    "Hack 1",
    "Hack 2",
    "Hack 3"}
,nil,"Main Menu")

if menu == 1 then
gg.alert("Hack 1 Done")
elseif
menu == 2 then 
gg.alert("Hack 2 Done")
elseif 
menu == 3 then
gg.alert("Hack 3 Done")
elseif 
menu == nil then
gg.toast("Canceled")
os.exit()
end
end

while true do
if gg.isVisible(true) then
main()
end
end

i dont know exactly or how you want it but i hope you get a rough idea about it.

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.