Jump to content

Simple Menu Template v2 2.1

   (0 reviews)

3 Screenshots

About This File

How to use:
- It's simple, no need to code a menu too hard and spam alot of line. Just add "Name" and "Handler".. psstt You can add submenu too.
 

-- CurrentMenuCtl: Control Current Menu.
-- If CtlArgs is true, then current menu will be remove. 
-- If CtlArgs is supplied with String, it will change current menu name to CtlArgs.
-- If CtlArgs was nil, then return current menu name.
function CurrentMenuCtl(CtlArgs)
	if type(CtlArgs) == "boolean" and CtlArgs == true then
		table.remove(mControl[1], _opt) table.remove(mControl[2], _opt) return true
	end
	if CtlArgs ~= nil then -- If name is passed, then change the menu name else return menu name.
		mControl[1][_opt] = CtlArgs
	end
	return mControl[1][_opt]
end

-- Follow the example below, how to use it !

-- Before using function below, it needs to initialize first.
function God() 
	gg.alert("God Mode Activated !") 
end
function InfinityAmmo() 
	gg.alert("Infinity Ammo Activated !") 
end

-- Menu Structure
MyMenu = {
	"Main Menu", -- Menu Title
	"ESP", function() gg.alert("ESP Activated !") end,
	"Wallhack + Color", { -- Button Name
		"Wallhack Selection",  -- Menu Title
		"Snapdragon 625+", function() gg.alert("Snapdragon 625+ Activated !") end, -- Button Name, and Handler Function
		"Snapdragon 625+", function() gg.alert("Snapdragon 625+ Activated !") end, -- Button Name, and Handler Function
		"Snapdragon 625+", function() gg.alert("Snapdragon 625+ Activated !") end, -- Button Name, and Handler Function
		"Color", { -- Button Name
			"Color Selection",  -- Menu Title
			"Red Color", function() gg.alert("Red Color Activated !") end,			-- Button Name, and Handler Function
			"Green Color", function() gg.alert("Green Color Activated !") end,		-- Button Name, and Handler Function
			"Rainbow Color", function() gg.alert("Rainbow Color Activated !") end,	-- Button Name, and Handler Function
		}
	},  -- Menu Title
	"No-Clip", function() gg.alert("No-Clip Activated !") end, -- Button Name, and Handler Function
	"God Mode", God,				-- Button Name, and Handler Function
	"Infinity Ammo", InfinityAmmo,	-- Button Name, and Handler Function
	"Change Name", function() Name = "Sup Bro !" CurrentMenuCtl(Name) gg.alert("Changed Name To: "..CurrentMenuCtl()) end,  -- Check out documentation on CurrentMenuCtl function to know what it is.
	"Remove Myself", function() CurrentMenuCtl(true) end -- Check out documentation on CurrentMenuCtl function to know what it is.
}

 

Please comment below to if you not understand some parts of script.


What's New in Version 2.1   See changelog

Released

Changelog:
v2.1    - Added Control to Set/Get/Remove current menu name.




User Feedback

Recommended Comments

for _=1, #Menu - 0.5 do
  if _ % 2 == 1 then
    -- ...
  end
end

is identical to

for _ = 1, #Menu - 0.5, 2 do
  -- ...
end

but second option is more effective and clear.

Share this comment


Link to comment
Share on other sites
10 hours ago, CmP said:

for _=1, #Menu - 0.5 do
  if _ % 2 == 1 then
    -- ...
  end
end

is identical to


for _ = 1, #Menu - 0.5, 2 do
  -- ...
end

but second option is more effective and clear.

Great, Thanks !

Share this comment


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
×