0% found this document useful (0 votes)
13 views2 pages

Spash API Integration with Monaco Editor

The document outlines a code implementation for a text editor that supports saving and opening Lua and text files, executing scripts, and clearing text. It includes methods for saving files with error handling, opening files, and injecting an API. Additionally, there is a function to terminate a Roblox session through the SpashAPIXeno class.

Uploaded by

dvmuniss
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Spash API Integration with Monaco Editor

The document outlines a code implementation for a text editor that supports saving and opening Lua and text files, executing scripts, and clearing text. It includes methods for saving files with error handling, opening files, and injecting an API. Additionally, there is a function to terminate a Roblox session through the SpashAPIXeno class.

Uploaded by

dvmuniss
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

MONACO:

string path = [Link]([Link],


"Editor", "[Link]");
[Link] = new Uri(path);

EXECUTE:
private async Task<string> Editorv()
{
string result = await [Link]("[Link]()");
return [Link](new
{
text = result
}.text).ToString();
}

EXECUTE2:
string editorvalue = await EditorV();
[Link](editorvalue);

CLEAR TEXT:

await [Link]($"SetText(``);");

SAVE FILE:

try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog
{
Filter = "Lua Files (*.lua)|*.lua|Text Files (*.txt)|*.txt",
DefaultExt = "lua",
Title = "Save Lua or Text File"
};

if ([Link]() == [Link])
{
string textToSave = await [Link]("GetText();");
string rawText = [Link]<string>(textToSave);
[Link]([Link], rawText);
}
}
catch (Exception ex)
{
[Link]($"Error saving file: {[Link]}", "Error",
[Link], [Link]);
}

OPEN FILE:

OpenFileDialog dialog = new OpenFileDialog();


[Link] = "Txt Files (*.txt)|*.txt|Lua Files (*.lua)|*.lua|All Files (*.*)|
*.*";

if ([Link]() == [Link])
{
string script = [Link]([Link]);
await [Link]($"[Link](`{script}`)");
}

Inject:
[Link]();

Kill Roblox:
[Link]();

You might also like