function Steering(F)local u=60/(1/F)if _MSteer then local F=math.max(1,(mouse.ViewSizeX*_Tune.Peripherals.MSteerWidth)/200)local u=_Tune.Peripherals.MSteerDZone/100 local A=(mouse.X-mouse.ViewSizeX/2)/F if math.abs(A)<=u then _GSteerT=0 else _GSteerT=(math.max(math.min(math.abs(A)-u,1-u),0)/(1-u))^_Tune.MSteerExp*(A/math.abs(A))end end _GSteerC=_GSteerC+(_GSteerT-_GSteerC)*(_Tune.LeanSpeed*u)bike.Body.bal.LeanGyro.cframe=CFrame.new(bike.Body.bal.CFrame.p,bike.Body.bal.CFrame.p+bike.Body.bal.CFrame.lookVector)*CFrame.Angles(0,0,(_GSteerC*_Tune.LeanProgressiveness)*(math.rad(_Tune.MaxLean)/(bike.DriveSeat.Velocity.Magnitude+_Tune.LeanProgressiveness))-_GSteerC*math.rad(_Tune.MaxLean))bike.FrontSection.TripleTreeHinge.SteeringGyro.CFrame=bike.Body.SteeringHinge.CFrame*CFrame.Angles(math.rad(_GSteerT*_Tune.SteerAngle),0,0)bike.FrontSection.TripleTreeHinge.SteeringGyro.MaxTorque=Vector3.new(_Tune.SteerMaxTorque*math.max((_Tune.LowSpeedCut-bike.DriveSeat.Velocity.Magnitude)/_Tune.LowSpeedCut,0)^2,0,0)end
--[[Steering]]

function Steering(dt)
	local deltaTime = (60 / (1 / dt))
	--Mouse Steer
	if _MSteer then
		local msWidth = math.max(1, mouse.ViewSizeX * _Tune.Peripherals.MSteerWidth / 200)
		local mdZone = _Tune.Peripherals.MSteerDZone / 100
		local mST = ((mouse.X - mouse.ViewSizeX / 2) / msWidth)
		if math.abs(mST) <= mdZone then
			_GSteerT = 0
		else
			_GSteerT = (math.max(math.min((math.abs(mST) - mdZone), (1 - mdZone)), 0) / (1 - mdZone)) ^ _Tune.MSteerExp
				* (mST / math.abs(mST))
		end
	end

	_GSteerC = (_GSteerC + ((_GSteerT - _GSteerC) * (_Tune.LeanSpeed * deltaTime)))

	--Apply Steering
	bike.Body.bal.LeanGyro.cframe = CFrame.new(
		bike.Body.bal.CFrame.p,
		bike.Body.bal.CFrame.p + bike.Body.bal.CFrame.lookVector
	) * CFrame.Angles(
		0,
		0,
		(
			(_GSteerC * _Tune.LeanProgressiveness)
				* (math.rad(_Tune.MaxLean) / (bike.DriveSeat.Velocity.Magnitude + _Tune.LeanProgressiveness))
			- (_GSteerC * math.rad(_Tune.MaxLean))
		)
	)

	--Apply Low Speed Steering
	bike.FrontSection.TripleTreeHinge.SteeringGyro.CFrame = bike.Body.SteeringHinge.CFrame
		* CFrame.Angles(math.rad(_GSteerT * _Tune.SteerAngle), 0, 0)
	bike.FrontSection.TripleTreeHinge.SteeringGyro.MaxTorque = Vector3.new(
		_Tune.SteerMaxTorque
			* ((math.max((_Tune.LowSpeedCut - bike.DriveSeat.Velocity.Magnitude) / _Tune.LowSpeedCut, 0)) ^ 2),
		0,
		0
	)
end
