If you look at the scripts here and around this folder
you should see how the scripts are.
After adding the script to there (in some folder under the scripts folder, for example the one I linked) you should add it to the scriptloader like all other scripts are:
And unless you use cmake, you need to either edit the solution file or open the solution in visual studio and drag and drop the script file or otherwise add it to the scriptdev2 project.
Looks like Cmake should be able to get all cpp and h files from all directories in the scripts directory recursively so no cmakelists.txt editing would be needed.
PS. Looks to me like the script you linked in this thread is for TrinityCore and would need some edits to be converted to MaNGOS/cMaNGOS