ScriptMod: Insert anything on the top of your code automatically

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.

This is how it looks:
image
image

And you can download it here:
ScriptMod - Plugin (Roblox Library)

Or by the source and uploading it as a local plugin:
Source.rbxm (70.7kbs)

3 Likes

Can you release the code I know some people don’t like the idea of plugins inserting scripts.

I sent it already! It’s public and allows you to modify how it behaves; Such as modifying which tags should be added or adding your own content to it.

1 Like

What if you don’t want it in every script?

This plugin would be more helpful if you had a interface to toggle specific run modes like --!strict and --!native, of any script.

1 Like

jesus christ, how is this 200 lines of code when it does 1 simple basic task

a fine example of how so many random features contributes to bloat

1 Like

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.

1 Like

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;
image
image