local z=5 local y={RemoteFunction=20;RemoteEvent=10}local H={}local function d(z,d)local m=d.ClassName local X=y[m]if not H[z]then H[z]={}end local b=H[z][d]if not b then b=1 H[z][d]=b else H[z][d]=b+1 end if b>X then(main:GetModule("\099\102")):FormatAndFireError(z,"\082\101\113\117\101\115\116\115\076\105\109\105\116")if m=="\082\101\109\111\116\101\070\117\110\099\116\105\111\110"then wait(1)end return false end return true end;(coroutine.wrap(function()while true do wait(z)H={}end end))()

local remoteRefreshRate = 5
local remoteLimits = {
	["RemoteFunction"] = 20;
	["RemoteEvent"] = 10;
}
local sanityChecks = {}

local function checkRemoteLimit(player, remote)
	local remoteType = remote.ClassName
	local remoteLimit = remoteLimits[remoteType]
	if not sanityChecks[player] then
		sanityChecks[player] = {}
	end
	local requests = sanityChecks[player][remote]
	if not requests then
		requests = 1
		sanityChecks[player][remote] = requests
	else
		sanityChecks[player][remote] = requests + 1
	end
	if requests > remoteLimit then
		main:GetModule("cf"):FormatAndFireError(player, "RequestsLimit")
		if remoteType == "RemoteFunction" then
			wait(1)
		end
		return false
	end
	return true
end

coroutine.wrap(function()
	while true do
		wait(remoteRefreshRate)
		sanityChecks = {}
	end
end)()


