Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Riky47#3355's Anti-Cheat - v1.0
- -Driving Simulator
- ]]
- --[[
- local title = " -Riky47#3355's Anti-Cheat"
- local reason1 = "Auto-Farm or Ista-Win exploit!" .. title
- local reason2 = "Teleporting exploit!" .. title
- local maxDistance = 500 --Max magnitude distance in a Delay
- local Delay = 1 --Delay ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ]]
- local oneTime = true --Run only 1 time in the while loop
- --[[
- local function kick(reason)
- game:GetService("Players").LocalPlayer:Kick(reason)
- end
- ]]
- local function findCar()
- for _,v in pairs(game.Workspace['$cars']:GetChildren()) do
- if v:FindFirstChild("State") then
- if v.State.Driver.Value == game.Players.LocalPlayer then
- return v
- end
- end
- end
- end
- while wait() do
- local car = nil
- local car = findCar() --Define Player Car
- if car ~= nil then
- -- Check for BodyPosition part who move the car in Auto-Farm or Ista-Win Exploits
- for i,v in pairs(car.Body:FindFirstChild("PrimaryBody"):GetChildren()) do
- if v:IsA('BodyPosition') then
- kick(reason1)
- end
- end
- -- Check for car magnitude
- local pos = car.Body:FindFirstChild("PrimaryBody").Position
- wait(Delay)
- if (pos - car.Body:FindFirstChild("PrimaryBody").Position).Magnitude > maxDistance then
- kick(reason2)
- end
- end
- if oneTime then
- oneTime = false
- print("Running Riky47#3355's Anti-Cheat")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment