Jump to content
  • 0

How do I create a menu with multiple choices


Hackudo

Question

Hello everyone, well I would like to know how I do to make a menu with multiple choices, well I did this one but only there is no how to branding several options at the same time. So I'm asking for help ... (Please do not send the Game Guardian API link I do not understand) Well here is part of my code:

::PLAY::
local mode = gg.choice({'?? PORTUGUÊS','?? ENGLISH'})
if mode == 1 then goto PORTUGUES end
if mode == 2 then goto ENGLISH end
if mode == nils then print('error') end
goto sdone

::sdone::
os.exit()

--MENU PT
::PORTUGUES::
t = gg.choice({'1️⃣ MOEDAS E GEMAS INFINITAS','2️⃣️ PODER INFINITO','3️⃣ VIDA INFINITA','4️⃣ LEIA-ME','5️⃣ SAIR'})
if t == 1 then goto OUROPT end
if t == 2 then goto SKILPT end
if t == 3 then goto LIFEPT end
if t == 4 then goto HP2 end
if t == 5 then goto sdone end
if t == nils then print('error') end
goto sdone

-- MENU EN
::ENGLISH::
e = gg.choice({'1️⃣ COINS AND GEMS INFINITE','2️⃣ INFINITE POWER','3️⃣ INFINITE LIVE','4️⃣ READ-ME','️5️⃣️ EXIT'})
if e == 1 then goto OUROEN end 
if e == 2 then goto SKILEN end
if e == 3 then goto LIFEEN end
if e == 4 then goto HP3 end
if e == 5 then goto sdone end
if e == nils then print('error') end 
goto sdone
 

-- HACK 1 PT
::OUROPT::
gg.clearResults(0)
gg.alert('⚠️ PARA OBTER MOEDAS E GEMAS INFINITAS, VOCÊ DEVE IR LOJA E COMPRAR O AMIGO GIGANTE (ELE CUSTARÁ "0" DE MOEDAS E "0" DE GEMAS)')
gg.searchNumber("120000", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("-999999999", gg.TYPE_DWORD)
gg.clearResults(0)
gg.searchNumber("650", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("-999999999", gg.TYPE_DWORD)
gg.clearResults(0)
print('⚠️DEPOIS DE COMPRAR, RENICIE O JOGO PARA NÃO DAR ERRO.')
gg.toast('Hackeado com sucesso ✔️')
goto sdone

--HACK 1 EN
::OUROEN::
gg.clearResults(0)
gg.alert('⚠️ TO GET COINS AND GEMS, YOU SHOULD GO STORE AND BUY THE GIANT FRIEND (IT WILL COST "0" OF COINS AND "0" OF GEMS)')
gg.searchNumber("120000", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("-999999999", gg.TYPE_DWORD)
gg.clearResults(0)
gg.searchNumber("650", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("-999999999", gg.TYPE_DWORD)
gg.clearResults(0)
print('⚠️ AFTER BUYING UP, RESTART THE GAME TO NOT TUE PROBLEMS ')
gg.toast('Hacked successfully ✔️')
goto sdone
 

I would like you, who understand the subject, to take the second menu that is the codes, and make multiple choices, just so I can see how it works ... (The second menu is where the Hacks are.)

I use translator, sorry for the bad english

Look at the images to understand better

Screenshot_20181114-221023.png

Screenshot_20181114-221122.png

Screenshot_20181114-220906.png

Screenshot_20181114-221128.png

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

2 hours ago, Hackudo said:

Hello everyone, well I would like to know how I do to make a menu with multiple choices, well I did this one but only there is no how to branding several options at the same time. So I'm asking for help ... (Please do not send the Game Guardian API link I do not understand) Well here is part of my code:

::PLAY::
local mode = gg.choice({'?? PORTUGUÊS','?? ENGLISH'})
if mode == 1 then goto PORTUGUES end
if mode == 2 then goto ENGLISH end
if mode == nils then print('error') end
goto sdone

::sdone::
os.exit()

--MENU PT
::PORTUGUES::
t = gg.choice({'1️⃣ MOEDAS E GEMAS INFINITAS','2️⃣️ PODER INFINITO','3️⃣ VIDA INFINITA','4️⃣ LEIA-ME','5️⃣ SAIR'})
if t == 1 then goto OUROPT end
if t == 2 then goto SKILPT end
if t == 3 then goto LIFEPT end
if t == 4 then goto HP2 end
if t == 5 then goto sdone end
if t == nils then print('error') end
goto sdone

-- MENU EN
::ENGLISH::
e = gg.choice({'1️⃣ COINS AND GEMS INFINITE','2️⃣ INFINITE POWER','3️⃣ INFINITE LIVE','4️⃣ READ-ME','️5️⃣️ EXIT'})
if e == 1 then goto OUROEN end 
if e == 2 then goto SKILEN end
if e == 3 then goto LIFEEN end
if e == 4 then goto HP3 end
if e == 5 then goto sdone end
if e == nils then print('error') end 
goto sdone
 

-- HACK 1 PT
::OUROPT::
gg.clearResults(0)
gg.alert('⚠️ PARA OBTER MOEDAS E GEMAS INFINITAS, VOCÊ DEVE IR LOJA E COMPRAR O AMIGO GIGANTE (ELE CUSTARÁ "0" DE MOEDAS E "0" DE GEMAS)')
gg.searchNumber("120000", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("-999999999", gg.TYPE_DWORD)
gg.clearResults(0)
gg.searchNumber("650", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("-999999999", gg.TYPE_DWORD)
gg.clearResults(0)
print('⚠️DEPOIS DE COMPRAR, RENICIE O JOGO PARA NÃO DAR ERRO.')
gg.toast('Hackeado com sucesso ✔️')
goto sdone

--HACK 1 EN
::OUROEN::
gg.clearResults(0)
gg.alert('⚠️ TO GET COINS AND GEMS, YOU SHOULD GO STORE AND BUY THE GIANT FRIEND (IT WILL COST "0" OF COINS AND "0" OF GEMS)')
gg.searchNumber("120000", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("-999999999", gg.TYPE_DWORD)
gg.clearResults(0)
gg.searchNumber("650", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("-999999999", gg.TYPE_DWORD)
gg.clearResults(0)
print('⚠️ AFTER BUYING UP, RESTART THE GAME TO NOT TUE PROBLEMS ')
gg.toast('Hacked successfully ✔️')
goto sdone
 

I would like you, who understand the subject, to take the second menu that is the codes, and make multiple choices, just so I can see how it works ... (The second menu is where the Hacks are.)

I use translator, sorry for the bad english

Look at the images to understand better

Screenshot_20181114-221023.png

Screenshot_20181114-221122.png

Screenshot_20181114-220906.png

Screenshot_20181114-221128.png

Try this and don't use 's' in the 'nil'. nils is wrong

 --MENU PT
::PORTUGUES::
t = gg.multiChoice({' MOEDAS E GEMAS INFINITAS','️ PODER INFINITO',' VIDA INFINITA',' LEIA-ME',' SAIR'})
if t == nil then print('error') end
if t[1] then goto OUROPT end
if t[2] then goto SKILPT end
if t[3] then goto LIFEPT end
if t[4] then goto HP2 end
if t[5] then goto sdone end
goto sdone

-- MENU EN
::ENGLISH::
e = gg.multiChoice({' COINS AND GEMS INFINITE',' INFINITE POWER',' INFINITE LIVE',' READ-ME','️️ EXIT'})
if e == nil then print('error') end 
if e[1] then goto OUROEN end 
if e[2] then goto SKILEN end
if e[3] then goto LIFEEN end
if e[4] then goto HP3 end
if e[5] then goto sdone end
goto sdone

 

Link to comment
Share on other sites

4 minutes ago, CmP said:

@Revoxtical, one more thing, that check of equality to nil has to be done before other checks in this case. Otherwise, error ("attempt to index a nil value") will be thrown upon cancelling the dialog.

haaha yeah right, I was too rushed to just copy paste because there was a lot of work :D

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.