Skip to content
StarCrypt / DocsOpen obfuscator
Browse documentation
STARCRYPT / DOCUMENTATION

Obfuscate a Roblox ModuleScript and keep using require

On this page

A ModuleScript returns one value, commonly a table of functions. Obfuscate the complete module, including its final return. Select This is a ModuleScript, enter its name, then build. The result includes a require example for that name. Replace its source with the output and keep its location and public method names.

1. Your original module

local M = {}
function M.add(a, b)
  return a + b
end
return M

2. Replace the module source

Paste the complete generated output into the same ModuleScript. Keep a separate original-source backup. Test in Studio before publishing.

3. Use the same call

local M = require(game.ServerScriptService.MyModule)
print(M.add(2, 3))

Use your actual module path. ServerScriptService and ServerStorage are server-only; clients cannot require modules stored there. ReplicatedStorage is visible to clients, so do not store secrets there.

Place ID versus universe ID

print(game.PlaceId)
print(game.GameId)

PlaceId identifies the current place or map. GameId identifies the universe, or experience, containing all its places. Publish the experience before collecting IDs. A place lock allows one place; a universe lock allows all places within that experience. Both selected means both checks must match. Client-side locks can be modified by an attacker.

Roblox DataModel reference

Need a hand with your build?Contact support ↗