What do you want to achieve?
What i want is that when a player removes a script in studio. A different script will detect it when entering play mode and it’ll do a function.
What is the issue?
I have tried creating some but it keeps failing.
What solutions have you tried so far?
I have searched on the web, such as; YouTube, DevForum, DevHub, and even asked people. But they couldn’t really helped me.
So the thing is this, the script “AnimationsHandler” is a whitelist, this is the script:
local UserID = 0 -- Put ID in here
if game.CreatorId == UserID then
print("Correct Owner")
elseif game.CreatorId ~= UserID then
script.Parent.Parent.Parent:Destroy()
end
You can easely remove the script to bypass the whitelist. And i don’t want that. I want it so if you delete it. Somewhere in a different script the same function will do when the script is deleted. (If the owner isn’t equal to the UserID)
So “Script” in the BR.Main Group should do that task.
If an exploiter tries to delete a Script that’s visible to them(not a LocalScript) it wont apply any real chances on the server. Also the exploiter can write code to keep script.Parent.Parent.Parent in game for their own client anyway. So you may need to find a solution to that instead.
Even if client deletes a script, the server won’t detect it, it doesn’t matter if you put a check on the server if their scripts are deleted, because changes from player client doesn’t replicate to the server, the server will still see the deleted existance.
Sanity checks, or you could put the delete check in a vital local script (yes, it can detect if other local scripts are deleted because it’s local, which means it’ll replicate) which is required for the game to work, which means if they delete the script in attempt to remove the anti cheat, it’ll break their side of the game. (i dont really use this, i dont know if it’ll work for your game)
They aren’t, so the best way to do this is to handle all the cars whitelist checks with 1 script, that’s stored in ServerScriptService. The client doesn’t have access to ServerScriptService meaning that they won’t be able to remove the script.
you dont get what i mean, i mean because literally the script would still see the scripts as existant even if the client removes them because client changes does not replicate to server, so the serverscript wouldnt know if script got deleted from client so its pointless
while wait(5) do
if workspace:FindFirstChild("ModelName"):FindFirstChild("ScriptName") == nil then --etc just go to the script
--do what you want if the script isn't there
end
end
In simple terms, you can’t fully stop this. However, you can make the exploiter’s time harder by checking if scripts are being deleted inside a very important script on the client so if they do delete it they will delete those other functions.