--made by Bertox
--lul

local ts = game:GetService("TweenService")
local fadeDRL = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local fadeDRL2 = TweenInfo.new(4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local goal = {}
local goal2 = {}
local F = {}
local car = script.Parent.Parent.Parent.Parent

 script.Parent.Parent.Parent.Parent.Electrics.Changed:connect(function()
	if script.Parent.Parent.Parent.Parent.Electrics.Value == true then
		drlFade(true)
	else
		drlFade(false)
	end
end)

function drlFade(bool)
		if bool then
			goal2.Transparency = 0.8
			local a = ts:Create(car.Body.DRLs.DRL1, fadeDRL, goal2)
			a:Play()
		else
			goal2.Transparency = 1
			local a = ts:Create(car.Body.DRLs.DRL1, fadeDRL, goal2)
			a:Play()	
		end
	end

F.drlFade = function(bool)
	drlFade(bool)
end
