--How to do:
--Put BassParts in body
--And this script in DriverSeat
--Please make sure to have the songMod installed!


if script.Parent:IsA("VehicleSeat") then
	script.Parent.ChildAdded:connect(function(child)
		if child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
			local p= game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			local g= script.SendRgb:Clone()
			g.Parent=p.PlayerGui
			g.src.Value = script.RgbEvent
			g.Disabled = false	
		end
	end)
	script.Parent.ChildRemoved:Connect(function(child)
		if child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		local p=game.Players:GetPlayerFromCharacter(child.Part1.Parent).PlayerGui.SendRgb:Destroy()
		end
	end)
end

script.RgbEvent.OnServerEvent:Connect(function(plr)
	local body = script.Parent.Parent.Body
	if body:FindFirstChild("LightPart") then
		local lightPart = body:FindFirstChild("LightPart")
		if lightPart.PointLight.Enabled == false then
			lightPart.PointLight.Enabled = true
		else
			lightPart.PointLight.Enabled = false
		end
	end
end)
