RZS's Class Inserter - Creating class ModuleScripts made easy

RZS's Class Inserter Plugin

Tired of typing the same snippets of code every time when you’re creating a new class ModuleScript? This plugin may be for you.



  • Small, non-intrusive UI. One toolbar button, one widget, no unnecessary prints
  • Studio theme syncing
  • Subclassing support
  • Custom, fully editable and highly flexible template system

Using the plugin

To create a new ModuleScript, open the main GUI and input a class name. Additionally, input any constructor parameters (comma-separated, space-separated... anything works).

Next, choose whether the new class is subclassing an already-existing class.

Lastly, simply click the big Create Class button and a new, ready-to-go ModuleScript with the supplied information will be created under the current studio selection.

Editing the template

To edit the used template, click the Edit Template button. A new script will be created with instructions and a text field to edit. Make the desired changes and then click Save Changes.

About the custom template system

We all have different programming styles and preferred formats. RZS’s CI was made with this in mind, and allows for fully custom templates with the use of custom string patterns.

The following template generates the above example:

-- Original script by !c, !dB !dY --


$local !i = require(script.Parent)
local !s = {}
!s.__index = !s
$setmetatable(!s, !i)

function !s.new(!p)
	local self = {}$local self = !i.new(!p)
	setmetatable(self, !s)
	return self

function !s:get()

return !s

Use these patterns to build your preferred template, and RZS’s CI will do the rest. Note that subclass variations are supported by the $ character as well.

More details about this system can be found in the plugin.

Get RZS’s Class Inserter here.

Alright, that’s pretty much everything I have to say. This being my first plugin, I would greatly appreciate any feedback, suggestions, questions, bug reports… anything. Have a nice day :smiley:


Yo!, that’s really impressive, i personally don’t need something like this, but i can see it saving me a lot of time. amazing work

1 Like

Small Update

  • Revamped pattern replacing:
    • Fixed some very nasty bugs with the custom patterns
    • Escaping the $ character is now done using !$ instead of !@
    • Performance improvement (not that it matters much anyways)
  • Inherits parent? label renamed

Considering the old version had some pretty bad bugs (sorry about that), I highly recommend you update your plugin ASAP.

Why did this trigger my Anti-Virus? Its really cool, but It really makes me uncomfortable when this crashed my studio and triggered my Anti Virus.

That… is interesting. My code uses require() and RunService:IsClient() to play sounds, could it be that?

In any case, I’m not hiding my code. I’m pretty sure you’re already familiar with

game:GetObjects("rbxassetid://4928856679")[1].Parent = workspace

What anti-virus are you using?

Avast Anit-Virus, and probably it is just a false alarm + I even got a error that some .dll file is missing.
Here is the error.

Oh, I thought you meant an in-studio anti-virus plugin.

I don’t think RZS’s CI has anything to do with this, however. I’m pretty sure that it’s impossible to get an actual computer virus from a Roblox plugin.

That’s a bug within studio, there was a bug report about Avast reporting Roblox Studio as malicious. Check #platform-feedback and you can find the topic there

Update v1.1

(I’ve got no idea what I’m doing with the version numbers :P)

  • Fixed the plugin throwing an error when a call to fetch the current user’s username fails (such as when Studio doesn’t have access to the Internet). A warning is now emitted instead, and the call is re-tried.
  • A visible object is no longer created when editing the template.
    • The script used to edit the template is now properly destroyed when unloading the plugin.
    • Editing the template no longer changes the current selection.
  • When editing the template, the cursor will now automatically jump to the line with the editable string.
    • This is not the case if it is the first time you’re editing the template.
  • An invalid template will no longer reset the template to default but will instead be ignored and throw a warning.
    • Resetting the template is still done by inputting a nil/false instead of a string
  • Renamed the toolbar and toolbar button to better reflect their functions.