Thank you, raffriff. It works now. I have the same version of masktools as you, StainlessS. I even added the plugins again but it doesn't work. It isn't a problem though because the script works now.
The subtitle removal works great for the most part but leaves out certain parts of the subtitle (mostly around the edges). In my clips, the source without the subtitles is actually better quality and is just for testing purposes for now. The subtitles are surrounded by uniform black borders all around.
Also, thank you for the concise explanation of your script.
Lining up clips is a pain though. DGIndex doesn't allow me to do precise frame cutting so I can only offer the best I could to trim to match the hardsubbed video without reencoding. It has a few mismatches in scenes but you can find many scenes with subs that are matching.
Clips here. The hardsubbed video is pretty small in size however, the non-subbed version is a little too big.
I really wish I could assist you but I am not capable of doing so.