EzCommands v2 [Outdated]

Working: :white_check_mark:
Current Version: v2.2


EzCommands is a module to make your life easier, this module can save you some minutes of coding, but you still need a little knowledge of scripting. The reason why I didn’t add so many preset commands, is because I want the beginners to learn to script and make their own scripts.

If you have any feedback, ideas or questions send DM, here’s my discord River#8221

Modules Related

Functions

Show Functions
  • Add Command (Now returns a table of functions)
  • Add Admin (Outdated)
  • [NEW] Add Allowed (AddAdmin new version)
  • [NEW] Add Rank
  • [NEW] Add Panel (Please read the explanation before using this feature)
  • [NEW] Set Theme
  • [NEW] Get Commands
  • [NEW] Has Permission
Coming Soon (Next update)
  • Making this module part of EzToMake Modules :relaxed:
Presets (Remember this module is on beta)
  • Ban (Uses DataStore, and it’s server-side)

Updates

  • New functions, now addAdmin() is outdated(NOT DELETED), I added a new method who accepts multiple players and is able to set those players rank. Now you can make a panel for a specific command, and there’s a command list frame too.

  • Setup function was revamped in this update, now it returns a table of functions. Also, now you need to use “addAllowed()”, the table of administrators was removed in this update.

  • Now commands have “description” property.


I know, I know, you’re thinking “this dude doesn’t will show the code or what? so here’s the code.”

Raw Handler

-- Loading

local library = require(game:GetService("ReplicatedStorage").EzCommands) -- There's no id, you need to insert the module in your game.

local module = library[1]
local presets = library[2]

-- Setup

local setupParams = {
	prefix = "!", -- <string> Default Prefix (obligatory)
	showCommandBar = true, -- Show Command Bar (obligatory; if you set it to nil or false the admins dont will have the command bar)
    cmdBar_Keybind = "C", -- <string> Keybind to open/close command bar (Leave it nil and the module will set C for default)
    cmdList_Keybind = "R" -- <string> Keybind to open/close command list (Leave it nil and the module will set R for default)
	error_callback = function(reason) -- <function> Error Handling (This just receives the error reason, the module has a default callback, but if you want to make a custom callback, you can use this param)
		print(reason)
	end
}

local cmdLib = module.setup(setupParams)
cmdLib.setTheme(Color3.fromRGB(255, 255, 0)) -- Using new feature

-- Get Commands (New Feature)

local cmds = module.getCommands() -- Returns a table with the commands properties (name, description, allowed persons, has panel)

-- Add Rank 

module.addRank({ -- Now you can put a command for this specific rank.
   name = "Moderator", -- <string> Name of the rank
   permissionLevel = 3, -- <number> Permission Level (If the player doesn't have the rank, the script will check his rank perm level, if it's higher that player will be able to execute the cmd)
   commandsPanel = true -- <boolean> Rank can see command list 
})

-- Add Allowed and Add Admin (Explanation and comparison)

module.addAllowed({
   players = {"Player1", "Player2"}, -- <table> Player(s) Name
   rankToSet = "Moderator"  -- <string> Rank to set ( You need to create it with addRank(). )
})

module.addAdmin({ -- Outdated (You only can use one player, and cannot set his new rank)
   player = "Player1" -- <string> Player name
})

-- Add Command

local commandParams = {
	prefix = nil, -- <string> Command Prefix (If you leave it false, the module will use the default prefix)
	command = "test", -- <string> Command (obligatory)
	allowed = "admins", -- <string> or <table> Allowed players to execute cmd (If you put admins, the players you set as admin will be able to use the cmd or you can put a table of specific players.)
	description = "Hello! this is a testing command" -- <string> Description (This text will be displayed on command info)
	captureTextAfter = 1, -- <number pos> Capture Text After (Leave it nil or capture the text after the number position given, for example, start capturing text after argument 1 (first; arg 1 is the command in this case "!test"). )
	callback = function(params, player, capturedText) -- <function> Callback (obligatory)
		print(player, params, capturedText)
	end
}

local testCmd = module.addCommand(commandParams) -- Returns functions (NEW)

-- Adding a panel to the command (New feature)

testCmd.addPanel({
	title = "Testing Panel",
	textboxes = {
		{ -- textboxes are no name tables
			name = "argument1",
			text = "arg test", -- Placeholder text
			pattern = nil -- find that pattern in text (leave it nil and it wont detect patterns)
		},
		{
			name = "patterntest",
			text = "pattern test here",
			pattern = "%d+" -- %d+, script now will difference these pattern (numbers)
		}
	},
})


Download the module

Versions available to download

Or get the latest version of the module from Roblox


Showcase


I hope you enjoy the module and the new update :relaxed:

6 Likes

Thanks!!!
I hope everyone loves it

3 Likes

Thanks, for the support! :smiley:

2 Likes

Where’s the module? How can we even use your product If you don’t include the modules link or asset id?

2 Likes

How do we get the module though?

1 Like

Sorry! i updated the module and i was so tired, i forgot to add the module link.

1 Like

I added the asset id on the loader

3 Likes