--Mute players across different servers

local muteConnection = ms:SubscribeAsync(muteTopic, function(message)
	local targetId = message.Data[1]
	local muteLength = message.Data[2]

	for i, plr in pairs(game.Players:GetPlayers()) do
		if plr.UserId == targetId then
			
			channel:MuteSpeaker(plr.Name)

			task.wait(muteLength)
			if plr then
				channel:UnmuteSpeaker(plr.Name)
			end
		end
	end
end)