# MoonSec V3 Obfuscator Macros

## \<string> MS\_ENCRYPT(\<string>)

Encrypts given string, alternatively you can use **ENCRYPT:** prefix too.

```lua
print(MS_ENCRYPT('Hello World'));
local a = MS_ENCRYPT([[Oh god]]);
print(a, "ENCRYPT:Another hello world");


```

{% hint style="warning" %}
This macro uses a big algorithm to decrypt strings, so it is not recommended on frequently used strings as it will decrease performance
{% endhint %}

## \<void> MS\_WATERMARK(\<string>)

Changes the watermark on output files, and it will break the script if that watermark is somehow removed.

```lua
MS_WATERMARK('SkiddedSS - Join us discord.gg/ğ')
print('hello world');
```

{% hint style="info" %}
By default, this is`MS_WATERMARK([[This file was protected with MoonSec Private by Federal#9999]])`
{% endhint %}

{% hint style="warning" %}
You can't pass a variable to this macro, because it is not actually a function defined in the code. The watermark gets replaced at parsing process, and function call gets removed from your code automatically.
{% endhint %}

## \<void> MOONSEC\_EXIT()

Kills the interpreter and ends the script execution immediately, with all sub-threads.&#x20;

```lua
-- example threads:
for i=1,15 do
    spawn(function() 
        while wait(1) do 
            print'x' 
        end 
    end)
end

print('bye bye');
MOONSEC_EXIT();
print('this will never be printed');

```

## \<number> MOONSEC\_GET\_SCRIPT\_ID()

This is an unique script identifier fingerprint, and it changs between every obfuscated file. IDs have a range between `111111111` and `999999999`

```lua
print(MOONSEC_GET_SCRIPT_ID())
```

##
