I found out from my earlier questions in regards to editing bytecode through reddit and other forums, as well as from what I heard from my peers in discord, that decompiling and recompiling code would only lead to more problems than it solves, and that the better approach around this is to edit the bytecode directly through code.
That said, I don't know as to how do I go about this. With the idea in mind, I decided to go on a searching spree in regards to the process, to little results. I could only find some libraries, some idea, and barely any documentation or mention of the process in regards to loading, editing, and saving into the actual bytecode.
I need to know how do I go about this so that I can go on from there to create the necessary components for the program.
I was planning to use this knowledge to make the function to load LuaJIT bytecode, before editing specific strings from the code. After the changes are saved, I have to save the bytecode directly back into LuaJIT bytecode.
Any help and suggestions in regards to this is appreciated.