What exactly is the use case here? The player could delete the script performing this check and you’d be back to square one.
By “studio” do you mean while the game is running, or when it is not?
What exactly is the use case here? The player could delete the script performing this check and you’d be back to square one.
By “studio” do you mean while the game is running, or when it is not?
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.
I hope this will do.
If your code is open for download, there is no way to protect its source.
Any checks you add can be disabled/deleted.
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.
I want to obfuscate the script when it’s fully done. So that’s why it’s still open.
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.
So it’s basically impossible? Or is/might (be) there a solution for that?
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)
Simply move all the whitelist check scripts to ServerScriptService
so the client won’t be able to access it.
You can make a plugin that will detect if something deletes:
game.DescendantRemoving:Connect(function(inst)
if inst:IsA("Script") then
source = inst.Source
print(source)
end
end)
to import this as plugin, you need to select script and click ‘Save as local plugin’
It wouldn’t work because client changes are not replicated to server, only to client so only local scripts can see client changes
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
I do understand what you are saying. Sorry I was going based on some image that was up above the forum.
Create a script with this in it:
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
if I’m correct, this is what you want?
You want to detect if script deletes in game or in studio? If in studio,plugin will work.
I know but op is looking for client deleted scripts
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.
^^ yea u can do that karsssssss
This has worked, thank you all guys for your help trying to solve this problem. As i look trough the responds, i see a lot of people thinking i had it about exploiters. That’s not really my thing; i ment that when i open the file in roblox studio and i delete the whitelist script. That there’s a script that’ll detect if it’s still there. If not, than it’ll just remove the main model.
But anyways, thank you all for your help!