---
if 	script.Parent.Parent.Parent.IsOn.Value then
	script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)
end

script.Parent.Parent.Parent.IsOn.Changed:connect(function()
	if script.Parent.Parent.Parent.IsOn.Value then
		script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)
	end
end)
	script.Parent.MouseButton1Click:connect(function()
		if car.Misc.Popups.Parts.L.L.L.Enabled == false then
			script.Parent.BackgroundColor3 = Color3.new(0,255/255,0)
			script.Parent.TextStrokeColor3 = Color3.new(0,255/255,0)
			car.Body.Lights.R.L.L.Enabled = true
			car.Misc.Popups.Parts.L.L.L.Enabled = true
			for index, child in pairs(car.Misc.Popups.Parts.L:GetChildren()) do
			child.Material = Enum.Material.Neon
			end
			for index, child in pairs(car.Body.Lights.R:GetChildren()) do
			child.Material = Enum.Material.Neon
			end
		elseif car.Misc.Popups.Parts.L.L.L.Enabled == true then
			script.Parent.BackgroundColor3 = Color3.new(0,0,0)
			script.Parent.TextStrokeColor3 = Color3.new(0,0,0)
			car.Body.Lights.R.L.L.Enabled = false
			car.Misc.Popups.Parts.L.L.L.Enabled = false
			for index, child in pairs(car.Misc.Popups.Parts.L:GetChildren()) do
			child.Material = Enum.Material.SmoothPlastic
			end
			for index, child in pairs(car.Body.Lights.R:GetChildren()) do
			child.Material = Enum.Material.SmoothPlastic
			end
		end
	end)
	
	script.Parent.Parent.Parent.Values.Brake.Changed:connect(function()
		if script.Parent.Parent.Parent.Values.Brake.Value ~= 1 and script.Parent.Parent.Parent.IsOn.Value then
			for index, child in pairs(car.Body.Lights.B:GetChildren()) do
			child.Material = Enum.Material.SmoothPlastic
			end
			car.Body.Lights.B.L.L.Enabled = false
			car.Body.a0.Enabled = false
			car.Body.a1.Enabled = false
			car.Body.a2.Enabled = false
			car.Body.a3.Enabled = false
			car.Body.a4.Enabled = false
			car.Body.a5.Enabled = false
			car.Body.a6.Enabled = false
			car.Body.a7.Enabled = false
			car.Body.a8.Enabled = false
			car.Body.a9.Enabled = false
			car.Body.a10.Enabled = false
			car.Body.a11.Enabled = false
			car.Body.a12.Enabled = false
			car.Body.a13.Enabled = false
			car.Body.a14.Enabled = false
			car.Body.a15.Enabled = false
			car.Body.a16.Enabled = false
		else
			for index, child in pairs(car.Body.Lights.B:GetChildren()) do
			child.Material = Enum.Material.Neon
			end
			car.Body.Lights.B.L.L.Enabled = true
			car.Body.a0.Enabled = true
			car.Body.a1.Enabled = true
			car.Body.a2.Enabled = true
			car.Body.a3.Enabled = true
			car.Body.a4.Enabled = true
			car.Body.a5.Enabled = true
			car.Body.a6.Enabled = true
			car.Body.a7.Enabled = true
			car.Body.a8.Enabled = true
			car.Body.a9.Enabled = true
			car.Body.a10.Enabled = true
			car.Body.a11.Enabled = true
			car.Body.a12.Enabled = true
			car.Body.a13.Enabled = true
			car.Body.a14.Enabled = true
			car.Body.a15.Enabled = true
			car.Body.a16.Enabled = true
		end
	end)
	
	script.Parent.Parent.Parent.Values.Gear.Changed:connect(function()
		if script.Parent.Parent.Parent.Values.Gear.Value == -1 then
			for index, child in pairs(car.Body.Lights.Rev:GetChildren()) do
			child.Material = Enum.Material.Neon
			car.DriveSeat.Reverse:Play()
			end
		else
			for index, child in pairs(car.Body.Lights.Rev:GetChildren()) do
			child.Material = Enum.Material.SmoothPlastic
			car.DriveSeat.Reverse:Stop()
			end
		end
	end)
	
	while wait() do
		if (car.DriveSeat.Velocity.magnitude/40)+0.300 < 1.3 then
		car.DriveSeat.Reverse.Pitch = (car.DriveSeat.Velocity.magnitude/40)+0.300
		car.DriveSeat.Reverse.Volume = (car.DriveSeat.Velocity.magnitude/150)	
		else
		car.DriveSeat.Reverse.Pitch = 1.3
		car.DriveSeat.Reverse.Volume = .2
		end
	end