local j=game.Players.LocalPlayer local F=j.Character or j.CharacterAdded:Wait()local I=false local n=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local w=script.Parent:WaitForChild("\086\097\108\117\101\115")local W=script.Parent.Car.Value local A=W:WaitForChild("\068\114\105\118\101\083\101\097\116")local k=W:WaitForChild("\083\116\097\114\116\101\100")local x=W:WaitForChild("\085\112\100\097\116\101")local v=require(W:WaitForChild("\065-\067\104\097\115\115\105\115 \084\117\110\101"))local e=script.Model.Value local m=w.Parent:WaitForChild("\073\115\079\110")m.Changed:Connect(function()if m.Value then k:FireServer(e,m)else k:FireServer(e,false)end end)A.ChildAdded:Connect(function()if v.AutoStart==true then k:FireServer(e,true)else k:FireServer(e,false)end end)A.ChildRemoved:Connect(function()k:FireServer(e,false)end)w.RPM.Changed:Connect(function()x:FireServer(e,"\082\080\077",w.RPM.Value,v.Redline)end)w.Gear.Changed:Connect(function()x:FireServer(e,"\071\101\097\114",w.Gear.Value)end)local z=coroutine.create(function()while wait()do if speedUnit=="\075\080\072"then script.Speed.Value=math.floor((F:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")).Velocity.Magnitude)x:FireServer(e,"\083\112\101\101\100",math.floor(script.Speed.Value*.9144))elseif speedUnit=="\077\080\072"then script.Speed.Value=math.floor((F:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")).Velocity.Magnitude)x:FireServer(e,"\083\112\101\101\100",math.floor((script.Speed.Value*.83333333333333)*.68181818181818))end end end)coroutine.resume(z)
-------------------------

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local timerStarted = false
local UIS = game:GetService("UserInputService")
local Values = script.Parent:WaitForChild("Values")
local car = script.Parent.Car.Value
local DriveSeat = car:WaitForChild("DriveSeat")
local Started = car:WaitForChild("Started")
local Update = car:WaitForChild("Update")
local Tune = require(car:WaitForChild("A-Chassis Tune"))
local Model = script.Model.Value
local IsOn = Values.Parent:WaitForChild("IsOn")

IsOn.Changed:Connect(function()
	if IsOn.Value then
		Started:FireServer(Model, IsOn)
	else
		Started:FireServer(Model, false)
	end
end)

DriveSeat.ChildAdded:Connect(function()
	if Tune.AutoStart == true then
		Started:FireServer(Model, true)
	else
		Started:FireServer(Model, false)
	end
end)

DriveSeat.ChildRemoved:Connect(function()
	Started:FireServer(Model, false)
end)

Values.RPM.Changed:Connect(function()
	Update:FireServer(Model, "RPM", Values.RPM.Value, Tune.Redline)
end)

Values.Gear.Changed:Connect(function()
	Update:FireServer(Model, "Gear", Values.Gear.Value)
end)

local cs = coroutine.create(function()
	while wait() do
		if speedUnit == "KPH" then
			script.Speed.Value = math.floor(char:WaitForChild("HumanoidRootPart").Velocity.Magnitude)
			Update:FireServer(Model, "Speed", math.floor(script.Speed.Value * ((10 / 12) * 1.09728)))
		elseif speedUnit == "MPH" then
			script.Speed.Value = math.floor(char:WaitForChild("HumanoidRootPart").Velocity.Magnitude)
			Update:FireServer(Model, "Speed", math.floor(script.Speed.Value * (10 / 12) * (60 / 88)))
		end
	end
end)
coroutine.resume(cs)
