--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local car = script.Parent.Car.Value
local vl = script.Parent.Values

local strength = 350

local max = 4 --in sps

while wait() do
	if car.Body.Lights.BRAKE.Material ~= Enum.Material.Neon then
		if vl.Throttle.Value < 0.1 and vl.RPM.Value > 0 and vl.Velocity.Value.Magnitude < max and (math.abs(vl.Gear.Value) > 0) then
			car.Body.Creep.BV.MaxForce = Vector3.new(strength,0,strength)
		else
			car.Body.Creep.BV.MaxForce = Vector3.new(0,0,0)
		end
		car.Body.Creep.BV.Velocity = car.Body.Creep.CFrame.lookVector*(8*(math.min(vl.Gear.Value,1)))
	else
		car.Body.Creep.BV.Velocity = Vector3.new(0,0,0)
	end
end
