Jump to content
  • 0

Menu help


Maksup
 Share

Question

Hello so i just got into (2 months) lua for gg. And i dont know how to make multiple menus in one menu example. Main menu (Money hack, gem hack) and then when i click on lets say Money hack i want to open up another menu. Also i want to have different types of menus (Normal menu, Slider menu ect.). Can i see an example?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
gg.setVisible(false)

::menu:: -- this for test
local a = gg.choice(
{
'Change game currency',
'Kill all enemy',
'Blah blah blah',
 },
 nil, '--- What do you want? ---'
)
if a == nil then
	gg.alert('Not choice') gg.clearResults() gg.setVisible(true) os.exit() 
	end

if a == 1 then
	local out = gg.choice(
	{
	'Gold',
	'Gems',
	'Dragon skin\'s',
	},
	nil, '--- Select do You want ---'
	)
	
	if out == nil then
		gg.alert('Not choice') gg.clearResults() gg.setVisible(true) os.exit() 
	end
	
	if out == 1 then
		goto set_gold
		end
	if out == 2 then
		goto set_gems
		end
	if out == 3 then
		goto set_skin
		end
end

if a == 2 then
	goto kill_all
	end
	
if a == 3 then
	goto blah_blah
	end
	
::set_gold::
-- Your code

::set_gems::
-- Your code

::set_skin::
-- Your code

::kill_all::
--  Your code

::blah_blah::
-- Your code

os.exit() 

Simple menu

Edited by Count_Nosferatu
Link to comment
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
 Share

×
×
  • 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.