Someone sent me this to my inbox. I'm not really sure what it does as I'm a noob at programming. But I hope someone will find good use for it. If this is your code that you don't want others to see, then let me know and I'll tell the mods to delete this thread. Otherwise, I hope you have no hurt feelings.
https://pastebin.com/MfitwxJc