Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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.

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

1 comment

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.