this is a decryptor/encryptor for NScripter's nscript.dat files and a reverse engineering of the original windows-only nsdec.exe tool, its algorithm boils down to XORing every single byte in the file with the value 0x84 (decimal 132), basically inverting the 8th and 3rd bits starting from the right, and this is not the only encoding the engine supports, it seems that every game written in NScripter either uses scripts in this format (.dat), uses plaintext as its script (not only .txt, but .u and .utf as well), or put the script in an archive file (such as arc.nsa or arc.sar).
this tool will only work with NScripter games that use "compiled" scripts with .dat extentions, that heavily depends on what version of the game you have, and thus can be used on any of the visual novels in the list below as long as you see a nscript.dat file in a game's directory, then follow the steps at the bottom of this file and this tool should do the work for you.
As for the newer version of the engine, P(proportional)O(open)Nscripter, i have not tested this algorithm aganist pscript.dat, which i personally think is encoded in a similar manner, i recommend trying that as well.
you can find the list of all the games that use NScripter here.
to decrypt a script Place the executable in the same folder as the script file named nscript.dat and Run it (it should take a few seconds depending on the length of the script, it should NOT trigger any antivirus, read the readme.txt in the release)
to encrypt a script, likewise, place the executable in the same folder as the script that you need to encrypt, note that the script has to be a text file called nscript.txt
NOTE: you will need a compiler that supports C99 or later
for Linux:
$: gcc -o rdat.out rdat.c && chmod +x ./rdat.out
for Windows:
> gcc -o rdat.exe rdat.c