Still have questions? Join our Discord server and get real time help.
Log in to vote

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

Asked by 6 months ago

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.
        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.

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!

This isn't that kind of site. DesertusX 430 — 6mo
scripting "helpers" ReallyUnikatni 68 — 6mo
eh DesertusX 430 — 6mo
This is not a place where you should release scripts. VitroxVox 786 — 6mo
Use 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.

Why was this question closed?

2 answers

Log in to vote
Answered by
AspectW 426 Moderation Voter
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
Log in to vote
Answered by 6 months ago

I would suggest it saying You were kicked for hacking instead of Tried to delete Anti exploit cause then they will come back with better script.

duck go quack quack HappyTimIsHim 637 — 6mo
LMAO Stop finding my Tim Lol just do my homework DuckyRobIox 280 — 6mo