Im pretty sure you can parent it to the character or something to make it work even in the server
Even then, exploiters typically do not entirely delete the anti-cheat script. Things are usually hooked to return fake values to the anti-cheat. This isn’t to say that basic checks are worthless, and the exploiting community has gone downhill compared to how it used to be a few years ago. There’s very few people in that community now that actually know what they’re doing.
Tried it myself, the deletion seems to be prioritized more than the script unfortunately.
local MyScript = script
local connections = {}
local function close()
for _, connection in connections do
connection:Disconnect()
end
connections = nil
end
connections.Parent = MyScript:GetPropertyChangedSignal("Parent"):Connect(function()
print("I was moved..")
if MyScript.Parent == nil then
print("Possibly destroyed..")
end
close()
end)
connections.Destroying = MyScript.Destroying:Connect(function()
print("I'm being destroyed.")
close()
end)
afraid that’s easily bypassible:
--disables ALL RbxScriptConnections connected to that event
for _, connection in getconnections(MyScript:GetPropertyChangedSignal("Parent")) do
connection:Disable()
end
Im confused, you can recieve data from script to script?
If you plan to add a client anticheat system, i would not recommend a handshake (although i might stand biased by this point as i think they are completely detectable). You’d be better off just hiding your script as deeply as you can, although nothing is foolproof. I’d recommend getting a deeper understanding of how exploits, and Luau structures such as the stack, work before attempting to make a client anticheat.
that is exploit code. Exploits have much more power than standard LocalScripts, mainly because they inject their own C++ code into the engine. This allows for things such as retrieving all currently connected functions to an RBXScriptSignal, which is what the above code utilised.
you can like
put it in critical game scripts that completely break the game if removed (ex. all gui stops working in a gui-centric game)