function module.Process(f,q,O,V,d,u,U,S,L,a,m)local i={}local X={}local Q=false local P=false if V==main.settings.UniversalPrefix then Q=true end for q,O in pairs(q)do if q~=1 or O~="\112\108\097\121\101\114"or not Q then table.insert(X,O)end end for q,V in pairs(X)do local f=O[q]if V=="\114\097\110\107"then local q=6 if f~=nil then for O,V in pairs(main.settings.Ranks)do local d=V[1]local u=V[2]if string.lower(u)==f then q=d break end end if q==6 then for O,V in pairs(main.settings.Ranks)do local d=V[1]local u=V[2]if string.sub(string.lower(u),1,#f)==f then q=d break end end end end f=q elseif V=="\099\111\108\111\117\114"or V=="\099\111\108\111\114"or V=="\099\111\108\111\114\051"then local q if f~=nil then local O={}f:gsub("\040\091\094\044\093\043\041",function(q)table.insert(O,tonumber(q))end)if#O==3 then q=Color3.fromRGB(O[1],O[2],O[3])else q=(main:GetModule("\099\102")):GetColorFromString(f)end end if not q then if d=="\108\097\115\101\114\069\121\101\115"then q=U.LaserColor else q=Color3.fromRGB(255,255,255)end end f=q elseif V=="\110\117\109\098\101\114"or V=="\105\110\116\101\103\101\114"or V=="\115\116\117\100\115"or V=="\115\112\101\101\100"or V=="\105\110\116\101\110\115\105\116\121"then f=tonumber(f)or 0 local q=main.settings.CommandLimits[d]if q then local O=q.Limit local d=q.IgnoreLimit if f>O and U.Rank<d then local q=(main:GetModule("\099\102")):GetRankName(d);(main:GetModule("\099\102")):FormatAndFireError(u,"\067\111\109\109\097\110\100\076\105\109\105\116",V,O,q)P=true end end elseif V=="\098\111\111\108\101\097\110"then f=(f=="\111\110"or f=="\116\114\117\101")and true or false elseif V=="\118\097\108\117\101"then local q=tonumber(f)if q then f=q end elseif V=="\115\116\097\116"or V=="\115\116\097\116\110\097\109\101"then local q=""local O=u:FindFirstChild("\108\101\097\100\101\114\115\116\097\116\115")if O then for O,V in pairs(O:GetChildren())do local d=string.lower(V.Name)if string.sub(d,1,#f)==f then q=V.Name break end end end f=q elseif V=="\115\099\097\108\101"then f=tonumber(f)or 1 local q=main.settings.ScaleLimit local O=main.settings.IgnoreScaleLimit if f>q and U.Rank<O then local V=(main:GetModule("\099\102")):GetRankName(O);(main:GetModule("\099\102")):FormatAndFireError(u,"\083\099\097\108\101\076\105\109\105\116",q,V)P=true elseif f>50 then f=100 end elseif V=="\100\101\103\114\101\101\115"or V=="\100\101\103\114\101\101"or V=="\114\111\116\097\116\105\111\110"then f=tonumber(f)or 180 elseif V=="\116\101\097\109"then local q for O,V in pairs(main.teams:GetChildren())do local d=string.lower(V.Name)if string.sub(d,1,#f)==f then q=V break end end f=q elseif V=="\116\101\097\109\099\111\108\111\114"then local q for O,V in pairs(main.teams:GetChildren())do local d=string.lower(V.Name)if string.sub(d,1,#f)==f then q=V.TeamColor break end end f=q elseif V=="\116\101\120\116"or V=="\115\116\114\105\110\103"or V=="\114\101\097\115\111\110"or V=="\113\117\101\115\116\105\111\110"or V=="\116\101\097\109\110\097\109\101"or V=="\099\111\100\101"then local q,O=(string.lower(S)):find(L)if f then local q=string.sub(S,O+1)local d,U=(string.lower(q)):find(f,1,true)local L=string.sub(q,d)if m~=#a then local q=m+1 for O,V in pairs(a)do if O>=q then table.remove(a,q)end end end if tonumber(L)or V=="\099\111\100\101"then f=L else f=(main:GetModule("\099\102")):FilterBroadcast(L,u)end else f=" "end elseif V=="\097\110\115\119\101\114\115"then local q={}if f then f:gsub("\040\091\094\044\093\043\041",function(O)q[#q+1]=O end)f=q end elseif V=="\109\097\116\101\114\105\097\108"then local q=Enum.Material.Plastic for O,V in pairs(materials)do if f==string.sub(string.lower(V),1,#f)then q=Enum.Material[V]break end end f=q elseif V=="\117\115\101\114\105\100"or V=="\112\108\097\121\101\114\105\100"or V=="\112\108\114\105\100"then if f==nil then f=1 end local q=tonumber(f)if not q then local O=string.lower(f)for V,d in pairs(main.players:GetChildren())do local u=string.lower(d.Name)if string.sub(u,1,#O)==O then q=d.UserId end end if not q then q=(main:GetModule("\099\102")):GetUserId(f)end end f=q elseif V=="\116\111\111\108\115"or V=="\103\101\097\114\115"or V=="\116\111\111\108"or V=="\103\101\097\114"then local q=f f={}for O,V in pairs(main.listOfTools)do if q=="\097\108\108"or string.lower(string.sub(V.Name,1,#q))==q then table.insert(f,V)end end elseif V=="\109\111\114\112\104"then local q=f f=nil if q then for O,V in pairs(main.server.Morphs:GetChildren())do local d=string.lower(V.Name)if d==q then f=V break elseif string.sub(d,1,#q)==q then f=V end end end end if P then break end table.insert(i,f)end return i,P 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
				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
