--[[
	Sends alert of type and message. If players is not specified, will send to everyone, else supports a single player, or a table of players.
]]

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local SendAlert = ReplicatedStorage.Remotes.SendAlert

return function(alertType, message, players)
	assert(message)

	if not players then
		SendAlert:FireAllClients(alertType, message)
	elseif typeof(players) == "table" then
		for _, player in pairs(players) do
			SendAlert:FireClient(player, alertType, message)
		end
	else
		SendAlert:FireClient(players, alertType, message)
	end
end
