How to make Anti-Teleport Hack?
If you can show soruce code it will help me alot
It’s not our responsibility as devforum members to provide you with scripts when you ask for them; you’re supposed to show US your code, as well as errors, and we will help you find a solution
Yeah as @lluckvy said not a good idea to just outright ask for source code especially with a complex topic like anti-exploits if you have done your research on #resources:community-resources and #resources:community-tutorials.
I think a simple one is this resource which just checks the players velocity and the players position and simply rubber bands them if they exceed a given speed or have teleported a far distance away. Of course it has its flaws but it should be a good starting point to work from in order to fit your game.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
RunService.Heartbeat:Wait()
local lastPos = nil
local Warnings = 0
local s
s = RunService.Heartbeat:Connect(function()
if not Character then
s:Disconnect()
return
end
if not Character:FindFirstChild("Humanoid") or not Character:FindFirstChild("HumanoidRootPart") then
Character:BreakJoints()
s:Disconnect()
return
end
if lastPos == nil then
lastPos = Character.HumanoidRootPart.Position
end
if (Character.HumanoidRootPart.Position - lastPos).Magnitude > 100 then
Warnings = Warnings +1
Character:MoveTo(lastPos)
if Warnings >= 8 then
Player:Kick("why")
end
return
end
lastPos = Character.HumanoidRootPart.Position
end)
end)
end)
6 Likes