-- Anti God
if Anti_Humanoid_Destroyer == true then
Character.ChildRemoved:Connect(function(Obj)
if Obj:IsA("Humanoid") then
LocalPlayer:Kick("No Exploits")
end
end)
end
-- Anti Health
if Anti_Health == true then
if Character.Humanoid.Health > Max_Health then
LocalPlayer:Kick("No Exploits")
end
end
Humanoid.Health property is automatically limited by humanoid.MaxHealth. Just check if their MaxHealth is greater than whatever limit you want. I don’t know about the “anti-god” part, but you automatically get respawned whenever your character is missing a humanoid. The weird thing is, if you delete your humanoid server-sided, this weird respawning behavior doesn’t happen. Also, changing your health from a LocalScript doesn’t replicate, so I wouldn’t bother with checking that.
Well, how do you think I should edit my script then, for anti god, for anti health I made if greater than Character.Humanoid.MaxHealth instead of my local. Oh and when I tested it with Kohl’s and set my health to 1000, it didn’t kick me.
Client side scripts (local scripts) cannot kick players, you also don’t need to worry about a players health unless your remote events have a vulnerability which means a client can call the server to edit their health - in which case you should really improve this.
In regards to the health being changed on the client side → it has no effect on server side operations aka they aren’t actually godded, they have the false impression.
I would just toss out the part where you check if a client is tampering with their health. You shouldn’t really care about “fe god” since it’s basically obsolete at this point. But if you wanted to, you can check if their humanoid is missing, using a server script
Defending through the client is a stupid method however as you can just delete the local script. Not to mention, yes you can mess with your own character but to little relevant effect mainly: because the server can easily pick up on any changes the client side makes. This can lead to a bunch of issues for themselves anyway.
If you really want to detect these though @node_modules1 :
Left you the check functions to write, if you don’t want them to do anything then obviously just place a kick statement (as sometimes it might be a server done event). We’ve used Descendant instead of Child incase they place it within any part of the character as its very easy to define new parents for malicious scripts.
I’m not exactly sure how your game works, but I might know how to fix your problem.
Now It wouldn’t exactly be a “ani-god” as such, but It might prevent them from using the humanoid godmode glitch.
If what you’re doing is humanoid:takedamage() or humanoid.Health = 20 add a check in server script form for if the humanoid is below 0.
If the humanoid is below 0 then you can break the players joints.
If you already do this then my advice might be usless to you.
anyway what I came up with is something along the lines of:
local Players = game:GetService("Players");
Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local humanoid = char:WaitForChild("Humanoid");
humanoid.Changed:connect(function(property)
if property == "Health" then
if humanoid.Health <= 0 then
char:BreakJoints();
end
end
end)
end)
end)
All of this code is made in the reply box and is untested. adjustments can be made, I think you should give it a try!
Yes, It is a server script. Essentially what it’s doing is checking if the humanoid on the server is below 0 and if it is, it will break the character’s joints in turn killing the clients humanoid.
You shouldn’t worry about it not working for a server-sided admin script, The thing I made is to prevent the exploit version (I tested it myself in studio using the command line)
Unfortunately, as @nulllifeleft pointed out, a client is capable of authoritatively replicating deletions in their character. Not sure if this is a bug or what but this has been reported on several occasions and still presently holds true. The server won’t treat a deleted Humanoid as still-existing.
It’s an intentional replication behavior, the player-can-delete-anything-in-their-character-and-it’ll-replicate behavior. The reason they can do this is because they are supposed to completely remove their character whenever they die, and I guess Roblox thought it’d be better if clients were responsible for removing their own characters. Probably for reducing the burden on the server or reducing latency or whatever.
Do you have any citation for that? I’m pretty sure the server is responsible for handling that, as they do virtually any other connections by clients to a server or assembling the character in the backend. Only physics and animations (via the Animator object) are supposed to be authoritatively replicated by a client regarding their character and that’s after the server has permitted them to do so.
It seems more like an issue of the workflow rather than server burden. I know that the server would be able to handle such a trivial task without much effort. It’s also why, if you’ve been in a slow-running server, characters don’t respawn for a while but you can still turn your camera around without lag.
I really hope it’s not intentional, because it’s very annoying.