I happen to have made something for this a loong time ago, just to see if I could. I've never actually used it to release any "obfuscated" lua programs, but just found and tested it, and it seems to work.
program:
pastebin get AucFCRxS lua2bindownload as lua2bin, and use like this:
> lua2bin myProgram myProgram2
It will take myProgram, which is lua code, compile it to bytecode, dump that to a string, encode that string in base64, and then write a new lua program that contains that base64 string and, when run, loads, decodes, and runs the original program. The resulting output is a valid program that can safely be sent over rednet or http, and so distributed on pastebin, etc.
Thought I'd share this since I made it and have never used it for anything, and it's exactly what you're asking for, but… I'm not sure I'd recommend actually using it to distribute your programs. it is fantastically unlikely anyone wants to steal your code, and if they really did, this wouldn't actually stop them, just make it harder. It will also cause the program to generate very cryptic error messages if anything goes wrong, making it harder for you to find and fix bugs reported by other people. If you want to do it anyway… go for it!