while(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:wait()and(car:FindFirstChild("\068\114\105\118\101\083\101\097\116")and character.Humanoid.SeatPart==car.DriveSeat)do if IsGrounded()then if movement.Y~=0 then local G=(humanoidRootPart.CFrame.lookVector*movement.Y)*stats.Speed.Value humanoidRootPart.Velocity=humanoidRootPart.Velocity:Lerp(G,.1)bodyVelocity.maxForce=Vector3.new(0,0,0)else bodyVelocity.maxForce=Vector3.new(mass/2,mass/4,mass/2)end local G=humanoidRootPart.CFrame:vectorToWorldSpace(Vector3.new((movement.Y*stats.Speed.Value)/50,0,(-humanoidRootPart.RotVelocity.Y*5)*movement.Y))local l=-(humanoidRootPart.CFrame:vectorToObjectSpace(humanoidRootPart.Velocity)).unit.Z rotation=rotation+math.rad((-stats.Speed.Value/5)*movement.Y)if math.abs(l)>.1 then G=G+humanoidRootPart.CFrame:vectorToWorldSpace(Vector3.new(0,(-movement.X*l)*stats.TurnSpeed.Value,0))bodyAngularVelocity.maxTorque=Vector3.new(0,0,0)else bodyAngularVelocity.maxTorque=Vector3.new(mass/4,mass/2,mass/4)end humanoidRootPart.RotVelocity=humanoidRootPart.RotVelocity:Lerp(G,.1)else bodyVelocity.maxForce=Vector3.new(0,0,0)bodyAngularVelocity.maxTorque=Vector3.new(0,0,0)end for G,l in pairs(car:GetChildren())do if l.Name=="\084\104\114\117\115\116\101\114"then UpdateThruster(l)end end end for G,l in pairs(car:GetChildren())do if l:FindFirstChild("\066\111\100\121\084\104\114\117\115\116")then l.BodyThrust:Destroy()end end bodyVelocity:Destroy()bodyAngularVelocity:Destroy()script:Destroy()

	while game:GetService("RunService").Heartbeat:wait() and car:FindFirstChild("DriveSeat") and character.Humanoid.SeatPart == car.DriveSeat do
		--game:GetService("RunService").RenderStepped:wait()
		if IsGrounded() then
			if movement.Y ~= 0 then
				local velocity = humanoidRootPart.CFrame.lookVector * movement.Y * stats.Speed.Value
				humanoidRootPart.Velocity = humanoidRootPart.Velocity:Lerp(velocity, 0.1)
				bodyVelocity.maxForce = Vector3.new(0, 0, 0)
			else
				bodyVelocity.maxForce = Vector3.new(mass / 2, mass / 4, mass / 2)
			end
			local rotVelocity = humanoidRootPart.CFrame:vectorToWorldSpace(Vector3.new(movement.Y * stats.Speed.Value / 50, 0, -humanoidRootPart.RotVelocity.Y * 5 * movement.Y))
			local speed = -humanoidRootPart.CFrame:vectorToObjectSpace(humanoidRootPart.Velocity).unit.Z
			rotation = rotation + math.rad((-stats.Speed.Value / 5) * movement.Y)
			if math.abs(speed) > 0.1 then
				rotVelocity = rotVelocity + humanoidRootPart.CFrame:vectorToWorldSpace((Vector3.new(0, -movement.X * speed * stats.TurnSpeed.Value, 0)))
				bodyAngularVelocity.maxTorque = Vector3.new(0, 0, 0)
			else
				bodyAngularVelocity.maxTorque = Vector3.new(mass / 4, mass / 2, mass / 4)
			end
			humanoidRootPart.RotVelocity = humanoidRootPart.RotVelocity:Lerp(rotVelocity, 0.1)
			
			--bodyVelocity.maxForce = Vector3.new(mass / 3, mass / 6, mass / 3)
			--bodyAngularVelocity.maxTorque = Vector3.new(mass / 6, mass / 3, mass / 6)
		else
			bodyVelocity.maxForce = Vector3.new(0, 0, 0)
			bodyAngularVelocity.maxTorque = Vector3.new(0, 0, 0)
		end
		
		for i, part in pairs(car:GetChildren()) do
			if part.Name == "Thruster" then
				UpdateThruster(part)
			end
		end
	end
	for i, v in pairs(car:GetChildren()) do
		if v:FindFirstChild("BodyThrust") then
			v.BodyThrust:Destroy()
		end
	end
	bodyVelocity:Destroy()
	bodyAngularVelocity:Destroy()
	--camera.CameraType = oldCameraType
	script:Destroy()