From cbd02483fa9ae35ad32ae5ee394c2cf63ab93f0f Mon Sep 17 00:00:00 2001 From: rex-rbx Date: Sat, 29 Nov 2025 09:55:43 +1100 Subject: [PATCH 1/4] Create moonsec.d.json --- docs/moonsec.d.json | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 docs/moonsec.d.json diff --git a/docs/moonsec.d.json b/docs/moonsec.d.json new file mode 100644 index 0000000..aecd47c --- /dev/null +++ b/docs/moonsec.d.json @@ -0,0 +1,72 @@ +{ + "@moonsec/global/MS_ENCRYPT": { + "documentation": "Encrypts the provided string literal using MoonSec's internal string-encryption system. This macro only accepts literal strings, as the encryption is performed at parse time. The macro call is removed and replaced with an encrypted constant in the final output.", + "learn_more_link": "https://raw.githubusercontent.com/spxnso/lua-obfuscators/refs/heads/master/obfuscators/moonsec/versions/v3/README.md", + "code_sample": "print(MS_ENCRYPT('Hello World'))\nlocal a = MS_ENCRYPT([[Oh god]])\nprint(a, \"ENCRYPT:Another hello world\")", + "params": [ + { + "name": "toEncrypt", + "type": "string", + "documentation": "A literal string to be encrypted at compile time." + } + ], + "returns": [ + "string" + ] + }, + + "@moonsec/global/MS_WATERMARK": { + "documentation": "Sets a custom watermark to be injected into the obfuscated file. The watermark is required to remain present; removing or altering it will break the script at runtime. This macro is only usable with literal strings, as it is processed and removed before final compilation.", + "learn_more_link": "https://raw.githubusercontent.com/spxnso/lua-obfuscators/refs/heads/master/obfuscators/moonsec/versions/v3/README.md", + "code_sample": "MS_WATERMARK('This file was skidded with your mom in my bed')\nprint('hello world')", + "params": [ + { + "name": "watermark", + "type": "string", + "documentation": "A literal string to embed as the file's required watermark." + } + ], + "returns": [] + }, + + "@moonsec/global/MOONSEC_EXIT": { + "documentation": "Immediately terminates the executing script and all of its threads. This is a hard stop that halts the interpreter context and guarantees no further Lua code will continue executing.", + "learn_more_link": "https://raw.githubusercontent.com/spxnso/lua-obfuscators/refs/heads/master/obfuscators/moonsec/versions/v3/README.md", + "code_sample": "for i = 1, 15 do\n spawn(function()\n while wait(1) do print('x') end\n end)\nend\n\nprint('bye bye')\nMOONSEC_EXIT()\nprint('this will never be printed')", + "params": [], + "returns": [ + "never" + ] + }, + + "@moonsec/global/MOONSEC_GET_SCRIPT_ID": { + "documentation": "Returns the unique script identifier assigned to this specific obfuscated output. The ID is newly generated for every obfuscation pass, and always falls between 111111111 and 999999999.", + "learn_more_link": "https://raw.githubusercontent.com/spxnso/lua-obfuscators/refs/heads/master/obfuscators/moonsec/versions/v3/README.md", + "code_sample": "print(MOONSEC_GET_SCRIPT_ID())", + "params": [], + "returns": [ + "number" + ] + }, + + "@moonsec/settings": { + "documentation": "MoonSec V3 global obfuscation settings available during compilation.", + "settings": { + "anti_tamper": { + "type": "boolean", + "default": false, + "documentation": "Enables bytecode tamper detection. When enabled, any modification to the compiled output will cause the script to break or terminate immediately." + }, + "max_security": { + "type": "boolean", + "default": false, + "documentation": "Enables the highest level of virtualization and mutation. Significantly slows execution but applies maximum-strength protection." + }, + "constant_protection": { + "type": "boolean", + "default": false, + "documentation": "Enables heavy obfuscation over constant values, making static analysis more difficult." + } + } + } +} From 3d2c351cdbc12e9194cf2d06f2726ca7d3f28151 Mon Sep 17 00:00:00 2001 From: rex-rbx Date: Sat, 29 Nov 2025 09:57:15 +1100 Subject: [PATCH 2/4] Create moonsec.d.luau --- types/moonsec.d.luau | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 types/moonsec.d.luau diff --git a/types/moonsec.d.luau b/types/moonsec.d.luau new file mode 100644 index 0000000..f7ed14e --- /dev/null +++ b/types/moonsec.d.luau @@ -0,0 +1,5 @@ +--#region MoonSec Macros +declare function MS_ENCRYPT(toEncrypt: string): string +declare function MS_WATERMARK(watermark: string): () +declare function MOONSEC_EXIT(): never +declare function MOONSEC_GET_SCRIPT_ID(): number From 3e64f681b53f3eb50af0f4d4371741f5638e5398 Mon Sep 17 00:00:00 2001 From: rex-rbx Date: Sat, 29 Nov 2025 09:57:39 +1100 Subject: [PATCH 3/4] Update moonsec.d.json --- docs/moonsec.d.json | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/docs/moonsec.d.json b/docs/moonsec.d.json index aecd47c..033637a 100644 --- a/docs/moonsec.d.json +++ b/docs/moonsec.d.json @@ -47,26 +47,5 @@ "returns": [ "number" ] - }, - - "@moonsec/settings": { - "documentation": "MoonSec V3 global obfuscation settings available during compilation.", - "settings": { - "anti_tamper": { - "type": "boolean", - "default": false, - "documentation": "Enables bytecode tamper detection. When enabled, any modification to the compiled output will cause the script to break or terminate immediately." - }, - "max_security": { - "type": "boolean", - "default": false, - "documentation": "Enables the highest level of virtualization and mutation. Significantly slows execution but applies maximum-strength protection." - }, - "constant_protection": { - "type": "boolean", - "default": false, - "documentation": "Enables heavy obfuscation over constant values, making static analysis more difficult." - } - } } } From ff3b82181f0ecfa48d632a8bab7305fe3ea02e22 Mon Sep 17 00:00:00 2001 From: rex-rbx Date: Tue, 16 Dec 2025 11:47:09 +1100 Subject: [PATCH 4/4] Update environment.d.luau --- types/environment.d.luau | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/environment.d.luau b/types/environment.d.luau index df66283..1e0e59d 100644 --- a/types/environment.d.luau +++ b/types/environment.d.luau @@ -52,6 +52,7 @@ declare function newcclosure(function_to_wrap: GenericFunction