IT FINALLY WORKS! Encode and Decode any message, and I mean anything. The only (current) issue is that it can't do capitalization. I also made it encode three times and decode three times so the code is nearly impossible to break.
I am currently having an issue because scratch treats capital letters and lowercase letters as literally equal, so I don't really know what to do here.