Back to home

Scripting

Resources for Roblox script development

My Scripts

Da Hood Lua Lock

Target lock script for Da Hood

Chams / Highlight

ESP highlight script

Target HUD

Target info display

Speed Script

Movement speed modifier

Triggerbot

Auto-fire on target

UI Libraries

Best
Mid
Unsupported

Lua Basics

-- This is a comment
print("Hello, World!")

--[[
  Multi-line
  comment block
]]
local number = 42
local text = "Hello"
local flag = true
local empty = nil
local x = 10

if x > 10 then
    print("Greater")
elseif x == 10 then
    print("Equal")
else
    print("Less")
end
-- For loop
for i = 1, 5 do
    print(i)
end

-- While loop
local count = 0
while count < 3 do
    count = count + 1
end
local function greet(name)
    return "Hello, " .. name
end

print(greet("World"))
-- Array-style
local fruits = {"apple", "banana", "orange"}
print(fruits[1]) -- apple

-- Dictionary-style
local player = {
    name = "stratxgy",
    level = 50,
    active = true
}
print(player.name)
Official Roblox Luau Docs