--		body.HB.BrickColor = bool and BrickColor.new("Pearl") or BrickColor.new("Black")
--		body.HB.Material = bool and "Neon" or "SmoothPlastic
--		body.L2.Light.Enabled = bool --if you want That Bright Lights.
	elseif lights == 'HB' then
		body.HB.Material = bool and "Neon" or "SmoothPlastic"
		body.HB.Light.Enabled = bool
	
	end
end


local b = ''

function Toggle(dir, tog)
	if dir == 'Left' then
		body.LeftIn.Material = tog and "Neon" or "Neon"
		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("Maroon")
		
		car.Misc.FL.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FL.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		car.DriveSeat.LI.Value = tog
	elseif dir == 'Right' then
		body.RightIn.Material = tog and "Neon" or "Neon"
		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("Maroon")
		body.RRight2.Material = tog and "Neon" or "SmoothPlastic"
		body.RRight2.BrickColor = tog and BrickColor.new("Really red") or BrickColor.new("Pearl")
		car.Misc.FR.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FR.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		
		car.DriveSeat.RI.Value = tog
	elseif dir == 'Hazards' then
		body.LeftIn.Material = tog and "Neon" or "Neon"
		body.LeftIn.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		car.Misc.FL.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FL.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		car.Misc.FR.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FR.Mirror.Ind.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("Maroon")
		
		body.RightIn.Material = tog and "Neon" or "Neon"
		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("Maroon")
		
		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.rv = function(bool)
	tk.RV.Material = bool and "Neon" or "SmoothPlastic"
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)