function Steering(w)local l=60/(1/w)if _MSteer then local w=math.max(1,(mouse.ViewSizeX*_Tune.Peripherals.MSteerWidth)/200)local l=_Tune.Peripherals.MSteerDZone/100 local R=(mouse.X-mouse.ViewSizeX/2)/w if math.abs(R)<=l then _GSteerT=0 else _GSteerT=(math.max(math.min(math.abs(R)-l,1-l),0)/(1-l))^_Tune.MSteerExp*(R/math.abs(R))end end _GSteerC=_GSteerC+(_GSteerT-_GSteerC)*(_Tune.LeanSpeed*l)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


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

