Info:
Hi. I am currently working on an anticheat for speed hacks within my combat game i’m developing. Within the game, you are able to train a speed stat which influences the speed of a sprint mechanic along with other values. Here is how I calculate the speed of the sprint:
local totalSpeed = hum.Health / hum.MaxHealth * 10 + basespeed + stats.speed
This script is also within a local script otherwise the sprint would appear late due to latency
My goal:
My goal is to, within a server script, use the above equation as a value of max walkspeed. I would then use this max walkspeed value to estimate the max velocity a player should be moving at. If the actual velocity is far greater than the estimated velocity, then either kick the player or set the velocity to 0.
Issue:
I am unsure on how to estimate the velocity the player should be going at with the max walkspeed value.