function module.Process(U,J,s,q,d,Y,V,g,w,n,A)local I={}local k={}local P=false local B=false if q==main.settings.UniversalPrefix then P=true end for J,s in pairs(J)do if J~=1 or s~="\112\108\097\121\101\114"or not P then table.insert(k,s)end end for J,q in pairs(k)do local U=s[J]if q=="\114\097\110\107"then local J=6 if U~=nil then for s,q in pairs(main.settings.Ranks)do local d=q[1]local Y=q[2]if string.lower(Y)==U then J=d break end end if J==6 then for s,q in pairs(main.settings.Ranks)do local d=q[1]local Y=q[2]if string.sub(string.lower(Y),1,#U)==U then J=d break end end end end U=J elseif q=="\099\111\108\111\117\114"or q=="\099\111\108\111\114"or q=="\099\111\108\111\114\051"then local J if U~=nil then local s={}U:gsub("\040\091\094\044\093\043\041",function(J)table.insert(s,tonumber(J))end)if#s==3 then J=Color3.fromRGB(s[1],s[2],s[3])else J=(main:GetModule("\099\102")):GetColorFromString(U)end end if not J then if d=="\108\097\115\101\114\069\121\101\115"then J=V.LaserColor else J=Color3.fromRGB(255,255,255)end end U=J elseif q=="\110\117\109\098\101\114"or q=="\105\110\116\101\103\101\114"or q=="\115\116\117\100\115"or q=="\115\112\101\101\100"or q=="\105\110\116\101\110\115\105\116\121"then U=tonumber(U)or 0 local J=main.settings.CommandLimits[d]if J then local s=J.Limit local d=J.IgnoreLimit if U>s and V.Rank<d then local J=(main:GetModule("\099\102")):GetRankName(d);(main:GetModule("\099\102")):FormatAndFireError(Y,"\067\111\109\109\097\110\100\076\105\109\105\116",q,s,J)B=true end end elseif q=="\098\111\111\108\101\097\110"then U=(U=="\111\110"or U=="\116\114\117\101")and true or false elseif q=="\118\097\108\117\101"then local J=tonumber(U)if J then U=J end elseif q=="\115\116\097\116"or q=="\115\116\097\116\110\097\109\101"then local J=""local s=Y:FindFirstChild("\108\101\097\100\101\114\115\116\097\116\115")if s then for s,q in pairs(s:GetChildren())do local d=string.lower(q.Name)if string.sub(d,1,#U)==U then J=q.Name break end end end U=J elseif q=="\115\099\097\108\101"then U=tonumber(U)or 1 local J=main.settings.ScaleLimit local s=main.settings.IgnoreScaleLimit if U>J and V.Rank<s then local q=(main:GetModule("\099\102")):GetRankName(s);(main:GetModule("\099\102")):FormatAndFireError(Y,"\083\099\097\108\101\076\105\109\105\116",J,q)B=true elseif U>50 then U=100 end elseif q=="\100\101\103\114\101\101\115"or q=="\100\101\103\114\101\101"or q=="\114\111\116\097\116\105\111\110"then U=tonumber(U)or 180 elseif q=="\116\101\097\109"then local J for s,q in pairs(main.teams:GetChildren())do local d=string.lower(q.Name)if string.sub(d,1,#U)==U then J=q break end end U=J elseif q=="\116\101\097\109\099\111\108\111\114"then local J for s,q in pairs(main.teams:GetChildren())do local d=string.lower(q.Name)if string.sub(d,1,#U)==U then J=q.TeamColor break end end U=J elseif q=="\116\101\120\116"or q=="\115\116\114\105\110\103"or q=="\114\101\097\115\111\110"or q=="\113\117\101\115\116\105\111\110"or q=="\116\101\097\109\110\097\109\101"or q=="\099\111\100\101"then local J,s=(string.lower(g)):find(w)if U then local J=string.sub(g,s+1)local d,V=(string.lower(J)):find(U,1,true)local w=string.sub(J,d)if A~=#n then local J=A+1 for s,q in pairs(n)do if s>=J then table.remove(n,J)end end end U=string.sub(U,1,420)if tonumber(w)or q=="\099\111\100\101"then U=w else U=(main:GetModule("\099\102")):FilterBroadcast(w,Y)end else U=" "end elseif q=="\097\110\115\119\101\114\115"then local J={}if U then U:gsub("\040\091\094\044\093\043\041",function(s)J[#J+1]=s end)U=J end elseif q=="\109\097\116\101\114\105\097\108"then local J=Enum.Material.Plastic for s,q in pairs(materials)do if U==string.sub(string.lower(q),1,#U)then J=Enum.Material[q]break end end U=J elseif q=="\117\115\101\114\105\100"or q=="\112\108\097\121\101\114\105\100"or q=="\112\108\114\105\100"then if U==nil then U=1 end local J=tonumber(U)if not J then local s=string.lower(U)for q,d in pairs(main.players:GetChildren())do local Y=string.lower(d.Name)if string.sub(Y,1,#s)==s then J=d.UserId end end if not J then J=(main:GetModule("\099\102")):GetUserId(U)end end U=J elseif q=="\116\111\111\108\115"or q=="\103\101\097\114\115"or q=="\116\111\111\108"or q=="\103\101\097\114"then local J=U U={}for s,q in pairs(main.listOfTools)do if J=="\097\108\108"or string.lower(string.sub(q.Name,1,#J))==J then table.insert(U,q)end end elseif q=="\109\111\114\112\104"then local J=U U=nil if J then for s,q in pairs(main.server.Morphs:GetChildren())do local d=string.lower(q.Name)if d==J then U=q break elseif string.sub(d,1,#J)==J then U=q end end end end if B then break end table.insert(I,U)end return I,B end return module
-- << FUNCTIONS >>
function module:Process(
	commandArgsReal,
	args,
	commandPrefix,
	commandName,
	speaker,
	speakerData,
	originalMessage,
	originalAlias,
	batches,
	batchPos
)
	local argsToReturn = {}
	local commandArgs = {}
	local UP = false
	local forceExit = false
	if commandPrefix == main.settings.UniversalPrefix then
		UP = true
	end
	for i, v in pairs(commandArgsReal) do
		if i ~= 1 or v ~= "player" or not UP then
			table.insert(commandArgs, v)
		end
	end
	for i, v in pairs(commandArgs) do
		local argToProcess = args[i]

		if v == "rank" then
			local finalRankId = 6 -- Any rank higher than 5 will not be given
			if argToProcess ~= nil then
				for _, rankDetails in pairs(main.settings.Ranks) do
					local rankId = rankDetails[1]
					local rankName = rankDetails[2]
					if string.lower(rankName) == argToProcess then
						finalRankId = rankId
						break
					end
				end
				if finalRankId == 6 then
					for _, rankDetails in pairs(main.settings.Ranks) do
						local rankId = rankDetails[1]
						local rankName = rankDetails[2]
						if string.sub(string.lower(rankName), 1, #argToProcess) == argToProcess then
							finalRankId = rankId
							break
						end
					end
				end
			end
			argToProcess = finalRankId
		elseif v == "colour" or v == "color" or v == "color3" then
			local finalColor
			if argToProcess ~= nil then
				local rgb = {}
				argToProcess:gsub("([^,]+)", function(c)
					table.insert(rgb, tonumber(c))
				end)
				if #rgb == 3 then
					finalColor = Color3.fromRGB(rgb[1], rgb[2], rgb[3])
				else
					finalColor = main:GetModule("cf"):GetColorFromString(argToProcess)
				end
			end
			if not finalColor then
				if commandName == "laserEyes" then
					finalColor = speakerData.LaserColor
				else
					finalColor = Color3.fromRGB(255, 255, 255)
				end
			end
			argToProcess = finalColor
		elseif v == "number" or v == "integer" or v == "studs" or v == "speed" or v == "intensity" then
			argToProcess = tonumber(argToProcess) or 0
			local limitDetails = main.settings.CommandLimits[commandName]
			if limitDetails then
				local limit = limitDetails.Limit
				local ingoreRank = limitDetails.IgnoreLimit
				if argToProcess > limit and speakerData.Rank < ingoreRank then
					local rankName = main:GetModule("cf"):GetRankName(ingoreRank)
					main:GetModule("cf"):FormatAndFireError(speaker, "CommandLimit", v, limit, rankName)
					forceExit = true
				end
			end
		elseif v == "boolean" then
			argToProcess = ((argToProcess == "on" or argToProcess == "true") and true) or false
		elseif v == "value" then
			local number = tonumber(argToProcess)
			if number then
				argToProcess = number
			end
		elseif v == "stat" or v == "statname" then
			local finalStatName = ""
			local leaderstats = speaker:FindFirstChild("leaderstats")
			if leaderstats then
				for _, stat in pairs(leaderstats:GetChildren()) do
					local statName = string.lower(stat.Name)
					if string.sub(statName, 1, #argToProcess) == argToProcess then
						finalStatName = stat.Name
						break
					end
				end
			end
			argToProcess = finalStatName
		elseif v == "scale" then
			argToProcess = tonumber(argToProcess) or 1
			local scaleLimit = main.settings.ScaleLimit
			local ignoreRank = main.settings.IgnoreScaleLimit
			if argToProcess > scaleLimit and speakerData.Rank < ignoreRank then
				local rankName = main:GetModule("cf"):GetRankName(ignoreRank)
				main:GetModule("cf"):FormatAndFireError(speaker, "ScaleLimit", scaleLimit, rankName)
				forceExit = true
			elseif argToProcess > 50 then
				argToProcess = 100
			end
			--
		elseif v == "degrees" or v == "degree" or v == "rotation" then
			argToProcess = tonumber(argToProcess) or 180
		elseif v == "team" then
			local selectedTeam
			for _, team in pairs(main.teams:GetChildren()) do
				local teamName = string.lower(team.Name)
				if string.sub(teamName, 1, #argToProcess) == argToProcess then
					selectedTeam = team
					break
				end
			end
			argToProcess = selectedTeam
		elseif v == "teamcolor" then
			local teamColor
			for _, team in pairs(main.teams:GetChildren()) do
				local teamName = string.lower(team.Name)
				if string.sub(teamName, 1, #argToProcess) == argToProcess then
					teamColor = team.TeamColor
					break
				end
			end
			argToProcess = teamColor
		elseif v == "text" or v == "string" or v == "reason" or v == "question" or v == "teamname" or v == "code" then
			local _, minStartPos = string.lower(originalMessage):find(originalAlias)
			if argToProcess then
				local newOriginalMessage = string.sub(originalMessage, minStartPos + 1)
				local startPos, endPos = string.lower(newOriginalMessage):find(argToProcess, 1, true)
				local message = string.sub(newOriginalMessage, startPos)
				if batchPos ~= #batches then
					local removeFrom = batchPos + 1
					for i, v in pairs(batches) do
						if i >= removeFrom then
							table.remove(batches, removeFrom)
						end
					end
				end
				argToProcess = string.sub(argToProcess, 1, 420) -- We don't people flooding items like titles with over 20,000 characters for example
				if tonumber(message) or v == "code" then
					argToProcess = message
				else
					argToProcess = main:GetModule("cf"):FilterBroadcast(message, speaker)
				end
			else
				argToProcess = " "
			end
		elseif v == "answers" then
			local newArgs = {}
			if argToProcess then
				argToProcess:gsub("([^,]+)", function(c)
					newArgs[#newArgs + 1] = c
				end)
				argToProcess = newArgs
			end
		elseif v == "material" then
			local finalMaterial = Enum.Material.Plastic
			for i, materialName in pairs(materials) do
				if argToProcess == string.sub(string.lower(materialName), 1, #argToProcess) then
					finalMaterial = Enum.Material[materialName]
					break
				end
			end
			argToProcess = finalMaterial
		elseif v == "userid" or v == "playerid" or v == "plrid" then
			if argToProcess == nil then
				argToProcess = 1
			end
			local userId = tonumber(argToProcess)
			if not userId then
				local userName = string.lower(argToProcess)
				for i, plr in pairs(main.players:GetChildren()) do
					local plrName = string.lower(plr.Name)
					if string.sub(plrName, 1, #userName) == userName then
						userId = plr.UserId
					end
				end
				if not userId then
					userId = main:GetModule("cf"):GetUserId(argToProcess)
				end
			end
			argToProcess = userId
		elseif v == "tools" or v == "gears" or v == "tool" or v == "gear" then
			local toolName = argToProcess
			argToProcess = {}
			for i, v in pairs(main.listOfTools) do
				if toolName == "all" or string.lower(string.sub(v.Name, 1, #toolName)) == toolName then
					table.insert(argToProcess, v)
				end
			end
		elseif v == "morph" then
			local morphName = argToProcess
			argToProcess = nil
			if morphName then
				for i, v in pairs(main.server.Morphs:GetChildren()) do
					local mName = string.lower(v.Name)
					if mName == morphName then
						argToProcess = v
						break
					elseif string.sub(mName, 1, #morphName) == morphName then
						argToProcess = v
					end
				end
			end
		end
		if forceExit then
			break
		end
		table.insert(argsToReturn, argToProcess)
	end

	return argsToReturn, forceExit
end

return module
