-- Decompiled with the Synapse X Luau decompiler.


return {
	Name = "run-lines", 
	Aliases = {}, 
	Description = "Splits input by newlines and runs each line as its own command. This is used by the init-run command.", 
	Group = "DefaultUtil", 
	Args = { {
			Type = "string", 
			Name = "Script", 
			Description = "The script to parse.", 
			Default = ""
		} }, 
	Run = function(p1, p2)
		if #p2 == 0 then
			return "";
		end;
		local v1 = p1.Dispatcher:Run("var", "INIT_PRINT_OUTPUT") ~= "";
		local v2, v3, v4 = ipairs((p2:gsub("\n+", "\n"):split("\n")));
		while true do
			v2(v3, v4);
			if not v2 then
				break;
			end;
			v4 = v2;
			if v3:sub(1, 1) ~= "#" then
				local v5 = p1.Dispatcher:EvaluateAndRun(v3);
				if v1 then
					p1:Reply(v5);
				end;
			end;		
		end;
		return "";
	end
};
