If you modify it to make it more efficient, that would be phenomenal. You should definitely let me have a look in that case so I can learn from it; I'm still very much just an occasional hobbyist :) . Thanks!
In future scripts I'll look into merging text events. It just seems weird to me that having a script always trigger on every text event, even if it's only one line, would be more efficient. I'll also look into hash. It's something I've never seen or heard of.