--	elseif key == "u" then --Window controls
--		windows = not windows
--		rad(windows)

	elseif key == "[" then -- volume down
		if st then
			carSeat.CCS.Value = carSeat.CCS.Value-1
		else
			handler:FireServer('updateVolume', -0.5)
		end
	elseif key == "g" then -- volume up
		handler:FireServer('sr')
	elseif key == "]" then -- volume up
		if st then
			carSeat.CCS.Value = carSeat.CCS.Value+1
		else
			handler:FireServer('updateVolume', 0.5)
		end
	elseif key == "u" then --Mode Screen Switch
		swap()
	elseif key:byte() == 48 then -- CC
		st = true
	end
end)

mouse.KeyUp:connect(function (key)
    key = string.lower(key)
	if key:byte() == 48 then --Camera controls
		st = false
	end
end)

for i,v in pairs(HB:GetChildren()) do
	if v:IsA('ImageButton') then
		v.MouseButton1Click:connect(function()
			if carSeat.Windows:FindFirstChild(v.Name) then
				local v = carSeat.Windows:FindFirstChild(v.Name)
				if v.Value == true then
					handler:FireServer('updateWindows', v.Name, false)
				else
					handler:FireServer('updateWindows', v.Name, true)
				end
			end
		end)
	end
end

for i,v in pairs(HUB.Windows:GetChildren()) do
	if v:IsA('ImageButton') then
		v.MouseButton1Click:connect(function()
			if carSeat.Windows:FindFirstChild(v.Name) then
				local v = carSeat.Windows:FindFirstChild(v.Name)
				if v.Value == true then
					handler:FireServer('updateWindows', v.Name, false)
				else
					handler:FireServer('updateWindows', v.Name, true)
				end
			end
		end)
	end
end

HUB.Misc.CC.MouseButton1Click:connect(function()
	carSeat.CC.Value = not carSeat.CC.Value
	carSeat.CCS.Value = math.floor(carSeat.Velocity.Magnitude*mph)
end)

HUB.Misc.W.MouseButton1Click:connect(function()
	handler:FireServer('wws',carSeat.WS.Value,st)
	handler:FireServer('wwr',carSeat.WS.Value,st)
end)

HUB.Misc.SS.MouseButton1Click:connect(function()
	carSeat.SST.Value = not carSeat.SST.Value
end)
