I made a free plugin that inserts anything you want on the top of your scripts automatically; It is smart and checks for blocking content before.
This is useful to adds tags like “–!native” or “–!strict” to scripts automatically when you open or close them (you can configure when the insertion happens through the settings panel). You can also configure which contents should be blocking the insertion of it.
By default, the content that it inserts is “–!strict” and the blocking content is “–!nocheck” or “–!nonstrict”, but it allows you to customize it way further.
I’m already doing that; You’ll be able to customize your own tags to add, keywords that stop them from being added and optional filters to decide wether or not they should be added;
For example, if a document is a LocalScript, add Y tag group to it (while also considering circumstances, obviously), or if a document is a ModuleScript, add X tag to it.
The script already has internal support for most of theses features, as i stated, but they need implementation.
It’s only meant to insert --!strict for now (although you can modify it), you can see that by looking at it; Once i modify and work it further, you’ll be able to customize it way more, even with custom tokens parsing;
For example:
—%{user-name} would convert to the user-name of the currently logged user
—%{datetime} would convert to the current date and time; Eg: 10/16/2023 7:43
You’ll even be able to execute code inside theses tokens (they’ll be called code tokens and will have their environment defaulted to the string library so that it’easier to write and keep it smaller):
—${upper(‘hello’)} → HELLO
In this case, $$ captures a normal token to inside of the code token, so:
—${upper($$user-name)} → SWETCH29 (Possible name)
—$(upper($$month-name)} → OCTOBER
I already have the string patterns and parser for these types of tokens, they just really need implementation.
By allowing you to execute code within it, the possibilities are infinite. It allows you to execute code and return a value to the plugin that then inserts it into the script.
To be honest, i probably should not have released it right now; It’s pretty raw and requires some implementations.
I updated the plugin and you can now customize the way it behaves easier;
You can now add any flag you want or any of your content to it, while also implementing your own logic;