Not true. I made one a few months ago without even a year of coding experience.
It would be great if u could share it with us and it would also help to get the proper way
If they disable the script then server will not get any replies. If that happens kick the client simple. It’s not completely flawless but it will definitely take time to crack. Probably it might slow down the exploiter by about an hour.
If you make an intricate system with uses formulas and encryption use randomly timed FireAllClients and use multiple unreadable scripts the exploiter will have a hard time making an exploit. Nothing is ever perfect all you can do is slow them down.
v = x/t. x = the displacement (distance between both points) and t = time. WalkSpeed is the velocity that the player is moving at. Using this we can create a simple script that checks the velocity. If the velocity is higher than the WalkSpeed then we want to kick the player.
Example (sorry about the bad formatting)
local players = game:GetService("Players")
local waitTime = .5
local maxSpeed = 18
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local rootPart = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
local lastPosition = nil
wait(3) -- delays so it doesn't spike at the beginning
while wait(waitTime) do
if not lastPosition and rootPart then
lastPosition = rootPart.Position
elseif lastPosition and rootPart and humanoid.Health > 0 then
local position = rootPart.Position*Vector3.new(1, 0, 1)
local magnitude = math.round((lastPosition - position).Magnitude/waitTime)
print(magnitude)
if magnitude > maxSpeed then
player:Kick()
end
lastPosition = position
end
end
end)
end)
Thanks for the help.
I can’t really get the math there though where you are rounding up the result of the subtraction of position from the last position and dividing by the wait time.
Can you take some time to explain it?
Thanks again.
best way to do this is ditch the client. What you should do is have magnitude checks, and reset each position every time the player dies. If a player goes out of their limit, correct their position. This also acts as a anti-fling and teleportation script
Since velocity = x (distance between both points) / t (time taken between both points). We can plug in the variables with our values.
To find x, we need to identify the two positions. We also want to remove the Y-axis since it’s not affected by running.
local pointA = Vector3.new(32, 8, 29)*Vector3.new(1, 0, 1)
local pointB = Vector3.new(47, 8, 52)*Vector3.new(1, 0, 1)
-- in the other code, the variables are lastPosition and position
Once that’s done, we must find the distance between both points. I rounded it so that it would somewhat match the WalkSpeed. Flooring it might make it identical, but I haven’t tested that.
local magnitude = math.round((pointA - pointB).Magnitude)
-- this is x
Now we can plug the variables into the formula
local velocity = magnitude/overallTime -- if checking every 0.1 second, make this 0.1
-- if you use this in a while wait() loop, make the overallTime be the number in the wait()
Thanks for the clear explanation!
WalkSpeed changes from the client aren’t replicated to the server.
Making an intricate system with random forums and encryption is defeated if the exploiter makes their own script to send information back when the call is sent. Do not trust the client when designing an anti exploit system.
Sorry, I don’t think you understand what I am trying to say. It is impossible to fully stop exploiters. All we can do is slow them down.
Sure they can make a script, but how long would it take and how much effort would they need? Have you ever tried?
If you have you will know that it is impossible to have a perfect system. All we can do is slow them down.
Yes, all you can do is slow them down. However, you should not design a system that has a major flaw from the beginning. If you give an exploiter an easy path to alter important data needed to determine cheating, then you have done little to slow them down. If you instead calculate all information needed to find exploiters and then keep that script in a place where an exploiter cannot possibly see the source code, then they will have to guess at every step to see what is kicking them and how they can get around this.
So, how exactly would this work for Walkspeed?
Ignore WalkSpeed. Only look at two position values from different points in time to calculate how fast the user is moving and then kick them if they are traveling too fast.
Unfortunately it would break if the client lags too much, if the client glitches and if the client falls for example out of the map. Depending on the type of game you have you would also need to take into account vehicles too.
The more times you update the more strain you put on the server depending on the amount of players. The less strain you put the less secure it will be.
As you can see there is no perfect solution. So, I am just saying that it is sometimes easier to trust the client. Yes, it isn’t foolproof but it is a lot more hassle and and a lot more complex to make an exploit for.
Some things are unfeasible to check on the server too. For example, aimbotting. Something like that is impossible to check directly from the server.
Let’s just both agree that both our solutions have flaws that there is no perfect solution and that hackers must be banned.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.