How do i block modules from being run in my game?

So i am working on an Antiexploit called “Aidan’s AntiExploit” and need to figure some stuff out.

I want to ban malicious script from running by typing in it’s activation code in a “” safe environment and then if someone uses it kick them with a message and block the script.

I need to do this to 100+ exploits btw.

How would i do this?

1 Like

You can probally use remote events, when the remote event get’s fired it shows the player that fired it.

I have certain modules i want to ban. Not players. Like require(NumberID)

Well you can make a constant for loop through the game and if the module is there then you can remove it.

Okay, but how would i do that? I have never done something like this before.

while wait(1) do 
for i, v in pairs(game:GetChildren() do
if v.Name = "Lets say this is a bad module name" then
v:Destroy()
warn("Virus found and removed!")
end
end
end

Just an example

Do a game:GetDescendants()

instance[] GetDescendants()
1 Like

Is there any way to do it via ID and for multiple modules at a time?

I’m not sure what you mean by

via ID

1 Like

You can also do

if v.Name == “Bad Module” or v.Name == “BAD MODULE2”

so if i wanted to do multiple modules i could do

if v.ID = "ID, ID, ID"

No Because when you do that you are scanning module’s that are already in the game.

And you cant get an ID from a module that is in the game unless you make a script when you insert an object.

how would i do multiple modules then?

There (character limit 30 characters)

1 Like

Oh so like

if v.ID == “id” or v.ID == “Id”

Noo noo you cant get a ID from an instance.

I want to do it via Id tho. So that they cant change the name.

V is an instance an and an instance is an object.

so how would i scan modules in the game and see if any of those are viruses? Because i just need to get this to protect the player’s game.