--		body.FB.BrickColor = bool and BrickColor.new("Pearl") or BrickColor.new("Fossil")
--		body.FB.Material = bool and "Neon" or "SmoothPlastic"
		
		hb(bool)
		
		body.RB.BrickColor = bool and BrickColor.new("Really red") or BrickColor.new("Crimson")
		body.RB.Material = bool and "Neon" or "SmoothPlastic"
		tk.RB.BrickColor = bool and BrickColor.new("Really red") or BrickColor.new("Crimson")
		tk.RB.Material = bool and "Neon" or "SmoothPlastic"
		body.FB.Light.Enabled = bool
		car.DriveSeat.Lights.Value = bool
	elseif lights == 'reverse' then
		body.RV.BrickColor = bool and BrickColor.new("Pearl") or BrickColor.new("Fossil")
		body.RV.Material = bool and "Neon" or "SmoothPlastic"
	end
end

function optwait(sec,opt)
	if opt then
		wait(sec)
	end
end

local b = ''

function Runner(dir,tog)
	if dir == 'Left' then
		body.LeftIn.Material = tog and "Neon" or "SmoothPlastic"
		body.LeftIn.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.L1.Material = tog and "Neon" or "SmoothPlastic"
		body.L1.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.L2.Material = tog and "Neon" or "SmoothPlastic"
		body.L2.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.L3.Material = tog and "Neon" or "SmoothPlastic"
		body.L3.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
	elseif dir == 'Right' then
		body.RightIn.Material = tog and "Neon" or "SmoothPlastic"
		body.RightIn.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.R1.Material = tog and "Neon" or "SmoothPlastic"
		body.R1.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.R2.Material = tog and "Neon" or "SmoothPlastic"
		body.R2.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.R3.Material = tog and "Neon" or "SmoothPlastic"
		body.R3.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
	elseif dir == 'Hazards' then
		body.LeftIn.Material = tog and "Neon" or "SmoothPlastic"
		body.LeftIn.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		body.RightIn.Material = tog and "Neon" or "SmoothPlastic"
		body.RightIn.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.L1.Material = tog and "Neon" or "SmoothPlastic"
		body.L1.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		body.R1.Material = tog and "Neon" or "SmoothPlastic"
		body.R1.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.L2.Material = tog and "Neon" or "SmoothPlastic"
		body.L2.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		body.R2.Material = tog and "Neon" or "SmoothPlastic"
		body.R2.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		
		body.L3.Material = tog and "Neon" or "SmoothPlastic"
		body.L3.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
		body.R3.Material = tog and "Neon" or "SmoothPlastic"
		body.R3.BrickColor = tog and BrickColor.new("Pearl") or BrickColor.new("Pearl")
	end
end

function Toggle(dir, tog)
	if dir == 'Left' then
		car.Misc.FL.Door.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FL.Door.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		car.DriveSeat.LI.Value = tog
		
		tk.l1.Material = tog and "Neon" or "SmoothPlastic"
		tk.l1.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.L1.Material = tog and "Neon" or "SmoothPlastic"
		body.L1.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		--optwait(1/27,tog)
		body.l2.Material = tog and "Neon" or "SmoothPlastic"
		body.l2.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.L2.Material = tog and "Neon" or "SmoothPlastic"
		body.L2.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		--optwait(1/27,tog)
		body.l3.Material = tog and "Neon" or "SmoothPlastic"
		body.l3.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.L3.Material = tog and "Neon" or "SmoothPlastic"
		body.L3.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
	elseif dir == 'Right' then
		car.Misc.FR.Door.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FR.Door.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		car.DriveSeat.RI.Value = tog
		
		tk.r1.Material = tog and "Neon" or "SmoothPlastic"
		tk.r1.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.R1.Material = tog and "Neon" or "SmoothPlastic"
		body.R1.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		--optwait(1/27,tog)
		body.r2.Material = tog and "Neon" or "SmoothPlastic"
		body.r2.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.R2.Material = tog and "Neon" or "SmoothPlastic"
		body.R2.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		--optwait(1/27,tog)
		body.r3.Material = tog and "Neon" or "SmoothPlastic"
		body.r3.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.R3.Material = tog and "Neon" or "SmoothPlastic"
		body.R3.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
	elseif dir == 'Hazards' then
		
		car.Misc.FL.Door.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FL.Door.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		car.Misc.FR.Door.Mirror.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FR.Door.Mirror.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		car.DriveSeat.LI.Value = tog
		car.DriveSeat.RI.Value = tog
		
		tk.l1.Material = tog and "Neon" or "SmoothPlastic"
		tk.l1.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		tk.r1.Material = tog and "Neon" or "SmoothPlastic"
		tk.r1.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.L1.Material = tog and "Neon" or "SmoothPlastic"
		body.L1.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.R1.Material = tog and "Neon" or "SmoothPlastic"
		body.R1.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		--optwait(1/27,tog)
		body.l2.Material = tog and "Neon" or "SmoothPlastic"
		body.l2.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.r2.Material = tog and "Neon" or "SmoothPlastic"
		body.r2.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.L2.Material = tog and "Neon" or "SmoothPlastic"
		body.L2.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.R2.Material = tog and "Neon" or "SmoothPlastic"
		body.R2.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		--optwait(1/27,tog)
		body.l3.Material = tog and "Neon" or "SmoothPlastic"
		body.l3.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.r3.Material = tog and "Neon" or "SmoothPlastic"
		body.r3.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.L3.Material = tog and "Neon" or "SmoothPlastic"
		body.L3.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.R3.Material = tog and "Neon" or "SmoothPlastic"
		body.R3.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
	end
end

function blink(typ)
	b = typ
	if blinking == true then
		blinking = false
	else
		blinking = true
		Runner(typ, false)
		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(typ, false)
		script.Parent:FireClient(player, 'blink', .9, false)
		wait(1/9)
		Runner(typ, true)
	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.drl = function(x)
	Runner('Hazards', x)
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)