Jump to content
  • 0

Someone pls help me how to fix menu "while true do" error


Question

Posted

revert = {}
ON = "[✔] "
OFF = "[❌] "
prefix = {}
prefix[1] = ON
prefix[2] = ON
prefix[3] = ON
function main()
local choice = gg.choice({
prefix[1].."FIRE RATE(ON)",
prefix[2].."FIRE RATE(OFF)",
prefix[3].."clear data(beta)",
"EXIT",
})
if choice == 1 then prefix[1] = button1(prefix[1]) end
if choice == 2 then prefix[2] = button2(prefix[2]) end
  if choice == 3 then prefix[3] = button3(prefix[3]) end
os.exit()
end

function button1(target)
    if target == ON then
    gg.alert("ON")

gg.searchNumber("22D;19;19::60",64)
if gg.isVisible(true) then gg.setVisible(false) end
gg.refineNumber("19",64)
gg.getResults(100)
gg.editAll("12.00123",64)
gg.clearResults()
gg.searchNumber("0.45",64)
gg.getResults(100)
gg.editAll("0.00123",64)
gg.toast("fire rate hacked!")


return OFF
else
gg.alert("OFF")
return ON
end 
end

function button2(target)
if target == ON then
gg.alert("ON")
gg.searchNumber("0.00123",64)
if gg.isVisible(true) then gg.setVisible(false) end
gg.getResults(100)
gg.editAll("0.45",64)
gg.clearResults()
gg.searchNumber("12.00123",64)
if gg.isVisible(true) then gg.setVisible(false) end
gg.getResults(100)
gg.editAll("19",64)
gg.toast("firerate off!")


return OFF
else
gg.alert("OFF")
return ON
end 
end


if main(gg.setVisible(false))
    while( true ) do
if checkadmprefix==on    then    adm_detect()    end
    if gg.isVisible() then
        main(gg.setVisible(false))
    end
end


while true do 
    if gg.isVisible(true) then
        buttom = 1
        gg.setVisible(false)
    end
    if buttom == 2 then
        A()
    end
end

1 answer to this question

Recommended Posts

  • 0
Posted

im no expert in scripting but for a simple ON-OFF script, this is how i came up with :

local gg = gg
r = {"[✔️ON]","[❌OFF]"}
SW = r[2]


function main()
local menu = gg.choice({
  "\nFireRate Hack"..SW, 
  "\nEXIT"},
nil, "ON OFF Menu")

if menu == nil then return
elseif menu == 1 then hack1()
elseif menu == 2 then os.exit()
end
end


function hack1()
if SW == r[2] then 
-- codes here --
gg.alert("FireRate Hack Enable")
SW = r[1]
else
-- codes here --
gg.alert("FireRate Hack Disable")
SW = r[2]
end
end


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

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.