Is it possible to check a scripts code, and if not is it at least possible to check a scripts amount of lines ?
It would help me allot to to detect and destroy hacker scripts.
Edit: it should work while gameplay and not in studio
Is it possible to check a scripts code, and if not is it at least possible to check a scripts amount of lines ?
It would help me allot to to detect and destroy hacker scripts.
Edit: it should work while gameplay and not in studio
Read the script?
Scroll all the way to the bottom line and look at what the number says on the left.
Hope this helps.
script.Source is a property that works for widgets and plugins
You cant necessarily scan a script however I use Ro-Defender and it helps get rid of viruses in scripts.
Do you mean while you have the script open in Studio, or to detect scripts during gameplay?
In Studio just use the Search tool (Ctrl F)
I’m pretty sure OP means he wants to scan scripts during gameplay to prevent hackers from putting in malicious scripts
With “scanning” i meant a way to detect malicious scripts while gameplay
Then the answer is no. You can access script source only via plug-in (I think) and command bar, but game scripts don’t have high enough permission.
“This item is protected. Attempting to use it in a Script
or LocalScript
will cause an error.” - Script.Source
But why do you need to detect malicious script during gameplay? It would be better to just detected it in studio and remove it. If you’re trying to do it to make it so hackers can’t put in their own scripts, they can just delete your script that searches code anyways.
But you don’t actually have to be able to read a script. You can just check if the script gets added to the game structure. If a script gets added and you didn’t add it, then it’s a bad script. But again, the hacker could just delete this check.