Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make it so when an Exploiter Disables a LocalScript then it Kicks them?

Asked by
xJTv 2
2 years ago

Hello,

I am making some GUI stuff, that contains a local script under StarterPlayerScripts. I am wonder how do I make it so when an exploiter or the script it self gets Disabled it kicks them from the Game?

Thanks! -xJTv

2 answers

Log in to vote
0
Answered by 2 years ago

The only thing I could come up with, is to make another LocalScript in the same folder and name it something that you think they wouldn't be interested in, and name the other LocalScript (your script that you don't want them disabling) to something like "Anti-cheat" or something pretty obvious to them, making them most likely disable the script.

In the new LocalScript, try this...

local Script = script.Parent:WaitForChild('YOUR SCRIPT')

while true do
    wait()
    if Script.Disabled == true then
        local plr = game:GetService('Players').LocalPlayer
        plr:Kick('WHATEVER MESSAGE YOU WANT')
    end
end

I hope this helps. I can't think of a way to put this script inside the original LocalScript without it getting Disabled too early for it to execute the Kick part.

Ad
Log in to vote
0
Answered by
0hsa 193
2 years ago

better, make serverscript use remote events when a property is changed on a localscript and check if it's the same on the server, and if the remote-event sending localscript gets deleted it'll make a new one

0
Its impossible to check if the player has deleted or changed anything without the player being able to bypass that as well. There will always be a way to bypass a local anti-cheat. They could auto fire the remote event from their exploit and just delete the script. BulletproofVast 1033 — 2y

Answer this question