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

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 jackdow
      Hi 
      i play a game called KillBox, it's like free fire . 
      i searched the different numbers but i tired Because I did not get anything and i could not make cheat for KillBox.
      you can help me ?How others do 😞 ؟ 
      when i see your site every create cheat for pubg,ros,ff... but i can't create cheat for my favorite game😫 , please help me @Enyby
    • By Anonymousse
      Hey guys I'm new to this whole website and tool. Just recently started playing Archero and its super fun but I can only play it for so long because the game limits you by taking from your maximum "power" per round you play. I started looking into gameguardian and saw that a lot of people are able to basic hack the game using this tool, but for some reason I cant seem to get it working. I run into a problem rather early on: the game just crashes even if opened without gameguardian in the virtual space app. I've tried 3 different apps and they all are incompatible with Archero: Parallel Space, and two others who's names elude me at this time. Any way, I'm just looking for a little help and confirmation if I'm the only one encountering the problem. Thanks!
    • By AutoSQLModGT
      Are Its Possible To Create And Write File From GGPromt Results?
    • By Sinterklaas
      Hey there,
       I tried to decrypt/decompile this gameguardian file brom BadCase. I tried this with a lot of files on YouTube, but it didn’t work for me. I don’t know if I used this wrong or if it is just not working. I just don’t know how to decompile/decrypt, is someone able to do this for me?
       
      It goes about the following file:
      BadCase's Script Launcher (#5vkp70uo)  
      Thanks in advanced!
    • By Kimastar
      Hello!!!
      Im here why most of the cheat for asphalt 8 in that site are very obsolete for last update and not working anymore for asphalt 8 so im here for asking 2 thing!!
      1 - can u update them???
      2 - and most important there is a very cool cheat for asphalt 8 (windows edition) that working with (cheat engine) its possible to let work the cheat for cheat engine to game guardian?? if yes how??
      also below im link a site with that cheat but unfortunately they are not working anymore because the owner stop to working on them so im here for asking
      if a skilled guy can update them for last update or explain how i can update and let working on game guardian??
      My english is not very good nut i hope u can understand me ty!!!
      http://fearlessrevolution.com/viewtopic.php?f=4&t=8510&sid=1f9fbfc48514ea6786cfef51dd091bd6
×
×
  • Create New...