Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
Multiple codebase changes, use full api dump
Browse files Browse the repository at this point in the history
  • Loading branch information
regginator committed Feb 20, 2023
1 parent 296cc74 commit 89918cb
Show file tree
Hide file tree
Showing 44 changed files with 228 additions and 386 deletions.
2 changes: 1 addition & 1 deletion .darklua.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"generator": {
"name": "dense",
"column_span": 10000000000
"column_span": 2147483647
},
"rules": [
"convert_local_function_to_assign",
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.luau linguist-language=lua
*.*.luau linguist-language=lua
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
/*.rbxl
/*.rbxlx

# DarkLua minified src output
/dist

# Wally-installed packages (Use `wally.lock` for specific pkg version reinstallation)
/Packages
/ServerPackages
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"MD026": false,
"MD034": false,
"MD001": false
}
},
"luau-lsp.require.mode": "relativeToWorkspaceRoot"
}
62 changes: 21 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div align="center">
<!-- Logo -->
<a href="https://github.com/latte-soft/maui#gh-dark-mode-only">
<img width="250" src="assets/MauiLogo-DarkMode.svg#gh-dark-mode-only" alt="Maui Logo (Dark Mode)" />
<img width="250" src="assets/repo/MauiLogo-DarkMode.svg#gh-dark-mode-only" alt="Maui Logo (Dark Mode)" />
</a>
<a href="https://github.com/latte-soft/maui#gh-light-mode-only">
<img width="250" src="assets/MauiLogo-LightMode.svg#gh-light-mode-only" alt="Maui Logo (Light Mode)" />
<img width="250" src="assets/repo/MauiLogo-LightMode.svg#gh-light-mode-only" alt="Maui Logo (Light Mode)" />
</a>
<!-- Title/Desc -->
<h1>Maui</h1>
Expand All @@ -13,19 +13,19 @@
<!-- Direct links -->
<!-- Roblox marketplace -->
<a href="https://www.roblox.com/library/12071720464">
<img src="repo/social_icons/roblox_dev.svg" alt="Roblox Marketplace" />
<img src="assets/repo/social_icons/roblox_dev.svg" alt="Roblox Marketplace" />
</a>
<!-- GitHub releases -->
<a href="https://github.com/latte-soft/maui/releases">
<img src="repo/social_icons/github.svg" alt="GitHub Releases" />
<img src="assets/repo/social_icons/github.svg" alt="GitHub Releases" />
</a>
<!-- Latte Discord -->
<a href="https://latte.to/invite">
<img src="repo/social_icons/discord-icon.svg" alt="Latte Softworks Discord" />
<a href="https://latte.to/discord">
<img src="assets/repo/social_icons/discord-icon.svg" alt="Latte Softworks Discord" />
</a>
<!-- Latte Twitter -->
<a href="https://twitter.com/lattesoftworks">
<img src="repo/social_icons/twitter-icon.svg" alt="Latte Softworks Discord" />
<img src="assets/repo/social_icons/twitter-icon.svg" alt="Latte Softworks Discord" />
</a>
</p>
<p>
Expand Down Expand Up @@ -69,14 +69,6 @@ Maui is built with [LuaEncode](https://github.com/regginator/LuaEncode), another

The plugin, and **all** of its source code, will **always** be 100% free (as-in freedom) & open source, under the MIT License. You can download & build from source on the [GitHub repository](https://github.com/latte-soft/maui) (if you're worried about security or whatnot), or install a pre-built version directly from the [releases page](https://github.com/latte-soft/maui/releases). We *also* provide the plugin on Roblox's Developer Marketplace for ~250 Robux, if you want to support us, or just want automatic updates. With a self/pre-built version of the plugin, you're responsible for keeping it up-to-date in your plugins folder.

___

## Why the Name?

The name of this project was originally going to be "Eclipse", however, it turned out to be a *very* generic and overused name, used by multiple other Lua (Roblox) projects. ("Lua" means "Moon", yeah..) [Roblox's built-in scripting language](https://luau-lang.org) is named "Luau", which is a type of [traditional party/feast](https://en.wikipedia.org/wiki/L%C5%AB%CA%BBau) in Hawaiian culture. ["Maui"](https://en.wikipedia.org/wiki/Maui) is one of the largest islands in Hawaii, with [Luau parties throughout the year](https://mauiluau.com). Hence, a non-generic name!

___

## Installation

* Installation via Roblox Marketplace
Expand All @@ -89,22 +81,20 @@ ___

Goto the [latest release](https://github.com/latte-soft/maui/releases/lastest) on the GitHub repository, and download whichever file suites best. (`*.rbxm` is faster to load, and `*.rbxmx` is more readable.)

Do note, pre-built versions of Maui are always minified with [Darklua](https://darklua.com), a Lua formatter. It is **not** obfuscation, just minification.

If you don't know where your specific local-plugins folder is, in Studio, goto the "Plugins" tab via the ribbon-bar, and on the left there should be a "Plugins Folder" button, opening that will prompt the local plugins folder, where you will place the plugin in.

![Where the plugins folder is](repo/usage/where_plugins_folder_is.png)
![Where the plugins folder is](assets/repo/usage/where_plugins_folder_is.png)

* Building from Source

We provide a [`build.sh`](build.sh) script, however it will only work with a POSIX-compliant shell. You need everything in [`aftman.toml`](aftman.toml) installed, preferably with [Aftman](https://github.com/LPGhatguy/aftman).

The following instructions are just for building Maui as quickly as possible, in-case you can't use `build.sh`.

* Clone the Repository (**Recursively!** We have [submodules](submodules) in use)
* Clone the Repository

```txt
git clone https://github.com/latte-soft/maui.git --recursive && cd maui
git clone https://github.com/latte-soft/maui.git && cd maui
```
* Install Packages w/ Wally
Expand All @@ -121,35 +111,29 @@ ___
And you're done! You can place the built model file into your plugins folder
___
## Usage
In a new/existing Studio place, go to the *"Plugins"* tab from the ribbon-menu, and you'll see a button similar to this:
<img src="repo/usage/maui_in_plugins.png" alt="Maui in plugins tab" />
In a new/existing Studio place, go to the *"Plugins"* tab from the ribbon menu, and you'll see the plugin:
Upon toggle, you should automatically see the widget, which from there has more instructions in the console! It is *always* completely synced with **your** Studio's color palette theme, with Fusion components similar to Studio's look & feel.
<img src="assets/repo/usage/maui_in_plugins.png" alt="Maui in plugins tab" />
<img width="420" src="repo/usage/initial_gui_widget.png" alt="What the widget's GUI looks like" />
<img width="420" src="assets/repo/usage/initial_gui_widget.png" alt="What the widget's GUI looks like" />
From there, just select an object, and click "Build"! Due to LuaEncode's EXTREMELY fast speeds and optimization, Maui usually only takes a few *milliseconds* to create the output.
From there, just select an object, and click "Build"! Due to LuaEncode's fast speeds and optimization, Maui usually only takes a few *milliseconds* to create the output.
After the script is built, Maui should open the output script's editor window, and Maui will store information logs in the internal console.
After the script is built, Maui should open the output script's editor window, and Maui will store information logs in it's internal console.
<img width="600" src="repo/usage/built_script_example.png" alt="Example built-script output" />
<img width="600" src="assets/repo/usage/built_script_example.png" alt="Example built-script output" />
<img width="450" src="repo/usage/widget_gui_console.png" alt="Widget gui console output" />
<img width="450" src="assets/repo/usage/widget_gui_console.png" alt="Widget gui console output" />
From there, you're done! You can run it in a script utility, another script, place it into obfuscation, etc.. It's 100% portable, and will work in almost *any* Roblox environment!
Remember, because it **literally** packs a Roblox model, you need to have at least 1 `LocalScript` (client context) or `Script` (server context) to actually initialize what you want. You *can* configure this to ignore context like `Script.Disabled` or running a script in the wrong context in the [project format](#the-maui-project-format). By default, if you provide a `MainModule`, Maui will return the value from it with the exact same behavior as requiring a module by ID on Roblox.
##### *This is a simple test-script for using Fusion with an exploit, you can see the source [here](tests/HelloFusion), and example output [here](examples/MauiFusionDemo_2023-01-06_13-24-23.lua)*
<sup>*This is a simple test-script for using Fusion with an exploit, you can see the source [here](tests/HelloFusion), and example output [here](examples/MauiFusionDemo_2023-01-06_13-24-23.lua)*</sup>
<img width="775" src="repo/usage/example_script_execution.png" alt="Example of script being used" />
___
<img width="775" src="assets/repo/usage/example_script_execution.png" alt="Example of script being used" />
## The `maui` Script Global
Expand All @@ -174,21 +158,19 @@ Here's the *current* API reference:
* ### Get Real Script Object

```lua
<Instance: LuaSourceContainer> maui.GetScript(<void>)
<Instance: LuaSourceContainer> maui.Script
```

Returns the REAL script global from the closure that's currently running.

* ### Get Shared Environment Table

```lua
<table> maui.GetShared(<void>)
<table> maui.Shared
```

Returns a "shared" table for ALL closures in a Maui-generated script, so you don't need to the real `_G` or `shared`.

___

## The "`.maui`" Project Format

##### *This is really meant for more advanced projects/modules you're packing, and right now there really isn't much outside of minification options.*
Expand Down Expand Up @@ -252,8 +234,6 @@ You can *also* use [Rojo's JSON module feature](https://rojo.space/docs/v7/sync-

Still keep in mind, you need to include this file in your `*.project.json` file, if you're using Rojo.

___

## Contributing

*For now*, there really isn't any specific contribution instructions to follow. We're still working on our public Luau style-guide, so if you have an idea/implementation of something, show us your idea through an [issue](https://github.com/latte-soft/maui/issues) or [pull-request](https://github.com/latte-soft/maui/pulls)!
Expand Down
36 changes: 9 additions & 27 deletions THREAD.bbcode
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[size=xx-large][b]Maui — By Latte Softworks[/b][/size]
[size=large]Roblox Studio Plugin for Packing Modules as Executable Luau Scripts[/size]

[url=https://www.roblox.com/library/12071720464/Maui-Module-Packing-Serialization][img]https://cdn.discordapp.com/attachments/1060751075415687178/1060769983266836490/roblox_dev.svg[/img][/url] [url=https://github.com/latte-soft/maui/releases][img]https://cdn.discordapp.com/attachments/1060751075415687178/1060769982948048976/github.svg[/img][/url] [url=https://latte.to/invite][img]https://cdn.discordapp.com/attachments/1060751075415687178/1060769982612508753/discord-icon.svg[/img] [/url] [url=https://twitter.com/lattesoftworks][img]https://cdn.discordapp.com/attachments/1060751075415687178/1060769983560421416/twitter-icon.svg[/img][/url]
[url=https://www.roblox.com/library/12071720464/Maui-Module-Packing-Serialization][img]https://cdn.discordapp.com/attachments/1060751075415687178/1060769983266836490/roblox_dev.svg[/img][/url] [url=https://github.com/latte-soft/maui/releases][img]https://cdn.discordapp.com/attachments/1060751075415687178/1060769982948048976/github.svg[/img][/url] [url=https://latte.to/discord][img]https://cdn.discordapp.com/attachments/1060751075415687178/1060769982612508753/discord-icon.svg[/img] [/url] [url=https://twitter.com/lattesoftworks][img]https://cdn.discordapp.com/attachments/1060751075415687178/1060769983560421416/twitter-icon.svg[/img][/url]

[hr][/align]

Expand All @@ -15,28 +15,13 @@ Maui is built with [url=https://github.com/regginator/LuaEncode]LuaEncode[/url],

[hr]

[size=x-small][i]You can skip reading this if you want to..[/i][/size]
[size=x-large][b]Preface[/b][/size]
Ever since the very simple beginnings of script development on this platform, we've all followed a fairly similar, basic way of writing and distributing scripts as a whole. We've had minor changes over the years with things like more complex obfuscation and auth systems, but for the most part, it's still quite the same overall; write everything in one script, and distribute. For tools/libraries made by script devs, this often isn't very organized, or [i]secure[/i] for that matter.

There have been fairly [i]similar[/i] solutions to these issues in the past like [url=https://v3rmillion.net/showthread.php?tid=1162252]"luapack"[/url] and [url=https://github.com/richie0866/rbxm-suite]"rbxm-suite"[/url], however, they usually only solved part of a problem, and either worked against the Roblox environment, or were just too impractical/had too many issues in production.

While the previous way of doing things is not necessarily [i]bad[/i], and can actually be quite useful for small/simple projects, it's not always efficent for proper code organization or development in general. These days, we also have MANY awesome, professional tools created by Roblox's OSS community like [url=https://rojo.space]Rojo[/url] and [url=https://wally.run]Wally[/url] [size=xx-small]sorry, wally[/size], and even libraries such as [url=https://github.com/Roblox/roact]React[/url], [url=https://github.com/Elttob/Fusion]Fusion[/url], and [url=https://github.com/evaera/roblox-lua-promise]Promise[/url].

[b]Do note, Maui is very-much in its' early stages! You may find small bugs, and we do not yet have all of the features implemented that we want to. It's better to just get it out, and update from there![/b]

[size=small][i]Please read [b]this[/b], though[/i][/size]
[size=x-large][b]Also..[/b][/size]
[size=large][b]Also..[/b][/size]
[b]The first thing you may be wondering if you clicked on the [i]"Get it on Roblox"[/i] button before reading this[/b] is probably something along the lines of [b]"Why is this a paid plugin?"[/b]. Well, it [i]is[/i] and it [i]isn't[/i]. Let me explain.

The plugin, and [b]all[/b] of its source code, will [b]always[/b] be 100% free (as-in freedom) & open source, under the MIT License. You can download & build from source on the [url=https://github.com/latte-soft/maui]GitHub repository[/url] (if you're worried about security or whatnot), or install a pre-built version directly from the [url=https://github.com/latte-soft/maui/releases]releases page[/url]. We [i]also[/i] provide the plugin on Roblox's Developer Marketplace for ~250 Robux, if you want to support us, or just want automatic updates. With a self/pre-built version of the plugin, you're responsible for keeping it up-to-date in your plugins folder.

[hr]

[size=x-large][b]Why the Name?[/b][/size]
The name of this project was originally going to be "Eclipse", however, it turned out to be a [i]very[/i] generic and overused name, used by multiple other Lua (Roblox) projects. ("Lua" means "Moon", yeah..) [url=https://luau-lang.org]Roblox's built-in scripting language[/url] is named "Luau", which is a type of [url=https://en.wikipedia.org/wiki/L%C5%AB%CA%BBau]traditional party/feast[/url] in Hawaiian culture. [url=https://en.wikipedia.org/wiki/Mau]"Maui"[/url] is one of the largest islands in Hawaii, with [url=https://mauiluau.com]Luau parties throughout the year[/url]. Hence, a non-generic name!

[hr]
[size=x-large][b]Installation & Getting Started[/b][/size]

[spoiler="Installation via Roblox Marketplace"]
Expand All @@ -48,9 +33,8 @@ From there, just "Install" the plugin in Studio from Roblox!
[spoiler="Installation via GitHub Releases"]
Goto the [url=https://github.com/latte-soft/maui/releases/lastest]latest release[/url] on the GitHub repository, and download whichever file suites best. ([font=Courier New]*.rbxm[/font] is faster to load, and [font=Courier New]*.rbxmx[/font] is more readable.)

Do note, pre-built versions of Maui are always minified with [url=https://darklua.com]Darklua[/url], a Lua formatter. It is [b]not[/b] obfuscation, just minification.

If you don't know where your specific local-plugins folder is, in Studio, goto the "Plugins" tab via the ribbon-bar, and on the left there should be a "Plugins Folder" button, opening that will prompt the local plugins folder, where you will place the plugin in.
If you don't know where your specific local-plugins folder is, in Studio, goto the "Plugins" tab via the ribbon-bar, and on the left there s
hould be a "Plugins Folder" button, opening that will prompt the local plugins folder, where you will place the plugin in.

[img]https://media.discordapp.net/attachments/1060751075415687178/1060993996060631050/image.png[/img]
[/spoiler]
Expand All @@ -62,17 +46,15 @@ For building directly from source, you can view the latest build instructions in


[size=large][b]Usage[/b][/size]
In a new/existing Studio place, go to the [i]"Plugins"[/i] tab from the ribbon-menu, and you'll see a button similar to this:
In a new/existing Studio place, go to the [i]"Plugins"[/i] tab from the ribbon menu, and you'll see the plugin:

[img]https://media.discordapp.net/attachments/1060751075415687178/1060815232076873728/image.png[/img]

Upon toggle, you should automatically see the widget, which from there has more instructions in the console! It is [i]always[/i] completely synced with [b]your[/b] Studio's color palette theme, with Fusion components similar to Studio's look & feel.

[img=420x259]https://media.discordapp.net/attachments/1060751075415687178/1060817600243830845/image.png[/img]

From there, just select an object, and click "Build"! Due to LuaEncode's EXTREMELY fast speeds and optimization, Maui usually only takes a few [i]milliseconds[/i] to create the output.
From there, just select an object, and click "Build"! Due to LuaEncode's fast speeds and optimization, Maui usually only takes a few [i]milliseconds[/i] to create the output.

After the script is built, Maui should open the output script's editor window, and Maui will store information logs in the internal console.
After the script is built, Maui should open the output script's editor window, and Maui will store information logs in it's internal console.

[img=600x256]https://media.discordapp.net/attachments/1060751075415687178/1060818298213777418/image.png?width=1069&height=456[/img]

Expand Down Expand Up @@ -104,13 +86,13 @@ Here's the [i]current[/i] API reference:

[*] [size=large][b]Get Real Script Object[/b][/size]

[font=Courier New]<Instance: LuaSourceContainer> maui.GetScript(<void>)[/font]
[font=Courier New]<Instance: LuaSourceContainer> maui.Script

Returns the REAL script global from the closure that's currently running.

[*] [size=large][b]Get Shared Environment Table[/b][/size]

[font=Courier New]<table> maui.GetShared(<void>)[/font]
[font=Courier New]<table> maui.Shared

Returns a "shared" table for ALL closures in a Maui-generated script, so you don't need to the real `_G` or `shared`.
[/list]
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 89918cb

Please sign in to comment.