Still have questions? Join our Discord server and get real time help.
-1

# Need help protecting your anti-exploit scripts? [closed]

So a lot of people tend to get stuck wondering how in the world they will be able to protect a LocalScript. I thought I'd try to help anyone in need of an answer to this. One way you can do this is by having two LocalScripts.

So, there's LocalScript1, and LocalScript2. Lets say LocalScript1 has the anti-exploit code in it. We will use LocalScript2 to detect if LocalScript1(anti-exploit) is deleted. In LocalScript1 we will do the same thing, the only difference is that it will detect is LocalScipt2 is deleted. Doing this will keep them both protected by repeatedly checking each other with a loop. In this case we will just use a while loop.

Code Example: LocalScript1

--Anti-Exploit before the while loop.
while wait() do --Make sure this while loop is at the end of your script!
if LocalScript2 == nil then --Check if the script was deleted.
LocalPlayer:Kick("Tried to delete Anti-Exploit")    --Kick the player if they deleted LocalScript2.
else
if LocalScript2.Disabled then   --Check if the script is Disabled.
LocalScript2.Disabled = false   --Here you could Kick the player, but we will just enable it again in this example.
end
end
end


So basically, make 2 scripts check if they are deleted and if one gets deleted the other kicks the player, and if one is disabled, the other enables it. Make sure to put them in a place where their parents wont get deleted or have the script check its parent. Hope this was helpful!

0
This isn't that kind of site. DesertusX 430 — 6mo
0
scripting "helpers" ReallyUnikatni 68 — 6mo
0
eh DesertusX 430 — 6mo
0
This is not a place where you should release scripts. VitroxVox 786 — 6mo
0
Use https://devforum.roblox.com instead. PrismaticFruits 837 — 6mo

### Closed as off-topic by VitroxVox, Vinceberget, AspectW, Syclya, PrismaticFruits, JesseSong, moo1210, ScuffedAI, lazycoolboy500, zblox164, EmbeddedHorror, and Utter_Incompetence

This question has been closed by our community as being off-topic from ROBLOX Lua Scripting.

2
AspectW 426
6 months ago

First of all, the exploiters can destroy/disable both localscripts at once. Second of all, never kick on the client, they could easily bypass that kick. If you really want to get rid of an exploiter on the client then try crashing them with something like:

while true do end