Smart Script Metadata Plugin (Currently not publicly released)

Hello! I recently developed a plugin which intelligently (and selectively) replaces/updates existing script content/variables based on different section names. It adds a list of all services/modules used in the script (converting require, game:GetService calls and game.SERVICE_NAME to variables where possible, as well as converting game.Workspace to workspace), an Author tag based on the currently logged in studio user’s name/id, as well as adding Contributor tags if there’s a non matching Author tag already there (using the existing UserId bit), Last Edited/Created timestamps/dates (in UTC & local time), and a multiline Description section which contains placeholder text.

My code works by “sectionizing” a script using a section format that looks like --[[ SECTION_NAME ]]--. The script writer can add their own sections which have their content and order preserved within the script when the plugin is activated. There is a “Metadata” section which is reserved for the plugin which includes all stuff mentioned above. There is additionally two sections which are not reserved, however are modified called “Services” and “Modules” which include referenced services and modules. Duplicates are cleaned up, and I plan to have it so that things are placed in the order they are first referenced, non referenced ones being placed last.

Note: My produced format (e.g. comments, naming, spacing, etc) is currently changing a bit which is why I haven’t put any produced sample code atm, but I’ll probably update this post if I decide on a format.

1 Like