F.SignalLeft=function(X,G,A,l,T,q,H,k)if A then if not q then if G then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=0})A:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=1;Range=16})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=0})A:Play()for X,G in pairs(lights.LeftInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=1 G.Range=16 elseif G.Name=="\076\078"then G.Transparency=.02 end end end wait(X)else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})A:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=0,Range=0})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})A:Play()for X,G in pairs(lights.LeftInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end wait(X)end else if G then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=0})A:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A.Name=="\083\073"..tostring(k)then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.LeftInd:GetDescendants())do if G.Name=="\083\073"..tostring(k)then G.Transparency=.02 end end end else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})A:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if string.sub(A.Name,1,2)=="\083\073"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.LeftInd:GetDescendants())do if string.sub(G.Name,1,2)=="\083\073"then G.Transparency=1 end end end end end else if not q then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})A:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=0,Range=0})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.LeftInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end wait(X)else if G then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=0})A:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A.Name=="\083\073"..tostring(k)then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.LeftInd:GetDescendants())do if G.Name=="\083\073"..tostring(k)then G.Transparency=.02 end end end else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})A:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if string.sub(A.Name,1,2)=="\083\073"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.LeftInd:GetDescendants())do if string.sub(G.Name,1,2)=="\083\073"then G.Transparency=1 end end end end end end end F.SignalRight=function(X,G,A,l,T,q,H,k)if A then if not q then if G then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=0})A:Play()for X,A in pairs(lights.RightInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=1,Range=16})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=0})A:Play()for X,G in pairs(lights.RightInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=1 G.Range=16 elseif G.Name=="\076\078"then G.Transparency=.02 end end end wait(X)else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()for X,A in pairs(lights.RightInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=0;Range=0})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()for X,G in pairs(lights.RightInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end wait(X)end else if G then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=0})A:Play()for X,A in pairs(lights.RightInd:GetDescendants())do if A.Name=="\083\073"..tostring(k)then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.RightInd:GetDescendants())do if G.Name=="\083\073"..tostring(k)then G.Transparency=.02 end end end else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()for X,A in pairs(lights.RightInd:GetDescendants())do if string.sub(A.Name,1,2)=="\083\073"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.RightInd:GetDescendants())do if string.sub(G.Name,1,2)=="\083\073"then G.Transparency=1 end end end end end else if not q then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()for X,A in pairs(lights.RightInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=0,Range=0})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.RightInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end wait(X)else if G then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=0})A:Play()for X,A in pairs(lights.RightInd:GetDescendants())do if A.Name=="\083\073"..tostring(k)then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.RightInd:GetDescendants())do if G.Name=="\083\073"..tostring(k)then G.Transparency=.02 end end end else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()for X,A in pairs(lights.RightInd:GetDescendants())do if string.sub(A.Name,1,2)=="\083\073"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then for X,G in pairs(lights.RightInd:GetDescendants())do if string.sub(G.Name,1,2)=="\083\073"then G.Transparency=1 end end end end end end end F.Hazards=function(X,G,A,l,T,q,H,k)if A then if not q then if G then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=0})local T=TweenService:Create(l[6],G,{ImageTransparency=0})A:Play()T:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=1,Range=16})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end for X,A in pairs(lights.RightInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=1;Range=16})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=0})local T=TweenService:Create(l[6],G,{ImageTransparency=0})A:Play()T:Play()for X,G in pairs(lights.LeftInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=2 G.Range=16 elseif G.Name=="\076\078"then G.Transparency=0 end end for X,G in pairs(lights.RightInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=2 G.Range=16 elseif G.Name=="\076\078"then G.Transparency=0 end end end wait(X)else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})local T=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()T:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=0,Range=0})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end for X,A in pairs(lights.RightInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=0,Range=0})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})local T=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()T:Play()for X,G in pairs(lights.LeftInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end for X,G in pairs(lights.RightInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end wait(X)end else if G then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=0})local T=TweenService:Create(l[6],G,{ImageTransparency=0})A:Play()T:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A.Name=="\083\073"..tostring(k)then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end for X,A in pairs(lights.RightInd:GetDescendants())do if A.Name=="\083\073"..tostring(k)then local X=TweenService:Create(A,G,{Transparency=.02})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=0})local T=TweenService:Create(l[6],G,{ImageTransparency=0})A:Play()T:Play()for X,G in pairs(lights.LeftInd:GetDescendants())do if G.Name=="\083\073"..tostring(k)then G.Transparency=.02 end end for X,G in pairs(lights.RightInd:GetDescendants())do if G.Name=="\083\073"..tostring(k)then G.Transparency=.02 end end end wait(X)else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})local T=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()T:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if string.sub(A.Name,1,2)=="\083\073"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end for X,A in pairs(lights.RightInd:GetDescendants())do if string.sub(A.Name,1,2)=="\083\073"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})local T=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()T:Play()for X,G in pairs(lights.LeftInd:GetDescendants())do if string.sub(G.Name,1,2)=="\083\073"then G.Transparency=1 end end for X,G in pairs(lights.RightInd:GetDescendants())do if string.sub(G.Name,1,2)=="\083\073"then G.Transparency=1 end end end wait(X)end end else if not q then if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})local T=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()T:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=0;Range=0})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end for X,A in pairs(lights.RightInd:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local X=TweenService:Create(A,G,{Brightness=0,Range=0})X:Play()elseif A.Name=="\076\078"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})local T=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()T:Play()for X,G in pairs(lights.LeftInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end for X,G in pairs(lights.RightInd:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end wait(X)else if T=="\072\097\108\111\103\101\110"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})local T=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()T:Play()for X,A in pairs(lights.LeftInd:GetDescendants())do if string.sub(A.Name,1,2)=="\083\073"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end for X,A in pairs(lights.RightInd:GetDescendants())do if string.sub(A.Name,1,2)=="\083\073"then local X=TweenService:Create(A,G,{Transparency=1})X:Play()end end elseif T=="\076\069\068"then local G=TweenInfo.new(X/2.5,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local A=TweenService:Create(l[5],G,{ImageTransparency=1})local T=TweenService:Create(l[6],G,{ImageTransparency=1})A:Play()T:Play()for X,G in pairs(lights.LeftInd:GetDescendants())do if string.sub(G.Name,1,2)=="\083\073"then G.Transparency=1 end end for X,G in pairs(lights.RightInd:GetDescendants())do if string.sub(G.Name,1,2)=="\083\073"then G.Transparency=1 end end end wait(X)end end end F.Headlights=function(X,G,A,l)if l=="\072\097\108\111\103\101\110"then if X==0 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()if plactive then for G,A in pairs(lights.Headlights.Low:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0;Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.7})G:Play()end end for G,A in pairs(lights.Headlights.High:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0;Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=1})G:Play()end end elseif not plactive then for G,A in pairs(lights.Headlights:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0;Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=1})G:Play()end end end elseif X==1 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})l:Play()T:Play()for G,A in pairs(lights.Headlights.Low:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=2;Range=48})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.2})G:Play()end end elseif X==2 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()for G,A in pairs(lights.Headlights:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=3.5;Range=60})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.02})G:Play()end end elseif X==3 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()for G,A in pairs(lights.Headlights:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=4.25;Range=60})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.02})G:Play()end end end elseif l=="\076\069\068"then if X==0 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()if plactive then for X,G in pairs(lights.Headlights.Low:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=.7 end end for X,G in pairs(lights.Headlights.High:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end elseif not plactive then for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end elseif X==1 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})l:Play()T:Play()for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=2 G.Range=48 elseif G.Name=="\076\078"then G.Transparency=.2 end end elseif X==2 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=3.5 G.Range=60 elseif G.Name=="\076\078"then G.Transparency=.02 end end elseif X==3 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=4.25 G.Range=60 elseif G.Name=="\076\078"then G.Transparency=.02 end end end end end F.Popups=function(X,G)if G then local G=PHeadlights.Hinge:WaitForChild("\077\111\116\111\114")G.MaxVelocity=.08 if X then G.DesiredAngle=-0.9 elseif not X then G.DesiredAngle=0 end end end F.PopupLights=function(X,G,A,l)if l=="\072\097\108\111\103\101\110"then if X==0 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()if plactive then for G,A in pairs(PHeadlights.Parts.Headlights:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0,Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.7})G:Play()end end elseif not plactive then for G,A in pairs(PHeadlights.Parts.Headlights:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0,Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=1})G:Play()end end end elseif X==1 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})l:Play()T:Play()for G,A in pairs(PHeadlights.Parts.Headlights:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=2;Range=48})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.2})G:Play()end end elseif X==2 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()for G,A in pairs(PHeadlights.Parts.Headlights:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=3.5,Range=60})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.02})G:Play()end end elseif X==3 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()for G,A in pairs(PHeadlights.Parts.Headlights:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=4.25;Range=60})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.02})G:Play()end end end elseif l=="\076\069\068"then if X==0 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()if plactive then for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=.7 end end elseif not plactive then for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end elseif X==1 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})l:Play()T:Play()for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=2 G.Range=48 elseif G.Name=="\076\078"then G.Transparency=.2 end end elseif X==2 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=3.5 G.Range=60 elseif G.Name=="\076\078"then G.Transparency=.02 end end elseif X==3 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[1],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})local T=TweenService:Create(A[2],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()T:Play()for X,G in pairs(lights.Headlights:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=4.25 G.Range=60 elseif G.Name=="\076\078"then G.Transparency=.02 end end end end end F.FogLights=function(X,G,A,l)if X then if l=="\072\097\108\111\103\101\110"then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[4],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})l:Play()for G,A in pairs(lights.Fog:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=3.75;Range=60})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.02})G:Play()end end elseif l=="\076\069\068"then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[4],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})l:Play()for X,G in pairs(lights.Fog:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=3.75 G.Range=60 elseif G.Name=="\076\078"then G.Transparency=.02 end end end elseif not X then if l=="\072\097\108\111\103\101\110"then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[4],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()for G,A in pairs(lights.Fog:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0,Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=1})G:Play()end end elseif l=="\076\069\068"then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)local l=TweenService:Create(A[4],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})l:Play()for X,G in pairs(lights.Fog:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end end end F.ParkLights=function(X,G)if X then local X=TweenService:Create(G[3],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=0})X:Play()plactive=true else local X=TweenService:Create(G[3],TweenInfo.new(.05,Enum.EasingStyle.Quint),{ImageTransparency=1})X:Play()plactive=false end end F.BrakeLights=function(X,G,A)if A=="\072\097\108\111\103\101\110"then if X then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for G,A in pairs(lights.Brake:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=2.5;Range=38})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.02})G:Play()end end else local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for G,A in pairs(lights.Brake:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0,Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=1})G:Play()end end end elseif A=="\076\069\068"then if X then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for X,G in pairs(lights.Brake:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=3.5 G.Range=38 elseif G.Name=="\076\078"then G.Transparency=.02 end end else local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for X,G in pairs(lights.Brake:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end end end F.RearLights=function(X,G,A)if A=="\072\097\108\111\103\101\110"then if X==0 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)if plactive then for G,A in pairs(lights.Rear:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0;Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.7})G:Play()end end elseif not plactive then for G,A in pairs(lights.Rear:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0,Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=1})G:Play()end end end elseif X==1 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for G,A in pairs(lights.Rear:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=1.5;Range=25})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.2})G:Play()end end end elseif A=="\076\069\068"then if X==0 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)if plactive then for X,G in pairs(lights.Rear:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=.7 end end elseif not plactive then for X,G in pairs(lights.Rear:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end elseif X==1 then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for X,G in pairs(lights.Rear:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=1.5 G.Range=25 elseif G.Name=="\076\078"then G.Transparency=.2 end end end end end F.DashboardIndicators=function(X,G,A) end F.Reverse=function(X,G,A)if A=="\072\097\108\111\103\101\110"then if X then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for G,A in pairs(lights.Reverse:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=1;Range=20})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=.03})G:Play()end end else local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for G,A in pairs(lights.Reverse:GetDescendants())do if A:IsA("\083\112\111\116\076\105\103\104\116")then local G=TweenService:Create(A,X,{Brightness=0;Range=0})G:Play()elseif A.Name=="\076\078"then local G=TweenService:Create(A,X,{Transparency=1})G:Play()end end end elseif A=="\076\069\068"then if X then local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for X,G in pairs(lights.Reverse:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=1 G.Range=20 elseif G.Name=="\076\078"then G.Transparency=.03 end end else local X=TweenInfo.new(G,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)for X,G in pairs(lights.Reverse:GetDescendants())do if G:IsA("\083\112\111\116\076\105\103\104\116")then G.Brightness=0 G.Range=0 elseif G.Name=="\076\078"then G.Transparency=1 end end end end end F.IndsOnLeave=function(X,G,A,l,T,q,H)event.IndicatorsAfterLeave.Disabled=false wait()leaveseatevent:Fire(X,G,A,l,T,q,H)end event.OnServerEvent:Connect(function(X,G,...)F[G](...)end)


F.SignalLeft = function(flash_rate, state, active, tb, type, seq, max_segs, current_segment)
	if active then
		if not seq then
			if state then
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
						
					local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 0})
					gtwe:Play()			
			
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							local tw = TweenService:Create(child, t, {Brightness = 1, Range = 16})
							tw:Play()
						elseif child.Name == "LN" then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
					local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 0})
					gtwe:Play()	
					
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							child.Brightness = 1
							child.Range = 16
						elseif child.Name == "LN" then
							child.Transparency = 0.02
						end
					end				
				end	
				wait(flash_rate)
			else
				if type == "Halogen" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
				
					local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1})
					gtwe:Play()				
			
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
							tw:Play()
						elseif child.Name == "LN" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()	
						end
					end
				elseif type == "LED" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
					local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1})
					gtwe:Play()	
	
						for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							child.Brightness = 0
							child.Range = 0
						elseif child.Name == "LN" then
							child.Transparency = 1
						end
					end				
				end				
				wait(flash_rate)
			end
		else
			if state then
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 0})
					gtwe:Play()			

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							child.Transparency = 0.02	
						end
					end			
				end	
			else
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1})
					gtwe:Play()			

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							child.Transparency = 1	
						end
					end			
				end	
			end
		end
	else
		if not seq then
			if type == "Halogen" then
				local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
				local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1})
				gtwe:Play()				
	
				for idx, child in pairs(lights.LeftInd:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()		
					end
				end
			elseif type == "LED" then
				for idx, child in pairs(lights.LeftInd:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 1
					end
				end				
			end				
			wait(flash_rate)
		else
			if state then
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 0})
					gtwe:Play()			

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							child.Transparency = 0.02	
						end
					end			
				end	
			else
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[5], t, {ImageTransparency = 1})
					gtwe:Play()			

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							child.Transparency = 1	
						end
					end			
				end	
			end		
		end			
	end	
end

F.SignalRight = function(flash_rate, state, active, tb, type, seq, max_segs, current_segment)
	if active then
		if not seq then
			if state then
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 0})
					gtwe:Play()			

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							local tw = TweenService:Create(child, t, {Brightness = 1, Range = 16})
							tw:Play()
						elseif child.Name == "LN" then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 0})
					gtwe:Play()	

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							child.Brightness = 1
							child.Range = 16
						elseif child.Name == "LN" then
							child.Transparency = 0.02
						end
					end				
				end	
				wait(flash_rate)
			else
				if type == "Halogen" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1})
					gtwe:Play()				

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
							tw:Play()
						elseif child.Name == "LN" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()	
						end
					end
				elseif type == "LED" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1})
					gtwe:Play()	

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							child.Brightness = 0
							child.Range = 0
						elseif child.Name == "LN" then
							child.Transparency = 1
						end
					end				
				end				
				wait(flash_rate)
			end
		else
			if state then
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 0})
					gtwe:Play()			

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							child.Transparency = 0.02	
						end
					end			
				end	
			else
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1})
					gtwe:Play()			

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							child.Transparency = 1	
						end
					end			
				end	
			end
		end
	else
		if not seq then
			if type == "Halogen" then
				local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

				local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1})
				gtwe:Play()				

				for idx, child in pairs(lights.RightInd:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()		
					end
				end
			elseif type == "LED" then
				for idx, child in pairs(lights.RightInd:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 1
					end
				end				
			end				
			wait(flash_rate)
		else
			if state then
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 0})
					gtwe:Play()			

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							child.Transparency = 0.02	
						end
					end			
				end	
			else
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe = TweenService:Create(tb[6], t, {ImageTransparency = 1})
					gtwe:Play()			

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							child.Transparency = 1	
						end
					end			
				end	
			end		
		end			
	end	
end

F.Hazards = function(flash_rate, state, active, tb, type, seq, max_segs, current_segment)
	if active then
		if not seq then
			if state then
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
				
					local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 0})			
					local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 0})
					gtwe1:Play()				
					gtwe2:Play()				
					
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 1, Range = 16})
							tw:Play()
						elseif child.Name == "LN" then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()	
						end
					end
					
					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							local tw = TweenService:Create(child, t, {Brightness = 1, Range = 16})
							tw:Play()
						elseif child.Name == "LN" then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
					local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 0})			
					local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 0})
					gtwe1:Play()				
					gtwe2:Play()				
	
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							child.Brightness = 2
							child.Range = 16
						elseif child.Name == "LN" then
							child.Transparency = 0
						end
					end
					
					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							child.Brightness = 2
							child.Range = 16
						elseif child.Name == "LN" then
							child.Transparency = 0
						end
					end						
				end		
			
				wait(flash_rate)
			else
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1})			
					local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1})
					gtwe1:Play()				
					gtwe2:Play()				

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
							tw:Play()
						elseif child.Name == "LN" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()	
						end
					end

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
							tw:Play()
						elseif child.Name == "LN" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()
						end
					end
				elseif type == "LED" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
					local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1})			
					local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1})
					gtwe1:Play()				
					gtwe2:Play()				
	
					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							child.Brightness = 0
							child.Range = 0
						elseif child.Name == "LN" then
							child.Transparency = 1
						end
					end

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child:IsA("SpotLight") then
							child.Brightness = 0
							child.Range = 0
						elseif child.Name == "LN" then
							child.Transparency = 1
						end
					end						
				end				
				wait(flash_rate)		
			end
		else
			if state then
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 0})			
					local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 0})
					gtwe1:Play()				
					gtwe2:Play()				

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
					
					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							local tw = TweenService:Create(child, t, {Transparency = 0.02})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 0})			
					local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 0})
					gtwe1:Play()				
					gtwe2:Play()				

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							child.Transparency = 0.02		
						end
					end

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if child.Name == "SI"..tostring(current_segment) then
							child.Transparency = 0.02	
						end
					end					
				end		

				wait(flash_rate)
			else
				if type == "Halogen" then			
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1})			
					local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1})
					gtwe1:Play()				
					gtwe2:Play()				

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()		
						end
					end

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							local tw = TweenService:Create(child, t, {Transparency = 1})
							tw:Play()		
						end
					end
				elseif type == "LED" then
					local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

					local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1})			
					local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1})
					gtwe1:Play()				
					gtwe2:Play()				

					for idx, child in pairs(lights.LeftInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							child.Transparency = 1		
						end
					end

					for idx, child in pairs(lights.RightInd:GetDescendants()) do
						if string.sub(child.Name, 1, 2) == "SI" then
							child.Transparency = 1
						end	
					end					
				end		
				wait(flash_rate)
			end			
		end	
	else
		if not seq then
			if type == "Halogen" then			
				local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

				local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1})			
				local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1})
				gtwe1:Play()				
				gtwe2:Play()				
	
				for idx, child in pairs(lights.LeftInd:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()
					end
				end

				for idx, child in pairs(lights.RightInd:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()	
					end
				end
			elseif type == "LED" then
				local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
				local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1})			
				local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1})
				gtwe1:Play()				
				gtwe2:Play()				

				for idx, child in pairs(lights.LeftInd:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 1
					end
				end
	
				for idx, child in pairs(lights.RightInd:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 1
					end
				end						
			end				
			wait(flash_rate)
		else
			if type == "Halogen" then			
				local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

				local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1})			
				local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1})
				gtwe1:Play()				
				gtwe2:Play()				

				for idx, child in pairs(lights.LeftInd:GetDescendants()) do
					if string.sub(child.Name, 1, 2) == "SI" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()		
					end
				end

				for idx, child in pairs(lights.RightInd:GetDescendants()) do
					if string.sub(child.Name, 1, 2) == "SI" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()		
					end
				end
			elseif type == "LED" then
				local t = TweenInfo.new(flash_rate / 2.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

				local gtwe1 = TweenService:Create(tb[5], t, {ImageTransparency = 1})			
				local gtwe2 = TweenService:Create(tb[6], t, {ImageTransparency = 1})
				gtwe1:Play()				
				gtwe2:Play()				

				for idx, child in pairs(lights.LeftInd:GetDescendants()) do
					if string.sub(child.Name, 1, 2) == "SI" then
						child.Transparency = 1		
					end
				end

				for idx, child in pairs(lights.RightInd:GetDescendants()) do
					if string.sub(child.Name, 1, 2) == "SI" then
						child.Transparency = 1
					end	
				end					
			end		
			wait(flash_rate)
		end			
	end		
end

F.Headlights = function(state, fade_time, tb, type)
	if type == "Halogen" then
		if state == 0 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()
			
			if plactive then
				for idx, child in pairs(lights.Headlights.Low:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 0.7})
						tw:Play()	
					end
				end
				for idx, child in pairs(lights.Headlights.High:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()	
					end
				end
			elseif not plactive then
				for idx, child in pairs(lights.Headlights:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()	
					end
				end				
			end	
		elseif state == 1 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
			
			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			gtwe1:Play()
			gtwe2:Play()		
			
			for idx, child in pairs(lights.Headlights.Low:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 2, Range = 48})
					tw:Play()
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.2})
					tw:Play()	
				end
			end			
		elseif state == 2 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
			
			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()		
				
			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 3.5, Range = 60})
					tw:Play()
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.02})
					tw:Play()	
				end
			end				
		elseif state == 3 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()		

			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 4.25, Range = 60})
					tw:Play()
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.02})
					tw:Play()	
				end
			end				
		end
	elseif type == "LED" then
		if state == 0 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()

			if plactive then
				for idx, child in pairs(lights.Headlights.Low:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 0.7
					end
				end
				for idx, child in pairs(lights.Headlights.High:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 1
					end
				end
			elseif not plactive then
				for idx, child in pairs(lights.Headlights:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 1
					end
				end	
			end	
		elseif state == 1 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			gtwe1:Play()
			gtwe2:Play()	
			
			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 2
					child.Range = 48
				elseif child.Name == "LN" then
					child.Transparency = 0.2
				end
			end			
		elseif state == 2 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()		

			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 3.5
					child.Range = 60
				elseif child.Name == "LN" then
					child.Transparency = 0.02
				end
			end				
		elseif state == 3 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()		

			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 4.25
					child.Range = 60
				elseif child.Name == "LN" then
					child.Transparency = 0.02
				end
			end				
		end	
	end
end

F.Popups = function(state, enabled)
	if enabled then
		local motor = PHeadlights.Hinge:WaitForChild("Motor")
		motor.MaxVelocity = 0.08
		
		if state then
			motor.DesiredAngle = -0.9
		elseif not state then
			motor.DesiredAngle = 0
		end
	end
end

F.PopupLights = function(state, fade_time, tb, type)
	if type == "Halogen" then
		if state == 0 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()

			if plactive then
				for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 0.7})
						tw:Play()	
					end
				end
			elseif not plactive then
				for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()	
					end
				end				
			end	
		elseif state == 1 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			gtwe1:Play()
			gtwe2:Play()		

			for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 2, Range = 48})
					tw:Play()
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.2})
					tw:Play()	
				end
			end			
		elseif state == 2 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()		

			for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 3.5, Range = 60})
					tw:Play()
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.02})
					tw:Play()	
				end
			end				
		elseif state == 3 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()		

			for idx, child in pairs(PHeadlights.Parts.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 4.25, Range = 60})
					tw:Play()
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.02})
					tw:Play()	
				end
			end				
		end
	elseif type == "LED" then
		if state == 0 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()

			if plactive then
				for idx, child in pairs(lights.Headlights:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 0.7
					end
				end
			elseif not plactive then
				for idx, child in pairs(lights.Headlights:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency = 1
					end
				end	
			end	
		elseif state == 1 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			gtwe1:Play()
			gtwe2:Play()	

			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 2
					child.Range = 48
				elseif child.Name == "LN" then
					child.Transparency = 0.2
				end
			end			
		elseif state == 2 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()		

			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 3.5
					child.Range = 60
				elseif child.Name == "LN" then
					child.Transparency = 0.02
				end
			end				
		elseif state == 3 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[1], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			local gtwe2 = TweenService:Create(tb[2], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()
			gtwe2:Play()		

			for idx, child in pairs(lights.Headlights:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 4.25
					child.Range = 60
				elseif child.Name == "LN" then
					child.Transparency = 0.02
				end
			end				
		end			
	end	
end

F.FogLights = function(state, fade_time, tb, type)
	if state then
		if type == "Halogen" then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[4], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			gtwe1:Play()
			
			for idx, child in pairs(lights.Fog:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 3.75, Range = 60})
					tw:Play()
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.02})
					tw:Play()	
				end
			end				
		elseif type == "LED" then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[4], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
			gtwe1:Play()

			for idx, child in pairs(lights.Fog:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 3.75
					child.Range = 60
				elseif child.Name == "LN" then
					child.Transparency = 0.02
				end
			end				
		end
	elseif not state then
		if type == "Halogen" then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[4], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()

			for idx, child in pairs(lights.Fog:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
					tw:Play()
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 1})
					tw:Play()	
				end
			end				
		elseif type == "LED" then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			local gtwe1 = TweenService:Create(tb[4], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
			gtwe1:Play()

			for idx, child in pairs(lights.Fog:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 0
					child.Range = 0
				elseif child.Name == "LN" then
					child.Transparency = 1
				end
			end				
		end		
	end
end

F.ParkLights = function(state, tb)
	if state then
		local gtwe = TweenService:Create(tb[3], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0})
		gtwe:Play()
			
		plactive = true
	else
		local gtwe = TweenService:Create(tb[3], TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 1})
		gtwe:Play()			
		
		plactive = false
	end
end

F.BrakeLights = function(state, fade_time, type)
	if type == "Halogen" then
		if state then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
		
			for idx, child in pairs(lights.Brake:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 2.5, Range = 38})
					tw:Play()			
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.02})
					tw:Play()	
				end
			end			
		else
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
		
			for idx, child in pairs(lights.Brake:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
					tw:Play()			
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 1})
					tw:Play()	
				end
			end				
		end
	elseif type == "LED" then
		if state then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			for idx, child in pairs(lights.Brake:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 3.5
					child.Range = 38
				elseif child.Name == "LN" then
					child.Transparency = 0.02
				end
			end			
		else
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			for idx, child in pairs(lights.Brake:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 0
					child.Range = 0
				elseif child.Name == "LN" then
					child.Transparency = 1
				end
			end				
		end		
	end	
end

F.RearLights = function(state, fade_time, type)
	if type == "Halogen" then
		if state == 0 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
	
			if plactive then
				for idx, child in pairs(lights.Rear:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 0.7})
						tw:Play()	
					end
				end
			elseif not plactive then
				for idx, child in pairs(lights.Rear:GetDescendants()) do
					if child:IsA("SpotLight") then
						local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
						tw:Play()
					elseif child.Name == "LN" then
						local tw = TweenService:Create(child, t, {Transparency = 1})
						tw:Play()	
					end
				end				
			end				
		elseif state == 1 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
		
			for idx, child in pairs(lights.Rear:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 1.5, Range = 25})
					tw:Play()			
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.2})
					tw:Play()	
				end
			end			
		end
	elseif type == "LED" then
		if state == 0 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			if plactive then
				for idx, child in pairs(lights.Rear:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency  = 0.7	
					end
				end
			elseif not plactive then
				for idx, child in pairs(lights.Rear:GetDescendants()) do
					if child:IsA("SpotLight") then
						child.Brightness = 0
						child.Range = 0
					elseif child.Name == "LN" then
						child.Transparency  = 1
					end
				end				
			end				
		elseif state == 1 then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			for idx, child in pairs(lights.Rear:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 1.5
					child.Range = 25
				elseif child.Name == "LN" then
					child.Transparency  = 0.2
				end
			end			
		end	
	end
end	

F.DashboardIndicators = function(headlights, indicators, parklights)
	
end

F.Reverse = function(state, fade_time, type)
	if type == "Halogen" then
		if state then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
		
			for idx, child in pairs(lights.Reverse:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 1, Range = 20})
					tw:Play()			
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 0.03})
					tw:Play()	
				end
			end	
		else
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
			
			for idx, child in pairs(lights.Reverse:GetDescendants()) do
				if child:IsA("SpotLight") then
					local tw = TweenService:Create(child, t, {Brightness = 0, Range = 0})
					tw:Play()			
				elseif child.Name == "LN" then
					local tw = TweenService:Create(child, t, {Transparency = 1})
					tw:Play()	
				end
			end				
		end
	elseif type == "LED" then
		if state then
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			for idx, child in pairs(lights.Reverse:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 1
					child.Range = 20
				elseif child.Name == "LN" then
					child.Transparency = 0.03
				end
			end	
		else
			local t = TweenInfo.new(fade_time, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)

			for idx, child in pairs(lights.Reverse:GetDescendants()) do
				if child:IsA("SpotLight") then
					child.Brightness = 0
					child.Range = 0
				elseif child.Name == "LN" then
					child.Transparency = 1	
				end
			end				
		end		
	end	
end

F.IndsOnLeave = function(left, right, hazard, sequential, segs, fr, type)
	event.IndicatorsAfterLeave.Disabled = false
	wait()
	leaveseatevent:Fire(left, right, hazard, sequential, segs, fr, type)
end

event.OnServerEvent:Connect(function(pl, Fnc, ...)
	F[Fnc](...)
end)
