--		body.L2.Light.Enabled = bool --if you want That Bright Lights.

	end
end

local b = ''

function Toggle(dir, tog)
	if dir == 'Left' then
		body.LeftIn.Material = tog and "Neon" or "SmoothPlastic"
		body.LeftIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		body.RLeft.Material = tog and "Neon" or "SmoothPlastic"
		body.RLeft.BrickColor = tog and BrickColor.new("Really red") or BrickColor.new("Ghost grey")
		
		car.DriveSeat.LI.Value = tog
	elseif dir == 'Right' then
		body.RightIn.Material = tog and "Neon" or "SmoothPlastic"
		body.RightIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		body.RRight.Material = tog and "Neon" or "SmoothPlastic"
		body.RRight.BrickColor = tog and BrickColor.new("Really red") or BrickColor.new("Ghost grey")
		
		
		car.DriveSeat.RI.Value = tog
	elseif dir == 'Hazards' then
		body.LeftIn.Material = tog and "Neon" or "SmoothPlastic"
		body.LeftIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		body.RLeft.Material = tog and "Neon" or "SmoothPlastic"
		body.RLeft.BrickColor = tog and BrickColor.new("Really red") or BrickColor.new("Ghost grey")
		
		body.RightIn.Material = tog and "Neon" or "SmoothPlastic"
		body.RightIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		body.RRight.Material = tog and "Neon" or "SmoothPlastic"
		body.RRight.BrickColor = tog and BrickColor.new("Really red") or BrickColor.new("Ghost grey")
		
		car.DriveSeat.LI.Value = tog
		car.DriveSeat.RI.Value = tog
	end
end

function blink(typ)
	b = typ
	if blinking == true then
		blinking = false
	else
		blinking = true
		while blinking do
			Toggle(typ, true)
			script.Parent:FireClient(player, 'blink', .9, true)
			wait(1/3)
			Toggle(typ, false)
			script.Parent:FireClient(player, 'blink', 0.8, true)
			wait(1/3)
		end
		Toggle('Hazards', false)
		script.Parent:FireClient(player, 'blink', .9, false)
	end
end

script.Parent.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") and BlinkersEnabled then
		if blinking == true and b == 'Hazards' then
			return
		else
			blinking = false
		end
	end
end)

F.blinkers = function(dir)
	blink(dir)
end

F.flash = function()
	Toggle('Hazards', true)
	wait(1/3)
	Toggle('Hazards', false)
end

script.Parent.OnServerEvent:connect(function(pl,Fnc,...)
	player = pl
	F[Fnc](...)
end)
