How to read a script?

Hello! I would like to see how can I read a script source (in my game) and then also find if a key/method is in that script with a string?

Is this possible or not?

1 Like

Are you talking about logs or the actual script?

When a game is running the source will have already been compiled, and you can’t read the Source property outside of command bar/plugin anyway.

Oh, I don’t mean that, I want to read the script source from a plugin that I’m making.

Okay, then yes you can do it if it’s from a plugin. Just use the Source property then. Since it’s a string you can do :match et al.

3 Likes

What’s the “et al” part? And also how exactly do you use the :match thing? can’t find it in the Dev hub.

String Patterns article which contains string.match

1 Like