wait(.05)local R=script.Parent.Parent.Car.Value local C=script.Parent.Parent.Values.Brake function on()R.Body.Lights.RN.BrickColor=BrickColor.New("\077\097\114\111\111\110")R.Body.Lights.RN.Material=Enum.Material.Neon R.Body.Lights.Light.Material=Enum.Material.Neon R.Body.Lights.Light.Light.Enabled=true R.Body.Lights.Light.BrickColor=BrickColor.New("\073\110\115\116\105\116\117\116\105\111\110\097\108 \119\104\105\116\101")R.Body.Lights.RN.Light.Enabled=true function off()R.Body.Lights.Light.BrickColor=BrickColor.New("\068\097\114\107 \115\116\111\110\101 \103\114\101\121")R.Body.Lights.RN.Material=Enum.Material.SmoothPlastic R.Body.Lights.RN.BrickColor=BrickColor.New("\067\114\105\109\115\111\110")R.Body.Lights.Light.Light.Enabled=false R.Body.Lights.Light.Material=Enum.Material.SmoothPlastic R.Body.Lights.RN.Light.Enabled=false for R,C in pairs(R.Body.Lights:GetChildren())do if C.Name=="\076\105\103\104\116\050"then C.Material=Enum.Material.SmoothPlastic C.Light.Enabled=false end end end end function on2()for C,w in pairs(R.Body.Lights:GetChildren())do if w.Name=="\076\105\103\104\116\050"then w.Material=Enum.Material.Neon w.Light.Enabled=true for R,C in pairs(R.Body.Lights:GetChildren())do if C.Name=="\076\105\103\104\116"then C.BrickColor=BrickColor.new("\068\097\114\107 \115\116\111\110\101 \103\114\101\121")C.Material=Enum.Material.SmoothPlastic C.Light.Enabled=false end end end end end function auto()if game.Lighting:GetMinutesAfterMidnight()<390 or game.Lighting:GetMinutesAfterMidnight()>1050 then R.Body.Lights.Light.Material=Enum.Material.Neon R.Body.Lights.Light.Light.Enabled=true R.Body.Lights.RN.BrickColor=BrickColor.New("\066\114\105\103\104\116 \114\101\100")R.Body.Lights.RN.Light.Enabled=true else R.Body.Lights.RN.Light.Enabled=false R.Body.Lights.RN.Material=Enum.Material.SmoothPlastic R.Body.Lights.RN.BrickColor=BrickColor.New("\077\097\114\111\111\110")R.Body.Lights.Light.Light.Enabled=false R.Body.Lights.Light.Material=Enum.Material.SmoothPlastic end end script.Parent.MouseButton1Click:connect(function()if script.Parent.Text=="\076\105\103\104\116\115\058 \065\117\116\111"then on()script.Parent.Text="\076\105\103\104\116\115\058 \079\110 \040\049\041"elseif script.parent.Text=="\076\105\103\104\116\115\058 \079\110 \040\049\041"then on2()script.Parent.Text="\076\105\103\104\116\115\058 \079\110 \040\050\041"elseif script.Parent.Text=="\076\105\103\104\116\115\058 \079\110 \040\050\041"then off()script.Parent.Text="\076\105\103\104\116\115\058 \079\102\102"elseif script.parent.Text=="\076\105\103\104\116\115\058 \079\102\102"then auto()script.Parent.Text="\076\105\103\104\116\115\058 \065\117\116\111"end end)script.Parent.Parent.Values.Brake.Changed:connect(function()for R,w in pairs(R.Body.Lights:GetChildren())do if w.Name=="\082"then if w.Light.Enabled then if C.Value>0 then w.Transparency=0 w.Light.Brightness=12 w.Light.Range=15 else w.Transparency=.3 w.Light.Brightness=8 w.Light.Range=10 end else w.Transparency=0 if C.Value>0 then w.Material=Enum.Material.Neon else w.Material=Enum.Material.SmoothPlastic end end elseif w.Name=="\082\082"then if C.Value>0 then w.Material=Enum.Material.Neon if w.Light.Enabled then w.Transparency=1 else w.Transparency=0 end else w.Transparency=1 if w.Light.Enabled then w.Material=Enum.Material.Neon else w.Material=Enum.Material.SmoothPlastic end end end end end)game.Lighting.Changed:connect(auto)auto()
-- Remade by Truenus
wait(0.05)
local car = script.Parent.Parent.Car.Value
local GBrake = script.Parent.Parent.Values.Brake
function on()
	car.Body.Lights.RN.BrickColor = BrickColor.New("Maroon")
	car.Body.Lights.RN.Material = Enum.Material.Neon
	car.Body.Lights.Light.Material = Enum.Material.Neon
	car.Body.Lights.Light.Light.Enabled = true
	car.Body.Lights.Light.BrickColor = BrickColor.New("Institutional white")
	car.Body.Lights.RN.Light.Enabled = true
	function off()
		car.Body.Lights.Light.BrickColor = BrickColor.New("Dark stone grey")
		car.Body.Lights.RN.Material = Enum.Material.SmoothPlastic
		car.Body.Lights.RN.BrickColor = BrickColor.New("Crimson")
		car.Body.Lights.Light.Light.Enabled = false
		car.Body.Lights.Light.Material = Enum.Material.SmoothPlastic
		car.Body.Lights.RN.Light.Enabled = false
		for i, v in pairs(car.Body.Lights:GetChildren()) do
			if v.Name == "Light2" then
				v.Material = Enum.Material.SmoothPlastic
				v.Light.Enabled = false
			end
		end
	end
end
function on2()
	for i, v in pairs(car.Body.Lights:GetChildren()) do
		if v.Name == "Light2" then
			v.Material = Enum.Material.Neon
			v.Light.Enabled = true
			for i, v in pairs(car.Body.Lights:GetChildren()) do
				if v.Name == "Light" then
					v.BrickColor = BrickColor.new("Dark stone grey")
					v.Material = Enum.Material.SmoothPlastic
					v.Light.Enabled = false
				end
			end
		end
	end
end
function auto()
	if game.Lighting:GetMinutesAfterMidnight() < 390 or game.Lighting:GetMinutesAfterMidnight() > 1050 then
		car.Body.Lights.Light.Material = Enum.Material.Neon
		car.Body.Lights.Light.Light.Enabled = true
		car.Body.Lights.RN.BrickColor = BrickColor.New("Bright red")
		car.Body.Lights.RN.Light.Enabled = true
	else
		car.Body.Lights.RN.Light.Enabled = false
		car.Body.Lights.RN.Material = Enum.Material.SmoothPlastic
		car.Body.Lights.RN.BrickColor = BrickColor.New("Maroon")
		car.Body.Lights.Light.Light.Enabled = false
		car.Body.Lights.Light.Material = Enum.Material.SmoothPlastic
	end
end

script.Parent.MouseButton1Click:connect(function()
	if script.Parent.Text == "Lights: Auto" then
		on()
		script.Parent.Text = "Lights: On (1)"
	elseif script.parent.Text == "Lights: On (1)" then
		on2()
		script.Parent.Text = "Lights: On (2)"
	elseif script.Parent.Text == "Lights: On (2)" then
		off()
		script.Parent.Text = "Lights: Off"
	elseif script.parent.Text == "Lights: Off" then
		auto()
		script.Parent.Text = "Lights: Auto"
	end
end)

script.Parent.Parent.Values.Brake.Changed:connect(function()
	for i, v in pairs(car.Body.Lights:GetChildren()) do
		if v.Name == "R" then
			if v.Light.Enabled then
				if GBrake.Value > 0 then
					v.Transparency = 0
					v.Light.Brightness = 12
					v.Light.Range = 15
				else
					v.Transparency = 0.3
					v.Light.Brightness = 8
					v.Light.Range = 10
				end
			else
				v.Transparency = 0
				if GBrake.Value > 0 then
					v.Material = Enum.Material.Neon
				else
					v.Material = Enum.Material.SmoothPlastic
				end
			end
		elseif v.Name == "RR" then
			if GBrake.Value > 0 then
				v.Material = Enum.Material.Neon
				if v.Light.Enabled then
					v.Transparency = 1
				else
					v.Transparency = 0
				end
			else
				v.Transparency = 1
				if v.Light.Enabled then
					v.Material = Enum.Material.Neon
				else
					v.Material = Enum.Material.SmoothPlastic
				end
			end
		end
	end
end)

game.Lighting.Changed:connect(auto)
auto()
