Anti Exploit Script not fully working

Trying to add an Anti exploit to slow down/prevent exploiters in my game, I say “slow down/prevent” as this script is only a LocalScript so It’s very easy to bypass but I am not worried about that as this script is to slow down exploiters.

All the script works except for the anti btools script, which works IF it’s in a localscript by itself but it won’t work if it’s in a localscript with other scripts in it.

Script:

-- Anti Fly

local Players = game:GetService("Players")

local LocalPlayer = Players.LocalPlayer

repeat wait() until LocalPlayer.Character

repeat wait() until LocalPlayer:FindFirstChild("Backpack")

local Character = LocalPlayer.Character

local Backpack = LocalPlayer:WaitForChild("Backpack")

local Anti = script.Parent

local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")

HumanoidRootPart.ChildAdded:connect(function(obj)

if obj:IsA("BodyPosition") or obj:IsA("BodyVelocity") or obj:IsA("BodyGyro") then

obj:Destroy()

LocalPlayer:Kick("You have been kicked for use of exploits that gives you ability to fly.")

end

end)

-- Anti Walkspeed

while true do

wait(0.5)

if script.Parent:FindFirstChild("Humanoid").WalkSpeed > 17 then

game.Players.LocalPlayer:Kick("You have been kicked for use of exploits that change your walkspeed.")

end

end

-- Anti JumpPower

while true do

wait(0.5)

if script.Parent:FindFirstChild("Humanoid").JumpPower > 51 then

game.Players.LocalPlayer:Kick("You have been kicked for use of exploits that change your jump power.")

end

end

-- Anti Health modifications

while true do

wait(0.5)

if script.Parent:FindFirstChild("Humanoid").Health > 101 then

game.Players.LocalPlayer:Kick("You have been kicked for use of exploits that change your health.")

end

end

-- Anti Max Health modifications

while true do

wait(0.5)

if script.Parent:FindFirstChild("Humanoid").MaxHealth > 101 then

game.Players.LocalPlayer:Kick("You have been kicked for use of exploits that change your health.")

end

end

-- Anti HipHeight modifications

while true do

wait(0.5)

if script.Parent:FindFirstChild("Humanoid").HipHeight > 5 then

game.Players.LocalPlayer:Kick("You have been kicked for use of exploits that change your hip height.")

end

end

-- Anti max slope angle modifications

while true do

wait(0.5)

if script.Parent:FindFirstChild("Humanoid").MaxSlopeAngle > 90 then

game.Players.LocalPlayer:Kick("You have been kicked for use of exploits that change your max slope angle.")

end

end

local Player = game:GetService("Players")

local LocalPlayer = Player.LocalPlayer

local Backpack = LocalPlayer:WaitForChild("Backpack")

Backpack.ChildAdded:connect(function(Obj)

if Obj:IsA("HopperBin") then

LocalPlayer:kick("You have been kicked for use of exploits that gave you btools.")

end

end)

Maybe try make all your while true statements to coroutines?
But will be better if you remove them all and keep only one while, which will also contain statement about btools.

All of the scripts work counting the btools one it’s just the btools one does not work if it’s in the script with everything above that… Does removing all the while trues fix that?

I mean while true - main problem, but try print something after them all?
Also - use only
local Backpack = LocalPlayer:WaitForChild("Backpack")
you don’t need use
repeat wait() until LocalPlayer:FindFirstChild("Backpack")

1 Like

Thank you for leading me into the correct way of fixing the issue…

How I fixed it:

I changed the anti btools script to:

game:GetService("Players").LocalPlayer:WaitForChild("Backpack").ChildAdded:connect(function(Obj)
	if Obj:IsA("HopperBin") then
		game:GetService("Players").LocalPlayer:kick("You have been kicked for use of exploits that gave you btools.")
	end
end)

then I put that onto the top of the script, everything works as it should.

1 Like

Sorry to say but you can easily bypass this:

  • Deleting the anti exploit
  • Disabling the anti exploit
  • Hook function

Try remaking this serversided…