From 954ac59feaf74152107e5a9b08ce461d910358c4 Mon Sep 17 00:00:00 2001
From: krampus Adonis is a community-maintained server management and moderation system created by Sceleratis (Davey_Bones). \ud83d\udc49 Refer to the side panel for specific sections/information. \ud83d\udcd8 User Manual: https://github.com/Epix-Incorporated/Adonis/wiki/User-Manual-&-Feature-Showcase Documentation is currently work-in-progress. Documentation for the Adonis _G API can be found here. View the contribution guidelines and instructions here if you'd like to contribute to the Adonis project. Adonis expects any modules it's loading to return a function containing the module's code to run. Adonis will require the module, set the returned function's environment to a custom one containing all important variables, and will execute the function. Plugins are loaded without yielding and will be loaded only after all of the core modules are loaded. Developers can create custom modules for Adonis to load without needing to alter Adonis's MainModule. Simply add modules to \ud83d\udc49 Server modules should have names starting with \"Server:\" or \"Server-\" \ud83d\udc49 Client modules should have names starting with \"Client:\" or \"Client-\" Example: \"Server: CustomChatHandler\" The module's name will be used by Adonis to determine if the module is a client plugin or a server plugin. The modules will be loaded after the \"Core\" modules finish loading. Plugins have the same level of access as any of Adonis's \"Core\" modules. Because of this, plugin modules are free to add, remove, and change whatever they like. It is advised, however, that you avoid removing any existing tables, functions, or objects and instead replace them with \"dummy\" alternatives to avoid causing serious errors. The following is an example server plugin In this example, we create a new command named \"ExampleCommand1\" which can be ran using \":examplecommand1\" (assuming the command Prefix is set to \":\" in loader settings). In the same way we can add commands, we can use the same method to remove or alter commands. Instead of creating an entirely new command named ExampleCommand, the following would remove the command \":ff\" from the script and make it so the :kick command still exists but does nothing.
"},{"location":"Plugins-%26-Modules/","title":"Plugins & Modules","text":"Adonis_Loader
> Config
> Plugins
return function(Vargs)\n local server = Vargs.Server\n local service = Vargs.Service\n\n --// Add a new command to the Commands table at index \"ExampleCommand1\"\n server.Commands.ExampleCommand1 = { --// The index & table of the command\n Prefix = server.Settings.Prefix; --// The prefix the command will use, this is the ':' in ':ff me'\n Commands = {\"examplecommand1\", \"examplealias1\", \"examplealias2\"}; --// A table containing the command strings (the things you chat in-game to run the command, the 'ff' in ':ff me')\n Args = {\"arg1\", \"arg2\", \"etc\"}; --// Command arguments, these will be available in order as args[1], args[2], args[3], etc; This is the 'me' in ':ff me'\n Description = \"Example command\"; --// The description of the command\n AdminLevel = 100; -- Moderators --// The command's minimum admin level; This can also be a table containing specific levels rather than a minimum level: {124, 152, \"HeadAdmins\", etc};\n --// Alternative option: AdminLevel = \"Moderators\";\n Filter = true; --// Should user supplied text passed to this command be filtered automatically? Use this if you plan to display a user-defined message to other players\n Fun = false; --// Is this command considered as fun?\n Hidden = true; --// Should this command be hidden from the command list?\n Disabled = true; --// Should this command be unusable?\n NoStudio = false; --// Should this command be blocked from being executed in a Studio environment?\n NonChattable = false; --// Should this command be blocked from being executed via chat?\n CrossServerDenied = false; --// If true, this command will not be usable via :crossserver\n Function = function(plr: Player, args: {string}, data: {}) --// The command's function; This is the actual code of the command which runs when you run the command\n --// \"plr\" is the player running the command\n --// \"args\" is a table containing command arguments supplied by the user\n --// \"data\" is a table containing information related to the command and the player running it, such as data.PlayerData.Level (the player's admin level)\n print(\"This is 'arg1':\", args[1])\n print(\"This is 'arg2':\", args[2])\n print(\"This is 'etc'(arg 3):\", args[3])\n error(\"this is an example error :o !\")\n end\n }\nend\n
If you wish to do this, refer to the appropriate commands module located under return function(Vargs)\n local server = Vargs.Server\n local service = Vargs.Service\n\n --// Remove ForceField from the Commands table\n server.Commands.ForceField = nil\n\n --// Change the Kick command to do nothing:\n server.Commands.Kick.Function = function(plr: Player, args: {string})\n print(plr.Name ..\" tried to kick someone\")\n end\nend\n
MainModule
> Server
> Commands
to view the internal index of a command. Alternatively, you may run :cmdinfo <command>
in-game which will also display the command's index.
The internal file structure of both Adonis's client and server can be broken down into four main parts:
"},{"location":"Structure/#core","title":"Core","text":"This folder contains modules essential to the script's functionality. When Adonis starts, all modules within the core folder are loaded in a specific order. These modules must be loaded, in order, before the script can start doing anything.
"},{"location":"Structure/#server-load-order","title":"Server Load Order:","text":"All dependencies of the client or server are contained within the respective \"Dependencies\" folder. This can include pre-made scripts and UI elements.
"},{"location":"Structure/#plugins","title":"Plugins","text":"The \"Plugins\" folders specific non-essential modules to be loaded. The server will automatically populate the client's Plugins folder if user defined client plugins are present in Loader > Config > Plugins
"},{"location":"Structure/#main-scripts","title":"Main Scripts","text":""},{"location":"Structure/#server","title":"Server","text":"Handles the server-side loading process.
"},{"location":"Structure/#client","title":"Client","text":"Handles the client-side loading process.
"},{"location":"Structure/#code-structure","title":"Code Structure","text":"Adonis has three main tables that nearly all variables, functions, settings, objects, and folders, can be accessed from.
"},{"location":"Structure/#server-client","title":"\"server\" & \"client\"","text":"The \"server\" and \"client\" variables are tables containing everything related to Adonis's functionality. This includes any tables, functions, and variables added by loaded modules.
"},{"location":"Structure/#service","title":"service","text":"The \"service\" metatable is a variable unique to Adonis and it's modules that provides many functions and services used throughout both the client and server. Within the service metatable are functions to handle anything from task creation and tracking to object deletion. If the index requested is not found within the service table, it will return a game service matching the index if it can. (Specifically, it just returns game:GetService(index)
.)
These are the following ways by which an Adonis command can be executed by a user: - by chat (as long as chat commands have not been disabled) - by command console (default keybind for opening the console is '
; the console may be restricted or disabled according to settings) - by other interfaces such as :cmdbox
In all cases, the prefix (which is :
by default for admin commands and !
by default for player commands) must be included at the start of each command for it to work.
\u2139\ufe0f Tip: To run a command silently in the chat (so that other players do not see it), either prepend it with \"/e \" (eg. \"/e :kill scel\") or enable chat command hiding in your client settings.
"},{"location":"User-Manual-%26-Feature-Showcase/#player-selectors","title":"Player Selectors","text":"Commands that take players as their argument (eg. :kill
) will normally support either a singular player or a comma-separated list of player names.
Example: :god scel
or :kill noob1,noob2
Note that player names are not case-sensitive and may be partial, eg. scel
for Sceleratis
.
In addition to simply using player names, the following special identifiers for targeting certain groups of players exist: - me
- yourself (the executor of the command) - all
- everyone in the server - others
- everyone in the server except yourself - admins
- all admins in the server - nonadmins
- everyone except admins in the server - random
- a random person in the server - #NUM
- random players in the server - @USERNAME
- targets a specific player whose username is exactly - %TEAM
- members of the team - $GROUPID
- members of the group with ID (number found in the Roblox group webpage URL) - radius-NUM
- anyone within a -stud radius of you
Placing -
before any selector or player name will invert the selection and select everyone except those within the selection defined after -
. To illustrate, using the others
selector is essentially the same as doing all,-me
.
Example: :explode -radius-10
- explodes all players further than 10 studs from you.
Multiple commands can be ran sequentially at a time by separating them using the batch key, which defaults to |
(vertical pipe).
Additionally, you can insert timed delays using !wait <duration in seconds>
.
Example: :ff me | :m Exploding everyone in 10 seconds! | !wait 10 | :explode all
- gives you a forcefield and makes a message announcement, waits 10 seconds, then explodes everyone.
Admins/moderators by default have access to the :repeat <times> <delay>
command, which easily allows a command to be ran in a loop.
Example: :repeat 10 1 :sword me | :heal me
- will give you a sword and heal yourself once every 1 second, for 10 times.
:cmds
for a list of available commands:cmdinfo <command>
for detailed info about a specific command!brickcolors
for a list of valid BrickColors (can be used in some commands which take a brickcolor argument)!materials
for a list of material types:capes
for a list of preset capes available to admins:musiclist
for a list of preset audios:insertlist
for a list of assets that can be inserted using :insert <name>
(set by the developer in settings.InsertList
)Return to Top
"},{"location":"User-Manual-%26-Feature-Showcase/#section-2-the-userpanel-gui","title":"Section 2: The \"UserPanel\" GUI","text":"The UserPanel GUI can be used to quickly access certain things in Adonis, such as commands, as well as configure Adonis client or server settings. This wiki page will go over the different tabs within Adonis's UserPanel GUI and what they do.
"},{"location":"User-Manual-%26-Feature-Showcase/#info","title":"Info","text":"The info tab shows you information about Adonis, and gives the user convenient buttons to perform actions such as opening the command list, viewing the changelog, viewing credits, getting the loader, or getting the system's source in the form of its MainModule.
"},{"location":"User-Manual-%26-Feature-Showcase/#donate","title":"Donate","text":"This is where users can donate to Adonis's development and control settings related to their donator perks. These perks can be disabled by the place owner in the settings module of the Loader. Donation perks are intended to be purely visual and should not impact gameplay. When users donate in your game, Roblox will give the place owner 10% of the sale.
"},{"location":"User-Manual-%26-Feature-Showcase/#keybinds","title":"Keybinds","text":"The keybinds tab allows users to bind command strings to a specific key, so when they press that key the specified command gets executed.
"},{"location":"User-Manual-%26-Feature-Showcase/#aliases","title":"Aliases","text":"Aliases allow you to create custom commands that point to existing commands, or a combination of existing commands. When creating an alias, you can add markers for command arguments. The order the argument identifiers appear in the command string is the order the arguments will be replaced in.
To better understand lets go through what's going on in the above screenshot: The command string :kill <arg1> | :fire <arg1> <arg2>
is bound to :killfire
The following happens when :killfire scel Really red
is ran:
<arg1>
is replaced with scel
and the substring <arg2>
is replaced with Really red
:killfire scel Really red
is replaced by :kill scel | :fire scel Really red
.|
separating the two commands. The BatchKey setting can be used to change the |
(vertical pipe) to whatever you'd like as long as it is not the same as the SplitKey or any of the Prefix settings.It's important to note that the number of arguments is determined by the number of unique argument identifiers. Also, the actual text within the argument identifier is not important and is only used to match user-supplied arguments to where they should be. The order that these unique argument identifiers appear in the command string is what determines which which identifier will match argument 1, the next unique one found being argument 2, and so on. This is important to keep in mind. If you were to change the command string to :kill <arg2> | :fire <arg2> <arg1>
and then chatted :killfire scel Really red
scel
would be assigned to <arg2>
and Really red
would be assigned to <arg1>
so :killfire Really red scel
would not work (as :kill scel
would now be :kill Really red
) It should also be noted that arguments that are intended to take spaces must appear last as otherwise portions of them may be treated as part of previous arguments when using the default SplitKey (a blank space.)
This system is currently still in development and may see improvements in the near future, such as manually defining in the alias string how arguments should be interpreted and matched to the command string. For now, you should not add argument indicators to the alias string. They should only be in the command string, and the order they appear is what currently determines the argument position they will be matched to in the chatted message.
"},{"location":"User-Manual-%26-Feature-Showcase/#client","title":"Client","text":"You've likely noticed that the UserPanel GUI in the screenshots here does not look like the default UserPanel. This is because Adonis supports multiple themes, my personal favorite being the Rounded theme (the one seen in these screenshots.) The default theme is named \"Default\" and is used for all UI development, and determines the default GUIs and UI modules used in the event the selected theme does not have the GUI being generated.
Users can choose what theme they would like to use by clicking the text next to the arrow pointing down next to the \"Theme\" listing.
There are also a few other client-specific settings. It should be noted that these settings are user-specific and only affect the user's client. They are not game breaking and only seek to offer finer control over certain things if the user wishes to do so.
"},{"location":"User-Manual-%26-Feature-Showcase/#client-settings","title":"Client Settings","text":"Setting Description Keybinds Enables/Disables keybinds (if disabled, keybinds will no longer work until re-enabled) UI Keep Alive Determines whether or not Adonis should attempt to prevent the deletion of its GUIs when the player respawns. Particle Effects Adonis contains a number of commands that involve particle effects, which for some users may be irritating or even performance-impacting. All particle effects are local to each client and as such can be toggled using this setting. Capes Like particle effects, capes (such as donor capes) are handled locally and can be disabled. Hide Chat Commands Whether Adonis commands that you run via the chat will automatically be hidden from other players. Console Key This is the key that will open/close the command console (the bar that appears when you press the Quote key by default). Theme Allows you to select the UI theme you want to use. Changing this to \"Game Theme\" will use whatever theme is set in the Adonis settings module (in the Loader). This is used by default for all new users."},{"location":"User-Manual-%26-Feature-Showcase/#game","title":"Game","text":"This is where creators can control Adonis related server settings for their game while in-game instead of in studio. \"Clear all saved settings\" will clear any settings previously written to the datastore. This is especially useful if you encounter issues after changing a setting in-game or quickly want to revert to only what is set within the settings module. Anything with \"Cannot change\" next to it can only be changed in studio currently.
If you ever change the prefix in-game and suddenly find yourself unable to open settings to fix it, running :adonissettings
will open the UserPanel GUI and focus the \"Game\" tab so you can fix any issues. The :adonissettings
command will always use :
as a prefix so you can't accidentally change it to something unusable.
Return to Top
"},{"location":"User-Manual-%26-Feature-Showcase/#section-3-ui-themes-showcase","title":"Section 3: UI Themes Showcase","text":"The following are the themes that come with Adonis by default:
"},{"location":"User-Manual-%26-Feature-Showcase/#default","title":"Default","text":"GUI Screenshot UserPanel HelpButton Console Notification Message Hint Error"},{"location":"User-Manual-%26-Feature-Showcase/#rounded","title":"Rounded","text":"GUI Screenshot UserPanel Console Notification Error"},{"location":"User-Manual-%26-Feature-Showcase/#colorize","title":"Colorize","text":"Note: rainbow effects are animated with chromatic interpolation.
GUI Screenshot UserPanel Console Notification Message Hint Error"},{"location":"User-Manual-%26-Feature-Showcase/#basicadmin","title":"BasicAdmin","text":"This theme only changes the announcement GUIs.
GUI Screenshot Message"},{"location":"User-Manual-%26-Feature-Showcase/#aero","title":"Aero","text":"Made by @Expertcoderz.
GUI Screenshot UserPanel HelpButton Console Notification Message Hint Error"},{"location":"User-Manual-%26-Feature-Showcase/#unity","title":"Unity","text":"Made by @LolloDev5123.
GUI Screenshot UserPanel HelpButton Console Notification Message Error"},{"location":"User-Manual-%26-Feature-Showcase/#windows-xp","title":"Windows XP","text":"Made by @P3tray.
GUI Screenshot UserPanel HelpButton Console Notification Message Hint ErrorReturn to Top
"},{"location":"User-Manual-%26-Feature-Showcase/#section-4-moderation-commands-reference","title":"Section 4: Moderation Commands Reference","text":"This section serves as a basic reference guide for the essential moderation commands offered by Adonis.
"},{"location":"User-Manual-%26-Feature-Showcase/#general","title":"General","text":""},{"location":"User-Manual-%26-Feature-Showcase/#kick-player-reason","title":":kick <player> <reason>
","text":"Disconnects the specified player from the server. If specified, the reason is shown to the player.
"},{"location":"User-Manual-%26-Feature-Showcase/#warning-players","title":"Warning Players","text":""},{"location":"User-Manual-%26-Feature-Showcase/#warnings-player","title":":warnings <player>
","text":"Displays the specified player's warning log.
"},{"location":"User-Manual-%26-Feature-Showcase/#warn-player-reason","title":":warn <player> <reason>
","text":"Gives the specified player a warning, upon which they will be notified with the reason.
"},{"location":"User-Manual-%26-Feature-Showcase/#kickwarn-player-reason","title":":kickwarn <player> <reason>
","text":"Gives the specified player a warning and kicks them; displays the warning reason in their kick message.
"},{"location":"User-Manual-%26-Feature-Showcase/#removewarning-player-reason","title":":removewarning <player> <reason>
","text":"Deletes the specified warning from the player's warning log.
"},{"location":"User-Manual-%26-Feature-Showcase/#clearwarnings-player","title":":clearwarnings <player>
","text":"Clears the player's warning log.
"},{"location":"User-Manual-%26-Feature-Showcase/#banning-players","title":"Banning Players","text":""},{"location":"User-Manual-%26-Feature-Showcase/#banlist","title":":banlist
","text":"Displays a list of normal bans.
"},{"location":"User-Manual-%26-Feature-Showcase/#timebanlist","title":":timebanlist
","text":"Displays a list of time-banned users.
"},{"location":"User-Manual-%26-Feature-Showcase/#trellobanlistsbl","title":":trellobanlist/:sbl
","text":"Displays a list of users banned via Trello; only applicable if Trello integration is configured.
"},{"location":"User-Manual-%26-Feature-Showcase/#banserverban-player-reason","title":":ban/:serverban <player> <reason>
","text":"Bans the specified player from the current server. Note that they may still be able to join other servers.
"},{"location":"User-Manual-%26-Feature-Showcase/#permbangameban-player-reason","title":":permban/:gameban <player> <reason>
","text":"Bans the specified player from all game servers, for an indefinite amount of time. Enforced immediately, so if the user is in a server other than where the command is run, they will be kicked by the system.
"},{"location":"User-Manual-%26-Feature-Showcase/#tempbantimeban-player-duration-smhd-reason","title":":tempban/:timeban <player> <duration (s/m/h/d)> <reason>
","text":"Bans the specified player from all game servers, for a specific amount of time. Enforced immediately.
Example: :tempban Player1 3d
-- globally-bans Player1 for 3 days.
:trelloban <player> <reason>
","text":"Adds the specified player to the Trello ban list, if Trello integrations are configured for the game.
\u2139\ufe0f Tip: The above commands support full usernames for the <player>
argument, which means you can ban specific users who are not currently in your server.
:notes <player>
","text":"Displays a list of notes on the specified player.
"},{"location":"User-Manual-%26-Feature-Showcase/#note-player-note","title":":note <player> <note>
","text":"Sets a note on the specified player.
"},{"location":"User-Manual-%26-Feature-Showcase/#removenote-player-note","title":":removenote <player> <note>
","text":"Removes a note from a specified player. Specify all
for <note>
to clear all notes on that player.
Return to Top
"},{"location":"User-Manual-%26-Feature-Showcase/#section-5-adonis-features-showcase","title":"Section 5: Adonis Features Showcase","text":"Here's a miscellaneous collection of some interesting features that many users of the Adonis admin system may not be aware of:
"},{"location":"User-Manual-%26-Feature-Showcase/#teams","title":"\ud83d\udea9:teams
","text":"This is an interface that allows you to view, create, delete and join teams easily.
"},{"location":"User-Manual-%26-Feature-Showcase/#tools-inventory-monitor-gui","title":"\ud83d\udee0\ufe0f:tools
-- Inventory Monitor GUI","text":"This utility allows you to view and manage players' backpacks via a user-friendly realtime inventory monitoring interface. An alternative to manually running the :viewtools <player>
, :removetool <player> <tool name>
and :removetools <player>
commands.
:explorer
","text":"This is a built-in alternative to :dex
which allows you to view and navigate the game's file structure as well as delete objects.
:players
","text":"Displays full a list of in-game players along with some live-updated info about the state of their characters; may be useful for moderators if your game has the regular player list GUI hidden.
"},{"location":"User-Manual-%26-Feature-Showcase/#profile-player","title":"\ud83d\udd0d!profile <player>
","text":"Displays quite comprehensive information about a specific player.
Some details such as safechat status and the \"Game\" tab are hidden from non-admins for security reasons.
"},{"location":"User-Manual-%26-Feature-Showcase/#i-serverinfo","title":"\u2139\ufe0f!serverinfo
","text":"Displays information about the current server.
Some details are hidden from non-admins for security reasons.
"},{"location":"User-Manual-%26-Feature-Showcase/#incognito-player","title":"\ud83d\udd75\ufe0f:incognito <player>
","text":"A powerful command that allows admins to hide themselves from other players in the server by vanishing from their player lists.
Return to Top
That's all, folks!
Notice anything wrong? Submit an issue here or discuss it in our official Discord server.
"},{"location":"guides/creating-a-theme/","title":"Getting started","text":"In order to create a theme, you must have the Adonis Loader inside your game. You will also need to have access to the Adonis MainModule, but you do not need to keep this.
"},{"location":"guides/creating-a-theme/#part-1","title":"Part 1","text":""},{"location":"guides/creating-a-theme/#copying-the-theme","title":"Copying the theme","text":"Go to the temporary Adonis MainModule copy and go to MainModule > Client > UI
. This will allow you to see all the UI themes that Adonis uses. Select whichever one it is that you would like to base your new theme on! In our example, we will use Unity.
Copy the theme you wish to base your new theme on and paste it in your loader at: Adonis_Loader > Config > Themes
. You can now delete MainModule if you wish.
ExampleTheme
.Base_Theme
. If it doesn't, create it! This is the theme that Adonis will use if it cannot find a specific GUI. In our example we will set this to Aero.ExampleTheme > Window > Drag
and change the FontFace from Ubuntu to Source Sans Pro. Then we will go into Drag and change the background frame to Red.Congratulations! Just publish the game and you've successfully made an Adonis theme. If you have any queries, or would like to see a different guide, just ask in our communications server.
"},{"location":"tables/server/admin/","title":"Admin","text":"The 'Admin' sub-table (server.Admin) contains admin-related functions and variables. The below functions can be accessed as members of server.Admin (For example: server.Admin.GetLevel(p))
"},{"location":"tables/server/admin/#dohidechatcmd-player-object-message-string-data-optional-player-data-table","title":"DoHideChatCmd (Player (Object), Message (String), Data (Optional Player Data Table))","text":"Checks whether or not to hide commands ran from the chat for the specific player.
"},{"location":"tables/server/admin/#gettruerank-player-object-groupid-int","title":"GetTrueRank (Player (Object), GroupId (Int))","text":"Deprecated Runs GetRankInGroup from the target player's client and returns the result. This is intended to be a less secure way to avoid group rank caching, however due to security concerns should really not be used.
"},{"location":"tables/server/admin/#getplayergroup-player-object-groupname-or-groupid-string-or-int","title":"GetPlayerGroup (Player (Object), GroupName or GroupId (String or Int))","text":"Checks groups the player is in against the GroupName/GroupId provided and returns the group if found.
Returns: Group
"},{"location":"tables/server/admin/#ismuted-player-object","title":"IsMuted (Player (Object))","text":"Checks if the given player is muted.
Returns true if muted
"},{"location":"tables/server/admin/#docheck-player-object-string-int-check-string-int-table","title":"DoCheck (Player (Object, String, Int), Check (String, Int, Table))","text":"Checks the given player/string/int (Player) against the given string/int/table (Check) and will return true if they match. This function is responsible for checking if a given player/input matches something else. For example, DoCheck(Player, \"Group:181\") would return true if Player is in the group with ID 181.
Returns: true if matched, false or nil if not
"},{"location":"tables/server/admin/#updatecachedlevel-player-object","title":"UpdateCachedLevel (Player (Object))","text":"Updates the cached version of the player's admin level. Admin levels are cached for a set period of time to lower any performance impacts that may arise from constantly checking if a player is an admin.
Returns: AdminLevel
"},{"location":"tables/server/admin/#leveltolist-level-int","title":"LevelToList (Level (Int))","text":"Takes a given level value and returns the list the level belongs to. This may become inaccurate if there are multiple lists/admin ranks that share the same level. If there are multiple ranks with the same level, built in/default ranks (HeadAdmins, Admins, Moderators, Creators) will be preferred over custom ranks.
Returns: list.Users, listName, list
"},{"location":"tables/server/admin/#leveltolistname-level-int","title":"LevelToListName (Level (Int))","text":"Similar to LevelToList however only returns the name of the found rank.
Returns: RankName
"},{"location":"tables/server/admin/#getlevel-player-object","title":"GetLevel (Player (Object))","text":"Returns the admin level for the given player. This will match the level of the highest admin rank the player belongs to. The default level values are: Place Owner: 1000 Creators: 900 HeadAdmins: 300 Admins: 200 Moderators: 100 Players: 0
Returns: AdminLevel
"},{"location":"tables/server/admin/#getupdatedlevel-player-object","title":"GetUpdatedLevel (Player (Object))","text":"Gets the updated admin level for the provided player. This called automatically when the cached version of the player's admin level expires and should not be used too often for performance reasons.
Returns: AdminLevel
"},{"location":"tables/server/admin/#checkadmin-player-object","title":"CheckAdmin (Player (Object))","text":"Returns true if the player is an admin (level > 0), false if not.
Returns: boolean
"},{"location":"tables/server/admin/#setlevel-player-object-newlevel-int","title":"SetLevel (Player (Object), NewLevel (Int))","text":"Sets the target player's level to the new level indicated. Cannot set level of any user at level 1000 or higher (place owner) This will not change the player's rank, but will rather set a \"level override\" via Admin.SpecialLevels which takes priority over rank tables.
"},{"location":"tables/server/admin/#istempadmin-player-object","title":"IsTempAdmin (Player (Object))","text":"Returns true if the player is a temporary administrator.
"},{"location":"tables/server/admin/#removeadmin-player-object-istemp-optional-bool","title":"RemoveAdmin (Player (Object), isTemp (Optional Bool))","text":"Removes the target player as an admin. If isTemp is true, it will remove them from the TempAdmins table.
"},{"location":"tables/server/admin/#addadmin-player-object-level-stringint-istempbool","title":"AddAdmin (Player (Object), Level (String/Int), isTemp(Bool))","text":"Makes the target player an admin, removing them from the admin table they are currently in (if any.) If isTemp is true, will make them a temporary admin. If Level is a string it will be converted to it's level equivalent if possible.
"},{"location":"tables/server/admin/#checkdonor-player-object","title":"CheckDonor (Player (Object))","text":"Checks if the player is a donor.
Returns: true if donor
"},{"location":"tables/server/admin/#checkban-player-object","title":"CheckBan (Player (Object))","text":"Checks if the given player is banned.
Returns: true if banned
"},{"location":"tables/server/admin/#addban-player-object-reason-string-dosave-bool-moderator-object","title":"AddBan (Player (Object), Reason (String), doSave (Bool), moderator (Object))","text":"Bans Player with the given Reason and will save if doSave is true.
"},{"location":"tables/server/admin/#dobancheck-player-string-int-check-string-int-table","title":"DoBanCheck (Player (String, Int), Check (String, Int, Table))","text":"Similar to Admin.DoCheck but specifically for bans.
Returns: true if matched, false if not
"},{"location":"tables/server/admin/#removeban-player-string-int-dosave-bool","title":"RemoveBan (Player (String, Int), doSave (Bool))","text":"Unbans the given player name/id/etc and will save if doSave is true.
"},{"location":"tables/server/admin/#runcommand-command-string-argstuple-tuple","title":"RunCommand (Command (String), ArgsTuple (Tuple))","text":"Runs the given command with the given arguments as the server.
"},{"location":"tables/server/admin/#runcommandasplayer-command-string-player-object-argstuple-tuple","title":"RunCommandAsPlayer (Command (String), Player (Object), ArgsTuple (Tuple))","text":"Runs the given command as the given player with the given arguments. Overrides player's level.
"},{"location":"tables/server/admin/#runcommandasnonadmin-command-string-player-object-argstuple-tuple","title":"RunCommandAsNonAdmin (Command (String), Player (Object), ArgsTuple (Tuple))","text":"Runs the given command as the given player with the given arguments. Treats the player as a non-admin. Overrides command level.
"},{"location":"tables/server/admin/#cachecommands","title":"CacheCommands ()","text":"Updates the command cache. Commands are cached to avoid performance impacts caused by constantly iterating through and checking the entirety of the commands table whenever a player chats or runs a command. If a command is added after this is called, it might not appear in-game until this function is called to forcibly re-cache all commands.
"},{"location":"tables/server/admin/#getcommand-command-string","title":"GetCommand (Command (String))","text":"Based on the command provided, will return the command's Index, DataTable, and the command string that was matched from the given string.
Returns: String, Table, String
"},{"location":"tables/server/admin/#findcommands-command-string","title":"FindCommands (Command (String))","text":"Returns a list of commands matching 'Command'
"},{"location":"tables/server/admin/#setpermission-command-string-newlevel-string-int","title":"SetPermission (Command (String), NewLevel (String, Int))","text":"Sets the AdminLevel of all commands matching 'Command' to 'NewLevel'
"},{"location":"tables/server/admin/#formatcommand-command-table","title":"FormatCommand (Command (Table))","text":"Converts data about the given command into a string that can be used in :cmds, the console, etc.
"},{"location":"tables/server/admin/#checktable-check1-player-string-int-table","title":"CheckTable (Check1 (Player, String, Int), Table)","text":"Check 'Check1' against all entries in 'Table'
Returns: true if match is found
"},{"location":"tables/server/admin/#checkaliasblacklist-alias-string","title":"CheckAliasBlacklist (Alias (String)","text":"Checks if a given alias is blacklisted. This is to prevent the accidental override of important commands, such as those used to alter aliases.
Returns: true if blacklisted
"},{"location":"tables/server/admin/#getargs-message-string-numargs-int-additionalargs-tuple","title":"GetArgs (Message (String), NumArgs (Int), AdditionalArgs (Tuple))","text":"Returns a table containing all arguments extracted from 'Message'
Returns: Args table
"},{"location":"tables/server/admin/#aliasformat-aliases-table-message-string","title":"AliasFormat (Aliases (Table), Message (String))","text":"Alters the given message based on aliases found in the provided alias table 'Aliases.'
Returns: Updated message string
"},{"location":"tables/server/admin/#iscomlevel-testlevel-int-string-table-comlevel-int-string-table","title":"IsComLevel (TestLevel (Int, String, Table), ComLevel (Int, String, Table))","text":"Checks if 'TestLevel' matches 'ComLevel'
Returns: true or index,value if found.
"},{"location":"tables/server/admin/#stringtocomlevel-rank-string","title":"StringToComLevel (Rank (String))","text":"Converts 'Rank' to it's level if found.
Returns: level
"},{"location":"tables/server/admin/#checkcomlevel-playerlevel-int-comlevel-int-string","title":"CheckComLevel (PlayerLevel (Int), ComLevel (Int, String))","text":"Checks if the player's level matches 'ComLevel'
Returns: true if matched
"},{"location":"tables/server/admin/#isblacklisted-player-object","title":"IsBlacklisted (Player (Object))","text":"Checks if 'Player' is blacklisted.
Returns: true if blacklisted
"},{"location":"tables/server/admin/#checkpermission-playerdata-table-command-table","title":"CheckPermission (PlayerData (Table), Command (Table))","text":"Checks if 'PlayerData' has permission to use 'Command.' This is responsible for command permission checks when a player runs a command.
Returns: true if allowed
"},{"location":"tables/server/admin/#searchcommands-player-object-search-string","title":"SearchCommands (Player (Object), Search (String))","text":"Searches commands matching 'Search' that the player is allowed to run. This is mainly used by the console.
Returns: Table containing matched commands
"},{"location":"tables/server/anti/","title":"Anti","text":"This table contains all server-side anti-exploit related functions/variables. They can be accessed via server.Anti
"},{"location":"tables/server/anti/#clienttimeoutlimit","title":"ClientTimeoutLimit","text":"Default: 120 How long a player's client can 'go dark' before the player is kicked from the game.
"},{"location":"tables/server/anti/#removeplayer-player-object-reason-optional-string","title":"RemovePlayer (Player (Object), Reason (Optional String))","text":"Removes 'Player' for 'Reason'
"},{"location":"tables/server/anti/#checkallclients","title":"CheckAllClients ()","text":"Checks if all clients are alive and responding. If client has not communicated for more than Anti.ClientTimeoutLimit the player the client belongs to will be removed from the server.
"},{"location":"tables/server/anti/#userspoofcheck-player-object","title":"UserSpoofCheck (Player (Object))","text":"Attempts to detect username/userid spoofing.
Returns: true if spoofing detected
"},{"location":"tables/server/anti/#sanitize-object-classlist-table","title":"Sanitize (Object, ClassList (Table))","text":"Searches 'Object' for children matching 'ClassList' and attempts to remove them if found. An example use case would be removing all scripts from a given hat.
"},{"location":"tables/server/anti/#isfake-player-object","title":"isFake (Player (Object))","text":"Attempts to determine if a player object is a real player.
Returns: true if \"fake\"
"},{"location":"tables/server/anti/#removeiffake-player-object","title":"RemoveIfFake (Player (Object))","text":"Removes 'Player' if isFake returns true
"},{"location":"tables/server/anti/#findfakeplayers","title":"FindFakePlayers ()","text":"Attempts to find and remove \"fake\" players.
"},{"location":"tables/server/anti/#getclassname-object","title":"GetClassName (Object)","text":"Attempts to get the class name of the given 'Object' regardless of whether or not it's RobloxLocked.
"},{"location":"tables/server/anti/#rlocked-object","title":"RLocked (Object)","text":"Returns true if 'Object' is RobloxLocked
"},{"location":"tables/server/anti/#objrlocked-object","title":"ObjRLocked (Object)","text":"Identical to RLocked.
"},{"location":"tables/server/anti/#assignname","title":"AssignName ()","text":"Returns a random 6 digit number.
"},{"location":"tables/server/anti/#detected-player-object-action-string-info-string","title":"Detected (Player (Object), Action (String), Info (String))","text":"Actions: Log - Only logs the event Kick - Logs the event and kicks the player Crash - Logs the event and attempts to crash the player in addition to kicking them.
This function is called whenever a player is detected by the anti-exploit system. The player and 'Info' are logged and the specified action is performed.
"},{"location":"tables/server/anti/#checknameid-player-object","title":"CheckNameID (Player (Object))","text":"Another method to attempt to detect Name/UserId spoofing.
"},{"location":"tables/server/commands/","title":"Commands","text":"This is the commands table. It contains all commands to be used by administrators in-game. It does not contain any additional functions or variables.
To add a command, simply do: server.Commands.CommandIndexHere = CommandDataTableHere
For example:
server.Commands.SomeNewCommand = { --// The index & table of the command\n Prefix = Settings.Prefix; --// The prefix the command will use, this is the ':' in ':ff me'\n Commands = {\"examplecommand\"}; --// A table containing the command strings (the things you chat in-game to run the command, the 'ff' in ':ff me')\n Args = {\"arg1\", \"arg2\", \"etc\"}; --// Command arguments, these will be available in order as args[1], args[2], args[3], etc; This is the 'me' in ':ff me'\n Description = \"Example command\";--// The description of the command\n AdminLevel = 100; -- Moderators --// The commands minimum admin level; This can also be a table containing specific levels rather than a minimum level: {124, 152, \"HeadAdmins\", etc};\n -- Alternative option: AdminLevel = \"Moderators\"\n Filter = true; --// Should user supplied text passed to this command be filtered automatically? Use this if you plan to display a user-defined message to other players\n Hidden = true; --// Should this command be hidden from the command list?\n Function = function(plr, args, data) --// The command's function; This is the actual code of the command which runs when you run the command\n --// \"plr\" is the player running the command\n --// \"args\" is a table containing command arguments supplied by the user\n --// \"data\" is a table containing information related to the command and the player running it, such as data.PlayerData.Level (the player's admin level)\n print(\"This is 'arg1': \".. tostring(args[1]));\n print(\"This is 'arg2': \".. tostring(args[2]));\n print(\"This is 'etc'(arg 3): \".. tostring(args[3]));\n end\n};\n
Note: After adding new commands it's always a good idea to call Admin.CacheCommands() to ensure they are added to the command cache (otherwise they won't be usable.)
"},{"location":"tables/server/core/","title":"Core","text":"This is the \"Core\" table. It houses functions and variables that are essential to the core functionality of Adonis. If something happened to this table or its contents the entire system would become unusable. Functions within this table handle things like initial setup of the RemoteEvent/RemoteFunction, client loading, etc.
"},{"location":"tables/server/core/#table-variables","title":"(Table) Variables:","text":"Contains Core-related variables, such as the TimeBans table.
"},{"location":"tables/server/core/#datastore-related-variables","title":"Datastore-related variables","text":"--// Datastore update/queue timers/delays\nDS_SetDataQueueDelay = 0.5;\nDS_UpdateQueueDelay = 1;\nDS_AllPlayerDataSaveInterval = 30;\nDS_AllPlayerDataSaveQueueDelay = 0.5;\n\n--// Used to change/\"reset\" specific datastore keys\nDS_RESET_SALTS = {\n SavedSettings = \"32K5j4\";\n SavedTables = \"32K5j4\";\n};\n
"},{"location":"tables/server/core/#disconnectevent","title":"DisconnectEvent ()","text":"Disconnects and destroys all events related to security and the RemoteEvent
"},{"location":"tables/server/core/#makeevent","title":"MakeEvent ()","text":"Creates the RemoteEvent and RemoteFunction used for server-client communication.
"},{"location":"tables/server/core/#updateconnections","title":"UpdateConnections ()","text":"Updates the list of NetworkServer - Player connections
"},{"location":"tables/server/core/#updateconnection-player-userdata","title":"UpdateConnection (Player: userdata)","text":"Same as UpdateConnections but for a specific player.
"},{"location":"tables/server/core/#getnetworkclient-player-userdata","title":"GetNetworkClient (Player: userdata)","text":"Returns the NetworkClient belonging to 'Player'
"},{"location":"tables/server/core/#setupevent-player-userdata","title":"SetupEvent (Player: userdata)","text":"Creates a new player-specific RemoteEvent to be used for client-server communication. Not currently used.
"},{"location":"tables/server/core/#prepareclient","title":"PrepareClient ()","text":"Creates a client loader in ReplicatedFirst. Not currently used in favor of handling the client loading process via HookClient(Player)
"},{"location":"tables/server/core/#hookclient-player-userdata","title":"HookClient (Player: userdata)","text":"When a player joins this function is called and handles the process of preparing the client and parenting it to the player.
"},{"location":"tables/server/core/#loadclientloader-player-userdata","title":"LoadClientLoader (Player: userdata)","text":"Handles the loading of existing players at server startup. Calls Process.PlayerAdded(Player)
"},{"location":"tables/server/core/#makeclient","title":"MakeClient ()","text":"Places the client into StarterPlayerScripts. Not currently used in favor of HookClient
"},{"location":"tables/server/core/#executepermission-sourcescriptobject-userdata-code-string-islocal-bool","title":"ExecutePermission (SourceScriptObject: userdata, Code: string, isLocal: bool)","text":"Determines if the given script object 'SourceScriptObject' is allowed to run. If 'Code' is provided it will be used as a pseudo-password. If 'isLocal' is true it will be treated as a LocalScript.
Returns: if allowed, table containing Source, noCache, runLimit, number of Executions
"},{"location":"tables/server/core/#getscript-scriptobject-userdata-code-string","title":"GetScript (ScriptObject: userdata, Code: string)","text":"Returns the registered script object matching 'ScriptObject' or 'Code'
"},{"location":"tables/server/core/#unregisterscript-scriptobject-userdata","title":"UnRegisterScript (ScriptObject: userdata)","text":"Unregisters 'ScriptObject' for execution.
"},{"location":"tables/server/core/#registerscript-data-table","title":"RegisterScript (Data: table)","text":"Registers Data.Script as being allowed to execute along with it's related information.
"},{"location":"tables/server/core/#getloadstring","title":"GetLoadstring ()","text":"Returns a new loadstring module.
"},{"location":"tables/server/core/#bytecode-luacode-string","title":"Bytecode (LuaCode: string)","text":"Converts 'LuaCode' into bytecode and returns the result. This is used before sending any code to run to the client.
"},{"location":"tables/server/core/#newscript-class-string-source-string-allowcodes-bool-nocache-bool-runlimit-int","title":"NewScript (Class: string, Source: string, AllowCodes: bool, NoCache: bool, RunLimit: int)","text":"Creates, registers, and returns a new script of class 'Class'
"},{"location":"tables/server/core/#saveplayer-player-userdata-data-table","title":"SavePlayer (Player: userdata, Data: table)","text":"Updates Player's data (in Core.PlayerData) do 'Data'
"},{"location":"tables/server/core/#defaultplayerdata-player-userdata","title":"DefaultPlayerData (Player: userdata)","text":"Returns the default player data for 'Player'
"},{"location":"tables/server/core/#getplayer-player-userdata","title":"GetPlayer (Player: userdata)","text":"Returns the PlayerData for 'Player' Also updates the PlayerData cache and will retrieve data from the datastore if not already cached.
"},{"location":"tables/server/core/#clearplayer-player-userdata","title":"ClearPlayer (Player: userdata)","text":"Clears data related to a player, resetting it to the default values.
"},{"location":"tables/server/core/#saveplayerdata-player-userdata-customdata-opttable","title":"SavePlayerData (Player: userdata, CustomData: (opt)table)","text":"Save's data for 'Player' to the datastore.
"},{"location":"tables/server/core/#saveallplayerdata","title":"SaveAllPlayerData ()","text":"Saves all player data.
"},{"location":"tables/server/core/#getdatastore","title":"GetDataStore ()","text":"Returns the DataStore.
"},{"location":"tables/server/core/#datastoreencode-key-string","title":"DataStoreEncode (Key: string)","text":"Returns the salted, encrypted, Base64 encoded version of a given key to be used in the datastore.
"},{"location":"tables/server/core/#savedata","title":"SaveData (...)","text":"Calls Core.SetData(...)
"},{"location":"tables/server/core/#removedata-key-string","title":"RemoveData (Key: string)","text":"Removes 'Key' and related data from the datastore.
"},{"location":"tables/server/core/#setdata-key-string-value","title":"SetData (Key: string, Value)","text":"Sets 'Key' to 'Value' in the datastore cache & datastore (when the datastore is updated)
"},{"location":"tables/server/core/#updatedata-key-string-function-function","title":"UpdateData (Key: string, Function: function)","text":"Calls UpdateAsync for the given 'Key' with 'Function'
"},{"location":"tables/server/core/#getdata-key-string","title":"GetData (Key: string)","text":"Returns data related to 'Key' from the DataCache/datastore
"},{"location":"tables/server/core/#indexpathtotable-stringtableancestry-table","title":"IndexPathToTable (string,TableAncestry: table)","text":"Attempts to find the given table based on the path provided. Returns: foundTable, foundTableIndex
"},{"location":"tables/server/core/#dosavedata-table","title":"DoSave(Data: table)","text":"Saves settings or tables to the datastore based on information provided in 'Data'
"},{"location":"tables/server/core/#loaddata-key-string-data-table","title":"LoadData (Key: string, Data: table)","text":"Loads saved settings, tables, etc.
"},{"location":"tables/server/core/#startapi","title":"StartAPI ()","text":"Handles the creation and monitoring of _G.Adonis
"},{"location":"tables/server/functions/","title":"Functions","text":"Contains various server-specific miscellaneous functions.
\u2139\ufe0f This page is currently incomplete.
"},{"location":"tables/server/functions/#playerfinders","title":"PlayerFinders","text":"These are used when service.GetPlayers
is called to search for players based on the user's input. The default built-in player finders (at the time of writing this) can be found below to be used as examples:
PlayerFinders = {\n [\"me\"] = {\n Match = \"me\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n table.insert(players,plr)\n plus()\n end;\n };\n\n [\"all\"] = {\n Match = \"all\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local everyone = true\n if isKicking then\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p.Name:lower():sub(1,#msg)==msg:lower() then\n everyone = false\n table.insert(players,p)\n plus()\n end\n end\n end\n if everyone then\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p then\n table.insert(players,p)\n plus()\n end\n end\n end\n end;\n };\n\n [\"@everyone\"] = {\n Match = \"@everyone\";\n Absolute = true;\n Function = function(...)\n return Functions.PlayerFinders.all.Function(...)\n end\n };\n\n [\"others\"] = {\n Match = \"others\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p ~= plr then\n table.insert(players,p)\n plus()\n end\n end\n end;\n };\n\n [\"random\"] = {\n Match = \"random\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n if #players>=#parent:GetChildren() then return end\n local rand = parent:GetChildren()[math.random(#parent:children())]\n local p = getplr(rand)\n for i,v in pairs(players) do\n if(v.Name == p.Name)then\n Functions.PlayerFinders.random.Function(msg, plr, parent, players, getplr, plus, isKicking)\n return;\n end\n end\n table.insert(players,p)\n plus();\n end;\n };\n\n [\"admins\"] = {\n Match = \"admins\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if Admin.CheckAdmin(p,false) then\n table.insert(players, p)\n plus()\n end\n end\n end;\n };\n\n [\"nonadmins\"] = {\n Match = \"nonadmins\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if not Admin.CheckAdmin(p,false) then\n table.insert(players,p)\n plus()\n end\n end\n end;\n };\n\n [\"friends\"] = {\n Match = \"friends\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p:IsFriendsWith(plr.userId) then\n table.insert(players,p)\n plus()\n end\n end\n end;\n };\n\n [\"@username\"] = {\n Match = \"@\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = tonumber(msg:match(\"@(.*)\"))\n local foundNum = 0\n if matched then\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p and p.Name == matched then\n table.insert(players,p)\n plus()\n foundNum = foundNum+1\n end\n end\n end\n end;\n };\n\n [\"%team\"] = {\n Match = \"%\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"%%(.*)\")\n if matched then\n for i,v in next,service.Teams:GetChildren() do\n if v.Name:lower():sub(1,#matched) == matched:lower() then\n for k,m in next,parent:GetChildren() do\n local p = getplr(m)\n if p.TeamColor == v.TeamColor then\n table.insert(players,p)\n plus()\n end\n end\n end\n end\n end\n end;\n };\n\n [\"$group\"] = {\n Match = \"$\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"%$(.*)\")\n if matched and tonumber(matched) then\n for i,v in next,parent:children() do\n local p = getplr(v)\n if p:IsInGroup(tonumber(matched)) then\n table.insert(players,p)\n plus()\n end\n end\n end\n end;\n };\n\n [\"id-\"] = {\n Match = \"id-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = tonumber(msg:match(\"id%-(.*)\"))\n local foundNum = 0\n if matched then\n for i,v in next,parent:children() do\n local p = getplr(v)\n if p and p.userId == matched then\n table.insert(players,p)\n plus()\n foundNum = foundNum+1\n end\n end\n if foundNum == 0 then\n local ran,name = pcall(function() return service.Players:GetNameFromUserIdAsync(matched) end)\n if ran and name then\n local fakePlayer = service.Wrap(service.New(\"Folder\"))\n local data = {\n Name = name;\n ToString = name;\n ClassName = \"Player\";\n AccountAge = 0;\n CharacterAppearanceId = tostring(matched);\n UserId = tonumber(matched);\n userId = tonumber(matched);\n Parent = service.Players;\n Character = Instance.new(\"Model\");\n Backpack = Instance.new(\"Folder\");\n PlayerGui = Instance.new(\"Folder\");\n PlayerScripts = Instance.new(\"Folder\");\n Kick = function() fakePlayer:Destroy() fakePlayer:SetSpecial(\"Parent\", nil) end;\n IsA = function(ignore, arg) if arg == \"Player\" then return true end end;\n }\n for i,v in next,data do fakePlayer:SetSpecial(i, v) end\n table.insert(players, fakePlayer)\n plus()\n end\n end\n end\n end;\n };\n\n [\"displayname-\"] = {\n Match = \"displayname-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = tonumber(msg:match(\"displayname%-(.*)\"))\n local foundNum = 0\n if matched then\n for i,v in next,parent:children() do\n local p = getplr(v)\n if p and p.DisplayName == matched then\n table.insert(players,p)\n plus()\n foundNum = foundNum+1\n end\n end\n end\n end;\n };\n\n [\"team-\"] = {\n Match = \"team-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n print(1)\n local matched = msg:match(\"team%-(.*)\")\n if matched then\n for i,v in next,service.Teams:GetChildren() do\n if v.Name:lower():sub(1,#matched) == matched:lower() then\n for k,m in next,parent:GetChildren() do\n local p = getplr(m)\n if p.TeamColor == v.TeamColor then\n table.insert(players, p)\n plus()\n end\n end\n end\n end\n end\n end;\n };\n\n [\"group-\"] = {\n Match = \"group-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"group%-(.*)\")\n if matched and tonumber(matched) then\n for i,v in next,parent:children() do\n local p = getplr(v)\n if p:IsInGroup(tonumber(matched)) then\n table.insert(players,p)\n plus()\n end\n end\n end\n end;\n };\n\n [\"-name\"] = {\n Match = \"-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"%-(.*)\")\n if matched then\n local removes = service.GetPlayers(plr,matched,true)\n for i,v in next,players do\n for k,p in next,removes do\n if v.Name == p.Name then\n table.remove(players,i)\n plus()\n end\n end\n end\n end\n end;\n };\n\n [\"#number\"] = {\n Match = \"#\";\n Function = function(msg, plr, ...)\n local matched = msg:match(\"%#(.*)\")\n if matched and tonumber(matched) then\n local num = tonumber(matched)\n if not num then\n Remote.MakeGui(plr,'Output',{Title = 'Output'; Message = \"Invalid number!\"})\n end\n for i = 1,num do\n Functions.PlayerFinders.random.Function(msg, plr, ...)\n end\n end\n end;\n };\n\n [\"radius-\"] = {\n Match = \"radius-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"radius%-(.*)\")\n if matched and tonumber(matched) then\n local num = tonumber(matched)\n if not num then\n Remote.MakeGui(plr,'Output',{Title = 'Output'; Message = \"Invalid number!\"})\n end\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p ~= plr and plr:DistanceFromCharacter(p.Character.Head.Position) <= num then\n table.insert(players,p)\n plus()\n end\n end\n end\n end;\n };\n};\n
"},{"location":"tables/server/logs/","title":"Logs","text":"This table is responsible for all logging in Adonis.
"},{"location":"tables/server/logs/#log-tables","title":"Log Tables","text":"Chats = {}; --// Chat logs\nJoins = {}; --// Join logs\nScript = {}; --// Script-related logs\nRemoteFires = {}; --// RemoteEvent logs\nCommands = {}; --// Command logs\nExploit = {}; --// Exploit logs\nErrors = {}; --// Error logs\nTempUpdaters = {} --// Temporary functions used as list updaters\n
"},{"location":"tables/server/logs/#tabtotype-table-table","title":"TabToType (table: Table)","text":"Returns a string describing what the provided table is logging.
Possible returns: \"Chat\", \"Join\", \"Script\", \"RemoteFire\", \"Command\", \"Exploit\", \"Error\", \"ServerDetails\", \"DateTime\"
"},{"location":"tables/server/logs/#addlog-table-string-logtable-table-string-log","title":"AddLog (table, string: LogTable, table, string: Log)","text":"Adds 'Log' to 'LogTable' and automatically adds a timestamp if one is not provided (unless 'Log' is a table and Log.NoTime is true)
Fires service.Events.LogAdded:Fire(TabToType(LogTable), Log, LogTable)
"},{"location":"tables/server/logs/#savecommandlogs","title":"SaveCommandLogs ()","text":"Saves command logs to the datastore as \"OldCommandLogs\"
"},{"location":"tables/server/logs/#table-listupdaters","title":"Table: ListUpdaters","text":"These are functions used by lists to update their contents when the user refreshes the list.
Here's the list updater for ChatLogs as an example:
ListUpdaters = {\n ChatLogs = function()\n return Logs.Chats\n end;\n}\n
"},{"location":"tables/server/process/","title":"Process","text":"This table contains functions that handle various events, such as calls to the RemoteEvent or player messages/commands.
"},{"location":"tables/server/process/#variables","title":"Variables","text":"MsgStringLimit = 500; --// Max message string length to prevent long length chat spam server crashing (chat & command bar); Anything over will be truncated;\nMaxChatCharacterLimit = 250; --// Roblox chat character limit; The actual limit of the Roblox chat's textbox is 200 characters; I'm paranoid so I added 50 characters; Users should not be able to send a message larger than that;\nRateLimits = { --// Rate limit values for various events that may occur to prevent spam/performance issues\n Remote = 0.01;\n Command = 0.1;\n Chat = 0.1;\n CustomChat = 0.1;\n RateLog = 10;\n};\n
"},{"location":"tables/server/process/#remote-userdata-player-table-clientdata-string-command-tuple-arguments","title":"Remote (userdata: Player, table: ClientData, string: Command, tuple: Arguments)","text":"Handles client to server communication. This is called whenever the RemoteEvent is triggered by the client.
"},{"location":"tables/server/process/#command-userdata-player-string-message-table-options-bool-noyield","title":"Command (userdata: Player, string: Message, table: Options, bool: noYield)","text":"Processes player commands.
"},{"location":"tables/server/process/#datastoreupdated-string-key-table-data","title":"DataStoreUpdated (string: Key, table: Data)","text":"Runs when the datastore updates and passes 'Key' and 'Data' to Core.LoadData
"},{"location":"tables/server/process/#crossserverchat-table-data","title":"CrossServerChat (table: Data)","text":"Handles cross-server chat messages.
"},{"location":"tables/server/process/#customchat-userdata-player-string-message-string-mode-bool-cancross","title":"CustomChat (userdata: Player, string: Message, string: Mode, bool CanCross)","text":"Handles messages sent via Adonis's custom chat.
"},{"location":"tables/server/process/#chat-userdata-player-string-message","title":"Chat (userdata: Player, string: Message)","text":"Handles player chats.
"},{"location":"tables/server/process/#workspacechildadded-userdata-child","title":"WorkspaceChildAdded (userdata: Child)","text":"Runs when a new child is added to Workspace. Previously, this was used as an alternative to player.CharacterAdded however is no longer in use.
"},{"location":"tables/server/process/#logservice-message-trace-script","title":"LogService (Message, Trace, Script)","text":"Runs whenever a new message is added by the LogService. Not currently used.
"},{"location":"tables/server/process/#playeradded-userdata-player","title":"PlayerAdded (userdata: Player)","text":"Runs when a new player joins the game and handles the initial loading process, such as player removal (if banned) and client hooking.
"},{"location":"tables/server/process/#playerremoving-userdata-player","title":"PlayerRemoving (userdata: Player)","text":"Runs when a player is leaving. Fires service.Events.PlayerRemoving(Player)
"},{"location":"tables/server/process/#networkadded-userdata-networkclient","title":"NetworkAdded (userdata: NetworkClient)","text":"Runs when a new NetworkClient object is added to NetworkServer Fires service.Events.NetworkAdded(NetworkClient)
"},{"location":"tables/server/process/#networkremoved-userdata-networkclient","title":"NetworkRemoved (userdata: NetworkClient)","text":"Runs when a NetworkClient is removed. Fires service.Events.NetworkRemoved(NetworkClient)
"},{"location":"tables/server/process/#finishloading-userdata-player","title":"FinishLoading (userdata: Player)","text":"Assuming the player isn't removed or leaves while loading (during PlayerAdded) this function will run when the player and client are fully finished loading and are ready for communication. This handles the \"You're an admin!\" messages as well as other things that happen when the player finishes loading, such as the enabling of various client-side anti-exploit handlers and misc features. Fires service.Events.PlayerAdded(Player)
"},{"location":"tables/server/process/#characteradded-userdata-player","title":"CharacterAdded (userdata: Player)","text":"Runs whenever a player's character loads.
"},{"location":"tables/server/process/#playerteleported-userdata-player-data","title":"PlayerTeleported (userdata: Player, data)","text":"Runs whenever a player teleports to the current server. Not currently used.
"},{"location":"tables/server/remote/","title":"Remote","text":"Remote handles all remote server-client communication.
"},{"location":"tables/server/remote/#table-returnables","title":"Table: Returnables","text":"This is a table containing functions that can be called via client.Remote.Get and will return something to the calling client.
"},{"location":"tables/server/remote/#table-unencrypted","title":"Table: UnEncrypted","text":"This is a table containing functions that can be used by clients without needing encryption/various security checks. This contains functions mostly related to initial loading before keys are exchanged, or communication with non-adonis-client localscripts, as well as very basic rapid fire events like chat handling.
"},{"location":"tables/server/remote/#table-commands","title":"Table: Commands","text":"These are functions which can be ran by clients via client.Remote.Send They cannot return data and are purely \"fire and forget.\"
"},{"location":"tables/server/remote/#newsession-string-sessiontype","title":"NewSession (string: SessionType)","text":"Creates and returns a new session handler that can be used to facilitate temporary communication between the server and multiple users with special commands/event defined.
Clients can listen for session events as needed via service.Events.SessionData
Here's an example of NewSession in action in the form of a, at the time of writing this, work in process private chat command & GUI:
Server code:
local newSession = Remote.NewSession(\"PrivateChat\");\nlocal eventConnection = newSession.SessionEvent.Event:Connect(function(p, ...)\n local args = {...};\n local cmd = args[1];\n\n if cmd == \"SendMessage\" then\n if newSession.Users[p] then\n table.insert(newSession.Users[p].Messages, args[2]);\n end\n\n newSession.SendToUsers(\"PlayerSentMessage\", p, args[2]);\n elseif cmd == \"LeaveSession\" then\n newSession.Users[p] = nil;\n newSession.SendToUsers(\"PlayerLeftSession\", p);\n elseif cmd == \"EndSession\" and p == plr then\n newSession.End();\n end\nend)\n\nfor i,v in ipairs(service.GetPlayers(plr, args[1])) do\n newSession.AddUser(v, {\n Messages = {};\n });\n\n Remote.MakeGui(v, \"PrivateChat\", {\n Owner = plr;\n SessionKey = newSession.SessionKey;\n })\n\n -- testing stuff below\n wait(2)\n newSession.SendToUsers(\"PlayerSentMessage\", plr, \"this is a test message\");\nend\n
Client Code:
local sessionEvent = service.Events.SessionData:Connect(function(sessionKey, cmd, ...)\n local vargs = {...};\n print(\"we got session thing!\");\n if SessionKey == sessionKey then\n print(\"SESSION KEY VALID\")\n if cmd == \"PlayerSentChat\" then\n local p = vargs[1];\n local message = vargs[2];\n\n print(\"got chat: \".. p.Name, \"Message: \".. message)\n end\n end\nend)\n
"},{"location":"tables/server/remote/#getsession-string-sessionkey","title":"GetSession (string: SessionKey)","text":"Gets the session belonging to 'SessionKey'
"},{"location":"tables/server/remote/#fire-userdata-player-tuple-arguments","title":"Fire (userdata: Player, tuple: Arguments)","text":"(Raw fire) Sends data to the client belonging to 'Player' with any arguments passed. Does not handle command encryption before sending. This should not be used for normal server-client communication.
"},{"location":"tables/server/remote/#getfire-userdata-player-tuple-arguments","title":"GetFire (userdata: Player, tuple: Arguments)","text":"(Raw fire) Functionally similar to Remote.Fire except it uses the RemoteFunction and is thus able to return data from the client. This should not be used for normal server-client communication.
"},{"location":"tables/server/remote/#send-userdata-player-string-command-tuple-arguments","title":"Send (userdata: Player, string: Command, tuple: Arguments)","text":"Encrypts 'Command' and sends it with 'Arguments' to client of 'Player' This should be used for normal communication.
"},{"location":"tables/server/remote/#get-userdata-player-string-command-tuple-arguments","title":"Get (userdata: Player, string: Command, tuple: Arguments)","text":"Encrypts 'Command' and sends it with 'Arguments' to client of 'Player' Functionally similar to Remote.Send except it uses the RemoteFunction and is thus able to return data from the client. This should be used for normal communication.
"},{"location":"tables/server/remote/#checkclient-userdata-player","title":"CheckClient (userdata: Player)","text":"Checks if the 'Player's client is hooked and ready for communication.
"},{"location":"tables/server/remote/#ping-userdata-player","title":"Ping (userdata: Player)","text":"Runs Remote.Get(Player, \"Ping\") and returns the result.
"},{"location":"tables/server/remote/#makegui-userdata-player-string-guiname-table-data-table-themedata","title":"MakeGui (userdata: Player, string: GuiName, table: Data, table: ThemeData)","text":"Tells 'Player's client to create the specified GUI with the specified data provided.
"},{"location":"tables/server/remote/#makeguiget-userdata-player-string-guiname-table-data-table-themedata","title":"MakeGuiGet (userdata: Player, string: GuiName, table: Data, table: ThemeData)","text":"Identical to Remote.MakeGui except this will yield and return any data returned by the GUI created. This is used in conjunction with UI elements like the YesNoPrompt.
"},{"location":"tables/server/remote/#getgui-userdata-player-string-guiname-table-data-table-themedata","title":"GetGui (userdata: Player, string: GuiName, table: Data, table: ThemeData)","text":"Alternative method of calling Remote.MakeGuiGet
"},{"location":"tables/server/remote/#removegui-userdata-player-string-guiname","title":"RemoveGui (userdata: Player, string: GuiName)","text":"Removes the specified UI element belonging to 'GuiName' from 'Player'
"},{"location":"tables/server/remote/#newparticle-userdata-player-userdata-parent-string-type-table-properties","title":"NewParticle (userdata: Player, userdata: Parent, string: Type, table: Properties)","text":"Creates a new particle of 'Type' in 'Parent' locally for 'Player'
"},{"location":"tables/server/remote/#removeparticle-userdata-player-userdata-parent-string-name","title":"RemoveParticle (userdata: Player, userdata: Parent, string: Name)","text":"Removes particle from 'Parent' for 'Player'
"},{"location":"tables/server/remote/#newlocal-userdata-player-string-classname-table-properties-userdata-parent","title":"NewLocal (userdata: Player, string: ClassName, table: Properties, userdata: Parent)","text":"Creates a new particle locally for 'Player' of 'ClassName' with 'Properties' in 'Parent'
"},{"location":"tables/server/remote/#makelocal-userdata-player-userdata-object-userdata-parent-bool-clone","title":"MakeLocal (userdata: Player, userdata: Object, userdata: Parent, bool: Clone)","text":"Makes 'Object' local to 'Player'
"},{"location":"tables/server/remote/#movelocal-player-object-parent-newparent","title":"MoveLocal (Player, Object, Parent, newParent)","text":"Moves local object to new parent for 'Player'
"},{"location":"tables/server/remote/#removelocal-player-object-parent-string-match","title":"RemoveLocal (Player, Object, Parent, string: Match)","text":"Removes local from 'Player' in 'Parent' matching 'Object' or 'Match'
"},{"location":"tables/server/remote/#setlighting-player-string-property-value","title":"SetLighting (Player, string: Property, Value)","text":"Sets game.Lighting[Property] to 'Value' for 'Player'
"},{"location":"tables/server/remote/#fireevent-player-tuple-arguments","title":"FireEvent (Player, tuple: Arguments)","text":"Triggers client event on 'Player' with 'Arguments'
"},{"location":"tables/server/remote/#newplayerevent-player-string-type-function-function","title":"NewPlayerEvent (Player, string: Type, function: Function)","text":"Creates a new player event and can be triggered by the client.
"},{"location":"tables/server/remote/#playaudio-player-int-audioid-int-volume-int-pitch-bool-looped","title":"PlayAudio (Player, int: AudioId, int: Volume, int: Pitch, bool: Looped)","text":"Plays audio locally on 'Player'
"},{"location":"tables/server/remote/#stopaudio-player-int-audioid","title":"StopAudio (Player, int: AudioId)","text":"Stops current playing local audio on 'Player'
"},{"location":"tables/server/remote/#stopallaudio-userdata-player","title":"StopAllAudio (userdata: Player)","text":"Stops all playing audio (locally created by Adonis)
"},{"location":"tables/server/remote/#loadcode-player-string-luacode-bool-getresult","title":"LoadCode (Player, string: LuaCode, bool: GetResult)","text":"Runs 'LuaCode' on the player's client and gets the result if 'GetResult' is true.
"},{"location":"tables/server/remote/#encrypt-string-string-string-key-table-cache","title":"Encrypt (string: String, string: Key, table: Cache)","text":"Handles encryption.
"},{"location":"tables/server/remote/#decrypt-string-string-string-key-table-cache","title":"Decrypt (string: String, string: Key, table: Cache)","text":"Handles decryption.
"},{"location":"tables/shared/service/","title":"The \"Service\" Metatable","text":"In Adonis, the \"service\" variable is a metatable provided by the Service core module containing many essential functions and variables used by both the server and client. The service table for the client is nearly identical to the service table for the server with the exception of a few variables added by either the client or server during loading.
If an index is requested from the service table (eg. service.Players) it will first check if it contains the requested index. If it does not contain the requested index, the it will query game:GetService(index) and return the result instead. This offers a slightly quicker alternative to typing game:GetService() when getting a Roblox service.
"},{"location":"tables/shared/service/#special-functions-variables","title":"Special Functions & Variables","text":"The following is a list of functions and variables that can be found in the service metatable.
Note that ... implies user defined arguments that are not necessarily required to use a function or used directly by the function. This is almost always arguments to be passed to a user defined function.
Variables starting with * indicate an optional variable.
"},{"location":"tables/shared/service/#serviceeventservice","title":"service.EventService","text":"The EventService table/object contains functions related to event and task handling. All members of the EventService object can be accessed as members of the service metatable.
"},{"location":"tables/shared/service/#tracktaskname-function","title":"TrackTask(Name, Function, ...)","text":"Creates a new Adonis-tracked \"task\" thread. If Name starts with \"Thread:\" Adonis will create the task as a coroutine, otherwise TrackTask will yield until function completion. TrackTask will pass ... as arguments to the specified task function and will return the result.
--// Add existing players in case some are already in the server\nfor _, player in service.Players:GetPlayers() do\n service.TrackTask(\"Thread: LoadPlayer \"..tostring(player.Name), server.Core.LoadExistingPlayer, player);\nend\n
"},{"location":"tables/shared/service/#eventtaskname-function","title":"EventTask(Name, Function)","text":"Creates a special function that can be called by an event to spawn a new task each time the event fires.
service.Players.PlayerAdded:Connect(service.EventTask(\"PlayerAdded\", server.Process.PlayerAdded))\n
"},{"location":"tables/shared/service/#gettasks","title":"GetTasks()","text":"Returns a table containing currently tracked tasks.
"},{"location":"tables/shared/service/#events","title":"Events","text":"Acts as a proxy to service.GetEvent(EventName) which will return a special event object for EventName.
The event object contains methods like :Connect(function), :Fire(...), and :Wait()
"},{"location":"tables/shared/service/#connectfunction","title":":Connect(function)","text":"Will attach a user specified function to the event. When :Fire(...) is called, the arguments passed to :Fire(...) will be passed to the attached function.
"},{"location":"tables/shared/service/#connectoncefunction","title":":ConnectOnce(function)","text":"Same as :Connect() except disconnects after firing once.
"},{"location":"tables/shared/service/#fire","title":":Fire(...)","text":"Runs all functions attached to the event and passes ... to them.
"},{"location":"tables/shared/service/#wait","title":":Wait()","text":"Waits for the event to fire once. Will return whatever arguments :Fire(...) sent. Yields.
"},{"location":"tables/shared/service/#adonis-events","title":"Adonis Events","text":"Adonis has a number of custom events that can be used by plugins or Adonis itself.
Events List:
--// SERVER\nCommandRan(Player, Data) \n--[[\n Data is a table containing the following: \n {\n Message = msg, --// The full message the player chatted; Previously the \"Message\" param\n Matched = matched, --// The :kick in :kick me (the MatchedString param previously (the command basically))\n Args = args, --// The command arguments (the me in :kick me)\n Command = command, --// The command's data table (contains the function and all info about the command being ran)\n Index = index, --// The command's index in the command table\n Success = success, --// Did the command run? Did it fail? Did it return anything for some reason? This will tell us..\n Error = error, --// If it failed, what was the error?\n Options = opts, --// The options (\"opts\" table) passed to Process.Command; Contains stuff like isSystem and CrossServer flags\n PlayerData = pDat --// Data about the player, such as Level, isAgent, isDonor, and the Player object itself\n }\n--]]\n\nCustomChat(Player, Message, Mode)\nPlayerChatted(Player, Message)\nPlayerAdded(Player)\nPlayerRemoving(Player)\nCharacterAdded(Player)\nNetworkAdded(NetworkClient)\nNetworkRemoved(NetworkClient)\nLogAdded(LogType, Log, LogTable)\n\n--// Currently Disabled\nObjectAdded(Object) \nObjectRemoved(Object)\nOutput(Message, Type)\nErrorMessage(Message, Trace, Script)\n\n--// CLIENT\nCharacterAdded()\nCharacterRemoving()\n
Example:
--// Connect to the LogAdded event\nservice.Events.LogAdded:Connect(function(LogType, Log, LogTable)\n print(\"New \" .. LogType ..\" log: \".. Log.Text .. \" - \" .. Log.Desc)\nend)\n\n--// Wait for a log to be added\nlocal LogType, Log, LogTable = service.Events.LogAdded:Wait()\n\n--// Fire the LogAdded event\nservice.Events.LogAdded:Fire(\"Command\", {Text = \"Player1: :ff me\", Desc = \"Player1 ran a command\"}, server.Logs.Commands)\n\n--// Also here's the list of potential LogTypes:\n--// Chats in the first entry of this table corresponds to server.Logs.Chats, it's log type is \"Chat\"\nlocal indToName = {\n Chats = \"Chat\";\n Joins = \"Join\";\n Script = \"Script\";\n Replications = \"Replication\";\n NetworkOwners = \"NetworkOwner\";\n RemoteFires = \"RemoteFire\";\n Commands = \"Command\";\n Exploit = \"Exploit\";\n Errors = \"Error\";\n}\n
"},{"location":"tables/shared/service/#checkeventswaiting","title":"CheckEvents(*Waiting)","text":"Currently disabled. Responsible for determining which events are done and should be cleaned up.
"},{"location":"tables/shared/service/#foreachtable-function","title":"ForEach(Table, Function)","text":"Iterates through a given table, calling Function(Table, Index, Value) for each item in the table.
"},{"location":"tables/shared/service/#wrapeventargstable","title":"WrapEventArgs(Table)","text":"Responsible for wrapping arguments passed to event functions.
"},{"location":"tables/shared/service/#unwrapeventargstable","title":"UnWrapEventArgs(Table)","text":"Unwraps objects in the given table.
"},{"location":"tables/shared/service/#geteventeventname","title":"GetEvent(EventName)","text":"Returns a special object for Adonis events. Refer to the Events section. Identical to service.Events.EventName
"},{"location":"tables/shared/service/#hookeventeventname-function","title":"HookEvent(EventName, Function)","text":"Attaches a function to the specified EventName. Identical to calling service.Events.EventName:Connect()
"},{"location":"tables/shared/service/#fireeventeventname","title":"FireEvent(EventName, ...)","text":"Identical to service.Events.EventName:Fire(...)
"},{"location":"tables/shared/service/#removeeventseventname","title":"RemoveEvents(EventName)","text":"Removes all event hooks associated with EventName.
"},{"location":"tables/shared/service/#servicethreadservice","title":"service.ThreadService","text":"The ThreadService object can be accessed via service.ThreadService. Unlike WrapService, EventService, and HelperService the functions and variables in ThreadService cannot be accessed as members of the service metatable. Instead, they can be accessed using the ThreadService object.
"},{"location":"tables/shared/service/#tasks","title":"Tasks","text":"Table containing running tasks.
"},{"location":"tables/shared/service/#threads","title":"Threads","text":"Table containing running threads.
"},{"location":"tables/shared/service/#checktasks","title":"CheckTasks()","text":"Responsible for removing \"dead\" tasks.
"},{"location":"tables/shared/service/#newtaskname-function-timeout","title":"NewTask(Name, Function, *Timeout)","text":"Creates a new task and returns newTask.Resume,newTask
Tasks have a number of functions. At it's core a task is a proxy object to a coroutine.
Every task contains the following:
PID - a unique identifier for the task\nName - task name\nIndex - index in the Tasks table\nCreated - time the task was created\nChanged - a table containing task related event functions, such as :connect(function), :fire(...); Fires when task changes\nTimeout - how long the task can run for, default inf (0)\nRunning - bool that's true when the task is running\nFunction - the task's function\nR_Status - current task status\nFinished - table containing tasks related event functions, such as :connect(function), fire(...), and :wait(); Fires when task finishes\nFunction - task function handler\nRemove - removes the task\nThread - task thread handler\nResume - resumes the task\nStatus - returns task status\nPause - suspends the task\nStop - stops and removes the task\nKill - ends and removes the task\nEnd - ends the task\n
"},{"location":"tables/shared/service/#runtaskname-function","title":"RunTask(Name, Function, ...)","text":"Creates a new task with Name and Function, then runs the new task with arguments ...
"},{"location":"tables/shared/service/#timeoutruntaskname-function-timeout","title":"TimeoutRunTask(Name, Function, Timeout, ...)","text":"Same as RunTask but with a timeout.
"},{"location":"tables/shared/service/#waittaskname-function","title":"WaitTask(Name, Function, ...)","text":"Same as RunTask, but yields until task.Finished fires.
"},{"location":"tables/shared/service/#neweventtaskname-function-timeout","title":"NewEventTask(Name, Function, *Timeout)","text":"Returns a function that can be used to create a new task each time an event fires.
"},{"location":"tables/shared/service/#stop-wait-pause-yield","title":"Stop, Wait, Pause, Yield,","text":"coroutine.yield
"},{"location":"tables/shared/service/#status","title":"Status","text":"corotuine.status
"},{"location":"tables/shared/service/#running-get","title":"Running, Get","text":"coroutine.running
"},{"location":"tables/shared/service/#create","title":"Create","text":"coroutine.create
"},{"location":"tables/shared/service/#start","title":"Start","text":"coroutine.resume
"},{"location":"tables/shared/service/#wrap","title":"Wrap","text":"corotouine.wrap
"},{"location":"tables/shared/service/#newfunction","title":"New(Function)","text":"Creates a new coroutine and adds it to threads
"},{"location":"tables/shared/service/#endthread","title":"End(Thread)","text":"Attempted to end the supplied thread and remove it
"},{"location":"tables/shared/service/#wrapfunction","title":"Wrap(Function, ...)","text":"Creates a new coroutine, adds it to threads, and then calls Resume with ...
"},{"location":"tables/shared/service/#resumethread","title":"Resume(Thread, ...)","text":"Calls resume on the specified thread with ...
"},{"location":"tables/shared/service/#removethread","title":"Remove(thread)","text":"Removes the specified thread.
"},{"location":"tables/shared/service/#stopall","title":"StopAll()","text":"Stops all threads.
"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-\\.]","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":"Adonis is a community-maintained server management and moderation system created by Sceleratis (Davey_Bones).
\ud83d\udc49 Refer to the side panel for specific sections/information.
\ud83d\udcd8 User Manual: https://github.com/Epix-Incorporated/Adonis/wiki/User-Manual-&-Feature-Showcase
Documentation is currently work-in-progress.
Documentation for the Adonis _G API can be found here.
"},{"location":"#contributing","title":"\u2b50 Contributing","text":"View the contribution guidelines and instructions here if you'd like to contribute to the Adonis project.
"},{"location":"#links","title":"\ud83d\udd17 Links","text":"Adonis expects any modules it's loading to return a function containing the module's code to run. Adonis will require the module, set the returned function's environment to a custom one containing all important variables, and will execute the function.
Plugins are loaded without yielding and will be loaded only after all of the core modules are loaded.
"},{"location":"Plugins-%26-Modules/#user-defined-modules-plugins","title":"User-defined modules (plugins)","text":"Developers can create custom modules for Adonis to load without needing to alter Adonis's MainModule. Simply add modules to Adonis_Loader
> Config
> Plugins
\ud83d\udc49 Server modules should have names starting with \"Server:\" or \"Server-\"
\ud83d\udc49 Client modules should have names starting with \"Client:\" or \"Client-\"
Example: \"Server: CustomChatHandler\"
The module's name will be used by Adonis to determine if the module is a client plugin or a server plugin. The modules will be loaded after the \"Core\" modules finish loading.
Plugins have the same level of access as any of Adonis's \"Core\" modules. Because of this, plugin modules are free to add, remove, and change whatever they like. It is advised, however, that you avoid removing any existing tables, functions, or objects and instead replace them with \"dummy\" alternatives to avoid causing serious errors.
"},{"location":"Plugins-%26-Modules/#example-server-plugin","title":"Example server plugin","text":"The following is an example server plugin
return function(Vargs)\n local server = Vargs.Server\n local service = Vargs.Service\n\n --// Add a new command to the Commands table at index \"ExampleCommand1\"\n server.Commands.ExampleCommand1 = { --// The index & table of the command\n Prefix = server.Settings.Prefix; --// The prefix the command will use, this is the ':' in ':ff me'\n Commands = {\"examplecommand1\", \"examplealias1\", \"examplealias2\"}; --// A table containing the command strings (the things you chat in-game to run the command, the 'ff' in ':ff me')\n Args = {\"arg1\", \"arg2\", \"etc\"}; --// Command arguments, these will be available in order as args[1], args[2], args[3], etc; This is the 'me' in ':ff me'\n Description = \"Example command\"; --// The description of the command\n AdminLevel = 100; -- Moderators --// The command's minimum admin level; This can also be a table containing specific levels rather than a minimum level: {124, 152, \"HeadAdmins\", etc};\n --// Alternative option: AdminLevel = \"Moderators\";\n Filter = true; --// Should user supplied text passed to this command be filtered automatically? Use this if you plan to display a user-defined message to other players\n Fun = false; --// Is this command considered as fun?\n Hidden = true; --// Should this command be hidden from the command list?\n Disabled = true; --// Should this command be unusable?\n NoStudio = false; --// Should this command be blocked from being executed in a Studio environment?\n NonChattable = false; --// Should this command be blocked from being executed via chat?\n CrossServerDenied = false; --// If true, this command will not be usable via :crossserver\n Function = function(plr: Player, args: {string}, data: {}) --// The command's function; This is the actual code of the command which runs when you run the command\n --// \"plr\" is the player running the command\n --// \"args\" is a table containing command arguments supplied by the user\n --// \"data\" is a table containing information related to the command and the player running it, such as data.PlayerData.Level (the player's admin level)\n print(\"This is 'arg1':\", args[1])\n print(\"This is 'arg2':\", args[2])\n print(\"This is 'etc'(arg 3):\", args[3])\n error(\"this is an example error :o !\")\n end\n }\nend\n
In this example, we create a new command named \"ExampleCommand1\" which can be ran using \":examplecommand1\" (assuming the command Prefix is set to \":\" in loader settings).
In the same way we can add commands, we can use the same method to remove or alter commands. Instead of creating an entirely new command named ExampleCommand, the following would remove the command \":ff\" from the script and make it so the :kick command still exists but does nothing.
return function(Vargs)\n local server = Vargs.Server\n local service = Vargs.Service\n\n --// Remove ForceField from the Commands table\n server.Commands.ForceField = nil\n\n --// Change the Kick command to do nothing:\n server.Commands.Kick.Function = function(plr: Player, args: {string})\n print(plr.Name ..\" tried to kick someone\")\n end\nend\n
If you wish to do this, refer to the appropriate commands module located under MainModule
> Server
> Commands
to view the internal index of a command. Alternatively, you may run :cmdinfo <command>
in-game which will also display the command's index."},{"location":"Structure/","title":"File Structure","text":"The internal file structure of both Adonis's client and server can be broken down into four main parts:
"},{"location":"Structure/#core","title":"Core","text":"This folder contains modules essential to the script's functionality. When Adonis starts, all modules within the core folder are loaded in a specific order. These modules must be loaded, in order, before the script can start doing anything.
"},{"location":"Structure/#server-load-order","title":"Server Load Order:","text":"All dependencies of the client or server are contained within the respective \"Dependencies\" folder. This can include pre-made scripts and UI elements.
"},{"location":"Structure/#plugins","title":"Plugins","text":"The \"Plugins\" folders specific non-essential modules to be loaded. The server will automatically populate the client's Plugins folder if user defined client plugins are present in Loader > Config > Plugins
"},{"location":"Structure/#main-scripts","title":"Main Scripts","text":""},{"location":"Structure/#server","title":"Server","text":"Handles the server-side loading process.
"},{"location":"Structure/#client","title":"Client","text":"Handles the client-side loading process.
"},{"location":"Structure/#code-structure","title":"Code Structure","text":"Adonis has three main tables that nearly all variables, functions, settings, objects, and folders, can be accessed from.
"},{"location":"Structure/#server-client","title":"\"server\" & \"client\"","text":"The \"server\" and \"client\" variables are tables containing everything related to Adonis's functionality. This includes any tables, functions, and variables added by loaded modules.
"},{"location":"Structure/#service","title":"service","text":"The \"service\" metatable is a variable unique to Adonis and it's modules that provides many functions and services used throughout both the client and server. Within the service metatable are functions to handle anything from task creation and tracking to object deletion. If the index requested is not found within the service table, it will return a game service matching the index if it can. (Specifically, it just returns game:GetService(index)
.)
These are the following ways by which an Adonis command can be executed by a user: - by chat (as long as chat commands have not been disabled) - by command console (default keybind for opening the console is '
; the console may be restricted or disabled according to settings) - by other interfaces such as :cmdbox
In all cases, the prefix (which is :
by default for admin commands and !
by default for player commands) must be included at the start of each command for it to work.
\u2139\ufe0f Tip: To run a command silently in the chat (so that other players do not see it), either prepend it with \"/e \" (eg. \"/e :kill scel\") or enable chat command hiding in your client settings.
"},{"location":"User-Manual-%26-Feature-Showcase/#player-selectors","title":"Player Selectors","text":"Commands that take players as their argument (eg. :kill
) will normally support either a singular player or a comma-separated list of player names.
Example: :god scel
or :kill noob1,noob2
Note that player names are not case-sensitive and may be partial, eg. scel
for Sceleratis
.
In addition to simply using player names, the following special identifiers for targeting certain groups of players exist: - me
- yourself (the executor of the command) - all
- everyone in the server - others
- everyone in the server except yourself - admins
- all admins in the server - nonadmins
- everyone except admins in the server - random
- a random person in the server - #NUM
- random players in the server - @USERNAME
- targets a specific player whose username is exactly - %TEAM
- members of the team - $GROUPID
- members of the group with ID (number found in the Roblox group webpage URL) - radius-NUM
- anyone within a -stud radius of you
Placing -
before any selector or player name will invert the selection and select everyone except those within the selection defined after -
. To illustrate, using the others
selector is essentially the same as doing all,-me
.
Example: :explode -radius-10
- explodes all players further than 10 studs from you.
Multiple commands can be ran sequentially at a time by separating them using the batch key, which defaults to |
(vertical pipe).
Additionally, you can insert timed delays using !wait <duration in seconds>
.
Example: :ff me | :m Exploding everyone in 10 seconds! | !wait 10 | :explode all
- gives you a forcefield and makes a message announcement, waits 10 seconds, then explodes everyone.
Admins/moderators by default have access to the :repeat <times> <delay>
command, which easily allows a command to be ran in a loop.
Example: :repeat 10 1 :sword me | :heal me
- will give you a sword and heal yourself once every 1 second, for 10 times.
:cmds
for a list of available commands:cmdinfo <command>
for detailed info about a specific command!brickcolors
for a list of valid BrickColors (can be used in some commands which take a brickcolor argument)!materials
for a list of material types:capes
for a list of preset capes available to admins:musiclist
for a list of preset audios:insertlist
for a list of assets that can be inserted using :insert <name>
(set by the developer in settings.InsertList
)Return to Top
"},{"location":"User-Manual-%26-Feature-Showcase/#section-2-the-userpanel-gui","title":"Section 2: The \"UserPanel\" GUI","text":"The UserPanel GUI can be used to quickly access certain things in Adonis, such as commands, as well as configure Adonis client or server settings. This wiki page will go over the different tabs within Adonis's UserPanel GUI and what they do.
"},{"location":"User-Manual-%26-Feature-Showcase/#info","title":"Info","text":"The info tab shows you information about Adonis, and gives the user convenient buttons to perform actions such as opening the command list, viewing the changelog, viewing credits, getting the loader, or getting the system's source in the form of its MainModule.
"},{"location":"User-Manual-%26-Feature-Showcase/#donate","title":"Donate","text":"This is where users can donate to Adonis's development and control settings related to their donator perks. These perks can be disabled by the place owner in the settings module of the Loader. Donation perks are intended to be purely visual and should not impact gameplay. When users donate in your game, Roblox will give the place owner 10% of the sale.
"},{"location":"User-Manual-%26-Feature-Showcase/#keybinds","title":"Keybinds","text":"The keybinds tab allows users to bind command strings to a specific key, so when they press that key the specified command gets executed.
"},{"location":"User-Manual-%26-Feature-Showcase/#aliases","title":"Aliases","text":"Aliases allow you to create custom commands that point to existing commands, or a combination of existing commands. When creating an alias, you can add markers for command arguments. The order the argument identifiers appear in the command string is the order the arguments will be replaced in.
To better understand lets go through what's going on in the above screenshot: The command string :kill <arg1> | :fire <arg1> <arg2>
is bound to :killfire
The following happens when :killfire scel Really red
is ran:
<arg1>
is replaced with scel
and the substring <arg2>
is replaced with Really red
:killfire scel Really red
is replaced by :kill scel | :fire scel Really red
.|
separating the two commands. The BatchKey setting can be used to change the |
(vertical pipe) to whatever you'd like as long as it is not the same as the SplitKey or any of the Prefix settings.It's important to note that the number of arguments is determined by the number of unique argument identifiers. Also, the actual text within the argument identifier is not important and is only used to match user-supplied arguments to where they should be. The order that these unique argument identifiers appear in the command string is what determines which which identifier will match argument 1, the next unique one found being argument 2, and so on. This is important to keep in mind. If you were to change the command string to :kill <arg2> | :fire <arg2> <arg1>
and then chatted :killfire scel Really red
scel
would be assigned to <arg2>
and Really red
would be assigned to <arg1>
so :killfire Really red scel
would not work (as :kill scel
would now be :kill Really red
) It should also be noted that arguments that are intended to take spaces must appear last as otherwise portions of them may be treated as part of previous arguments when using the default SplitKey (a blank space.)
This system is currently still in development and may see improvements in the near future, such as manually defining in the alias string how arguments should be interpreted and matched to the command string. For now, you should not add argument indicators to the alias string. They should only be in the command string, and the order they appear is what currently determines the argument position they will be matched to in the chatted message.
"},{"location":"User-Manual-%26-Feature-Showcase/#client","title":"Client","text":"You've likely noticed that the UserPanel GUI in the screenshots here does not look like the default UserPanel. This is because Adonis supports multiple themes, my personal favorite being the Rounded theme (the one seen in these screenshots.) The default theme is named \"Default\" and is used for all UI development, and determines the default GUIs and UI modules used in the event the selected theme does not have the GUI being generated.
Users can choose what theme they would like to use by clicking the text next to the arrow pointing down next to the \"Theme\" listing.
There are also a few other client-specific settings. It should be noted that these settings are user-specific and only affect the user's client. They are not game breaking and only seek to offer finer control over certain things if the user wishes to do so.
"},{"location":"User-Manual-%26-Feature-Showcase/#client-settings","title":"Client Settings","text":"Setting Description Keybinds Enables/Disables keybinds (if disabled, keybinds will no longer work until re-enabled) UI Keep Alive Determines whether or not Adonis should attempt to prevent the deletion of its GUIs when the player respawns. Particle Effects Adonis contains a number of commands that involve particle effects, which for some users may be irritating or even performance-impacting. All particle effects are local to each client and as such can be toggled using this setting. Capes Like particle effects, capes (such as donor capes) are handled locally and can be disabled. Hide Chat Commands Whether Adonis commands that you run via the chat will automatically be hidden from other players. Console Key This is the key that will open/close the command console (the bar that appears when you press the Quote key by default). Theme Allows you to select the UI theme you want to use. Changing this to \"Game Theme\" will use whatever theme is set in the Adonis settings module (in the Loader). This is used by default for all new users."},{"location":"User-Manual-%26-Feature-Showcase/#game","title":"Game","text":"This is where creators can control Adonis related server settings for their game while in-game instead of in studio. \"Clear all saved settings\" will clear any settings previously written to the datastore. This is especially useful if you encounter issues after changing a setting in-game or quickly want to revert to only what is set within the settings module. Anything with \"Cannot change\" next to it can only be changed in studio currently.
If you ever change the prefix in-game and suddenly find yourself unable to open settings to fix it, running :adonissettings
will open the UserPanel GUI and focus the \"Game\" tab so you can fix any issues. The :adonissettings
command will always use :
as a prefix so you can't accidentally change it to something unusable.
Return to Top
"},{"location":"User-Manual-%26-Feature-Showcase/#section-3-ui-themes-showcase","title":"Section 3: UI Themes Showcase","text":"The following are the themes that come with Adonis by default:
"},{"location":"User-Manual-%26-Feature-Showcase/#default","title":"Default","text":"GUI Screenshot UserPanel HelpButton Console Notification Message Hint Error"},{"location":"User-Manual-%26-Feature-Showcase/#rounded","title":"Rounded","text":"GUI Screenshot UserPanel Console Notification Error"},{"location":"User-Manual-%26-Feature-Showcase/#colorize","title":"Colorize","text":"Note: rainbow effects are animated with chromatic interpolation.
GUI Screenshot UserPanel Console Notification Message Hint Error"},{"location":"User-Manual-%26-Feature-Showcase/#basicadmin","title":"BasicAdmin","text":"This theme only changes the announcement GUIs.
GUI Screenshot Message"},{"location":"User-Manual-%26-Feature-Showcase/#aero","title":"Aero","text":"Made by @Expertcoderz.
GUI Screenshot UserPanel HelpButton Console Notification Message Hint Error"},{"location":"User-Manual-%26-Feature-Showcase/#unity","title":"Unity","text":"Made by @LolloDev5123.
GUI Screenshot UserPanel HelpButton Console Notification Message Error"},{"location":"User-Manual-%26-Feature-Showcase/#windows-xp","title":"Windows XP","text":"Made by @P3tray.
GUI Screenshot UserPanel HelpButton Console Notification Message Hint ErrorReturn to Top
"},{"location":"User-Manual-%26-Feature-Showcase/#section-4-moderation-commands-reference","title":"Section 4: Moderation Commands Reference","text":"This section serves as a basic reference guide for the essential moderation commands offered by Adonis.
"},{"location":"User-Manual-%26-Feature-Showcase/#general","title":"General","text":""},{"location":"User-Manual-%26-Feature-Showcase/#kick-player-reason","title":":kick <player> <reason>
","text":"Disconnects the specified player from the server. If specified, the reason is shown to the player.
"},{"location":"User-Manual-%26-Feature-Showcase/#warning-players","title":"Warning Players","text":""},{"location":"User-Manual-%26-Feature-Showcase/#warnings-player","title":":warnings <player>
","text":"Displays the specified player's warning log.
"},{"location":"User-Manual-%26-Feature-Showcase/#warn-player-reason","title":":warn <player> <reason>
","text":"Gives the specified player a warning, upon which they will be notified with the reason.
"},{"location":"User-Manual-%26-Feature-Showcase/#kickwarn-player-reason","title":":kickwarn <player> <reason>
","text":"Gives the specified player a warning and kicks them; displays the warning reason in their kick message.
"},{"location":"User-Manual-%26-Feature-Showcase/#removewarning-player-reason","title":":removewarning <player> <reason>
","text":"Deletes the specified warning from the player's warning log.
"},{"location":"User-Manual-%26-Feature-Showcase/#clearwarnings-player","title":":clearwarnings <player>
","text":"Clears the player's warning log.
"},{"location":"User-Manual-%26-Feature-Showcase/#banning-players","title":"Banning Players","text":""},{"location":"User-Manual-%26-Feature-Showcase/#banlist","title":":banlist
","text":"Displays a list of normal bans.
"},{"location":"User-Manual-%26-Feature-Showcase/#timebanlist","title":":timebanlist
","text":"Displays a list of time-banned users.
"},{"location":"User-Manual-%26-Feature-Showcase/#trellobanlistsbl","title":":trellobanlist/:sbl
","text":"Displays a list of users banned via Trello; only applicable if Trello integration is configured.
"},{"location":"User-Manual-%26-Feature-Showcase/#banserverban-player-reason","title":":ban/:serverban <player> <reason>
","text":"Bans the specified player from the current server. Note that they may still be able to join other servers.
"},{"location":"User-Manual-%26-Feature-Showcase/#permbangameban-player-reason","title":":permban/:gameban <player> <reason>
","text":"Bans the specified player from all game servers, for an indefinite amount of time. Enforced immediately, so if the user is in a server other than where the command is run, they will be kicked by the system.
"},{"location":"User-Manual-%26-Feature-Showcase/#tempbantimeban-player-duration-smhd-reason","title":":tempban/:timeban <player> <duration (s/m/h/d)> <reason>
","text":"Bans the specified player from all game servers, for a specific amount of time. Enforced immediately.
Example: :tempban Player1 3d
-- globally-bans Player1 for 3 days.
:trelloban <player> <reason>
","text":"Adds the specified player to the Trello ban list, if Trello integrations are configured for the game.
\u2139\ufe0f Tip: The above commands support full usernames for the <player>
argument, which means you can ban specific users who are not currently in your server.
:notes <player>
","text":"Displays a list of notes on the specified player.
"},{"location":"User-Manual-%26-Feature-Showcase/#note-player-note","title":":note <player> <note>
","text":"Sets a note on the specified player.
"},{"location":"User-Manual-%26-Feature-Showcase/#removenote-player-note","title":":removenote <player> <note>
","text":"Removes a note from a specified player. Specify all
for <note>
to clear all notes on that player.
Return to Top
"},{"location":"User-Manual-%26-Feature-Showcase/#section-5-adonis-features-showcase","title":"Section 5: Adonis Features Showcase","text":"Here's a miscellaneous collection of some interesting features that many users of the Adonis admin system may not be aware of:
"},{"location":"User-Manual-%26-Feature-Showcase/#teams","title":"\ud83d\udea9:teams
","text":"This is an interface that allows you to view, create, delete and join teams easily.
"},{"location":"User-Manual-%26-Feature-Showcase/#tools-inventory-monitor-gui","title":"\ud83d\udee0\ufe0f:tools
-- Inventory Monitor GUI","text":"This utility allows you to view and manage players' backpacks via a user-friendly realtime inventory monitoring interface. An alternative to manually running the :viewtools <player>
, :removetool <player> <tool name>
and :removetools <player>
commands.
:explorer
","text":"This is a built-in alternative to :dex
which allows you to view and navigate the game's file structure as well as delete objects.
:players
","text":"Displays full a list of in-game players along with some live-updated info about the state of their characters; may be useful for moderators if your game has the regular player list GUI hidden.
"},{"location":"User-Manual-%26-Feature-Showcase/#profile-player","title":"\ud83d\udd0d!profile <player>
","text":"Displays quite comprehensive information about a specific player.
Some details such as safechat status and the \"Game\" tab are hidden from non-admins for security reasons.
"},{"location":"User-Manual-%26-Feature-Showcase/#i-serverinfo","title":"\u2139\ufe0f!serverinfo
","text":"Displays information about the current server.
Some details are hidden from non-admins for security reasons.
"},{"location":"User-Manual-%26-Feature-Showcase/#incognito-player","title":"\ud83d\udd75\ufe0f:incognito <player>
","text":"A powerful command that allows admins to hide themselves from other players in the server by vanishing from their player lists.
Return to Top
That's all, folks!
Notice anything wrong? Submit an issue here or discuss it in our official Discord server.
"},{"location":"guides/creating-a-theme/","title":"Getting started","text":"In order to create a theme, you must have the Adonis Loader inside your game. You will also need to have access to the Adonis MainModule, but you do not need to keep this.
"},{"location":"guides/creating-a-theme/#part-1","title":"Part 1","text":""},{"location":"guides/creating-a-theme/#copying-the-theme","title":"Copying the theme","text":"Go to the temporary Adonis MainModule copy and go to MainModule > Client > UI
. This will allow you to see all the UI themes that Adonis uses. Select whichever one it is that you would like to base your new theme on! In our example, we will use Unity.
Copy the theme you wish to base your new theme on and paste it in your loader at: Adonis_Loader > Config > Themes
. You can now delete MainModule if you wish.
ExampleTheme
.Base_Theme
. If it doesn't, create it! This is the theme that Adonis will use if it cannot find a specific GUI. In our example we will set this to Aero.ExampleTheme > Window > Drag
and change the FontFace from Ubuntu to Source Sans Pro. Then we will go into Drag and change the background frame to Red.Congratulations! Just publish the game and you've successfully made an Adonis theme. If you have any queries, or would like to see a different guide, just ask in our communications server.
"},{"location":"tables/server/admin/","title":"Admin","text":"The 'Admin' sub-table (server.Admin) contains admin-related functions and variables. The below functions can be accessed as members of server.Admin (For example: server.Admin.GetLevel(p))
"},{"location":"tables/server/admin/#dohidechatcmd-player-object-message-string-data-optional-player-data-table","title":"DoHideChatCmd (Player (Object), Message (String), Data (Optional Player Data Table))","text":"Checks whether or not to hide commands ran from the chat for the specific player.
"},{"location":"tables/server/admin/#gettruerank-player-object-groupid-int","title":"GetTrueRank (Player (Object), GroupId (Int))","text":"Deprecated Runs GetRankInGroup from the target player's client and returns the result. This is intended to be a less secure way to avoid group rank caching, however due to security concerns should really not be used.
"},{"location":"tables/server/admin/#getplayergroup-player-object-groupname-or-groupid-string-or-int","title":"GetPlayerGroup (Player (Object), GroupName or GroupId (String or Int))","text":"Checks groups the player is in against the GroupName/GroupId provided and returns the group if found.
Returns: Group
"},{"location":"tables/server/admin/#ismuted-player-object","title":"IsMuted (Player (Object))","text":"Checks if the given player is muted.
Returns true if muted
"},{"location":"tables/server/admin/#docheck-player-object-string-int-check-string-int-table","title":"DoCheck (Player (Object, String, Int), Check (String, Int, Table))","text":"Checks the given player/string/int (Player) against the given string/int/table (Check) and will return true if they match. This function is responsible for checking if a given player/input matches something else. For example, DoCheck(Player, \"Group:181\") would return true if Player is in the group with ID 181.
Returns: true if matched, false or nil if not
"},{"location":"tables/server/admin/#updatecachedlevel-player-object","title":"UpdateCachedLevel (Player (Object))","text":"Updates the cached version of the player's admin level. Admin levels are cached for a set period of time to lower any performance impacts that may arise from constantly checking if a player is an admin.
Returns: AdminLevel
"},{"location":"tables/server/admin/#leveltolist-level-int","title":"LevelToList (Level (Int))","text":"Takes a given level value and returns the list the level belongs to. This may become inaccurate if there are multiple lists/admin ranks that share the same level. If there are multiple ranks with the same level, built in/default ranks (HeadAdmins, Admins, Moderators, Creators) will be preferred over custom ranks.
Returns: list.Users, listName, list
"},{"location":"tables/server/admin/#leveltolistname-level-int","title":"LevelToListName (Level (Int))","text":"Similar to LevelToList however only returns the name of the found rank.
Returns: RankName
"},{"location":"tables/server/admin/#getlevel-player-object","title":"GetLevel (Player (Object))","text":"Returns the admin level for the given player. This will match the level of the highest admin rank the player belongs to. The default level values are: Place Owner: 1000 Creators: 900 HeadAdmins: 300 Admins: 200 Moderators: 100 Players: 0
Returns: AdminLevel
"},{"location":"tables/server/admin/#getupdatedlevel-player-object","title":"GetUpdatedLevel (Player (Object))","text":"Gets the updated admin level for the provided player. This called automatically when the cached version of the player's admin level expires and should not be used too often for performance reasons.
Returns: AdminLevel
"},{"location":"tables/server/admin/#checkadmin-player-object","title":"CheckAdmin (Player (Object))","text":"Returns true if the player is an admin (level > 0), false if not.
Returns: boolean
"},{"location":"tables/server/admin/#setlevel-player-object-newlevel-int","title":"SetLevel (Player (Object), NewLevel (Int))","text":"Sets the target player's level to the new level indicated. Cannot set level of any user at level 1000 or higher (place owner) This will not change the player's rank, but will rather set a \"level override\" via Admin.SpecialLevels which takes priority over rank tables.
"},{"location":"tables/server/admin/#istempadmin-player-object","title":"IsTempAdmin (Player (Object))","text":"Returns true if the player is a temporary administrator.
"},{"location":"tables/server/admin/#removeadmin-player-object-istemp-optional-bool","title":"RemoveAdmin (Player (Object), isTemp (Optional Bool))","text":"Removes the target player as an admin. If isTemp is true, it will remove them from the TempAdmins table.
"},{"location":"tables/server/admin/#addadmin-player-object-level-stringint-istempbool","title":"AddAdmin (Player (Object), Level (String/Int), isTemp(Bool))","text":"Makes the target player an admin, removing them from the admin table they are currently in (if any.) If isTemp is true, will make them a temporary admin. If Level is a string it will be converted to it's level equivalent if possible.
"},{"location":"tables/server/admin/#checkdonor-player-object","title":"CheckDonor (Player (Object))","text":"Checks if the player is a donor.
Returns: true if donor
"},{"location":"tables/server/admin/#checkban-player-object","title":"CheckBan (Player (Object))","text":"Checks if the given player is banned.
Returns: true if banned
"},{"location":"tables/server/admin/#addban-player-object-reason-string-dosave-bool-moderator-object","title":"AddBan (Player (Object), Reason (String), doSave (Bool), moderator (Object))","text":"Bans Player with the given Reason and will save if doSave is true.
"},{"location":"tables/server/admin/#dobancheck-player-string-int-check-string-int-table","title":"DoBanCheck (Player (String, Int), Check (String, Int, Table))","text":"Similar to Admin.DoCheck but specifically for bans.
Returns: true if matched, false if not
"},{"location":"tables/server/admin/#removeban-player-string-int-dosave-bool","title":"RemoveBan (Player (String, Int), doSave (Bool))","text":"Unbans the given player name/id/etc and will save if doSave is true.
"},{"location":"tables/server/admin/#runcommand-command-string-argstuple-tuple","title":"RunCommand (Command (String), ArgsTuple (Tuple))","text":"Runs the given command with the given arguments as the server.
"},{"location":"tables/server/admin/#runcommandasplayer-command-string-player-object-argstuple-tuple","title":"RunCommandAsPlayer (Command (String), Player (Object), ArgsTuple (Tuple))","text":"Runs the given command as the given player with the given arguments. Overrides player's level.
"},{"location":"tables/server/admin/#runcommandasnonadmin-command-string-player-object-argstuple-tuple","title":"RunCommandAsNonAdmin (Command (String), Player (Object), ArgsTuple (Tuple))","text":"Runs the given command as the given player with the given arguments. Treats the player as a non-admin. Overrides command level.
"},{"location":"tables/server/admin/#cachecommands","title":"CacheCommands ()","text":"Updates the command cache. Commands are cached to avoid performance impacts caused by constantly iterating through and checking the entirety of the commands table whenever a player chats or runs a command. If a command is added after this is called, it might not appear in-game until this function is called to forcibly re-cache all commands.
"},{"location":"tables/server/admin/#getcommand-command-string","title":"GetCommand (Command (String))","text":"Based on the command provided, will return the command's Index, DataTable, and the command string that was matched from the given string.
Returns: String, Table, String
"},{"location":"tables/server/admin/#findcommands-command-string","title":"FindCommands (Command (String))","text":"Returns a list of commands matching 'Command'
"},{"location":"tables/server/admin/#setpermission-command-string-newlevel-string-int","title":"SetPermission (Command (String), NewLevel (String, Int))","text":"Sets the AdminLevel of all commands matching 'Command' to 'NewLevel'
"},{"location":"tables/server/admin/#formatcommand-command-table","title":"FormatCommand (Command (Table))","text":"Converts data about the given command into a string that can be used in :cmds, the console, etc.
"},{"location":"tables/server/admin/#checktable-check1-player-string-int-table","title":"CheckTable (Check1 (Player, String, Int), Table)","text":"Check 'Check1' against all entries in 'Table'
Returns: true if match is found
"},{"location":"tables/server/admin/#checkaliasblacklist-alias-string","title":"CheckAliasBlacklist (Alias (String)","text":"Checks if a given alias is blacklisted. This is to prevent the accidental override of important commands, such as those used to alter aliases.
Returns: true if blacklisted
"},{"location":"tables/server/admin/#getargs-message-string-numargs-int-additionalargs-tuple","title":"GetArgs (Message (String), NumArgs (Int), AdditionalArgs (Tuple))","text":"Returns a table containing all arguments extracted from 'Message'
Returns: Args table
"},{"location":"tables/server/admin/#aliasformat-aliases-table-message-string","title":"AliasFormat (Aliases (Table), Message (String))","text":"Alters the given message based on aliases found in the provided alias table 'Aliases.'
Returns: Updated message string
"},{"location":"tables/server/admin/#iscomlevel-testlevel-int-string-table-comlevel-int-string-table","title":"IsComLevel (TestLevel (Int, String, Table), ComLevel (Int, String, Table))","text":"Checks if 'TestLevel' matches 'ComLevel'
Returns: true or index,value if found.
"},{"location":"tables/server/admin/#stringtocomlevel-rank-string","title":"StringToComLevel (Rank (String))","text":"Converts 'Rank' to it's level if found.
Returns: level
"},{"location":"tables/server/admin/#checkcomlevel-playerlevel-int-comlevel-int-string","title":"CheckComLevel (PlayerLevel (Int), ComLevel (Int, String))","text":"Checks if the player's level matches 'ComLevel'
Returns: true if matched
"},{"location":"tables/server/admin/#isblacklisted-player-object","title":"IsBlacklisted (Player (Object))","text":"Checks if 'Player' is blacklisted.
Returns: true if blacklisted
"},{"location":"tables/server/admin/#checkpermission-playerdata-table-command-table","title":"CheckPermission (PlayerData (Table), Command (Table))","text":"Checks if 'PlayerData' has permission to use 'Command.' This is responsible for command permission checks when a player runs a command.
Returns: true if allowed
"},{"location":"tables/server/admin/#searchcommands-player-object-search-string","title":"SearchCommands (Player (Object), Search (String))","text":"Searches commands matching 'Search' that the player is allowed to run. This is mainly used by the console.
Returns: Table containing matched commands
"},{"location":"tables/server/anti/","title":"Anti","text":"This table contains all server-side anti-exploit related functions/variables. They can be accessed via server.Anti
"},{"location":"tables/server/anti/#clienttimeoutlimit","title":"ClientTimeoutLimit","text":"Default: 120 How long a player's client can 'go dark' before the player is kicked from the game.
"},{"location":"tables/server/anti/#removeplayer-player-object-reason-optional-string","title":"RemovePlayer (Player (Object), Reason (Optional String))","text":"Removes 'Player' for 'Reason'
"},{"location":"tables/server/anti/#checkallclients","title":"CheckAllClients ()","text":"Checks if all clients are alive and responding. If client has not communicated for more than Anti.ClientTimeoutLimit the player the client belongs to will be removed from the server.
"},{"location":"tables/server/anti/#userspoofcheck-player-object","title":"UserSpoofCheck (Player (Object))","text":"Attempts to detect username/userid spoofing.
Returns: true if spoofing detected
"},{"location":"tables/server/anti/#sanitize-object-classlist-table","title":"Sanitize (Object, ClassList (Table))","text":"Searches 'Object' for children matching 'ClassList' and attempts to remove them if found. An example use case would be removing all scripts from a given hat.
"},{"location":"tables/server/anti/#isfake-player-object","title":"isFake (Player (Object))","text":"Attempts to determine if a player object is a real player.
Returns: true if \"fake\"
"},{"location":"tables/server/anti/#removeiffake-player-object","title":"RemoveIfFake (Player (Object))","text":"Removes 'Player' if isFake returns true
"},{"location":"tables/server/anti/#findfakeplayers","title":"FindFakePlayers ()","text":"Attempts to find and remove \"fake\" players.
"},{"location":"tables/server/anti/#getclassname-object","title":"GetClassName (Object)","text":"Attempts to get the class name of the given 'Object' regardless of whether or not it's RobloxLocked.
"},{"location":"tables/server/anti/#rlocked-object","title":"RLocked (Object)","text":"Returns true if 'Object' is RobloxLocked
"},{"location":"tables/server/anti/#objrlocked-object","title":"ObjRLocked (Object)","text":"Identical to RLocked.
"},{"location":"tables/server/anti/#assignname","title":"AssignName ()","text":"Returns a random 6 digit number.
"},{"location":"tables/server/anti/#detected-player-object-action-string-info-string","title":"Detected (Player (Object), Action (String), Info (String))","text":"Actions: Log - Only logs the event Kick - Logs the event and kicks the player Crash - Logs the event and attempts to crash the player in addition to kicking them.
This function is called whenever a player is detected by the anti-exploit system. The player and 'Info' are logged and the specified action is performed.
"},{"location":"tables/server/anti/#checknameid-player-object","title":"CheckNameID (Player (Object))","text":"Another method to attempt to detect Name/UserId spoofing.
"},{"location":"tables/server/commands/","title":"Commands","text":"This is the commands table. It contains all commands to be used by administrators in-game. It does not contain any additional functions or variables.
To add a command, simply do: server.Commands.CommandIndexHere = CommandDataTableHere
For example:
server.Commands.SomeNewCommand = { --// The index & table of the command\n Prefix = Settings.Prefix; --// The prefix the command will use, this is the ':' in ':ff me'\n Commands = {\"examplecommand\"}; --// A table containing the command strings (the things you chat in-game to run the command, the 'ff' in ':ff me')\n Args = {\"arg1\", \"arg2\", \"etc\"}; --// Command arguments, these will be available in order as args[1], args[2], args[3], etc; This is the 'me' in ':ff me'\n Description = \"Example command\";--// The description of the command\n AdminLevel = 100; -- Moderators --// The commands minimum admin level; This can also be a table containing specific levels rather than a minimum level: {124, 152, \"HeadAdmins\", etc};\n -- Alternative option: AdminLevel = \"Moderators\"\n Filter = true; --// Should user supplied text passed to this command be filtered automatically? Use this if you plan to display a user-defined message to other players\n Hidden = true; --// Should this command be hidden from the command list?\n Function = function(plr, args, data) --// The command's function; This is the actual code of the command which runs when you run the command\n --// \"plr\" is the player running the command\n --// \"args\" is a table containing command arguments supplied by the user\n --// \"data\" is a table containing information related to the command and the player running it, such as data.PlayerData.Level (the player's admin level)\n print(\"This is 'arg1': \".. tostring(args[1]));\n print(\"This is 'arg2': \".. tostring(args[2]));\n print(\"This is 'etc'(arg 3): \".. tostring(args[3]));\n end\n};\n
Note: After adding new commands it's always a good idea to call Admin.CacheCommands() to ensure they are added to the command cache (otherwise they won't be usable.)
"},{"location":"tables/server/core/","title":"Core","text":"This is the \"Core\" table. It houses functions and variables that are essential to the core functionality of Adonis. If something happened to this table or its contents the entire system would become unusable. Functions within this table handle things like initial setup of the RemoteEvent/RemoteFunction, client loading, etc.
"},{"location":"tables/server/core/#table-variables","title":"(Table) Variables:","text":"Contains Core-related variables, such as the TimeBans table.
"},{"location":"tables/server/core/#datastore-related-variables","title":"Datastore-related variables","text":"--// Datastore update/queue timers/delays\nDS_SetDataQueueDelay = 0.5;\nDS_UpdateQueueDelay = 1;\nDS_AllPlayerDataSaveInterval = 30;\nDS_AllPlayerDataSaveQueueDelay = 0.5;\n\n--// Used to change/\"reset\" specific datastore keys\nDS_RESET_SALTS = {\n SavedSettings = \"32K5j4\";\n SavedTables = \"32K5j4\";\n};\n
"},{"location":"tables/server/core/#disconnectevent","title":"DisconnectEvent ()","text":"Disconnects and destroys all events related to security and the RemoteEvent
"},{"location":"tables/server/core/#makeevent","title":"MakeEvent ()","text":"Creates the RemoteEvent and RemoteFunction used for server-client communication.
"},{"location":"tables/server/core/#updateconnections","title":"UpdateConnections ()","text":"Updates the list of NetworkServer - Player connections
"},{"location":"tables/server/core/#updateconnection-player-userdata","title":"UpdateConnection (Player: userdata)","text":"Same as UpdateConnections but for a specific player.
"},{"location":"tables/server/core/#getnetworkclient-player-userdata","title":"GetNetworkClient (Player: userdata)","text":"Returns the NetworkClient belonging to 'Player'
"},{"location":"tables/server/core/#setupevent-player-userdata","title":"SetupEvent (Player: userdata)","text":"Creates a new player-specific RemoteEvent to be used for client-server communication. Not currently used.
"},{"location":"tables/server/core/#prepareclient","title":"PrepareClient ()","text":"Creates a client loader in ReplicatedFirst. Not currently used in favor of handling the client loading process via HookClient(Player)
"},{"location":"tables/server/core/#hookclient-player-userdata","title":"HookClient (Player: userdata)","text":"When a player joins this function is called and handles the process of preparing the client and parenting it to the player.
"},{"location":"tables/server/core/#loadclientloader-player-userdata","title":"LoadClientLoader (Player: userdata)","text":"Handles the loading of existing players at server startup. Calls Process.PlayerAdded(Player)
"},{"location":"tables/server/core/#makeclient","title":"MakeClient ()","text":"Places the client into StarterPlayerScripts. Not currently used in favor of HookClient
"},{"location":"tables/server/core/#executepermission-sourcescriptobject-userdata-code-string-islocal-bool","title":"ExecutePermission (SourceScriptObject: userdata, Code: string, isLocal: bool)","text":"Determines if the given script object 'SourceScriptObject' is allowed to run. If 'Code' is provided it will be used as a pseudo-password. If 'isLocal' is true it will be treated as a LocalScript.
Returns: if allowed, table containing Source, noCache, runLimit, number of Executions
"},{"location":"tables/server/core/#getscript-scriptobject-userdata-code-string","title":"GetScript (ScriptObject: userdata, Code: string)","text":"Returns the registered script object matching 'ScriptObject' or 'Code'
"},{"location":"tables/server/core/#unregisterscript-scriptobject-userdata","title":"UnRegisterScript (ScriptObject: userdata)","text":"Unregisters 'ScriptObject' for execution.
"},{"location":"tables/server/core/#registerscript-data-table","title":"RegisterScript (Data: table)","text":"Registers Data.Script as being allowed to execute along with it's related information.
"},{"location":"tables/server/core/#getloadstring","title":"GetLoadstring ()","text":"Returns a new loadstring module.
"},{"location":"tables/server/core/#bytecode-luacode-string","title":"Bytecode (LuaCode: string)","text":"Converts 'LuaCode' into bytecode and returns the result. This is used before sending any code to run to the client.
"},{"location":"tables/server/core/#newscript-class-string-source-string-allowcodes-bool-nocache-bool-runlimit-int","title":"NewScript (Class: string, Source: string, AllowCodes: bool, NoCache: bool, RunLimit: int)","text":"Creates, registers, and returns a new script of class 'Class'
"},{"location":"tables/server/core/#saveplayer-player-userdata-data-table","title":"SavePlayer (Player: userdata, Data: table)","text":"Updates Player's data (in Core.PlayerData) do 'Data'
"},{"location":"tables/server/core/#defaultplayerdata-player-userdata","title":"DefaultPlayerData (Player: userdata)","text":"Returns the default player data for 'Player'
"},{"location":"tables/server/core/#getplayer-player-userdata","title":"GetPlayer (Player: userdata)","text":"Returns the PlayerData for 'Player' Also updates the PlayerData cache and will retrieve data from the datastore if not already cached.
"},{"location":"tables/server/core/#clearplayer-player-userdata","title":"ClearPlayer (Player: userdata)","text":"Clears data related to a player, resetting it to the default values.
"},{"location":"tables/server/core/#saveplayerdata-player-userdata-customdata-opttable","title":"SavePlayerData (Player: userdata, CustomData: (opt)table)","text":"Save's data for 'Player' to the datastore.
"},{"location":"tables/server/core/#saveallplayerdata","title":"SaveAllPlayerData ()","text":"Saves all player data.
"},{"location":"tables/server/core/#getdatastore","title":"GetDataStore ()","text":"Returns the DataStore.
"},{"location":"tables/server/core/#datastoreencode-key-string","title":"DataStoreEncode (Key: string)","text":"Returns the salted, encrypted, Base64 encoded version of a given key to be used in the datastore.
"},{"location":"tables/server/core/#savedata","title":"SaveData (...)","text":"Calls Core.SetData(...)
"},{"location":"tables/server/core/#removedata-key-string","title":"RemoveData (Key: string)","text":"Removes 'Key' and related data from the datastore.
"},{"location":"tables/server/core/#setdata-key-string-value","title":"SetData (Key: string, Value)","text":"Sets 'Key' to 'Value' in the datastore cache & datastore (when the datastore is updated)
"},{"location":"tables/server/core/#updatedata-key-string-function-function","title":"UpdateData (Key: string, Function: function)","text":"Calls UpdateAsync for the given 'Key' with 'Function'
"},{"location":"tables/server/core/#getdata-key-string","title":"GetData (Key: string)","text":"Returns data related to 'Key' from the DataCache/datastore
"},{"location":"tables/server/core/#indexpathtotable-stringtableancestry-table","title":"IndexPathToTable (string,TableAncestry: table)","text":"Attempts to find the given table based on the path provided. Returns: foundTable, foundTableIndex
"},{"location":"tables/server/core/#dosavedata-table","title":"DoSave(Data: table)","text":"Saves settings or tables to the datastore based on information provided in 'Data'
"},{"location":"tables/server/core/#loaddata-key-string-data-table","title":"LoadData (Key: string, Data: table)","text":"Loads saved settings, tables, etc.
"},{"location":"tables/server/core/#startapi","title":"StartAPI ()","text":"Handles the creation and monitoring of _G.Adonis
"},{"location":"tables/server/functions/","title":"Functions","text":"Contains various server-specific miscellaneous functions.
\u2139\ufe0f This page is currently incomplete.
"},{"location":"tables/server/functions/#addjoinfilter-name-string-function-function","title":"AddJoinFilter (Name (string), Function (function))","text":"Adds the given function as a join filter. Will error if a joinfilter with this name already exists
Functions.AddJoinFilter(\"No_bandits\",function(Player:Player, PlayerData)\n if Player.Name == \"SimulprodBandit\" then\n return false, \"Simulprod Bandit\" -- second argument is the reason the player gets kicked\n end;\n\n return true;\n end);\n
"},{"location":"tables/server/functions/#removejoinfilter-name-string","title":"RemoveJoinFilter (Name (string))","text":"Removes the given joinfilter.
"},{"location":"tables/server/functions/#playerfinders","title":"PlayerFinders","text":"These are used when service.GetPlayers
is called to search for players based on the user's input. The default built-in player finders (at the time of writing this) can be found below to be used as examples:
PlayerFinders = {\n [\"me\"] = {\n Match = \"me\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n table.insert(players,plr)\n plus()\n end;\n };\n\n [\"all\"] = {\n Match = \"all\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local everyone = true\n if isKicking then\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p.Name:lower():sub(1,#msg)==msg:lower() then\n everyone = false\n table.insert(players,p)\n plus()\n end\n end\n end\n if everyone then\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p then\n table.insert(players,p)\n plus()\n end\n end\n end\n end;\n };\n\n [\"@everyone\"] = {\n Match = \"@everyone\";\n Absolute = true;\n Function = function(...)\n return Functions.PlayerFinders.all.Function(...)\n end\n };\n\n [\"others\"] = {\n Match = \"others\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p ~= plr then\n table.insert(players,p)\n plus()\n end\n end\n end;\n };\n\n [\"random\"] = {\n Match = \"random\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n if #players>=#parent:GetChildren() then return end\n local rand = parent:GetChildren()[math.random(#parent:children())]\n local p = getplr(rand)\n for i,v in pairs(players) do\n if(v.Name == p.Name)then\n Functions.PlayerFinders.random.Function(msg, plr, parent, players, getplr, plus, isKicking)\n return;\n end\n end\n table.insert(players,p)\n plus();\n end;\n };\n\n [\"admins\"] = {\n Match = \"admins\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if Admin.CheckAdmin(p,false) then\n table.insert(players, p)\n plus()\n end\n end\n end;\n };\n\n [\"nonadmins\"] = {\n Match = \"nonadmins\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if not Admin.CheckAdmin(p,false) then\n table.insert(players,p)\n plus()\n end\n end\n end;\n };\n\n [\"friends\"] = {\n Match = \"friends\";\n Prefix = true;\n Absolute = true;\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p:IsFriendsWith(plr.userId) then\n table.insert(players,p)\n plus()\n end\n end\n end;\n };\n\n [\"@username\"] = {\n Match = \"@\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = tonumber(msg:match(\"@(.*)\"))\n local foundNum = 0\n if matched then\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p and p.Name == matched then\n table.insert(players,p)\n plus()\n foundNum = foundNum+1\n end\n end\n end\n end;\n };\n\n [\"%team\"] = {\n Match = \"%\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"%%(.*)\")\n if matched then\n for i,v in next,service.Teams:GetChildren() do\n if v.Name:lower():sub(1,#matched) == matched:lower() then\n for k,m in next,parent:GetChildren() do\n local p = getplr(m)\n if p.TeamColor == v.TeamColor then\n table.insert(players,p)\n plus()\n end\n end\n end\n end\n end\n end;\n };\n\n [\"$group\"] = {\n Match = \"$\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"%$(.*)\")\n if matched and tonumber(matched) then\n for i,v in next,parent:children() do\n local p = getplr(v)\n if p:IsInGroup(tonumber(matched)) then\n table.insert(players,p)\n plus()\n end\n end\n end\n end;\n };\n\n [\"id-\"] = {\n Match = \"id-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = tonumber(msg:match(\"id%-(.*)\"))\n local foundNum = 0\n if matched then\n for i,v in next,parent:children() do\n local p = getplr(v)\n if p and p.userId == matched then\n table.insert(players,p)\n plus()\n foundNum = foundNum+1\n end\n end\n if foundNum == 0 then\n local ran,name = pcall(function() return service.Players:GetNameFromUserIdAsync(matched) end)\n if ran and name then\n local fakePlayer = service.Wrap(service.New(\"Folder\"))\n local data = {\n Name = name;\n ToString = name;\n ClassName = \"Player\";\n AccountAge = 0;\n CharacterAppearanceId = tostring(matched);\n UserId = tonumber(matched);\n userId = tonumber(matched);\n Parent = service.Players;\n Character = Instance.new(\"Model\");\n Backpack = Instance.new(\"Folder\");\n PlayerGui = Instance.new(\"Folder\");\n PlayerScripts = Instance.new(\"Folder\");\n Kick = function() fakePlayer:Destroy() fakePlayer:SetSpecial(\"Parent\", nil) end;\n IsA = function(ignore, arg) if arg == \"Player\" then return true end end;\n }\n for i,v in next,data do fakePlayer:SetSpecial(i, v) end\n table.insert(players, fakePlayer)\n plus()\n end\n end\n end\n end;\n };\n\n [\"displayname-\"] = {\n Match = \"displayname-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = tonumber(msg:match(\"displayname%-(.*)\"))\n local foundNum = 0\n if matched then\n for i,v in next,parent:children() do\n local p = getplr(v)\n if p and p.DisplayName == matched then\n table.insert(players,p)\n plus()\n foundNum = foundNum+1\n end\n end\n end\n end;\n };\n\n [\"team-\"] = {\n Match = \"team-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n print(1)\n local matched = msg:match(\"team%-(.*)\")\n if matched then\n for i,v in next,service.Teams:GetChildren() do\n if v.Name:lower():sub(1,#matched) == matched:lower() then\n for k,m in next,parent:GetChildren() do\n local p = getplr(m)\n if p.TeamColor == v.TeamColor then\n table.insert(players, p)\n plus()\n end\n end\n end\n end\n end\n end;\n };\n\n [\"group-\"] = {\n Match = \"group-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"group%-(.*)\")\n if matched and tonumber(matched) then\n for i,v in next,parent:children() do\n local p = getplr(v)\n if p:IsInGroup(tonumber(matched)) then\n table.insert(players,p)\n plus()\n end\n end\n end\n end;\n };\n\n [\"-name\"] = {\n Match = \"-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"%-(.*)\")\n if matched then\n local removes = service.GetPlayers(plr,matched,true)\n for i,v in next,players do\n for k,p in next,removes do\n if v.Name == p.Name then\n table.remove(players,i)\n plus()\n end\n end\n end\n end\n end;\n };\n\n [\"#number\"] = {\n Match = \"#\";\n Function = function(msg, plr, ...)\n local matched = msg:match(\"%#(.*)\")\n if matched and tonumber(matched) then\n local num = tonumber(matched)\n if not num then\n Remote.MakeGui(plr,'Output',{Title = 'Output'; Message = \"Invalid number!\"})\n end\n for i = 1,num do\n Functions.PlayerFinders.random.Function(msg, plr, ...)\n end\n end\n end;\n };\n\n [\"radius-\"] = {\n Match = \"radius-\";\n Function = function(msg, plr, parent, players, getplr, plus, isKicking)\n local matched = msg:match(\"radius%-(.*)\")\n if matched and tonumber(matched) then\n local num = tonumber(matched)\n if not num then\n Remote.MakeGui(plr,'Output',{Title = 'Output'; Message = \"Invalid number!\"})\n end\n for i,v in next,parent:GetChildren() do\n local p = getplr(v)\n if p ~= plr and plr:DistanceFromCharacter(p.Character.Head.Position) <= num then\n table.insert(players,p)\n plus()\n end\n end\n end\n end;\n };\n};\n
"},{"location":"tables/server/logs/","title":"Logs","text":"This table is responsible for all logging in Adonis.
"},{"location":"tables/server/logs/#log-tables","title":"Log Tables","text":"Chats = {}; --// Chat logs\nJoins = {}; --// Join logs\nScript = {}; --// Script-related logs\nRemoteFires = {}; --// RemoteEvent logs\nCommands = {}; --// Command logs\nExploit = {}; --// Exploit logs\nErrors = {}; --// Error logs\nTempUpdaters = {} --// Temporary functions used as list updaters\n
"},{"location":"tables/server/logs/#tabtotype-table-table","title":"TabToType (table: Table)","text":"Returns a string describing what the provided table is logging.
Possible returns: \"Chat\", \"Join\", \"Script\", \"RemoteFire\", \"Command\", \"Exploit\", \"Error\", \"ServerDetails\", \"DateTime\"
"},{"location":"tables/server/logs/#addlog-table-string-logtable-table-string-log","title":"AddLog (table, string: LogTable, table, string: Log)","text":"Adds 'Log' to 'LogTable' and automatically adds a timestamp if one is not provided (unless 'Log' is a table and Log.NoTime is true)
Fires service.Events.LogAdded:Fire(TabToType(LogTable), Log, LogTable)
"},{"location":"tables/server/logs/#savecommandlogs","title":"SaveCommandLogs ()","text":"Saves command logs to the datastore as \"OldCommandLogs\"
"},{"location":"tables/server/logs/#table-listupdaters","title":"Table: ListUpdaters","text":"These are functions used by lists to update their contents when the user refreshes the list.
Here's the list updater for ChatLogs as an example:
ListUpdaters = {\n ChatLogs = function()\n return Logs.Chats\n end;\n}\n
"},{"location":"tables/server/process/","title":"Process","text":"This table contains functions that handle various events, such as calls to the RemoteEvent or player messages/commands.
"},{"location":"tables/server/process/#variables","title":"Variables","text":"MsgStringLimit = 500; --// Max message string length to prevent long length chat spam server crashing (chat & command bar); Anything over will be truncated;\nMaxChatCharacterLimit = 250; --// Roblox chat character limit; The actual limit of the Roblox chat's textbox is 200 characters; I'm paranoid so I added 50 characters; Users should not be able to send a message larger than that;\nRateLimits = { --// Rate limit values for various events that may occur to prevent spam/performance issues\n Remote = 0.01;\n Command = 0.1;\n Chat = 0.1;\n CustomChat = 0.1;\n RateLog = 10;\n};\n
"},{"location":"tables/server/process/#remote-userdata-player-table-clientdata-string-command-tuple-arguments","title":"Remote (userdata: Player, table: ClientData, string: Command, tuple: Arguments)","text":"Handles client to server communication. This is called whenever the RemoteEvent is triggered by the client.
"},{"location":"tables/server/process/#command-userdata-player-string-message-table-options-bool-noyield","title":"Command (userdata: Player, string: Message, table: Options, bool: noYield)","text":"Processes player commands.
"},{"location":"tables/server/process/#datastoreupdated-string-key-table-data","title":"DataStoreUpdated (string: Key, table: Data)","text":"Runs when the datastore updates and passes 'Key' and 'Data' to Core.LoadData
"},{"location":"tables/server/process/#crossserverchat-table-data","title":"CrossServerChat (table: Data)","text":"Handles cross-server chat messages.
"},{"location":"tables/server/process/#customchat-userdata-player-string-message-string-mode-bool-cancross","title":"CustomChat (userdata: Player, string: Message, string: Mode, bool CanCross)","text":"Handles messages sent via Adonis's custom chat.
"},{"location":"tables/server/process/#chat-userdata-player-string-message","title":"Chat (userdata: Player, string: Message)","text":"Handles player chats.
"},{"location":"tables/server/process/#workspacechildadded-userdata-child","title":"WorkspaceChildAdded (userdata: Child)","text":"Runs when a new child is added to Workspace. Previously, this was used as an alternative to player.CharacterAdded however is no longer in use.
"},{"location":"tables/server/process/#logservice-message-trace-script","title":"LogService (Message, Trace, Script)","text":"Runs whenever a new message is added by the LogService. Not currently used.
"},{"location":"tables/server/process/#playeradded-userdata-player","title":"PlayerAdded (userdata: Player)","text":"Runs when a new player joins the game and handles the initial loading process, such as player removal (if banned) and client hooking.
"},{"location":"tables/server/process/#playerremoving-userdata-player","title":"PlayerRemoving (userdata: Player)","text":"Runs when a player is leaving. Fires service.Events.PlayerRemoving(Player)
"},{"location":"tables/server/process/#networkadded-userdata-networkclient","title":"NetworkAdded (userdata: NetworkClient)","text":"Runs when a new NetworkClient object is added to NetworkServer Fires service.Events.NetworkAdded(NetworkClient)
"},{"location":"tables/server/process/#networkremoved-userdata-networkclient","title":"NetworkRemoved (userdata: NetworkClient)","text":"Runs when a NetworkClient is removed. Fires service.Events.NetworkRemoved(NetworkClient)
"},{"location":"tables/server/process/#finishloading-userdata-player","title":"FinishLoading (userdata: Player)","text":"Assuming the player isn't removed or leaves while loading (during PlayerAdded) this function will run when the player and client are fully finished loading and are ready for communication. This handles the \"You're an admin!\" messages as well as other things that happen when the player finishes loading, such as the enabling of various client-side anti-exploit handlers and misc features. Fires service.Events.PlayerAdded(Player)
"},{"location":"tables/server/process/#characteradded-userdata-player","title":"CharacterAdded (userdata: Player)","text":"Runs whenever a player's character loads.
"},{"location":"tables/server/process/#playerteleported-userdata-player-data","title":"PlayerTeleported (userdata: Player, data)","text":"Runs whenever a player teleports to the current server. Not currently used.
"},{"location":"tables/server/remote/","title":"Remote","text":"Remote handles all remote server-client communication.
"},{"location":"tables/server/remote/#table-returnables","title":"Table: Returnables","text":"This is a table containing functions that can be called via client.Remote.Get and will return something to the calling client.
"},{"location":"tables/server/remote/#table-unencrypted","title":"Table: UnEncrypted","text":"This is a table containing functions that can be used by clients without needing encryption/various security checks. This contains functions mostly related to initial loading before keys are exchanged, or communication with non-adonis-client localscripts, as well as very basic rapid fire events like chat handling.
"},{"location":"tables/server/remote/#table-commands","title":"Table: Commands","text":"These are functions which can be ran by clients via client.Remote.Send They cannot return data and are purely \"fire and forget.\"
"},{"location":"tables/server/remote/#newsession-string-sessiontype","title":"NewSession (string: SessionType)","text":"Creates and returns a new session handler that can be used to facilitate temporary communication between the server and multiple users with special commands/event defined.
Clients can listen for session events as needed via service.Events.SessionData
Here's an example of NewSession in action in the form of a, at the time of writing this, work in process private chat command & GUI:
Server code:
local newSession = Remote.NewSession(\"PrivateChat\");\nlocal eventConnection = newSession.SessionEvent.Event:Connect(function(p, ...)\n local args = {...};\n local cmd = args[1];\n\n if cmd == \"SendMessage\" then\n if newSession.Users[p] then\n table.insert(newSession.Users[p].Messages, args[2]);\n end\n\n newSession.SendToUsers(\"PlayerSentMessage\", p, args[2]);\n elseif cmd == \"LeaveSession\" then\n newSession.Users[p] = nil;\n newSession.SendToUsers(\"PlayerLeftSession\", p);\n elseif cmd == \"EndSession\" and p == plr then\n newSession.End();\n end\nend)\n\nfor i,v in ipairs(service.GetPlayers(plr, args[1])) do\n newSession.AddUser(v, {\n Messages = {};\n });\n\n Remote.MakeGui(v, \"PrivateChat\", {\n Owner = plr;\n SessionKey = newSession.SessionKey;\n })\n\n -- testing stuff below\n wait(2)\n newSession.SendToUsers(\"PlayerSentMessage\", plr, \"this is a test message\");\nend\n
Client Code:
local sessionEvent = service.Events.SessionData:Connect(function(sessionKey, cmd, ...)\n local vargs = {...};\n print(\"we got session thing!\");\n if SessionKey == sessionKey then\n print(\"SESSION KEY VALID\")\n if cmd == \"PlayerSentChat\" then\n local p = vargs[1];\n local message = vargs[2];\n\n print(\"got chat: \".. p.Name, \"Message: \".. message)\n end\n end\nend)\n
"},{"location":"tables/server/remote/#getsession-string-sessionkey","title":"GetSession (string: SessionKey)","text":"Gets the session belonging to 'SessionKey'
"},{"location":"tables/server/remote/#fire-userdata-player-tuple-arguments","title":"Fire (userdata: Player, tuple: Arguments)","text":"(Raw fire) Sends data to the client belonging to 'Player' with any arguments passed. Does not handle command encryption before sending. This should not be used for normal server-client communication.
"},{"location":"tables/server/remote/#getfire-userdata-player-tuple-arguments","title":"GetFire (userdata: Player, tuple: Arguments)","text":"(Raw fire) Functionally similar to Remote.Fire except it uses the RemoteFunction and is thus able to return data from the client. This should not be used for normal server-client communication.
"},{"location":"tables/server/remote/#send-userdata-player-string-command-tuple-arguments","title":"Send (userdata: Player, string: Command, tuple: Arguments)","text":"Encrypts 'Command' and sends it with 'Arguments' to client of 'Player' This should be used for normal communication.
"},{"location":"tables/server/remote/#get-userdata-player-string-command-tuple-arguments","title":"Get (userdata: Player, string: Command, tuple: Arguments)","text":"Encrypts 'Command' and sends it with 'Arguments' to client of 'Player' Functionally similar to Remote.Send except it uses the RemoteFunction and is thus able to return data from the client. This should be used for normal communication.
"},{"location":"tables/server/remote/#checkclient-userdata-player","title":"CheckClient (userdata: Player)","text":"Checks if the 'Player's client is hooked and ready for communication.
"},{"location":"tables/server/remote/#ping-userdata-player","title":"Ping (userdata: Player)","text":"Runs Remote.Get(Player, \"Ping\") and returns the result.
"},{"location":"tables/server/remote/#makegui-userdata-player-string-guiname-table-data-table-themedata","title":"MakeGui (userdata: Player, string: GuiName, table: Data, table: ThemeData)","text":"Tells 'Player's client to create the specified GUI with the specified data provided.
"},{"location":"tables/server/remote/#makeguiget-userdata-player-string-guiname-table-data-table-themedata","title":"MakeGuiGet (userdata: Player, string: GuiName, table: Data, table: ThemeData)","text":"Identical to Remote.MakeGui except this will yield and return any data returned by the GUI created. This is used in conjunction with UI elements like the YesNoPrompt.
"},{"location":"tables/server/remote/#getgui-userdata-player-string-guiname-table-data-table-themedata","title":"GetGui (userdata: Player, string: GuiName, table: Data, table: ThemeData)","text":"Alternative method of calling Remote.MakeGuiGet
"},{"location":"tables/server/remote/#removegui-userdata-player-string-guiname","title":"RemoveGui (userdata: Player, string: GuiName)","text":"Removes the specified UI element belonging to 'GuiName' from 'Player'
"},{"location":"tables/server/remote/#newparticle-userdata-player-userdata-parent-string-type-table-properties","title":"NewParticle (userdata: Player, userdata: Parent, string: Type, table: Properties)","text":"Creates a new particle of 'Type' in 'Parent' locally for 'Player'
"},{"location":"tables/server/remote/#removeparticle-userdata-player-userdata-parent-string-name","title":"RemoveParticle (userdata: Player, userdata: Parent, string: Name)","text":"Removes particle from 'Parent' for 'Player'
"},{"location":"tables/server/remote/#newlocal-userdata-player-string-classname-table-properties-userdata-parent","title":"NewLocal (userdata: Player, string: ClassName, table: Properties, userdata: Parent)","text":"Creates a new particle locally for 'Player' of 'ClassName' with 'Properties' in 'Parent'
"},{"location":"tables/server/remote/#makelocal-userdata-player-userdata-object-userdata-parent-bool-clone","title":"MakeLocal (userdata: Player, userdata: Object, userdata: Parent, bool: Clone)","text":"Makes 'Object' local to 'Player'
"},{"location":"tables/server/remote/#movelocal-player-object-parent-newparent","title":"MoveLocal (Player, Object, Parent, newParent)","text":"Moves local object to new parent for 'Player'
"},{"location":"tables/server/remote/#removelocal-player-object-parent-string-match","title":"RemoveLocal (Player, Object, Parent, string: Match)","text":"Removes local from 'Player' in 'Parent' matching 'Object' or 'Match'
"},{"location":"tables/server/remote/#setlighting-player-string-property-value","title":"SetLighting (Player, string: Property, Value)","text":"Sets game.Lighting[Property] to 'Value' for 'Player'
"},{"location":"tables/server/remote/#fireevent-player-tuple-arguments","title":"FireEvent (Player, tuple: Arguments)","text":"Triggers client event on 'Player' with 'Arguments'
"},{"location":"tables/server/remote/#newplayerevent-player-string-type-function-function","title":"NewPlayerEvent (Player, string: Type, function: Function)","text":"Creates a new player event and can be triggered by the client.
"},{"location":"tables/server/remote/#playaudio-player-int-audioid-int-volume-int-pitch-bool-looped","title":"PlayAudio (Player, int: AudioId, int: Volume, int: Pitch, bool: Looped)","text":"Plays audio locally on 'Player'
"},{"location":"tables/server/remote/#stopaudio-player-int-audioid","title":"StopAudio (Player, int: AudioId)","text":"Stops current playing local audio on 'Player'
"},{"location":"tables/server/remote/#stopallaudio-userdata-player","title":"StopAllAudio (userdata: Player)","text":"Stops all playing audio (locally created by Adonis)
"},{"location":"tables/server/remote/#loadcode-player-string-luacode-bool-getresult","title":"LoadCode (Player, string: LuaCode, bool: GetResult)","text":"Runs 'LuaCode' on the player's client and gets the result if 'GetResult' is true.
"},{"location":"tables/server/remote/#encrypt-string-string-string-key-table-cache","title":"Encrypt (string: String, string: Key, table: Cache)","text":"Handles encryption.
"},{"location":"tables/server/remote/#decrypt-string-string-string-key-table-cache","title":"Decrypt (string: String, string: Key, table: Cache)","text":"Handles decryption.
"},{"location":"tables/shared/service/","title":"The \"Service\" Metatable","text":"In Adonis, the \"service\" variable is a metatable provided by the Service core module containing many essential functions and variables used by both the server and client. The service table for the client is nearly identical to the service table for the server with the exception of a few variables added by either the client or server during loading.
If an index is requested from the service table (eg. service.Players) it will first check if it contains the requested index. If it does not contain the requested index, the it will query game:GetService(index) and return the result instead. This offers a slightly quicker alternative to typing game:GetService() when getting a Roblox service.
"},{"location":"tables/shared/service/#special-functions-variables","title":"Special Functions & Variables","text":"The following is a list of functions and variables that can be found in the service metatable.
Note that ... implies user defined arguments that are not necessarily required to use a function or used directly by the function. This is almost always arguments to be passed to a user defined function.
Variables starting with * indicate an optional variable.
"},{"location":"tables/shared/service/#serviceeventservice","title":"service.EventService","text":"The EventService table/object contains functions related to event and task handling. All members of the EventService object can be accessed as members of the service metatable.
"},{"location":"tables/shared/service/#tracktaskname-function","title":"TrackTask(Name, Function, ...)","text":"Creates a new Adonis-tracked \"task\" thread. If Name starts with \"Thread:\" Adonis will create the task as a coroutine, otherwise TrackTask will yield until function completion. TrackTask will pass ... as arguments to the specified task function and will return the result.
--// Add existing players in case some are already in the server\nfor _, player in service.Players:GetPlayers() do\n service.TrackTask(\"Thread: LoadPlayer \"..tostring(player.Name), server.Core.LoadExistingPlayer, player);\nend\n
"},{"location":"tables/shared/service/#eventtaskname-function","title":"EventTask(Name, Function)","text":"Creates a special function that can be called by an event to spawn a new task each time the event fires.
service.Players.PlayerAdded:Connect(service.EventTask(\"PlayerAdded\", server.Process.PlayerAdded))\n
"},{"location":"tables/shared/service/#gettasks","title":"GetTasks()","text":"Returns a table containing currently tracked tasks.
"},{"location":"tables/shared/service/#events","title":"Events","text":"Acts as a proxy to service.GetEvent(EventName) which will return a special event object for EventName.
The event object contains methods like :Connect(function), :Fire(...), and :Wait()
"},{"location":"tables/shared/service/#connectfunction","title":":Connect(function)","text":"Will attach a user specified function to the event. When :Fire(...) is called, the arguments passed to :Fire(...) will be passed to the attached function.
"},{"location":"tables/shared/service/#connectoncefunction","title":":ConnectOnce(function)","text":"Same as :Connect() except disconnects after firing once.
"},{"location":"tables/shared/service/#fire","title":":Fire(...)","text":"Runs all functions attached to the event and passes ... to them.
"},{"location":"tables/shared/service/#wait","title":":Wait()","text":"Waits for the event to fire once. Will return whatever arguments :Fire(...) sent. Yields.
"},{"location":"tables/shared/service/#adonis-events","title":"Adonis Events","text":"Adonis has a number of custom events that can be used by plugins or Adonis itself.
Events List:
--// SERVER\nCommandRan(Player, Data) \n--[[\n Data is a table containing the following: \n {\n Message = msg, --// The full message the player chatted; Previously the \"Message\" param\n Matched = matched, --// The :kick in :kick me (the MatchedString param previously (the command basically))\n Args = args, --// The command arguments (the me in :kick me)\n Command = command, --// The command's data table (contains the function and all info about the command being ran)\n Index = index, --// The command's index in the command table\n Success = success, --// Did the command run? Did it fail? Did it return anything for some reason? This will tell us..\n Error = error, --// If it failed, what was the error?\n Options = opts, --// The options (\"opts\" table) passed to Process.Command; Contains stuff like isSystem and CrossServer flags\n PlayerData = pDat --// Data about the player, such as Level, isAgent, isDonor, and the Player object itself\n }\n--]]\n\nCustomChat(Player, Message, Mode)\nPlayerChatted(Player, Message)\nPlayerAdded(Player)\nPlayerRemoving(Player)\nCharacterAdded(Player)\nNetworkAdded(NetworkClient)\nNetworkRemoved(NetworkClient)\nLogAdded(LogType, Log, LogTable)\n\n--// Currently Disabled\nObjectAdded(Object) \nObjectRemoved(Object)\nOutput(Message, Type)\nErrorMessage(Message, Trace, Script)\n\n--// CLIENT\nCharacterAdded()\nCharacterRemoving()\n
Example:
--// Connect to the LogAdded event\nservice.Events.LogAdded:Connect(function(LogType, Log, LogTable)\n print(\"New \" .. LogType ..\" log: \".. Log.Text .. \" - \" .. Log.Desc)\nend)\n\n--// Wait for a log to be added\nlocal LogType, Log, LogTable = service.Events.LogAdded:Wait()\n\n--// Fire the LogAdded event\nservice.Events.LogAdded:Fire(\"Command\", {Text = \"Player1: :ff me\", Desc = \"Player1 ran a command\"}, server.Logs.Commands)\n\n--// Also here's the list of potential LogTypes:\n--// Chats in the first entry of this table corresponds to server.Logs.Chats, it's log type is \"Chat\"\nlocal indToName = {\n Chats = \"Chat\";\n Joins = \"Join\";\n Script = \"Script\";\n Replications = \"Replication\";\n NetworkOwners = \"NetworkOwner\";\n RemoteFires = \"RemoteFire\";\n Commands = \"Command\";\n Exploit = \"Exploit\";\n Errors = \"Error\";\n}\n
"},{"location":"tables/shared/service/#checkeventswaiting","title":"CheckEvents(*Waiting)","text":"Currently disabled. Responsible for determining which events are done and should be cleaned up.
"},{"location":"tables/shared/service/#foreachtable-function","title":"ForEach(Table, Function)","text":"Iterates through a given table, calling Function(Table, Index, Value) for each item in the table.
"},{"location":"tables/shared/service/#wrapeventargstable","title":"WrapEventArgs(Table)","text":"Responsible for wrapping arguments passed to event functions.
"},{"location":"tables/shared/service/#unwrapeventargstable","title":"UnWrapEventArgs(Table)","text":"Unwraps objects in the given table.
"},{"location":"tables/shared/service/#geteventeventname","title":"GetEvent(EventName)","text":"Returns a special object for Adonis events. Refer to the Events section. Identical to service.Events.EventName
"},{"location":"tables/shared/service/#hookeventeventname-function","title":"HookEvent(EventName, Function)","text":"Attaches a function to the specified EventName. Identical to calling service.Events.EventName:Connect()
"},{"location":"tables/shared/service/#fireeventeventname","title":"FireEvent(EventName, ...)","text":"Identical to service.Events.EventName:Fire(...)
"},{"location":"tables/shared/service/#removeeventseventname","title":"RemoveEvents(EventName)","text":"Removes all event hooks associated with EventName.
"},{"location":"tables/shared/service/#servicethreadservice","title":"service.ThreadService","text":"The ThreadService object can be accessed via service.ThreadService. Unlike WrapService, EventService, and HelperService the functions and variables in ThreadService cannot be accessed as members of the service metatable. Instead, they can be accessed using the ThreadService object.
"},{"location":"tables/shared/service/#tasks","title":"Tasks","text":"Table containing running tasks.
"},{"location":"tables/shared/service/#threads","title":"Threads","text":"Table containing running threads.
"},{"location":"tables/shared/service/#checktasks","title":"CheckTasks()","text":"Responsible for removing \"dead\" tasks.
"},{"location":"tables/shared/service/#newtaskname-function-timeout","title":"NewTask(Name, Function, *Timeout)","text":"Creates a new task and returns newTask.Resume,newTask
Tasks have a number of functions. At it's core a task is a proxy object to a coroutine.
Every task contains the following:
PID - a unique identifier for the task\nName - task name\nIndex - index in the Tasks table\nCreated - time the task was created\nChanged - a table containing task related event functions, such as :connect(function), :fire(...); Fires when task changes\nTimeout - how long the task can run for, default inf (0)\nRunning - bool that's true when the task is running\nFunction - the task's function\nR_Status - current task status\nFinished - table containing tasks related event functions, such as :connect(function), fire(...), and :wait(); Fires when task finishes\nFunction - task function handler\nRemove - removes the task\nThread - task thread handler\nResume - resumes the task\nStatus - returns task status\nPause - suspends the task\nStop - stops and removes the task\nKill - ends and removes the task\nEnd - ends the task\n
"},{"location":"tables/shared/service/#runtaskname-function","title":"RunTask(Name, Function, ...)","text":"Creates a new task with Name and Function, then runs the new task with arguments ...
"},{"location":"tables/shared/service/#timeoutruntaskname-function-timeout","title":"TimeoutRunTask(Name, Function, Timeout, ...)","text":"Same as RunTask but with a timeout.
"},{"location":"tables/shared/service/#waittaskname-function","title":"WaitTask(Name, Function, ...)","text":"Same as RunTask, but yields until task.Finished fires.
"},{"location":"tables/shared/service/#neweventtaskname-function-timeout","title":"NewEventTask(Name, Function, *Timeout)","text":"Returns a function that can be used to create a new task each time an event fires.
"},{"location":"tables/shared/service/#stop-wait-pause-yield","title":"Stop, Wait, Pause, Yield,","text":"coroutine.yield
"},{"location":"tables/shared/service/#status","title":"Status","text":"corotuine.status
"},{"location":"tables/shared/service/#running-get","title":"Running, Get","text":"coroutine.running
"},{"location":"tables/shared/service/#create","title":"Create","text":"coroutine.create
"},{"location":"tables/shared/service/#start","title":"Start","text":"coroutine.resume
"},{"location":"tables/shared/service/#wrap","title":"Wrap","text":"corotouine.wrap
"},{"location":"tables/shared/service/#newfunction","title":"New(Function)","text":"Creates a new coroutine and adds it to threads
"},{"location":"tables/shared/service/#endthread","title":"End(Thread)","text":"Attempted to end the supplied thread and remove it
"},{"location":"tables/shared/service/#wrapfunction","title":"Wrap(Function, ...)","text":"Creates a new coroutine, adds it to threads, and then calls Resume with ...
"},{"location":"tables/shared/service/#resumethread","title":"Resume(Thread, ...)","text":"Calls resume on the specified thread with ...
"},{"location":"tables/shared/service/#removethread","title":"Remove(thread)","text":"Removes the specified thread.
"},{"location":"tables/shared/service/#stopall","title":"StopAll()","text":"Stops all threads.
"}]} \ No newline at end of file diff --git a/tables/server/functions/index.html b/tables/server/functions/index.html index 7ec77d853c..c325c0fc09 100755 --- a/tables/server/functions/index.html +++ b/tables/server/functions/index.html @@ -74,7 +74,7 @@Contains various server-specific miscellaneous functions.
ℹ️ This page is currently incomplete.
-Adds the given function as a join filter. Will error if a joinfilter with this name already exists +
Functions.AddJoinFilter("No_bandits",function(Player:Player, PlayerData)
+ if Player.Name == "SimulprodBandit" then
+ return false, "Simulprod Bandit" -- second argument is the reason the player gets kicked
+ end;
+
+ return true;
+ end);
+
Removes the given joinfilter.
+These are used when service.GetPlayers
is called to search for players based on the user's input.
The default built-in player finders (at the time of writing this) can be found below to be used as examples:
PlayerFinders = {