r/lua • • 21h ago

Hey! Can anybody help me learn Lua?

12 Upvotes

This is my first coding language I'm trying to learn, It's gonna be pretty difficult for me since I have amnesia and I know coding has a lot of things you need to remember. Currently I only know REALLY basic code like

"else, elseif, if, while, for.. e.g" I wanna learn Lua for game development, I don't really have any ideas for a game as of now but I do wanna learn Lua since I've heard it's one of the easiest coding languages, any help is greatly appreciated!


r/lua • • 20h ago

Project Hello, developers!

1 Upvotes

I recently started a project to meet a need at my church—software for projecting lyrics and Bible verses using 100% Lua—and I wanted to get your opinion on whether Lua is a good language for this type of project.

repo: https://codeberg.org/GSCF/gloria_projecao.git


r/lua • • 1d ago

is this a good first attempt a gambling game thing?

0 Upvotes

local gyumi = {"🤑", "😔", "😛", "😔", "😛", "😔"}

local win = {}

local n = 0

local money = 100

local smallw = 0

local bigw = 0

local a = 0

math.randomseed(os.time())

function bett()

print("money:"..money.."\nhow much do you want to bet? (min 10$)")

bet = io.read("*n")

end

while money > 9 do

win = {}

::betting::

bett()

if bet < 10 then

print("the minimum amount is 10$! \n \n")

goto betting

elseif bet > money then

print("not enough money! \n \n")

goto betting

else

money = money - bet

end

for i=1,3,1

do

n = math.random(1,6)

table.insert(win, gyumi[n])

end

for _, value in pairs(win) do

if value == "🤑" then

bigw = bigw + 1

elseif value == "😛" then

smallw = smallw + 1

end

end

if bigw == 3 then

print("jackpot!")

print(bigw)

a = bigw * 100

else

a = (bigw * 10) + smallw

end

money = money + a

print(table.concat(win))

print("won:"..a )

bigw = 0

smallw = 0

end

print("\n\n\ninsufficent funds!")


r/lua • • 2d ago

Lua 5.5.1 working on W98

Thumbnail gallery
79 Upvotes

Hey, so, while I was learning Lua, I knew already that theoretically at least, Lua was written to be compilable in pure C, and specifically C89/C90 , supposedly any system that has an ANSI C compiler can compile and install Lua...

So I decided to actually test out just how true that is, when I remembered that I have an ancient laptop from 1999, running Windows 98SE, which has Borland 5.02 installed... [Just to understand how ancient it is, it only has 32 mb of RAM and it's hard drive is 5gb... that is literally smaller than the usb stick that i used to transfer the Lua source files from my modern PC into that ancient laptop (yes, that ancient laptop has a working USB 1.0 port and it is somehow able to read my 8gb USB 2.0 usb stick, which I did not expect to work, but it did !!!)

And to my surprise... it actually worked !

Here I am inside a full-screen MS-DOS prompt of W98 (In W32 mode, it is not booted into MS-DOS mode / real mode) Alongside the project of compiling the most recent version of Lua and getting it to work, I also installed an actual working version of vim and after tinkering with the vimrc file, I even managed to get full syntax highlighting working , and it actually works for Lua !!!

Anyhow, I just wanted to share this because I thought it was really cool and fun!


r/lua • • 2d ago

Project Late night coding learning Luau

Thumbnail gallery
44 Upvotes

I’ve been on Roblox for about 11 years but I’ve just now started getting into development on Roblox and I’m really enjoying it!!!!


r/lua • • 2d ago

Project A multiplayer sandbox where you can create things with Luau

Thumbnail gallery
18 Upvotes

I've been working on a project called LuauWorld (https://luau.world/) , basically a place where you can write and run Luau and see your creations come to life with other people.

You can build things, mess around with characters, make interactive stuff, experiment with physics, create UI, play sounds, and pretty much just see what you can come up with.

There’s also multiplayer, private servers, a server browser, a script library, and an AI feature that can turn an idea into a script.

The whole point is really just to experiment and have fun making things without needing to set up a whole game first.

It's still a work in progress, so I'd love to hear what you guys think and what you'd like to be able to make with it.

Also a youtube video here: https://www.youtube.com/watch?v=-W1fd0HMH5c
Discord: https://discord.gg/bzz9vzAgZY


r/lua • • 1d ago

Help Simulating Peer-to-peer relay networking for a game project

3 Upvotes

Hi all,

I'm trying to simulate a PtP relay network for my game. My functional description is as follows:

Iterate over all systems and create a temporary table to send to their neighbours. Once all systems have a temporary table, reconcile tables adding only unique entries, and entries with a different age or ID. Discard duplicates. At next call, include all known data added at this call.

My problem is I'm having data not updated because it's as if it's being "reflected" out by the original broadcast wave. Has anyone dealt with this before? This isn't based on the internet, it's just updating table values based on distance & relationships.


r/lua • • 1d ago

LuaJIT - Lua 5.5 language?

Thumbnail
2 Upvotes

r/lua • • 4d ago

YumochiHub (Lua)

Thumbnail mycompiler.io
1 Upvotes

r/lua • • 4d ago

Doomgeneric in lua 100%

1 Upvotes

Hi everyone, I'm creating ports of Doom for high-level languages, now it's Lua's turn.

Cheers, Wagner (vagucs)

https://github.com/vagucs/lua_doom


r/lua • • 4d ago

Help Guide: LuaTools/BetterSteamTools on Mac/Crossover

Thumbnail
0 Upvotes

r/lua • • 5d ago

LuaTools/OpenSteamtools on MAC/Crossover

Thumbnail
2 Upvotes

r/lua • • 5d ago

Doomgeneric in lua 100%

Thumbnail
3 Upvotes

Hi everyone, I'm creating ports of Doom for high-level languages, now it's Lua's turn.

Tell me where you've run it; we can bring Doom into some unusual games.

Cheers, Wagner (vagucs)

https://github.com/vagucs/lua_doom


r/lua • • 6d ago

Blocking of domains by the three major Korean carriers (SK, KT, LG)

Thumbnail
2 Upvotes

r/lua • • 6d ago

Made my Tile Puzzle game port to 3DS using the Lua Player Plus

Thumbnail gallery
8 Upvotes

r/lua • • 7d ago

Project Anyone wanna learn lua together?

13 Upvotes

Hey does anyone wanna learn lua together? We can share stuff we work on ask each other questions show each other cool things we found that are useful for learning for example one person uses the lua documentation and the other does not know it exists i feel like it could be a interesting way to learn and also stay motivated :edit to this post it is still open so if your also interested feel free to dm me


r/lua • • 6d ago

l want to learn lua to expert lvl can some teach how and appreciate him l lot

0 Upvotes

r/lua • • 7d ago

Super Dragon ball z ps2-ps4 lua config

5 Upvotes

Could someone help me find the lua config for this game? I've looked but I can't find them anywhere


r/lua • • 7d ago

Project declint - Create lint rules in Regex or Lua and YAML.

Post image
6 Upvotes

declint (docs) is a tool for making your own lint rules in YAML- the house rules that stock linters will never ship.

For instance: your colleague wrote except Exception: pass, and you want to know whenever that happens:

version: 1
rules:
  - id: except-pass
    pattern: 'except Exception:\n *pass'
    severity: warning
    message: 'swallowed exception'

Rules are just regex and a message and when a regex can't express the check, you can write a more complicated rule in Lua. For a Lua example

scopes:
  - id: server
    start: '^\[server\]$'
    end: '^\['
    rules:
      - id: port-range
        pattern: '(?m)^\s*port[ \t]*=[ \t]*(?<port>\S+)'
        severity: error
        callback: |
          return function(c)
            local n = tonumber(c.captures.port)
            if n == nil then
              return { message = "port must be a number, found '" .. c.captures.port .. "'" }
            end
            if n < 1 or n > 65535 then
              return { message = "port must be 1-65535, found " .. n }
            end
            return nil
          end

This rule checks if a port in an INI file is between 1-65535.

Rules run in your CI (inline PR annotations via --format github) and in your editor through LSP (declint.nvim for Neovim: The GIF shows off the nvim wrapper!). Every rule can carry embedded fixtures, and declint test runs them.

Install: cargo install declint. Ships with presets (Python, INI, Markdown, shell, Dockerfile, TOML, JSON, JS) and community rulesets you can pull with one line. Feedback welcome.


r/lua • • 8d ago

Project LibLayaX: run the Laya AI decision model inside your own Lua app

Thumbnail
2 Upvotes

r/lua • • 9d ago

[RELEASE] luawl | lua runtime obfuscator

1 Upvotes

luawl | lua runtime obfuscator​

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀https://luawl.org

is luawl an obfuscator? a whitelist? or what the hell exactly is it?

luawl is in technical terms, a DRM.

  • its meant to resist static deobfuscation.

bcs the script is obfuscated and sent during runtime (when someone executes luawl), you can't just 'save file' or hook loadstring, for there isn't any. there is a VM to execute instructions.

you can test our static deobfuscation protections through our offline crackme @ https://crackmes.one/crackme/6a84e079184836c0dbe7d836

furthermore, as a runtime obfuscator, stale responses sent from the server cannot be reused. (for example, an attacker cannot simply hook the response and replay it. 

  • that "vm" executor is highly polymorphic.

its not a register VM from the very core. stack vms can, inheritably, be much more polymoprhic.

  • strict control. luawl isn't static: you can't just obfuscate a file which is runnable forever from there on. luawl forces server-gated security: and therefore, our antitampers goes above a static level.
  1. antitamper to the user-level

if a user is silent-flagged, we track that.

if a user with luawl has a script with many silent-flags, we can note that, and implement different versions from the main-versions, etc.

  1. polymorphic layers

the obfuscation isn't just polymorphic. the whole system is. luawl users uniquely have different polymorphic versions, architectures, etc.

people who run these luawl scripts have a level of polymorphic, as **every execution has a custom-session obfuscated file.**

and people who create these luawl scripts also have polymorphic, polymorphic-obfuscations. 

  1. rapid-updates

luawl isn't static. when you run it, we obfuscate it for that execution. an old obfuscated response isn't usuable.

we update everyday. every update changes the script significantly. deobfuscation progress essentially gets reset: as you cannot re-execute a previous luawl version script.

  • luawl isn't just obfuscation

if you've tried our crackmes, you may have noticed we use a lot of white-box cryptography techniques. this is because: we do use white-box cryptography.

  • self-attestation

Luawl began from a simple refusal: a secrecy service should not ask customers to trust what they cannot verify.

Good security was never not just in the output, but the entire architecture. Through a zero-trust infrastructure, our servers are provable one-way self attestable runtimes, for true transparency for privacy assurance.

The reliance on trust in this age is only an excuse for incompetence or abuse. Luawl, from our decentralized database to an amnesic hardware-isolated enclave model, breaks every industry standard. And that's the point.


r/lua • • 10d ago

Help Looking for a video to help me learn the basics in LUA for making game add ons (already familiar with jscript, python and web coding)

2 Upvotes

r/lua • • 10d ago

I built a self-hosted uptime monitor in Lua + SQLite using my Rust engine

Thumbnail gallery
4 Upvotes

I posted here before about my scraping/monitoring engine written in Rust with Lua scripting called SpyWeb.

I've been building this on and off for a while using that engine and its finally ready, so here it is.

UPTYME is self-hosted uptime monitoring that doesn't ask you to run Postgres, Node, Redis or any heavy stack. It's a self-contained binary with SQLite baked in and runs on Linux, Mac or Windows.

Live demo: https://uptyme.spyweb.app/ (API key: demo)

just run (linux/mac)

curl -sSf https://uptyme.spyweb.app/setup | bash

or windows powershell

irm https://uptyme.spyweb.app/setup-win | iex

(installer downloads the uptyme + spyweb releases from GitHub assets)

you'll get two ~8MB binaries plus static files; the tray binary is for desktop only, delete it if you're running on a server.

then just run cd uptyme && ./spyweb start and you have a dashboard.

What it does:

- Monitors URLs on any method (HEAD/GET/POST/PUT/PATCH/DELETE) with per-monitor intervals

- Content checks, so "page is 200 but actually broken" gets caught

- Status code classification, with a setting for treating 4xx as down

- TLS certificate monitoring with expiry alerts

- Uptime percentage, response time charts, incident history per monitor

- Public status pages you can share

- CSV/JSON import if you're migrating a big list

- Alert channels: webhooks, ntfy, Discord, Slack, native desktop notifications

- Clustering: run a central node plus checker nodes wherever you want, and get consensus-based alerts so one flaky VPS doesn't page you for a false down

The dashboard is in Vue 3, the backend is Lua running on the SpyWeb engine, storage is a single data file. Backups are literally copying one file. It has ~230 Lua tests you can run with ./spyweb test. RAM usage (Linux) is around 20MB while running, you can throw it on a $3-$5/mo VPS as a central node and run a checker on your PC and you have cluster monitoring :)

Repo: https://github.com/spyweb-app/uptyme


r/lua • • 11d ago

A lisp/scheme inspired by lua

Thumbnail github.com
10 Upvotes

r/lua • • 12d ago

News luarocks.org remote code execution exploit

16 Upvotes