--			b2.BrickColor = BrickColor.new("Pearl")
--			b2.Material = Enum.Material.SmoothPlastic

			end
		end
	elseif input.KeyCode == Enum.KeyCode.Z then if input.UserInputState == Enum.UserInputState.Begin then
		if hazards then return end
		left = not left
		right = false
		if relay then repeat wait() until not relay end
		while left do
			l1.BrickColor = BrickColor.new("Deep orange")
			l1.Material = Enum.Material.Neon
		--	l2.BrickColor = BrickColor.new("Deep orange")
		--	l2.Material = Enum.Material.Neon
			b1.BrickColor = BrickColor.new("Deep orange")
			b1.Material = Enum.Material.Neon
		--	runner.Material = Enum.Material.SmoothPlastic
		--	runner.BrickColor = BrickColor.new("Pearl")
			cr.DriveSeat.Indicator.Value = true
			cr.DriveSeat.LI.Value = true
			wait(1/3)
			l1.BrickColor = BrickColor.new("Pearl")
			l1.Material = Enum.Material.SmoothPlastic
			--l2.BrickColor = BrickColor.new("Pearl")
			--l2.Material = Enum.Material.SmoothPlastic
			cr.DriveSeat.Indicator.Value = false
			cr.DriveSeat.LI.Value = false
			if not headlt then
			b1.BrickColor = BrickColor.new("Pearl")
			b1.Material = Enum.Material.SmoothPlastic
			else
			b1.BrickColor = BrickColor.new("Pearl")
			b1.Material = Enum.Material.SmoothPlastic
			end
			wait(1/3)
			if not left then
		--	runner.Material = Enum.Material.Neon
		--	runner.BrickColor = BrickColor.new("Pearl")
				if brake then
					b1.Material = Enum.Material.Neon
					b1.BrickColor = BrickColor.new("Pearl")
				end
			end
		end end
	elseif input.KeyCode == Enum.KeyCode.X then if input.UserInputState == Enum.UserInputState.Begin then
		if hazards == false then
			hazards = true
			left = true
			right = true
		else
			hazards = false
			left = false
			right = false
		end
		if hazards then left = false right = false end
		if relay then repeat wait() until not relay end
		while hazards do
			l1.BrickColor = BrickColor.new("Deep orange")
			l1.Material = Enum.Material.Neon
		--	l2.BrickColor = BrickColor.new("Deep orange")
		--	l2.Material = Enum.Material.Neon
			r1.BrickColor = BrickColor.new("Deep orange")
			r1.Material = Enum.Material.Neon
		--	r2.BrickColor = BrickColor.new("Pearl")
		--	r2.Material = Enum.Material.Neon
			b1.BrickColor = BrickColor.new("New Yeller")
			b1.Material = Enum.Material.Neon
		--	runner.Material = Enum.Material.SmoothPlastic
			--runner.BrickColor = BrickColor.new("Pearl")
			--runner2.Material = Enum.Material.SmoothPlastic
			--runner2.BrickColor = BrickColor.new("Pearl")
			b2.BrickColor = BrickColor.new("New Yeller")
			b2.Material = Enum.Material.Neon
			cr.DriveSeat.Indicator.Value = true
			cr.DriveSeat.LI.Value = true
			cr.DriveSeat.RI.Value = true
			wait(1/3)
			l1.BrickColor = BrickColor.new("Pearl")
			l1.Material = Enum.Material.SmoothPlastic
			r1.BrickColor = BrickColor.new("Pearl")
			r1.Material = Enum.Material.SmoothPlastic
		--	l2.BrickColor = BrickColor.new("Pearl")
		--	l2.Material = Enum.Material.SmoothPlastic
		--	r2.BrickColor = BrickColor.new("Pearl")
		--	r2.Material = Enum.Material.SmoothPlastic
			b1.BrickColor = BrickColor.new("Pearl")
			b1.Material = Enum.Material.SmoothPlastic
			b2.BrickColor = BrickColor.new("Pearl")
			b2.Material = Enum.Material.SmoothPlastic
			cr.DriveSeat.Indicator.Value = false
			cr.DriveSeat.LI.Value = false
			cr.DriveSeat.RI.Value = false
			wait(1/3)
			if not hazards then
			--		runner.Material = Enum.Material.Neon
			--runner.BrickColor = BrickColor.new("Pearl")
		--	runner2.Material = Enum.Material.Neon
			--runner2.BrickColor = BrickColor.new("Pearl")
				if brake then
					b1.Material = Enum.Material.Neon
					b2.Material = Enum.Material.Neon
					b1.BrickColor = BrickColor.new("Pearl")
					b2.BrickColor = BrickColor.new("Pearl")
				end
			end
		end end
	elseif input.KeyCode == Enum.KeyCode.C then if input.UserInputState == Enum.UserInputState.Begin then
		if hazards then return end
		right = not right
		left = false
		if relay then repeat wait() until not relay end
		while right do
			r1.BrickColor = BrickColor.new("Deep orange")
			r1.Material = Enum.Material.Neon
		--	r2.BrickColor = BrickColor.new("Deep orange")
		--	r2.Material = Enum.Material.Neon
			b2.BrickColor = BrickColor.new("New Yeller")
			b2.Material = Enum.Material.Neon
			cr.DriveSeat.Indicator.Value = true
			cr.DriveSeat.RI.Value = true
		--	runner2.Material = Enum.Material.SmoothPlastic
		--	runner2.BrickColor = BrickColor.new("Pearl")
			wait(1/3)
			r1.BrickColor = BrickColor.new("New Yeller")
			r1.Material = Enum.Material.SmoothPlastic
		--	r2.BrickColor = BrickColor.new("Pearl")
			--r2.Material = Enum.Material.SmoothPlastic
			cr.DriveSeat.Indicator.Value = false
			cr.DriveSeat.RI.Value = false
			if not headlt then
			b2.BrickColor = BrickColor.new("Pearl")
			b2.Material = Enum.Material.SmoothPlastic
			else
			b2.BrickColor = BrickColor.new("Pearl")
			b2.Material = Enum.Material.SmoothPlastic
			end
			wait(1/3)
			if not right then 
		--		runner2.Material = Enum.Material.Neon
		--	runner2.BrickColor = BrickColor.new("Pearl")
				if brake then
					b2.Material = Enum.Material.Neon
					b2.BrickColor = BrickColor.new("Pearl")
				end
			end
		end end
	elseif input.KeyCode == Enum.KeyCode.L then if input.UserInputState == Enum.UserInputState.Begin then
		if headlt and not highlt then
			highlt = true
		elseif headlt and highlt then
			headlt = false
			highlt = false
		elseif not headlt then
			headlt = true
		end
		if highlt then
			hi.BrickColor = BrickColor.new("Institutional white")
			hi.Material = Enum.Material.Neon
			lwww.SpotLight.Enabled = true
			rb.BrickColor = BrickColor.new("Really red")
			rb.Material = Enum.Material.Neon
		elseif not highlt then
			hi.BrickColor = BrickColor.new("Pearl")
			hi.Material = Enum.Material.SmoothPlastic
			lwww.SpotLight.Enabled = false
			if not brake then
				rb.BrickColor = BrickColor.new("Crimson")
				rb.Material = Enum.Material.SmoothPlastic
			else
				rb.BrickColor = BrickColor.new("Crimson")
				rb.Material = Enum.Material.SmoothPlastic
			if not headlt then
				rb.BrickColor = BrickColor.new("Crimson")
				rb.Material = Enum.Material.SmoothPlastic
			else
				rb.BrickColor = BrickColor.new("Crimson")
				rb.Material = Enum.Material.SmoothPlastic
			end
			end
		end
		if headlt then
			lw.BrickColor = BrickColor.new("Pearl")
			lw.Material = Enum.Material.Neon
			lww.SpotLight.Enabled = true
			rb.BrickColor = BrickColor.new("Really red")
			rb.Material = Enum.Material.Neon
			if not highlt then
			rb.BrickColor = BrickColor.new("Really red")
			rb.Material = Enum.Material.Neon
			end
		elseif not headlt then
			lw.Material = Enum.Material.SmoothPlastic
			lww.SpotLight.Enabled = false
		end end
	end
end

is.InputBegan:connect(DealWithInput)
is.InputChanged:connect(DealWithInput)
is.InputEnded:connect(DealWithInput)

gr.Changed:connect(function()
	if gr.Value == -1 then
		rv.Material = Enum.Material.Neon
	else
		rv.Material = Enum.Material.SmoothPlastic
	end
end)
