How would I go about detecting if there are duplicates in a script?

I’d like to check to see if a script has the same code as other scripts in my game, preferably using the command line, or plugin, or if I can edit my find all/replace all to find duplicates.
I’m not entirely sure if it’s possible to see the code of a script using a line of code from the command line, but I know that some plugins are able to detect the number of lines of code in a script, but I’m unsure whether I could use something similar to see if there are multiples.

The issue: I’m just really unsure how to go about even doing this, and I rather not do this all manually because I have to sort through around 13,000 module scripts, I know that if I was to copy and paste a script into the “find all/replace all” tool, nothing would show up. But I know if I was to go into a duplicated script and do “ctrl-f” and paste the code into the find/replace it would show up. So preferably if I could find out how to do the same with the find all/replace all tool in the studio, that would be a win.

I haven’t really tried much yet, because I can’t think of any way to do it besides possibly copying the scripts into VSC and maybe finding duplicates via a plugin there… but I’m still unsure if that would work.
I have looked through some forums but I don’t really get the search results I’m looking for, the majority of results are something along the lines of: “finding duplicates in strings or tables” but I’m not trying to find that.

Thank you in advance, hopefully, I don’t sound too stupid asking this question I’m just unsure how to approach it.

1 Like

you can use childadded to detect it

1 Like

I’m not trying to detect if a script is cloned, I’m trying to see which scripts in my game have the same code . I think you are thinking about it being cloned.

1 Like

dectect in script? wym i dont get it

1 Like

Basically, I need to loop through or find all the scripts that have the same code, or the exact same code as another script in the game.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.