So, what I’m basically trying to do is read code (whether it be a LocalScript, Script or ModuleScript) from a module. What I’m trying to get out of this is how should I go about this? Sorry for the lack of text but I can’t really expand on it as such. Feedback is appreciated, thanks for reading.
Use case: For Encrypting scripts through a module.
Normally you’d do something like LuaSourceContainer.Source but the source happens to be a protected string so there’s no way to check another script’s content at runtime. What’s your use case? Maybe there’s a simpler way
If you gave an example of why you want to do this, maybe we can provide you a better answer. In most cases you’re not interested in reading the actual code of the script (as mentioned by the two previous posters), but rather the output of the script (ie. the return value of the ModuleScript, or any functions returned by it).
With my new found knowledge of Script.Source (thanks for that one @return_end1!), I’m pretty much looking for a workaround which can do the same but isn’t restricted.