Jump to content
YeetMeister

Script Menu help (gg.prompt)

Recommended Posts

So i am making a "Private" script menu for a friend so he gets into hacking too.

 

But i dont know how to solve this problem

 

I hope you get my Idea xD

 

UI = 1

if gg.isVisible(true) then
  gg.setVisible(false)
end

CustomFoV = result[4]


--
function main()
gg.alert("{Press 'OK' to activate Hacks}\nthis hack Contains:\n~NoRecoil\n~Bigger Hitbox\n~FoV")
Result = gg.prompt({"No Recoil","Bigger Hitbox", "FoV","Custom FoV(Needed if checked)\nSelect a number between 150 and 360"},nil,{"checkbox", "checkbox","checkbox","number"})
if result[1] then NoRecoil() end
if result[2] then BigHitbox() end
if result[3] then FoV() end
if result[4] == FoV() then CustomFoV end
UI =-1
end

--
function NoRecoil()

end

function BigHitbox()

end

function FoV()

end
--
function exit()
gg.toast("This script is made by \nஜ۩۩ஜ[K/D Destroyer]ஜ۩۩ஜ \nPrivate script made for wifi-iwnl")
print("This script is made by \nஜ۩۩ஜ[K/D Destroyer]ஜ۩۩ஜ \nPrivate script made for wifi-iwnl")
os.exit()
end
--

main()

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

 

Share this post


Link to post
Share on other sites

1 minute ago, YeetMeister said:

I hope you get my Idea xD

You need to explain that "idea" using words and not just drop some block of code. Noone here can read your thoughts. Moreover, quality of question/problem explanation affects receiving (or not receiving) answers more than anything else.

Share this post


Link to post
Share on other sites
2 hours ago, CmP said:

You need to explain that "idea" using words and not just drop some block of code. Noone here can read your thoughts. Moreover, quality of question/problem explanation affects receiving (or not receiving) answers more than anything else.

Im sorry xD i was in hurry

Uhm what i wanted to do is a hack with gg.prompt() with checkboxes if they checked they will be executed if not then not BASIC IK

 

But theres another function with custom FOV (so if i check FoV i need to put in the value i want to set it to)

Is this explained better for you?

Share this post


Link to post
Share on other sites
2 hours ago, CmP said:

You need to explain that "idea" using words and not just drop some block of code. Noone here can read your thoughts. Moreover, quality of question/problem explanation affects receiving (or not receiving) answers more than anything else.

 

Like this

So if FoV is checked then it will need the custom number for that

Screenshot_20190106-015923_Quoda.jpg

Share this post


Link to post
Share on other sites

@Enyby why is this not working? Can you please help me in confused ._.

Ive tried it like this now but i get an error

Quote

Script ended:
Script error: org.luaj.vm2.LuaError: @/storage/emulated/0/Download/PrivateHack/Private Hack.lua:32
`gg.searchNumber(Result["i"], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)`
bad argument #1 (nil): string expected, got nil
level = 1, pc = 17
stack traceback:
    /storage/emulated/0/Download/PrivateHack/Private Hack.lua:32 in function 'FoV'
    /storage/emulated/0/Download/PrivateHack/Private Hack.lua:16 in function 'main'
    /storage/emulated/0/Download/PrivateHack/Private Hack.lua:46 in main chunk
    [Java]: in ?
    at org.luaj.vm2.Varargs.argerr(Varargs.java:282)
    at org.luaj.vm2.Varargs.checkjstring(Varargs.java:347)
    at android.ext.Script$searchNumber.invokeUi(Script.java:2801)
    at android.ext.Script$ApiFunction.run(Script.java:1181)
    at android.os.Handler.handleCallback(Unknown Source:2)
    at android.os.Handler.dispatchMessage(Unknown Source:4)
    at android.os.Looper.loop(Unknown Source:139)
    at android.app.ActivityThread.main(Unknown Source:146)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Unknown Source:11)
    at com.android.internal.os.ZygoteInit.main(Unknown Source:198)

And this is the "code"

Quote

UI = 1

if gg.isVisible(true) then
  gg.setVisible(false)
end


--
function main()
gg.alert("{Press 'OK' to activate Hacks}\nthis hack Contains:\n~NoRecoil\n~Bigger Hitbox\n~FoV")
Result = gg.prompt({"No Recoil","Bigger Hitbox", "FoV","Custom FoV(Needed if checked)\nSelect a number between 150 and 360"},nil,{"checkbox", "checkbox","checkbox",i = "0"})
if Result[1] then NoRecoil() end
if Result[2] then BigHitbox() end
if Result[3] then FoV() end
if Result[4] then FoV() end
UI =-1
end

--
function NoRecoil()

end

function BigHitbox()

end

function FoV()
gg.setRanges(gg.REGION_CODE_APP)
gg.searchNumber(Result["i"], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local r = gg.getResults(45)
gg.removeResults(r)
gg.getResults(1)
gg.editAll("222", gg.TYPE_FLOAT)
end
--
function exit()
gg.toast("This script is made by \nஜ۩۩ஜ[K/D Destroyer]ஜ۩۩ஜ \nPrivate script made for wifi-iwnl")
print("This script is made by \nஜ۩۩ஜ[K/D Destroyer]ஜ۩۩ஜ \nPrivate script made for wifi-iwnl")
os.exit()
end
--

main()

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

 

Share this post


Link to post
Share on other sites
17 minutes ago, YeetMeister said:

bad argument #1 (nil): string expected, got nil

First argument is

 

18 minutes ago, YeetMeister said:

Result["i"]

So it is nil.

Share this post


Link to post
Share on other sites
1 hour ago, Enyby said:

First argument is

 

So it is nil.

So what i have to do? Just simply add if nil then do something else or what

Share this post


Link to post
Share on other sites

Too complicated to explain. And I do not know what you want.

In general you need learn how to code.

This is something as try explain to a blind how an elephant look like.

I think You need Result[4] as first param. Maybe it wrong. You must know better.

Share this post


Link to post
Share on other sites

OMG after i watched the code i have to recode that again

COMPLETELY messed up.

 

UI = 1

if gg.isVisible(true) then
  gg.setVisible(false)
end


--
function main()
gg.alert("{Press 'OK' to activate Hacks}\nthis hack Contains:\n~NoRecoil\n~Bigger Hitbox\n~FoV")
Result = gg.prompt({"No Recoil","Bigger Hitbox", "FoV","Custom FoV(Needed if checked)\nSelect a number between 150 and 360"},{false,false,false,0},{"checkbox", "checkbox","checkbox","number"})
if Result[1] then NoRecoil() end
if Result[2] then BigHitbox() end
if Result[3] and Result[4] then FoV() end
UI =-1
end

--
function NoRecoil()

end

function BigHitbox()

end

function FoV()
gg.setRanges(gg.REGION_CODE_APP)
gg.searchNumber(Result[4], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local r = gg.getResults(45)
gg.removeResults(r)
gg.getResults(1)
gg.editAll("222", gg.TYPE_FLOAT)
end
--
function exit()
gg.toast("This script is made by \nஜ۩۩ஜ[K/D Destroyer]ஜ۩۩ஜ \nPrivate script made for wifi-iwnl")
print("This script is made by \nஜ۩۩ஜ[K/D Destroyer]ஜ۩۩ஜ \nPrivate script made for wifi-iwnl")
os.exit()
end
--

main()

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

 

_______________________________________________
added 0 minutes later

That should work i havn't test it yet

Share this post


Link to post
Share on other sites

Also that "UI" variable is redundant in your case. Don't use something just because others do it.

Your main loop can be rewritten this way:

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

 

Share this post


Link to post
Share on other sites
1 hour ago, CmP said:

Also that "UI" variable is redundant in your case. Don't use something just because others do it.

Your main loop can be rewritten this way:


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

 

As @CmP said,so i rewrite the code again to you.

 

gg.setVisible(false)

--
function main()
gg.alert("{Press 'OK' to activate Hacks}\nthis hack Contains:\n~NoRecoil\n~Bigger Hitbox\n~FoV")
Result = gg.prompt({"No Recoil","Bigger Hitbox", "FoV","Custom FoV(Needed if checked)\nSelect a number between 150 and 360"},{false,false,false,0},{"checkbox", "checkbox","checkbox","number"})
if Result[1] then NoRecoil() end
if Result[2] then BigHitbox() end
if Result[3] and Result[4] then FoV() end
UI =-1
end

--
function NoRecoil()

end

function BigHitbox()

end

function FoV()
gg.setRanges(gg.REGION_CODE_APP)
gg.searchNumber(Result[4], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local r = gg.getResults(45)
gg.removeResults(r)
gg.getResults(1)
gg.editAll("222", gg.TYPE_FLOAT)
end
--

function exit()
gg.toast("This script is made by \nஜ۩۩ஜ[K/D Destroyer]ஜ۩۩ஜ \nPrivate script made for wifi-iwnl")
print("This script is made by \nஜ۩۩ஜ[K/D Destroyer]ஜ۩۩ஜ \nPrivate script made for wifi-iwnl")
os.exit()
end
while true do
if gg.isVisible(true) then gg.setVisible(false) main() else gg.sleep(100) end
end

Also watch out for invisible symbol cause of BB code

Share this post


Link to post
Share on other sites

@noblack, you forgot to delete the line

3 minutes ago, noblack said:

UI =-1

in function "main".

Also isVisible function does not accept arguments, so that "true" in this line

6 minutes ago, noblack said:

if gg.isVisible(true) then gg.setVisible(false) main() else gg.sleep(100) end

is redundant. Moreover, this only works because of how Lua deals with extra arguments.

From the Lua 5.3 reference manual (https://www.lua.org/manual/5.3/manual.html#3.4.11) :

Spoiler

Parameters act as local variables that are initialized with the argument values:


	parlist ::= namelist [‘,’ ‘...’] | ‘...

When a function is called, the list of arguments is adjusted to the length of the list of parameters, unless the function is a vararg function, which is indicated by three dots ('...') at the end of its parameter list. A vararg function does not adjust its argument list; instead, it collects all extra arguments and supplies them to the function through a vararg expression, which is also written as three dots. The value of this expression is a list of all actual extra arguments, similar to a function with multiple results. If a vararg expression is used inside another expression or in the middle of a list of expressions, then its return list is adjusted to one element. If the expression is used as the last element of a list of expressions, then no adjustment is made (unless that last expression is enclosed in parentheses).

As an example, consider the following definitions:


     function f(a, b) end
     function g(a, b, ...) end
     function r() return 1,2,3 end

Then, we have the following mapping from arguments to parameters and to the vararg expression:


     CALL            PARAMETERS
     
     f(3)             a=3, b=nil
     f(3, 4)          a=3, b=4
     f(3, 4, 5)       a=3, b=4
     f(r(), 10)       a=1, b=10
     f(r())           a=1, b=2
     
     g(3)             a=3, b=nil, ... -->  (nothing)
     g(3, 4)          a=3, b=4,   ... -->  (nothing)
     g(3, 4, 5, 8)    a=3, b=4,   ... -->  5  8
     g(5, r())        a=5, b=1,   ... -->  2  3

Another thing is that value returned by "prompt" function needs to be checked (because the dialog may be cancelled, in some cases accidentally) as well as value that is stored in "Result[4]", but I suggest you to leave these improvements to be done by the author of the topic (if he needs them at all).

Share this post


Link to post
Share on other sites
Posted (edited)

For more easy menu implementation, use Menu Template.. Change MyMenu to this ..

MyMenu = {
	"Main Menu", -- Menu Title
	"No Recoil", function()
    -- When "No Recoil" clicked, this function will be executed.
		gg.alert("No Recoil Activated !") 
  	end,
    "Bigger Hitbox", function()
    -- When "Bigger Hitbox" clicked, this function will be executed.
		gg.alert("Bigger Hitbox Activated !") 
  	end,
	"Custom FOV", function()
    -- When "Custom FOV" clicked, this function will be executed.
    	Input = gg.prompt({"Please input custom FOV Value: "}, {cFOV}, {"number"})
		if Input ~= nil then
			InputtedFOV = Input[1]
      		gg.alert("Changed FOV to "..InputtedFOV)
		end
  	end
}


Example: Template_v2.0.lua

Edited by saiaapiz
Added example.

Share this post


Link to post
Share on other sites
5 hours ago, saiaapiz said:

For more easy menu implementation, use Menu Template.. Change MyMenu to this ..


MyMenu = {
	"Main Menu", -- Menu Title
	"No Recoil", function()
    -- When "No Recoil" clicked, this function will be executed.
		gg.alert("No Recoil Activated !") 
  	end,
    "Bigger Hitbox", function()
    -- When "Bigger Hitbox" clicked, this function will be executed.
		gg.alert("Bigger Hitbox Activated !") 
  	end,
	"Custom FOV", function()
    -- When "Custom FOV" clicked, this function will be executed.
    	Input = gg.prompt({"Please input custom FOV Value: "}, {cFOV}, {"number"})
		if Input ~= nil then
			InputtedFOV = Input[1]
      		gg.alert("Changed FOV to "..InputtedFOV)
		end
  	end
}


Example: Template_v2.0.lua

 

Emm...

You know,if you don't know how to use lua. Even starter can't understanad this.

And i just used a few minutes to know how this works.

Why don't i just use the official one?

There's are pros,loss tho.

Share this post


Link to post
Share on other sites

Hello Creators,

Your use Chatting app ? Whatsapp or telegram ?

Can i follow your chat app

I need study make script 

Thanksyou

Share this post


Link to post
Share on other sites
On 1/7/2019 at 6:22 PM, Anggi619 said:

Hello Creators,

Your use Chatting app ? Whatsapp or telegram ?

Can i follow your chat app

I need study make script 

Thanksyou

I learn code 

alone

and "thanks" @Enyby for some "advice" and force me to learn by myself.

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • By Eishohaki
      So Ill say this first... I'm a noob okay 😭😂.
      But basically Ive been looking all over for a way to easily find an address, that's drastically changing from mission to mission (HP).
      I've read about people finding the damage to hp code and changing them (but I don't that's an option here?? Plus I can't code..). Now offset could work but it could change from BFD1D1E8 to CAA3F4J1.. (the health value can be changed with Dword and 2 scans. However in multiplayer lobbies and such, it's too much of a pain to change it without taking damage (all enemies move independently for everyone))
      Any advice would be helpful
      (The game is Bleach Brave Souls, a server sided RPG)
    • By 404Funny
      View File FREEFIRE 1.27 HACK UPDATED 7/2/2019
       Script Features: 
      Note: You need to use the gameguardian mod to not crash game, gameduardian mod have in below GUIDE AND HACK FREE FIRE OB13 NEWS, Unlocking imei without virtual space (Rooted) 100% work
      No Recoil 90% High Dame 25% High Dame Xm8, MP40, Scart Long Shot Without Distance Increase 20% Armor 1,2,3 10% off damage Zano Fast Running, Fast Swimming, Surfing Board x 1.5 Auto Aim Mind Pin When Shot And Moving GUIDE AND HACK FREE FIRE OB13 NEWS (Nonroot) : LINK HACK UPDATED 7/2/2019 Fix out game Youtube update
      GUIDE AND HACK FREE FIRE OB13 NEWS, (Rooted) 100% work: Updated 7/2/2019 Youtube
      Submitter 404Funny Submitted 01/15/19 Category Free Fire  
    • By 404Funny
      Script Features: 
      Note: You need to use the gameguardian mod to not crash game, gameduardian mod have in below GUIDE AND HACK FREE FIRE OB13 NEWS, Unlocking imei without virtual space (Rooted) 100% work
      No Recoil 90% High Dame 25% High Dame Xm8, MP40, Scart Long Shot Without Distance Increase 20% Armor 1,2,3 10% off damage Zano Fast Running, Fast Swimming, Surfing Board x 1.5 Auto Aim Mind Pin When Shot And Moving GUIDE AND HACK FREE FIRE OB13 NEWS (Nonroot) : LINK HACK UPDATED 7/2/2019 Fix out game Youtube update
      GUIDE AND HACK FREE FIRE OB13 NEWS, (Rooted) 100% work: Updated 7/2/2019 Youtube
    • By juyox
      x= gg.prompt({[2]='Enter Value'}, {[1]='1;3;2;', [2]='22', [3]=',000~', [4]=',999;0::45'}) gg.searchNumber(x[1]x[2]x[3]x[2]x[4], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) found = gg.getResultCount() gg.alert('We found: '..found) Hi guys, please help for make it.
      Where is my fault?
      Final patten for search is:
      1;3;2;22,000~22,999;0::70
      In every search i just want to change two fisrt number of 22,000~22,999.
      in gg.promp line i just wrote [2]= 'Enter Value' b'cuz it's  variable.
      I got this error:
      Script ended:
      Script error: org.luaj.vm2.LuaError: @/sdcard/Notes/tttttt.lua:2
      `gg.searchNumber(x[2],x[1], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)`
      bad argument #3 (number): boolean expected, got number
       
    • By najoker
      hello ....
      i am playing free fire through bluestacks emulator knowing that bluestacks is fully rooted but when i use scripts some mods works well ..like :   antena , night mod , speedhack .
      but when use mods like :    one shot kill, auto head shot, and much ..not working
      ***** all mods work well on mobile phones
      any help here ...
×