Best way to protect a module?

I wanted to know the best way to protect a module, because I’m creating an advanced system and I do not want anyone to know how it works, if you have your best way to protect a module share for us.
My only best way to protect a module is complex code, but this does not help much for expert programmers.


I think one of the most straight forward ways is to use require(id).
Since no 3rd party users can load modules, if someone takes the game, the main module is still in your inventory.


Wouldn’t that be kinda impossible?

Don’t forget ROBLOX killed private modules.

You can still use require(id). You can’t load other peoples modules though.
It just has to be an asset id of your own.

1 Like

As @uJordy has said, you can use require() to protect your module script if you are the only one using the module.

However, if you wanted to make a module for public use but didn’t want the source code leaked, that is currently not possible to do very easily. You can always set up a webserver and code your functions there (communicating with HTTPService). If you don’t know how to set up a webserver, there are quite a few people who have set up servers for this type of task.
This has pros and cons but it is a way to help protect your code.

Just have all your modules in the ServerScriptService, this way exploiters can’t see them.

A good way to protect your module is to publish it to a group you own. That way, you can use it in your group games, and your games, but nobody else if they steal your place or the group’s places can use them.

There’s no way to hide the source of your module if multiple people have edit access to your game or your module is local. The best you can do is obfuscate your code with popular obfuscators such as Luraph or IronBrew

1 Like