Magnitude anti walkspeed check, issue with player jumping

The script works fine, if you’re moving too fast for your serverside walkspeed you’ll get moved to your original location. The only issue is you won’t get moved back if you’re jumping.

Essentially you can spam jump and set your walkspeed to 500 and you won’t get detected for exploiting.

I have a check in place to determine if the player is falling from a high place so they won’t get teleported back, but I can’t figure out a way to know which one is from jumping and which one is from falling. A player could also jump & fall off a high place, keep that in mind.

Any help would be amazing, as I’m currently stuck.

local Workspace = game:GetService("Workspace");

function GetCharacterPlatform(Character)
	if not Character:FindFirstChild("HumanoidRootPart") then
		return false;
	end;
	local NewRay = Ray.new(Character:FindFirstChild("HumanoidRootPart").CFrame.p, Vector3.new(0,-1,0).unit * 10);
	local Hit = Workspace:FindPartOnRay(NewRay, Character);
	if Hit then
		return true;
	else
		return false;
	end;
end;

function PossibleExploitation(Character)
	print(Character.HumanoidRootPart.Velocity.Magnitude/4)
	if ((Character.HumanoidRootPart.Velocity.Magnitude/4) > ((Character.Humanoid.WalkSpeed/4) + (10/4))) then
		return true;
	else
		return false;
	end;
end;

Players.PlayerAdded:Connect(function(Player)
	local a=false
	Player.CharacterAdded:Connect(function(Character)
		local Humanoid = Character:WaitForChild("Humanoid");
		wait(Players.RespawnTime/2);
		while true do
			local IndexedPosition = Character.HumanoidRootPart.Position;
			wait(1/4);
			if PossibleExploitation(Character) == true and a==false then
				if Character.Humanoid:GetState() ~= Enum.HumanoidStateType.FallingDown and Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall and Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Jumping and Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Landed then
					a=true
					Character:MoveTo(IndexedPosition);
					Character.Torso.Anchored = true;
					wait(0.25);
					Character.Torso.Anchored = false;
					wait(2)
					a=false
				else
					a=true
					wait((Character.HumanoidRootPart.Velocity.Magnitude/Character.Humanoid.WalkSpeed) + 1)
					a=false
					--check for freefall hax
				end;
			end;
		end;
	end);
end);```