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