The only functional encryption trick I’ve seen was Skyboy’s method where he added some asm code that trapped decompilers in nonsense loops. Don’t have a link. Point is, all of the commercial/publicly available ones fail.
If you really need to somehow protect its code, I think the best would be to throw a simple sitelock and make your own obfuscator, making sure that whatever it changes doesn’t hit performance. That said, as long as one person bothers to spend a couple of hours, days or weeks (depending on how well you protected it) reading and figuring it out, it won’t be safe. All clientside protection can do is to delay the time it takes for people to do whatever they want to do with your code.
E: Found the link. Although in that one he seems to have user a different method involving a Loader.