wait(.05)local Z=script.Parent.Parent.Car.Value local w=script.Parent.Parent.Values.Brake local z=BrickColor.new("\073\110\115\116\105\116\117\116\105\111\110\097\108 \119\104\105\116\101")local A=BrickColor.new("\068\097\114\107 \115\116\111\110\101 \103\114\101\121")function LightOn()for w,A in pairs(Z.Body.Lights:GetChildren())do if A.Name=="\076\105\103\104\116"then A.BrickColor=z A.Material=Enum.Material.Neon A.Light.Enabled=true for Z,w in pairs(Z.Body.Lights:GetChildren())do if w.Name=="\082"then w.Material=Enum.Material.Neon w.Light.Enabled=true w.Transparency=.02 end end end end end function LightOff()for w,z in pairs(Z.Body.Lights:GetChildren())do if z.Name=="\076\105\103\104\116"then z.BrickColor=A z.Material=Enum.Material.SmoothPlastic z.Light.Enabled=false for Z,w in pairs(Z.Body.Lights:GetChildren())do if w.Name=="\082"then w.BrickColor=BrickColor.new("\077\097\114\111\111\110")w.Material=Enum.Material.SmoothPlastic w.Light.Enabled=false w.Transparency=0 end end end end end function Auto()if game.Lighting:GetMinutesAfterMidnight()<390 or game.Lighting:GetMinutesAfterMidnight()>1050 then LightOn()else LightOff()end end script.Parent.MouseButton1Click:connect(function()if script.Parent.Text=="\076\105\103\104\116\115\058 \065\117\116\111"then LightOn()script.Parent.Text="\076\105\103\104\116\115\058 \079\110"elseif script.Parent.Text=="\076\105\103\104\116\115\058 \079\110"then LightOff()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 Z,z in pairs(Z.Body.Lights:GetChildren())do if z.Name=="\082"then if z.Light.Enabled==true then if w.Value>0 then z.Transparency=0 z.Light.Brightness=12 z.Light.Range=15 z.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")else z.BrickColor=BrickColor.new("\077\097\114\111\111\110")z.Material=Enum.Material.Sand z.Transparency=.02 z.Light.Brightness=8 z.Light.Range=10 end else z.Transparency=0 if w.Value>0 then z.Material=Enum.Material.Neon z.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")else z.BrickColor=BrickColor.new("\077\097\114\111\111\110")z.Material=Enum.Material.Sand end end elseif z.Name=="\082\082"then if w.Value>0 then z.Material=Enum.Material.Neon if z.Light.Enabled then z.Transparency=1 else z.Transparency=0 end else z.Transparency=1 if z.Light.Enabled then z.Material=Enum.Material.Neon else z.Material=Enum.Material.Sand end end end end end)game.Lighting.Changed:connect(Auto)Auto()
-- Remade by Truenus(1)
wait(0.05)
local car = script.Parent.Parent.Car.Value
local GBrake = script.Parent.Parent.Values.Brake
local lighton = BrickColor.new("Institutional white")
local lightoff = BrickColor.new("Dark stone grey")
function LightOn()
	for i, v in pairs(car.Body.Lights:GetChildren()) do
		if v.Name == "Light" then
			v.BrickColor = lighton
			v.Material = Enum.Material.Neon
			v.Light.Enabled = true
			for i, v in pairs(car.Body.Lights:GetChildren()) do
				if v.Name == "R" then
					v.Material = Enum.Material.Neon
					v.Light.Enabled = true
					v.Transparency = 0.02
				end
			end
		end
	end
end

function LightOff()
	for i, v in pairs(car.Body.Lights:GetChildren()) do
		if v.Name == "Light" then
			v.BrickColor = lightoff
			v.Material = Enum.Material.SmoothPlastic
			v.Light.Enabled = false

			for i, v in pairs(car.Body.Lights:GetChildren()) do
				if v.Name == "R" then
					v.BrickColor = BrickColor.new("Maroon")
					v.Material = Enum.Material.SmoothPlastic
					v.Light.Enabled = false
					v.Transparency = 0
				end
			end
		end
	end
end
function Auto()
	if game.Lighting:GetMinutesAfterMidnight() < 390 or game.Lighting:GetMinutesAfterMidnight() > 1050 then
		LightOn()
	else
		LightOff()
	end
end
script.Parent.MouseButton1Click:connect(function()
	if script.Parent.Text == "Lights: Auto" then
		LightOn()
		script.Parent.Text = "Lights: On"
	elseif script.Parent.Text == "Lights: On" then
		LightOff()
		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 == true then
				if GBrake.Value > 0 then
					v.Transparency = 0
					v.Light.Brightness = 12
					v.Light.Range = 15
					v.BrickColor = BrickColor.new("Really red")
				else
					v.BrickColor = BrickColor.new("Maroon")
					v.Material = Enum.Material.Sand
					v.Transparency = 0.02
					v.Light.Brightness = 8
					v.Light.Range = 10
				end
			else
				v.Transparency = 0
				if GBrake.Value > 0 then
					v.Material = Enum.Material.Neon
					v.BrickColor = BrickColor.new("Really red")
				else
					v.BrickColor = BrickColor.new("Maroon")
					v.Material = Enum.Material.Sand
				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.Sand
				end
			end
		end
	end
end)

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