So I am making a sword fight game and exploiters can use loopbring command even if its for client only the players get killed, the players get teleported for seconds its only seen on the exploiters client side but he is still able to kill them.
Does anyone have a script that would prevent this? I need it really bad
Like not make it possible for exploiters to bring any players even if its on their client only since it still kills the players, couldnt i just make it the players dont die??
Make sure your server performs a sanity check on the distance between the sword and the victim’s affected limb when you’re processing .Touched events for your swords.
Do you have a script for that? or should I use this one
Range = 7.5
for i,v in pairs(game.Workspace:GetChildren()) do
if v:FindFirstChild("Humanoid") and v:FindFirstChild("HitBox") then
local HitBox = v:FindFirstChild("HitBox")
local Human = v:FindFirstChild("Humanoid")
if HitBox and Human and HitBox ~= Character:FindFirstChild("HitBox") then
if (HumanoidRoot.Position - HitBox.Position).magnitude <= Range then
local detecting = Ray.new(HumanoidRoot.Position, HumanoidRoot.CFrame.LookVector * Range)
local hit,position = game.Workspace:FindPartOnRayWithIgnoreList(detecting, {HumanoidRoot})
if hit then
--Do stuff
end
end
end
end
end
You could check if players have a ping spike or use up more than average memory. I don’t know if this exploit can bypass the ping and memory check though.
I already got this and it doesnt work either because if it happens really quick they can just one hit the players and take all their points easily even if it means they get kicked in a second or two.
New idea, make a server script to loop check all the players health.
The one player that isn’t dead is most likely the exploiter. (Assuming they have god mode too.)
Edit: Don’t say you have instant respawn too lol.
Well wouldnt it be useless if the players are already killed? its like a steal time type of game so it would be already done and players would quit the game after a incident like this so hope you understand what i am saying.
Well if I’m understand correctly, when they die, their Humanoid Health drops to 0.
So check all of their healths and if all of the sudden, all but one drop to 0, you know what to do.
local Table = {}
local players = game.Players
while task.wait(0.5) do
for i, t, in pairs(Table) do
table.remove(Table,t)
end
for i, plr in pairs(players:GetPlayers()) do
if plr.Character ~= nil then
if plr.Character.Humanoid.Health == 0 then
table.insert(Table,plr)
end
end
end
--Also add another table for all characters to compare the lists.
end
If a player has 1k kills and he loses them because some exploiter killed him that would guarantee a rage quit moment or complains which is understandable and why I want a anticheat that prevents it