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)