public static string DecompileScript(byte[] compiledScript) { var function = LoadScript(compiledScript); var decompiler = new Decompiler(function); decompiler.decompile(); try { var output = new StringOutput(); decompiler.print(output); return(output.GetOutput()); } catch (Exception ex) { Console.Error.WriteLine(ex.ToString()); return($"--[=====[\n" + $"Encountered exception in LuaDecompiler.DecompileScript:" + $"{ex}\n" + $"--]=====]"); } }