# Introduction

[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)

<figure><img src="https://995049547-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6FWhjZ4TnTBq65rLlBWq%2Fuploads%2FFsixhe2Yi7bJrUWoxmiB%2FScreenshot%202023-07-10%20at%2012.06.03%E2%80%AFAM.png?alt=media&#x26;token=58067de0-8e2d-4ca4-bf40-bcb6609ec0f7" alt="" width="375"><figcaption></figcaption></figure>

### Sponsors

0 sadly

### Contributors

| <p><a href="https://github.com/AsynchronousAI"><img src="https://avatars.githubusercontent.com/u/72946059?v=4?s=100" alt="aqzp"><br>aqzp</a><br><a href="https://github.com/AsynchronousAI/roblox-pyc/commits?author=AsynchronousAI">💻</a></p> | <p><a href="https://github.com/tututuana"><img src="https://avatars.githubusercontent.com/u/51187395?v=4?s=100" alt="tututuana"><br>tututuana</a><br><a href="https://github.com/AsynchronousAI/roblox-pyc/commits?author=tututuana">💻</a></p> | <p><a href="https://github.com/BazirGames"><img src="https://avatars.githubusercontent.com/u/49544193?v=4?s=100" alt="BazirGames"><br>BazirGames</a><br><a href="https://github.com/AsynchronousAI/roblox-pyc/issues?q=author%3ABazirGames">🐛</a></p> | <p><a href="http://lawmixerscpf.tk/group"><img src="https://avatars.githubusercontent.com/u/53837083?v=4?s=100" alt="LawMixer"><br>LawMixer</a><br><a href="https://github.com/AsynchronousAI/roblox-pyc/issues?q=author%3ALawMixer">🐛</a></p> | <p><a href="https://github.com/cataclysmic-dev"><img src="https://avatars.githubusercontent.com/u/141081747?v=4?s=100" alt="cataclysmic-dev"><br>cataclysmic-dev</a><br><a href="https://github.com/AsynchronousAI/roblox-pyc/commits?author=cataclysmic-dev">💻</a></p> | <p><a href="https://github.com/luxkatana"><img src="https://avatars.githubusercontent.com/u/57036931?v=4?s=100" alt="luxkatana"><br>luxkatana</a><br><a href="https://github.com/AsynchronousAI/roblox-pyc/issues?q=author%3Aluxkatana">🐛</a></p> |
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

## roblox-pyc

[**Docs**](https://robloxpyc.gitbook.io/roblox-pyc) **|** [**Devforum**](https://devforum.roblox.com/t/roblox-py-python-luau/2457105?u=dev98799) **|** [**Github**](https://github.com/AsynchronousAI/roblox.pyc) **|** [**Tests/Examples**](https://github.com/AsynchronousAI/roblox.py/tree/main/test)

***

```
pip install roblox-pyc
```

Python, Lunar, C, C++ Compiler for Roblox.

Python 3.13 (dev), C (all versions), C++ (all versions), Lunar -> Lua(u)

> This has NO RELATION with .pyc files, roblox-py, or roblox-ts

> C/C++ is still in progress.

> Python is fully implemented, all code should work because it supports the dev build of Python 3.13.

***

### Features

* 🔄 **Interchangeable**\
  roblox-pyc supports using Lua, Lunar, roblox-ts, C, C++, and Python all at once so you can have the best of all sides.
* ☄️ **Ultrafast compiler**\
  The roblox-pyc compiler is designed so entire projects can be compiled in a matter of seconds
* 📉 **Optimized code**\
  roblox-pyc is a source-source compiler, it doesn't use any WASM or anything like that to cheat its way and has major performance drops. It uses an AST and rewrites your code and optimizes it.
* ⚠️ **Easy error checking**\
  Your code can easily be checked for errors because of the precompiler error system.
* 🧩 **Cross-language module support**\
  roblox-pyc allows you to require/import modules from other languages.
* 🛠️ **Supports everything**\
  Regardless if you use Rojo, Argon, in Mac, Windows with any code editors or anything else roblox-pyc is highly customizable and allows you to use any of them
* ↗️ **Customizable**\
  You can customize roblox-pyc to change your C/C++ version or dynamic library or any QoL features, not only that roblox-pyc and all of its dependencies are open-source so you can mod it and change anything to your liking
* 💻 **Languages**\
  roblox-pyc supports a great variety of languages that are fully programmed.
* 🌎 **Upload your code to the world**\
  Using a VScode sync plugin you can upload your code to the world with GitHub, GitLab, whatever.
* 📲 **In-roblox plugin**\
  If you dont what to use VScode, python supports a roblox plugin which can be hosted in the terminal with all the features listed above!
* 🌙 **Lunar**\
  roblox-pyc comes with a custom language called lunar with amazing syntax features and an extended standard library, which is a modified version of MoonScript for roblox

***

## Unsupported features

* Import \* (python)
* Syntax based slicing (python) (workaround: use slice builtin function)
* C/C++ (not implemented yet)
* *\_slots*\_ (python) (adding soon)
* *\_dict*\_ (python) (adding soon)

***

### Credits

* [Highlighter](https://github.com/boatbomber/Highlighter). modified to work with python (plugin usage)
* [TextBoxPlus](https://github.com/boatbomber/TextBoxPlus). uses a modified version with autocomplete (plugin usage)
* [pythonlua](https://github.com/dmitrii-eremin/python-lua). this is heavily modified version with flask implementation and compiler changes. (read licenses in [copyright.txt](https://github.com/AsynchronousAI/roblox.pyc/blob/main/COPYRIGHTS.txt))
* [seasnake](https://github.com/pybee/seasnake) and sealang. Modified to convert C/C++ to Luau rather than C/C++ to Python 2.7
* [MoonScript](https://github.com/leafo/moonscript). Modified to work with the Roblox API (Lunar).
* [LuauAST](https://robloxpyc.gitbook.io/roblox-pyc/readme). roblox-pyc uses roblox-ts's LuauAST to generate Luau code. (not used in current versions)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://robloxpyc.gitbook.io/roblox-pyc/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
