/* roblox-pyc | python, c, c++ to luau compiler *\

The roblox plugin is in GitHub releases, simply go to GitHub and click on the release with a plugin link. I’ll get the latest one here and send it.

This link: Release v1.2.1-beta · AsynchronousAI/roblox.pyc · GitHub has a Python.Plugin.rbxmx file in the bottom, move that to your Roblox plugins folder and configure it and you should be good to go.

Or you could use the CLI which I should get done soon and write your code in VScode and sync it with something like Rojo.

1.5.5

  • Finished cli, working on publishing to pip
  • continue
  • bug fixes/tests
  • more descriptive errors

CLI NOW AVAILABLE!!!

Use

pip install roblox-pyc

and it will install the following CLI’s:

  • roblox-py
  • roblox-c (indev)
  • roblox-cpp (indev)

Activate python plugin server:

roblox-py p

Watch current directory:

roblox-py w

(click enter inside of the terminal to compile all the files)


roblox-pyc 1.6.6.3

  • Reprogrammed some of the systems
  • Public C23, C++20 AST. Which will power the C, C++ to Luau
  • Reorganization
  • Automatic headers, Rather than the header getting all built in functions, it will just get the ones needed based on a estimate.
  • Cleaned up code
  • Switches from typer for CLI systems.

compiling python to luau has almost no benefit other than uglier syntax and better classes, really.

1 Like

this is a learning tool I made so I can learn more python, C, and C++ because they are honestly way more useful than lua and can be used outside of roblox. here’s some reasons how python is better, and “ugly syntax” is a preference, like in my opinion it is pretty ugly but still readable and way easier than lua.

  • matches
  • slicing
  • python is more popular (way more community support)
  • async functions and await (pretty much lua coroutines but wayy easier to read)
  • syntax may be uglier but easier to understand
  • more built in functions
  • with
  • if x in y:
  • if x is not y:
  • more libraries

And also this also supports C, and C++. I just deployed an update to the node visitor which allows C functions to convert. I made this for me to learn python, C, C++ and just for fun because I like these languages more than luau.

1 Like

1.12.10

  • Updated docs (Now uses GitBook)
  • Updated CLI (I recommend reading the docs)
  • C/C++ is (very very little support) accessible now!
  • Redid devforum post and ReadMe.md on GitHub

That can’t be farther from the truth!

First off, Python’s syntax is much more clean. It was specifically designed to be as close as possible to English, and it does it much better than Lua. You can take ages to write a simple script in LuaU, such as error exception, when in Python it’s 2 extra lines!

Python’s features are a big plus. Python obviously has MUCH more syntactical features than Lua, which can save both time and speed. Examples include classes, error exception, and asynchronous programming.

My last big point is that Python is the most popular language in the world. Lua is not! Learning Lua will help you nowhere in the future other than specifically Roblox development (there’s other games, sure, but my point is that it’s pointless). You’re much better off learning Python, C, or C++ than Lua.

1 Like

I would use roblox-ts. Its very clean and has good syntax, good syntax sugar, good classes, and can get you somewhere in the future.

1 Like

I also like Roblox-ts, kind of why I made this, I do more backend work and Python can get me somewhere in the future, same with C and C++, those 2 are like the core programming languages that every device supports to some extent. Typescript is a very good language and way better than Lua, it’s all a matter of preference on what you want to use.

2 Likes

I am still working on this, I added a lot of new stuff including

  • Help guide in terminal
  • Discord
  • New moonscript like language (Called roblox-lunar)
  • Extended API
  • Finished docs
  • Config/Settings
  • C/C++ support (very little)
  • Change C/C++ AST version
  • Change dylib for C/C++
  • roblox-pyc CLI with general tools
    and way more.

I will stop sending and update log here, and I am going to do a full release soon, this is just a feedback post, you can read more updates in GitHub releases and a updated ToDo in the Readme.md in GitHub.

That is wildly amazing you wrote a perfect translator!

1 Like

How to get the compiler?​ ​ ​ ​ ​

1 Like

Thanks!


Replying to @ProliantML110 :

pip install roblox-pyc

Write that in the terminal, it will download the following 5 tools:

  • roblox-pyc (general tool)
  • roblox-py (Stable)
  • roblox-c
  • roblox-cpp
  • roblox-lunar (Stable)

I do updates often so it may break. Python and Lunar is the only stable one so far

You can try python by going to the terminal with your current working directory having python scripts inside of it and write

roblox-py w

it will compile all scripts to lua, keep the terminal open and you can click enter there again while the roblox-py process is running to recompile with updated code.


If you are planning on getting the plugin that will be in GitHub releases and you can use

roblox-py p 

to start the roblox plugin server. I do not plan on having the plugin to undergo any large changes.


EDIT: Python is no longer the only working one, just dropped a fix on Lunar. Both are now production-ish ready but still need more testing.

Do i need Rojo installed?​​​​​​​​

1 Like

It is your preference on what vscode sync you want to use, you could use Argon, Rojo, or none of them if you just want them in your desktop.

Read the docs for more info.

I am definitely bookmarking this. Using Python usually makes it a lot easier to handle operations compared to Lua, which is usually my cup of tea when programming. If this was somehow integrated into Roblox itself, I’d very likely always use it over Luau.

1 Like

Will you add support for other programming languages in the future?

1 Like

Most likely so far it supports 4, C and C++ are still being worked on tho.