Seems like a lot of work to keep up to date all the time and synced with Roblox. What exactly are the benefits of doing so, other than branching?
Hey! I hear it’s been in development for a while, I would like some photos to see what it looks like!
I sent some photos of the UI in a previous post; I recommend you check that out!
You might wanna port over all this code onto a module script buddy. And, why should we use your admin command over other admin commands?
I believe other popular admin systems also provide this.
This is AdminSuiteForDevelopers, which is out of date (it was the version before I put it into a modulescript). I consider you upgrade to BaseAdmin, I provided a link to it in the post.
One possible issue:
BaseAdmin places values into the player for setting admin ranks for backwards compatibility reasons and to easily set ranks.
However, if you have one of these, it can be exploited:
event.OnServerEvent:Connect(function(_, s, v)s.Value=v end)
If you have one or more instances of something like that in your code, replace them with this:
event.OnServerEvent:Connect(function(plr, s, v)
if s.Parent == plr:FindFirstChild("BaseAdminPlayerData") then
--You can remove the below line, but it is recommended not to do so.
plr:Kick("Exploit detected")
else
s.Value = v
end
--If you have any more code, place it here.
end)
It is highly recommended that developers look into this until an alternative is provided, since BaseAdmin currently only supports real-time rank changing, which cannot be disabled.
Yes, they do in fact.
Good examples are Adonis and Cmdr.
Version 1.67 is now released.
This is now fixed, anyone worried about security now has nothing to worry about.
Additions
-
When opening UI in first person, keybinds will be provided to close the UI. If this breaks anything, please let me know.
-
Loading other versions is now possible with the ‘loadversion’ command. You can view the versions available with the ‘versions’ command.
-
BasicCommands now contains a new function called
getCommand
. This function allows the retrieval of commands with a name, and will return an error message when not found. A few other internal functions were added onto this, such asgetCommandRank
andgetFastCommandRank
. The difference between those two isgetFastCommandRank
does not check for custom restrictions set on a command, whilegetCommandRank
does.
Fixes
- Fixed a bug that prevented the ‘buyvip’ command from prompting purchases of gamepasses.
Changes
-
Setting ranks can no longer be done directly from the server without access to the
processAdminSavedData
service. -
Commands list gives an option to show commands for a certain rank, and now by default only shows commands for the current player’s rank.
-
Features will now have environment variables of the MainModule passed to them through the 2nd parameter. This affects both external and non-external Features, as a minor change. Current external features will continue to work normally.
-
Minor text changes for various internal messages.
Notes:
For those who need to set ranks outside of BaseAdmin, and are prevented by the security update
“AdminRank” and “SetRank”, present in “BaseAdminPlayerData”, can no longer be changed directly. To change these values, you must use the syntax: ModulesHandler.run("processAdminSavedData", Player, "setRank", type (dependency name of BaseAdminPlayerData), value)
.
To retrieve the ModulesHandler from a plugin
local data = {}
local env = {}
local ModulesHandler
data.name = 'e'
data.disabled = false --turn off if you want to test out a plugin.
data.plugin = {function(Player, arg)
for i, obj in pairs(env) do
print(i, obj)
end
end, 'desc', '<arg>', 2}
function init()
env = getfenv(2)
ModulesHandler = getfenv(3).ModulesHandler
return data
end
return init
To retrieve the ModulesHandler from an external or non-external feature
This is now possible with the latest template.
return function(set, env)
--init function
local modulesHandler = env.ModulesHandler
if not modulesHandler then warn("No ModulesHandler!") end
local s,e = pcall(function()
--Place your code here
end)
if not s then
--Available options are Retry and Abort.
--Return: StatusCode, pcallStatus, pcallError
--if the status code is Abort, pcallStatus can also be used as a string to identify an error code.
--example: return "Abort", "Unknown error"
--or, the Abort status can be used normally
--example: return "Abort", false, "Parse error"
return "Retry", s, e
end
end
If you need more information, I would be happy to help you!
Loader updates:
The loader will receive a minor version increment, from 0.78 to 0.781, as nothing has changed in the settings module yet. The latest version has an updated “extFeatures” example module which contains the 2nd “env” parameter.
Known Issues:
- When ranking a user in-game, the exploit protection might prevent instant ranking to accomplish. A workaround is to have the target player rejoin the game to become ranked. This issue is fixed as of v1.68b1.
There’s a chance v1.68 will be rolling out today! Stay tuned!
The update will include the ragdoll commands working again. I’ll provide more info in the update post.
Version 1.68 is now released.
Additions
-
Ragdoll v5.2 and v6.1 have been implemented in BaseAdmin.
-
The new service addition, “CorePrompt”, will use the
:SetCore
function to either prompt players or send a core notification. If you need information and syntax, please reply.
Fixes
- When ranking a user in game, their new rank will be denied. The cause of this was the exploit protection implemented in v1.67; v1.68 is now updated to apply this fix.
Changes
-
BasicCommands now uses the CorePrompt service for notifications when a dependency of a command is restricted.
-
Internal ragdoll command changes.
Notes:
Wait, Ragdoll 5.x used glue, how is it back!?
A little thing I called “ReplaceGlueWithAttachments” fixes this. It is coded very badly, but the Ragdoll 5 system is needed for R6 characters as the Ragdoll 6 system’s R6 functionality was limited when Glue was obsoleted. This caused Ragdoll 6 to become unstable when it came to R6, and it also did not work with RagdollCombatTools, which only worked with Ragdoll 5.
Ragdoll 5.2 and 6.1 are now included in BaseAdmin. Ragdoll 5 has very limited support with R15, but it does work.
To ragdoll, use “;ragdoll me” and then “;forceragdoll me true”. To use combat tools, use “;combat” and then “;clone”. Now, you can test out the system (combat tool animations do not play outside of the places owned by my account).
Loader updates:
A new update with a minor version increment brings the loader to v0.782, with the new addition of the setting “PromptToViewErrors”. When enabled, this setting will notify users with the “Owner” rank about errors and ask if they want to view them, using the CorePrompt service.
Version 1.69 is now released.
Additions
- None
Fixes
- When using BaseAdmin without DataStoreService working, BaseAdmin would not add you as an admin and load the legacy version via loader error. This was a problem with a previous update changing the way BaseAdmin retrieves admin metadata, but this is now fixed. If you still experience this issue, please reply to this post.
Changes
-
The noclip command now has better functionality.
-
The plane command now can load the backup plane.
-
The car command behaves differently when spawning a backup car.
-
Due to the ChatService partial deprecation warning, BasicCommands now moderates text using TextService instead of Chat.
Notes:
I noticed that SafeServer doesn't load in game, was this fixed yet?
I have noticed this bug for a while now and I’m not quite able to reproduce it correctly. SafeServer loads in the development place 100% of the time and I cannot reproduce the issue. When enabling the SafeServer feature, if you experience the issue, I’ll do my best to fix this issue in the next release.
This release was planned to go live later when more features were added, but due to the DataStore bug I decided to release it early. That’s why there’s no additions.
Loader updates:
The loader has not been changed.
Version 1.70 is now released.
Additions
-
GuiService is a new service used to create GUIs.
-
userDataService is a new service to manage user data. For more information, use the services command.
-
Gui themes have been added for more customizability. Use the theme command for more info.
-
Setting user data manually is possible through the setuserdata command. It will be available to nonadmins, so make your secure data saved in tables!
-
The guihelpv2 command can be used to test out the new theme service.
Fixes
No bugs were found with this release.
Changes
-
ModulesHandler now supports returning multiple arguments. This was a required change due to the addition of GuiService.
-
addAdmin is now obsolete. To use it, you must use
env.var.addAdmin
. This was an unnecessary argument that was taking up memory and it wasn’t used.
Notes:
What if a user wants to delete their BaseAdmin data?
This version of BaseAdmin is meant to introduce new features. Do not fork the module.
This feature will be added in the next release of BaseAdmin, using the all new ImmersiveGui to create a wizard to do so.
Loader updates:
The loader has not been changed.
Version 1.71 is now released. This update comes with some security patches and new features.
Additions
-
BaseAdmin is now compatible with custom chat systems such as SocialChat. More information can be found in the Details section of the release notes.
-
Users can now delete their user data with the ‘deleteuserdata’ command. Keep in mind that this will not delete their name from the admins list or the admin metadata.
Fixes
- Fixed a vulnerability for the command bar’s remote event. BaseAdmin will notify you if anyone tries to exploit yours.
- Restricted access to
env.t
commands. Useenv.useCommand
instead. - Fixed an issue where the notify sound would play when in Run mode.
Changes
- Changed some strings for kick and warning messages.
Details:
Using BaseAdmin with a custom chat system
You can use BaseAdmin with a custom chat system like SocialChat. Here is a code example:
--Place in the Settings Module.
config.getCustomMessageEvent = function(plr)
return game:GetService("ReplicatedStorage"):WaitForChild("SocialChat",5).Remotes.ChatReplicate.OnServerEvent
end--If your game uses a custom chat system, place a function here that returns an event when the player chatted.
The function basically returns a RBXScriptSignal connection value. The arguments passed should be player : Instance, message : string
This was tested, and it worked. If you are unable to get the example working, please reply to this post.
Loader updates:
The loader has been updated, but the version number won’t change, since none of the text in the loader was actually modified. You can now specify an “event getter” function for custom chat systems, using config.getCustomMessageEvent
.
Version 1.72 is now released. This update comes with some security patches, bug fixes, and new features.
Additions
-
The addition of PageViewer allows viewing pages with links inside of BaseAdmin. It is currently in beta and there’s several known issues with the system.
-
getConfig
is an internal function that allows retrieving configuration data. If the path specified does not exist, it will use a default value. This function generally clears clutter in the scripts that use the settings module. -
New theme: “BaseAdminLight” for light theme users. This will not replace the default theme.
-
“testerror” command is for testing the internal error handler.
-
“CommandTasks”
-
The new “tasks” command allows you to view commands currently being run by admins, and a history of them.
-
The new “docs” command allows you to view some documentation using PageViewer.
Fixes
-
Fixed a vulnerability where a user could exploit the search box. This is referred to as Security Patch #8.
-
Memory leak fix for when a player leaves. For the most part this has been patched in v1.32, but it is now disconnecting all events. This fix should not change any functionality.
-
Fixed a theme issue with the SSecurity theme.
-
Removed the close button from the AdminSuite themes.
-
Fixed an issue where text color would not display properly for lighter themed backgrounds.
Changes
-
The release note print is now an init module (like it should be)
-
BaseAdmin themes will now truncate text in the title bar if it is too long.
-
Changed some strings for kick and warning messages.
-
Changed some
wait
statements totask.wait
.
Details:
Nothing at the moment. Everything should be self-explanitory.
Loader updates:
The loader has been updated internally but no public update releases are currently available for this update.
As always, please report any issues you encounter due to this update.
Version 1.73 is now released. This applies enhancements to BaseAdmin along with some minor bug fixes. This will be the last update for 2022.
Additions
- Internally added a layout for beta versions:
Started! Version 1.73b3 (Build date: 12/31/2022)
Beta 1:
√ Fix for fly command and deferred SignalBehavior.
√ Fix for GuiButton.Active unreliability.
√ Update for GUI window close animation.
Beta 2:
√ Organized version layout for beta versions
√ Update BaseAdmin games.
Beta 3:
→ Plan: Remove the "No Command" warning when the command is a blank string or a string with whitespace.
Below will be rescheduled for the next BaseAdmin version.
⌛ Plan: Start working on a ModuleScript version of the command interpreter. This will be used in the future to run on the client.
Fixes
-
Fix for the ‘fly’ command where it would not function with deferred
SignalBehavior
. -
Due to the new keyboard navigation support update not supporting the
GuiButton.Active
property, this has been fixed inside of the script for the buttons for the GUI. -
Fixed a bug where BaseAdmin would STILL play the notify sound in the studio run mode, despite it being fixed twice before.
Changes
Improvements
-
The “No Command” warning does not display when you add a suffix to the prefix that is less than three characters long.
-
Update for BaseAdmin games. Games should be more performant now.
General Changes
- Update to the GUI window close animation where it will fade out instead of shrinking. This behavior will be customizable long in the future.
Delayed Updates
- BaseAdmin command interpreter module that can be run on the client to run client commands instantly. This update will be delayed.
Details:
BaseAdmin games are games that are either integrated into BaseAdmin or are specified in the loader as “extGames.” Access it via “;games” and play them using the “game” command.
Loader updates:
The loader has been updated internally to fix a bug where the notify sound would play in studio run mode. Navigate to the notify sound in LegacyAdminSuite to apply this fix.
I am aware of some issues with the command “genericListForInstances.” This will be looked into.
As always, please report any issues you encounter due to this update. See you in the new year!
Version 1.74 is now released. This update is a long-term support update (like the previous update). It services some known bugs of BaseAdmin to keep it functioning as intended, as well as providing small content updates to enhance the user experience of BaseAdmin.
BaseAdmin is now living in 2023 and is now over three years old.
Additions
-
Added new “Clear” theme. It allows you to see what’s going on behind the window you’re working in. To access it, use the “;theme Clear” command.
-
Made default theme more modernized. You can still access the old ones under the name “LegacyBaseAdmin” and “LegacyBaseAdminLight”.
Fixes
-
Fixed some theming issues. Particularly how the search bar placeholder emoji will not be transparent when closing the window.
-
Fixed command and game sorting system.
-
Updates to processAdminSavedData to allow support for deferred SignalBehavior. This is the most likely part to cause bugs or issues, so please let me know if things go wrong!
Changes
Improvements
- Search module general improvements (relevance sorting).
- Improved error and warning strings inside of BaseAdmin to be clearer to the user.
General Changes
Details:
ACTION REQUIRED: Changing default parent of BaseAdminServer to ServerStorage for clarity. If you do not use this feature, you are unaffected. Otherwise, you will need to change references.
The behavior can be edited by adding a value called “ServerCommandsParent” in the config and setting it to your desired value.
Loader updates:
New ServerCommandsParent setting. Comment changes for new version clarity.
I am aware of an issue that causes the user data service to sometimes not load. However, this issue was present in the previous release, and has not been tested for this one.
As always, please report any issues you encounter due to this update. If you really need an older version of BaseAdmin to keep your game functioning, I’ll be able to provide it here, when asked.
Version 1.75 is now released. This update includes some major performance optimizations and a couple security fixes, as well as a couple new features and many improvements. But in the name of compatibility, this could seriously break with plugins you may have installed. Read the changes section for more details.
Additions
-
BaseAdmin themes can now be loaded directly through the loader instead of having to create your own FeatureModule to inject them or fork the module.
-
‘chatmute’ command. This command is infinitely more secure than the legacy mute and unmute commands. It only functions with the new TextChatService.
-
New “Modern” theme.
use the command “theme Modern” to use it.
Fixes
It’s been a while, but I haven’t fixed very many things, mostly because last version was a stable release. If there’s an issue, inform me by replying, and I’ll have it fixed.
-
A side effect of the new environment update removes the GuiService environment finder. This allows it to be used in many more contexts and fixes existing issues with existing contexts.
-
Fixed genericListForInstances.
-
Fixed a bug where the errors would be suppressed without reason when running a command. This was due to the tasks update not having the correct time fallback.
Changes (read if you experience compatibility issues, mind the wall of text)
IMPORTANT:
BaseAdmin no longer uses the legacy getfenv
function for its internals. This change provides benefits to BaseAdmin’s optimizations but may also seriously impact compatibility. Here’s what’s changed:
New “environment” variable. You can access most of the stuff you could using getfenv
from anywhere without having to specify a level.
The new plugin template no longer requires init
to be called before accessing the plugin. It returns the data
table, which contains init
as a function. Don’t worry, init
will certainly be called before the plugin is used.
How to identify the version of your plugin template, and what to change
There are three plugin template versions. I call them legacy, ENV, and new.
Here’s what legacy looks like:
As you can see, it returns ‘data’. But it also does not have an init function. This form of plugin template is NO LONGER SUPPORTED! I don’t expect any of you to be using this version. If you are, you can use the loadversion command to load AdminSuite version 1.48 or 1.37. There are two variants to this plugin version, but the 2nd one broke long ago (and was used in a beta of 1.37 but made its way to the example in the loader).
Here’s what the ENV plugin template looks like:
The ENV plugin template returns an
init
function to obtain the environment, and then returns data
. This plugin template is deprecated, but it still works for the time being. Chances are you have this plugin template installed, so you will need to upgrade it.
New plugin template:
The new template will return data
AND have an init
function. templateVersion
is for future compatibility but is not required. You only need to modify one variable in the plugin essentials.
To migrate your ENV plugin, you will need to change the bottom init
section from this:
function init()
env = getfenv(2)
return data
end
return init
to this:
function data.init(newEnv)
env = newEnv
end
data.templateVersion = 1
return data
After you’ve replaced the ENV plugin with the new template, you should be good to go. Keep in mind that there’s certain variables that the new environment might not yet support, so keep reading for more information about compatibility.
Features and services now use the new environment. This includes the features loader, and all built in services. External features should not be affected by this change as the environment is passed as a parameter instead of relying on an initialization function, so the feature should see no difference.
The new environment does not have as many variables as the old one.
This is going to be the thing that keeps you up at 3 AM if you have an old plugin or feature. I’ll simplify this for you.
Variables the old environment has:
doEverything
getCommandRank
getFastCommandRank
Cdisplay
ModulesHandler
commandcheck
getMessage
getPlayers
CdisplayNotification
CdisplayHint
isRankHigher
preventJoin
var
notifyplayersystemmessage
script
getCommand
muteUnmute
t
isVip
CdisplayMessage
init
useCommand
purchase
getFilteredMessage
rankAllowed
getPlayerRun
isRankAllowed
http
Variables the new environment has:
getFilteredMessage
getFastCommandRank
Cdisplay
notifyplayersystemmessage
var
CdisplayNotification
CdisplayHint
isRankHigher
script
ModulesHandler
rankAllowed
t
isVip
getPlayerRun
getCommand
useCommand
purchase
getMessage
getCommandRank
CdisplayMessage
isRankAllowed
getPlayers
preventJoin
Some of the globals (such as SERVERPLAYER
) were never meant to be accessed directly through env
. They were always in var
, which is a store for variables and functions inside the MainModule. Some functions like commandcheck
are deprecated since version 1.65 and used internally. Others like init
are internal functions used by BasicCommands and running them elsewhere might break the system or duplicate it. Don’t worry about those.
If you find that your plugin needs something on the new environment that isn’t here, please reply to this post and I’ll add it. I do not want to clutter the environment with unnecessary material.
Services compatibility
Services are a similar story to plugins, but less complex. At the moment, services are treated identically, but this is subject to change.
The ModulesHandler service detects if the service is compatible with the new environment via the nonlgcy
variable in each service. Regardless, they are currently treated the same. If your service runs into issues that cannot be solved by adding something to the new environment, please tell me and I’ll add a compatibility layer for this variable.
Version 1.48 (ENV commands beta) loaded with the ‘loadversion’ command does not have the new environment update applied for compatibility reasons.
Improvements:
-
GamePIN is more secure (security patch 9) and can run when the game starts. More details in the loader update. GamePIN now has new command ‘eplock’ that will enforce the PIN on the existing players. It also has the ‘getpin’ command that can be used to obtain the current PIN.
-
Removed legacy datastore bloat in the MainModule. This speeds up loading time by a little bit.
-
The “GuiSystemAdder” module will add the systems to new themes in real time. Don’t rely on this too much, as I’m planning to update the GUIs in the future to automatically add these instances when they’re actually used to conserve memory.
-
The command bar, which was untouched since version 1.71 (almost a year ago), now has new optimizations. Firstly, it now uses
task.wait
instead ofwait
, so it should feel more responsive. Secondly, the remote event is now stored in ReplicatedStorage under the name “BaseAdminCommandBarSendRemote” (very catchy) so there is no longer a remote for each player. -
“version” init module now has an internal variable that determines if it should output the release in the beta “roadmap” format or the normal format. This is a simple change that only benefits me, who updates this module and adds beta version formatting to the version.
-
Miscellaneous optimizations in the MainModule.
-
notifyplayersystemmessage
will nowprint
the message if it detects the user is SERVERPLAYER (7) or RESERVEDPLAYER (5.5). -
Changed more of the
wait
s totask.wait
in older commands, modules, and GUI scripts. -
Some commands that teleported the player to some random places were affected by a change (the place was moderated). I changed the teleport ID of that place to one that isn’t deleted.
-
The welcome message is friendlier.
-
Updated ‘hover’ GUI script. It is now more fluid and is framerate independent.
Changes
-
init modules now have a third argument. The third argument is the new environment.
-
Entirely removed obsolete ‘flush’ command.
-
Entirely removed legacy ‘spazzy’ command.
-
GuiService will now position the windows in a random variation.
Loader updates:
New version: 0.79. The last version was version 0.782, which was released over a year ago.
About GamePIN
In the startup section, you can add these commands to automate GamePIN:
config.Startup = {
--Add commands for when the game starts. FINALLY released in BaseAdmin v1.49
--do not add prefixes
PlayerJoin = {
--You can add commands you would like to run automatically when the player joins.
--Use %s for the player's name, example: pm %s hello
},
ServerStart = {
--You can add commands here that you would like to run when the server starts.
'setrandompin',
'splock true',
'eplock'
}
}
This example uses GamePIN to set a random PIN, lock the game, and enforce the PIN on all players currently in the server.
Advanced section finally released in new versions! You can add your own themes too!
The advanced section currently controls very little settings at the moment. This is what we currently have:
config.advanced = {
tasks = {
CommandTasksMax = 20
},
UI = {
ErrorTweenTime = 3,
DefaultTheme = "Example",
ForceTheme = true
}
}
Note: some of the settings are NOT the defaults. If you want the default, make it nil or comment it out like always.
“DefaultTheme” corresponds to a theme in the extThemes folder. You can add your own if you want. Enabling this will make the default BaseAdmin GuiService theme the value.
“ForceTheme”, when enabled, will not allow the user to use any theme other than the default.
I’ve added a template for new themes in a folder called “extThemes”. Documentation inside the loader was improved.
Known issues:
The error notification sometimes makes duplicates of itself.
Clearing up some old claims I've made
There was no wizard created, it was just the deleteuserdata command.
SafeServer is deprecated and will be revamped in a future version. It’s an anti-exploit that prevents instance-based attacks but can easily be bypassed. It was designed to prevent one single physics exploit on the client. It stopped working about two years ago and has not been touched since.
This was an issue with studio.
You can now do this by using env.ModulesHandler
directly!
This has been reverted back since then and I’ve not told you guys! Not only did this double the memory used by commands, but it was also not providing very necessary security benefits, if any. The only use case for this is if you’re installing hundreds of thousands of plugins that you cannot verify the security of.
You should still use useCommand
. It is a wrapper for running commands that also detects if the user has a sufficient rank. It will return the string “restricted” if the command cannot run because of permission issues.
Do not hesitate to ask a question if you’re confused, no matter how small. Suggestions are also welcome!
As always, please report any issues you encounter due to this update (I usually don’t test every single feature included in BaseAdmin). If you really need an older version of BaseAdmin to keep your game functioning, I’ll be able to provide it here, when asked.
Edit 9/27/2023: Features such as BaseAdminSafeServer and BaseAdminIntegratedSSecurity are officially deprecated as of version 1.73. Forgot to clarify this in the update post. These features will be removed soon after a few subsequent releases. Nobody should be using these features anyways as they are disabled by default.
Update: new type module for easy creation of plugins, services, and features.
There is a new types module:
--!strict
type soundType = 'chord' | 'hardcrash' | 'notify' | 'push-notification' | 'push-notification2' | 'e' | 'random'
type cDisplayHintOrMessage = (msg:string, time:number, sound:soundType) -> nil
type serverPlayer = {
UserId : number;
Name : string;
Team : Team | nil;
Neutral : boolean;
Character : nil;
SERVER : true;
BaseAdminPlayerData : {
AdminRank : {
Value : number
};
SetRank : {
Value : number
}
}
};
type config = any
type service = {
info : string
}
type command = any
type getMessage = (Player, ...string) -> string;
type getPlayers = (Player, targetplr:string, customPlayerList:Instance|nil) -> any
export type environment = {
Cdisplay : (msg:string, time:number, sound:soundType, mode:string) -> nil;
CdisplayMessage : cDisplayHintOrMessage;
CdisplayHint : cDisplayHintOrMessage;
var : {
CommandTasks : any;
SERVERPLAYER : serverPlayer;
--RESERVEDPLAYER : serverPlayer;
addAdmin : (plr:Player, rank:number) -> nil; --do not use this
chatted : (msg:string, plr:Player) -> nil;
sortArguments : (cmd:string, args:string, plr:Player) -> nil;
config : config;
configloc : Instance | nil;
data : DataStoreService?;
data2 : DataStore?;
findMatchingCommand : (plr:Player, cmd:string, ...string) -> nil;
genericF : {
detectLoaderUpdate : (configloc:Instance, config) -> number;
getRank : (Player) -> number;
};
getConfig : (path:string, defaultValue:any) -> any;
};
version : number;
CdisplayNotification : cDisplayHintOrMessage;
ModulesHandler : {
run : (name:string, ...any) -> any;
info : (nil) -> string;
};
getCommand : (cmdname:string) -> command | nil;
getCommandRank : (cmdname:string) -> number;
getFastCommandRank : (cmdname:string) -> number;
getFilteredMessage : getMessage;
getMessage : getMessage;
getPlayerRun : getPlayers;
getPlayers : getPlayers;
isBetaVersion : boolean;
isRankAllowed : (plr1:Player, plr2:Player) -> nil;
rankAllowed : (plr1:Player, plr2:Player) -> (boolean, number, number); --allowed, plr1rank, plr2rank
isRankHigher : (plr1:Player, plr2:Player) -> boolean;
isVip : (Player) -> boolean;
notifyplayersystemmessage : (msg:string, plr:Player, time:number, sound:soundType?, hintmode:boolean, forceError:boolean) -> (TextLabel, ScreenGui);
preventJoin : (msg:string) -> nil;
purchase : (Player, id:number, type:'g'|any) -> nil; --'g' for gamepass
script : Instance;
t : {command};
useCommand : (Player, command:string, ...any) -> any | "restricted";
}
return true
it is probably poorly made since I’ve never done types before.
You can include it early into your plugin and feature templates:
local types = require(script.Parent.Parent:FindFirstChild("types")) --comment out when done (for performance reasons)!
local data = {}
local env : types.environment = {}
data.name = 'e'
data.disabled = false --turn off if you want to test out a plugin.
data.plugin = {function(Player, arg)
for i, obj in pairs(env) do
print(i, obj)
end
end, 'desc', '<arg>', 2}
function data.init(newEnv)
env = newEnv
end
data.templateVersion = 1
return data
local types = require(script.Parent.Parent:FindFirstChild("types")) --comment out when done (for performance reasons)!
return function(set, env : types.environment)
--init function
local modulesHandler = env.ModulesHandler
if not modulesHandler then warn("No ModulesHandler!") end
local s,e = pcall(function()
--Place your code here
end)
if not s then
--Available options are Retry and Abort.
--Return: StatusCode, pcallStatus, pcallError
--if the status code is Abort, pcallStatus can also be used as a string to identify an error code.
--example: return "Abort", "Unknown error"
--or, the Abort status can be used normally
--example: return "Abort", false, "Parse error"
return "Retry", s, e
end
end
Also, expect external services to come soon. This is not officially released yet, but you can apply it early. You will see this in the next loader version, 0.791.
I am half-glad that you stopped hard-coding yourself to have full admin in games that use this, but the fact that the comment is still there is a bit unnerving.
That said, are there any advantages of using this over, say, Redefine:A or Nano, both of which boast to have the same (if not higher) customization level?
I gave myself admin in BaseAdmin automatically since it was a pain to do so, but in the next loader update there will be a value to turn this on or off, and by default it will be off.
Redefine and Nano are alternatives to this system, however they work differently and don’t have all the same features (such as live restrictions, which must be coded manually).
The main selling point of BaseAdmin is its readable source and plugin development tools, all of which are shared by both systems. However, the way they were constructed over the years are very different. For example, with BaseAdmin you can install or create runtime scripts that can modify the environment, called Features. In Redefine, it would require a modification to the script. In BaseAdmin, you also get auto update to fix known security issues and add more features, however in Redefine you are expected more to modify the source.
TL;DR both systems have their strengths and weaknesses. However, I’ll recommend Redefine to anyone who wants to get the beta build from the source button, which BaseAdmin does not have:
And I’ll recommend BaseAdmin to whoever doesn’t want to fork the module but still wants development features.