Jump to content
  • 0

script ends un expectedly after turning on module


animehack

Question

ok so i run my script evrything wotks like ut should for the most part i am only having 1 ptoblem after i run a hack the script exits here are some parts of my code:

so at the bottom of my script i define when i want gg to be visible

while true do
	if gg.isVisible(true) then
	    gg.setVisible(false)
	    Qjctx = 1
    end
    gg.sleep(100)
		if loader123 then
			loader123()
		elseif main then
			main()
	end
end 

then when i start the script it loads this

do
function loader123()
gg.clearResults()

LOAD_CaT= gg.choice({
"[Main version]",
"[Lite Version]",
"[ E X I T ]"},
nil,"ALERT")

if LOAD_CaT == 1 then Lmain() end

if LOAD_CaT == 2 then lite() end

if LOAD_CaT == 3 then exit() end
end
end

do
function Lmain()

gg.sleep(200)

-- i removed some anti ss tool code from this part but it shouldent effect anything

  gg.sleep(2000)
	main()
	end
end

then it loads main menu function

do
function main()
gg.clearResults()
MAIN_CaT= gg.choice({
"[Stats]",
"[Player]",
"[World]",
"[Shop]",
"[Fun]",
"[Exploits]",
"[Misc]",
"[ E X I T ]"},
nil,"text")

if MAIN_CaT == 1 then stats() end

if MAIN_CaT == 2 then player() end

if MAIN_CaT == 3 then world() end

if MAIN_CaT == 4 then shop() end

if MAIN_CaT == 5 then fun() end

if MAIN_CaT == 6 then exploits() end

if MAIN_CaT == 7 then misc() end

if MAIN_CaT == 8 then exit() end

if Menu == nil then os.exit() end

end
end

then lets say we go into stats()

do
on = '[ON]'
off = '[OFF]'
Astats = off
Bstats = off

function stats()
  stats_menu = gg.choice({
    Astats .. ' wood armor stats',
	Bstats .. ' plunger stats', 
	'back'},
	nil,
	'edit stats of items')
  if stats_menu == 1 then
	wood()
  elseif stats_menu == 2 then
	plunger()
  elseif stats_menu == 3 then
    main()
  end
  Qjctx =-1
end

and now lets say we choose plunger()

function plunger()
  if Bstats == on then
    Bstats = off
	nBstats()
    gg.clearResults()

gg.searchNumber("-992174222", 
gg.TYPE_DWORD, false, 
gg.SIGN_EQUAL, 0, -1)

revert = gg.getResults(100)

gg.editAll("92173830", 
gg.TYPE_DWORD)

  else
    Bstats = on
	nBstats()
    gg.clearResults()

gg.searchNumber("92173830", 
gg.TYPE_DWORD, false, 
gg.SIGN_EQUAL, 0, -1)

revert = gg.getResults(100)

gg.editAll("-992174222", 
gg.TYPE_DWORD)

  end
end

function nBstats()
  if Bstats == on then
    Bstats = on
  else
    Bstats = off
  end
end

the expected out come should be that plunger module turns on the [on] tag is not present insted of the [off] and the menu should be hidden and when i click the gg icon the menu pops up again insted what happens is that after i click the plunger module the hack activate but when i click the gg icon the script is ended no error so i must be missing smt here if someone could help me out that would be great thx

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

ok so i managed to fix the closing thing it was caused by me having 

if Menu == nil then os.exit() end

in the main() function so yeh i just commented that part out. but now i am having another problem now when i press nil aka outside the box or cancel it just reopens to main() so i did some edits but now the problems is when i click the gg icon after clicking nil it defualts to loader123() function and the expected out come is that it defualts to main() here is my updated code

while true do
    if gg.isVisible(true) then
        gg.setVisible(false)
        Qjctx = 1
    end
    gg.sleep(100)
    if Qjctx == 1 then
       if loader123 then
			loader123()
		elseif main then
			main()
	   end
    end
end
do
function loader123()
gg.clearResults()

LOAD_CaT= gg.choice({
"[Main version]",
"[Lite Version]",
"[ E X I T ]"},
nil,"ALERT")

if LOAD_CaT == 1 then Lmain() end

if LOAD_CaT == 2 then lite() end

if LOAD_CaT == 3 then exit() end
end
end

do
function Lmain()

gg.sleep(200)

  gg.sleep(2000)
	main()
	end
end
do
function main()
gg.clearResults()
MAIN_CaT= gg.choice({
"[Stats]",
"[Player]",
"[World]",
"[Shop]",
"[Fun]",
"[Exploits]",
"[Misc]",
"[ E X I T ]"},
nil,"text")

if MAIN_CaT == 1 then stats() end

if MAIN_CaT == 2 then player() end

if MAIN_CaT == 3 then world() end

if MAIN_CaT == 4 then shop() end

if MAIN_CaT == 5 then fun() end

if MAIN_CaT == 6 then exploits() end

if MAIN_CaT == 7 then misc() end

if MAIN_CaT == 8 then exit() end

--    if MAIN_CaT == nil then Qjctx =1 end

end
end
do
on = '[ON]'
off = '[OFF]'
Astats = off
Bstats = off

function stats()
  stats_menu = gg.choice({
    Astats .. ' wood armor stats',
	Bstats .. ' plunger stats', 
	'back'},
	nil,
	'edit stats of items')
  if stats_menu == 1 then
	wood()
  elseif stats_menu == 2 then
	plunger()
  elseif stats_menu == 3 then
    main()
  end
  Qjctx =-1
end
function plunger()
  if Bstats == on then
    Bstats = off
	nBstats()
    gg.clearResults()

gg.searchNumber("-992174222", 
gg.TYPE_DWORD, false, 
gg.SIGN_EQUAL, 0, -1)

revert = gg.getResults(100)

gg.editAll("92173830", 
gg.TYPE_DWORD)

  else
    Bstats = on
	nBstats()
    gg.clearResults()

gg.searchNumber("92173830", 
gg.TYPE_DWORD, false, 
gg.SIGN_EQUAL, 0, -1)

revert = gg.getResults(100)

gg.editAll("-992174222", 
gg.TYPE_DWORD)

  end
end

function nBstats()
  if Bstats == on then
    Bstats = on
  else
    Bstats = off
  end
end

so yeh all help is appreciated 

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.