Jump to content
Sign in to follow this  
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

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
Sign in to follow this  

  • Similar Content

    • By McStankey
      I want to make a script wich uses gg.prompt to search the users input number and then after searching it closes the prompt and once the user clicks game guardian it opens a new prompt wich gets your new imputed number after that it edits that searched value to 999999999 and freezes it 
      If you can make this please give me the file thanks or comment the code
    • By Null69
      How to Hide GameGuardian from detection?
      I faced a lot of apps who can detect GG installed example:
      PUBG
      CODM
      Standoff 2 i think
      I have received a 3rd Party Ban on PUBG because of this, is there any possible way to hide it perfectly for these games
    • By GameGuardianGood
      Ok so the problem is that there is a game called blockman go.I had 2-3 scripts which used to work PERFECTLY fine.but then one day after closing the script I opened it back up after 1-2 hours and it was not working.I tried everything.then I downloaded a new script because I thought the old one was not working.then after selecting memory ranges I started the script and it didn't work so I went back to see the the memory ranges they were all unselected I tried many script after that and none of em worked.blockman go also has another app named bedwars.the scripts used to work fine on both but now it only works on bedwars plz fix this issue asap
       
      To the people who don't wanna read the whole thing: gameguardian is unselecting memory ranges after I start a script.and after I search,select and edit ANY value it's not putting changes into the app I want it to change.plz fix this issue asap
    • By jay__s__p
      𝙒𝙖𝙩𝙘𝙝 𝙩𝙝𝙚 𝙫𝙞𝙙𝙚𝙤 𝙞 𝙚𝙭𝙥𝙡𝙖𝙞𝙣𝙚𝙙 𝙞𝙣 𝙙𝙚𝙩𝙖𝙞𝙡... [ Recommended ]
      And also here is the step...
      Btw this trick is only For Root Users...
       
       
      𝙎𝙩𝙚𝙥𝙨 :
       
      -1. Before Starting... 
      0. Your Device Must Have *Root Access*
      1. Install GameGuardian in Virtual Xposed.
      2. open GG & goto settings...
      3. You will find "Use root in Virtual Space".
      4. Set it to "Yes".
      5. Restart the GameGuardian.
      6. Open Game( make a sure Internet is OFF ).
      7. Open GG & Select "com.theonegames.gunshipbattle".
      8. Search the money value... [Type : DWORD] [Encrypted : Yes] Now Search.
      9. It may take long time...
      10. Goto Play a game fire bullets & you see money is decreased...
      11. Now refine that value.
      12. Repeat Refine value step untill you get less then 10 Results...
      13. Btw the real value has random numbers...(bcoz it's encrypted)
      14. Find the real value ( use your brain :D) ...
      15. Now click on Value & press "goto" button...
      16. The Gold value is near to the money value find it...
      17. change that value & Enjoy...
      18. Watch the video if you don't understand Anything...
      19. i explained in detail.
       
      /* 𝚠𝚑𝚢 𝚒 𝚜𝚝𝚊𝚛𝚝𝚎𝚍 𝚏𝚛𝚘𝚖 -1 ??? 𝚁𝚎𝚊𝚜𝚘𝚗 : 19 𝚔𝚎 𝙱𝚊𝚊𝚍 𝚔𝚊 𝚗𝚞𝚖𝚋𝚎𝚛 𝚋𝚘𝚑𝚘𝚝 𝚋𝚞𝚛𝚊 𝚑𝚎 𝚒𝚜𝚜𝚜 𝚕𝚒𝚢𝚎 !!! */
       
       
       
       
       
       
      𝙎𝙩𝙚𝙥𝙨 𝙩𝙤 𝙝𝙖𝙘𝙠 𝙋𝙤𝙬𝙚𝙧𝙨(𝙖𝙢𝙢𝙤 𝙧𝙚𝙛𝙞𝙡𝙡, 𝙎𝙝𝙞𝙚𝙡𝙙 𝙋𝙧𝙤𝙩𝙚𝙘𝙩𝙞𝙤𝙣 𝙚𝙩𝙘...) :
       
      21. Now Turn internet on & buy some powers.
      22. Serch that value... [Type : DWORD],[Encrypted : No] Now search.
      23. change the value yourself...
      24. Refine the value... 
      25. Change it & Enjoy...
      26. U can also find other power value near that value...
       
    • By star360
      Optimise this virtual
      Virtual need to optimise
       
      I didn't received your answer
      I don't know what's wrong
×
×
  • Create New...