Lua - Reddit – Telegram
Lua - Reddit
30 subscribers
278 photos
31 videos
4.23K links
News and discussion for the Lua programming language.

Subreddit: https://www.reddit.com/r/lua

Powered by : @r_channels & @reddit2telegram
Download Telegram
Aprendiendo luau o lua. Estoy aprendiendo lo básico de lua desde Android no tengo pc, alguna recomendación?

local player = game.Players.LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Parent = player:WaitForChild("PlayerGui")
gui.ResetOnSpawn = false


local speed = Instance.new("TextButton")
speed.Name = "Speed"
speed.Size = UDim2.new(0, 150, 0, 50)
speed.Position = UDim2.new(0, 120, 0, 40)
speed.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
speed.Text = "Speed Off"
speed.Parent = gui

local speedActivo = false

speed.MouseButton1Click:Connect(function()
speedActivo = not speedActivo
if speedActivo then
player.Character.Humanoid.WalkSpeed = 80
speed.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
speed.Text = "Speed On"

else
player.Character.Humanoid.WalkSpeed = 16
speed.Text = "Speed Off"
speed.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
end
end)




https://redd.it/1maxym7
@r_lua
I need a teacher or partner

Guys, I’m so noob, i know nothing about lua
I just know a little python
Is there some one that s/he like learn with me or teach me?
After that we can do projects together or learn more from each other, if you like do this tell here, if we will be a lot, we can create a group
It can be very enjoyable that you teach to someone or learn with someone
Tnx for read💛🤜🏻🤛🏼

https://redd.it/1mbq10e
@r_lua
Learning Lua

I was thinking about getting into learning Lua to make games and am already familiar with JavaScript. I was wondering if there are any good resources for that.

https://redd.it/1mbuoes
@r_lua
Create 'constant' locals inside or outside the loop?
https://redd.it/1mdsf72
@r_lua
Issues regarding install

Upon opening my .Lua file with PowerShell it declines and exits the app

https://redd.it/1mfxnph
@r_lua
FNF Psych Engine Character Select screen in Lua & few other noscripts?

Hello, i wanted to ask you guys, or maybe even request, A Script that simulates the FNF V-Slice Change Character System: U Press tab in freeplay, and you go into the Character Select screen, the same UI etc. from FNF V-Slice, now I know "Nah man just use P-Slice" Dude P-Slice is so hard to use it's only peak at crashing and that's it -- I would like to get the noscript for 0.6.3 - Even the latest ver is accepted but plz send it if u have it or if u're a coder pls do it

https://redd.it/1mgg8wj
@r_lua
Roadblocks trying to make a very fast Lua Virtual Machine

I'm using a modified version of FiOne so it runs even faster. However i am hitting roadblocks which i have no idea how to solve. My benchmark gives me 0.077 (The lower, the better) however this is quite slow for my needs. (Example: Software Rendering, Dyno's, Heavy usage of math and etc)

I have tried creating a custom instruction set to try optimizing it however it barely made it faster. (0.001s improvement?)

So my question is: How can i make a LuaVM that runs even faster? For the provided benchmark, i want to see below 0.01 at best, 0.05 at worst

NOTES:
\- I have tried other interpreters which are **LuaInLua** and **LBI** however not only were they slower, they're also way more buggier.
\- I do NOT have access to FFI, loadstring and load due to being in a sand boxed environment (Bit library is accessible)
\- I must do this in just Lua, No C or C++
\- I am running this inside a game which means lua will run roughly 3x slower due to the layers it adds.
\- I cannot post my LBI's source code as i would be then leaking unreleased code from my project which i cannot do. It's roughly 80-90% same as the original code.
\- It might not be possible to optimize this any further but i want to try anyways.

What i know are damaging performance:
\- The amount of table indexing Lua interpreters are doing including FiOne.
\- The amount of if statements used inside run_lua_func for FiOne.

Benchmark code if needed (Yes, i know its quite basic but the more advanced one wouldn't fit here)

local x = os.clock()
local s = 0
for i=1,1000000, 1 do s = s + i end
print(string.format("elapsed time: %.5f", os.clock() - x))

https://redd.it/1mgwgz3
@r_lua
Is there a nice not boring app to learn LUA?

I keep finding boring books and websites, and I want to learn LUA having fun, for example, when I learned Python or C#, I found very nice courses.

https://redd.it/1mhpesp
@r_lua
Trying to reverse engineer a code

Hi, I need help reverse engineering a code probably malicious and I need to check if it is without running on my device

https://redd.it/1mhqxai
@r_lua
The program for creating small apps with TUI and SQLite support in Lua

Hey everyone. I've built a small all-in-one app for building Lua noscripts with text-based UIs and SQLite integration. Use it if you need add the TUI and SQLite integration in your noscript.

Really I was need a small timesheet program, but it was too boring so instead I'd created this app: https://github.com/LobachevEB/gotulua

https://redd.it/1mi3mor
@r_lua
Hello

So I am planning to make roblox war game, similar to the D Day game but better, with more maps and etc. I already have game plsn and some things, but I need a coder because I have no experience with lua. I am also looking for person that knows how to make maps, UI and gameplay. No need for market manager, I have a lot of experience with that. I can also promiss that two people fair amount of robux from earnings from the game, since it will be splited in equal parts (if 4 of us, 25% each) it can be modified if somebody will want more cause i really dont care about earnings.

https://redd.it/1mi62v1
@r_lua
What am i missing?

Sorry if this is a dumb question im trying to setup neovim for python and one part requires to setup the plugins configuration.

mine

this is the code, but shouldn't opts and ensure_installed be highlighted on red?? im using the same theme as the guy on the video and his is highlighted with red

tutorial



https://redd.it/1mijvpj
@r_lua
Check first bit in string

I have a 4 character string that consists of a single bit boolean value, followed by an unsigned 31 bit value.

I need to check what the boolean value is, what's the best way to do this?


At first I figured I could simply interpret it as a signed 32 bit value and then check if it is positive or negative, something like this:

local s32 = string.unpack("<i4", string)
if s32 < 0 then
return true
else
return false
end

But then I realised, if the 31 bit integer is zero, then wouldn't the resulting 32 bit integer be -0? And since -0 is equal to 0 then s32 < 0 would have to evaluate to false, right?

https://redd.it/1mixp1p
@r_lua