Velocity Executor Logo

Velocity Executor API - LuaU Reference 2026

The Velocity Executor API gives you full programmatic control over Roblox script execution. With a 98% UNC score, Velocity supports the most complete LuaU API of any free executor — including environment globals, closure utilities, filesystem access, and Velocity-specific extensions.

Latest Version 2.8.5 | Updated: Feb 4, 2026 | Windows 10/11

98% UNC
Full API
Tested
Secure
Velocity Executor API Interface

Velocity Executor Pages

Velocity Executor API Overview

The Velocity Executor API is the full set of functions and globals available inside the executor environment. Unlike standard Roblox LuaU, Velocity injects additional globals that give scripts privileged access to the game engine. All functions below are available immediately after injection with no additional setup required.

Velocity Executor API Functions Overview

Velocity's API exposes privileged Roblox engine functions unavailable in standard scripts

Environment Globals

These globals are injected into every script executed through Velocity. They provide essential identification and environment information.

-- Detect Velocity environment
if is_velocity_closure then
    print("Running inside Velocity Executor")
end

-- Get executor identity level (0–7)
print(getidentity())  -- returns 7 for Velocity

-- Set identity level for privileged operations
setidentity(7)

-- Get executor version string
print(getexecutorversion())  -- "Velocity 2.8.5"

-- Check if a function is a Velocity closure
local func = function() end
print(isvelocityclosure(func))  -- false (not injected)
print(isvelocityclosure(math.sin))  -- false (built-in)

Closure & Script API

Velocity provides a full closure manipulation API compliant with the UNC standard. These functions let you inspect, hook, and modify Roblox functions at runtime.

-- Hook a function (redirect calls)
local original_print = hookfunction(print, function(...)
    return original_print("[Velocity] " .. tostring((...)))
end)

-- Get raw closure of a Roblox function
local raw = getrawmetamethod(workspace, "__index")

-- Compare closures
print(compareclosures(print, print))  -- true

-- Check if a function is native (C closure)
print(isnativeclosure(math.sin))   -- true
print(isnativeclosure(function() end))  -- false

-- newcclosure: wrap a Lua function as a C closure
local cfunc = newcclosure(function(x) return x * 2 end)
print(cfunc(5))  -- 10

Filesystem API

Velocity's filesystem API allows scripts to read, write, and manage files in the executor's workspace directory (workspace/ folder next to Velocity.exe).

-- Write a file
writefile("workspace/config.txt", "speed=200\ngravity=50")

-- Read a file
local data = readfile("workspace/config.txt")
print(data)

-- Check if file exists
if isfile("workspace/config.txt") then
    print("Config found")
end

-- List files in a folder
local files = listfiles("workspace/")
for _, f in ipairs(files) do print(f) end

-- Create a folder
makefolder("workspace/myscripts")

-- Delete a file
delfile("workspace/config.txt")

-- Append to a file
appendfile("workspace/log.txt", "Session started\n")

HTTP & Request API

Velocity supports full HTTP requests from within scripts, enabling script loaders, config fetching, and external API calls.

-- Basic GET request
local response = request({
    Url = "https://pastebin.com/raw/exampleId",
    Method = "GET"
})
print(response.StatusCode)  -- 200
print(response.Body)

-- POST request with body
local res = request({
    Url = "https://example.com/api",
    Method = "POST",
    Headers = { ["Content-Type"] = "application/json" },
    Body = '{"key":"value"}'
})

-- Load and execute a remote script
local code = game:HttpGet("https://pastebin.com/raw/exampleId")
loadstring(code)()

Instance & Memory API

These functions allow direct access to Roblox engine instances, bypassing normal access restrictions enforced on standard scripts.

-- Get all instances of a class (including hidden ones)
local parts = getinstances()
for _, v in ipairs(parts) do
    if v:IsA("BasePart") then print(v.Name) end
end

-- Get nil-parented instances
local nil_instances = getnilinstances()

-- Get script bytecode
local script_ref = game.Players.LocalPlayer.PlayerScripts.Script
local bytecode = getscriptbytecode(script_ref)

-- Get all running scripts
local scripts = getscripts()

-- Get connections on an event
local conns = getconnections(workspace.ChildAdded)
for _, c in ipairs(conns) do
    print(c.Function)  -- inspect connected callbacks
end

Input Simulation API

Velocity exposes mouse and keyboard simulation functions that are commonly used in aimbot, auto-clicker, and macro scripts.

-- Move mouse to absolute screen position
mousemoveabs(960, 540)

-- Move mouse relative to current position
mousemoverel(10, -5)

-- Simulate left mouse click
mouse1click()
mouse1press()
mouse1release()

-- Simulate right mouse click
mouse2click()

-- Keyboard input
keypress(0x41)   -- press 'A' (Virtual Key code)
keyrelease(0x41)
keyclick(0x20)   -- spacebar click

-- Scroll wheel
mousescroll(3)   -- scroll up 3 ticks

Miscellaneous API Functions

Additional utility functions included in the Velocity API that don't fit neatly into other categories but are frequently used in scripts.

-- Queue a script to run next teleport/respawn
queue_on_teleport([[
    print("Teleport script running!")
]])

-- Get Roblox player name
print(getnamecallmethod())

-- Safe loadstring with error handling
local ok, err = pcall(loadstring, "invalid syntax ~~~")
if not ok then print("Syntax error:", err) end

-- Protect a function from being hooked
local protected = protect_gui(ScreenGui)

-- Get/Set rendering framerate
setfpscap(240)

-- Set clipboard contents
setclipboard("Hello from Velocity!")

-- Get clipboard contents
local clip = getclipboard()
print(clip)
Velocity Executor API in Action

Scripts leveraging the full Velocity API running in popular Roblox games

UNC Compliance — 98% Score Explained

The Universal Naming Convention (UNC) benchmark tests executors against a standardised list of expected API functions. Velocity scores 98% on the latest UNC test, meaning virtually every public Roblox script runs without modification.

Closure Library

Full hookfunction, newcclosure, iscclosure, clonefunction support — 100% compliant.

Filesystem Library

readfile, writefile, listfiles, makefolder, delfile — fully implemented.

Instance Library

getinstances, getnilinstances, getscripts, getconnections — full coverage.

Input Library

Full mouse and keyboard simulation including mousemoveabs, keypress, and scroll.

Velocity Executor API — FAQ

Do I need to import the Velocity API manually?

No. All Velocity API functions are automatically injected as globals the moment you click Inject. There are no require() calls or imports needed — just start using functions like readfile() or hookfunction() directly.

What API functions are in the 2% Velocity doesn't support?

The remaining 2% consists of very niche or experimental UNC functions that almost no public scripts use. Core functions like filesystem, closures, HTTP, and input are all 100% supported. The team is working to close this gap in upcoming releases.

Does the API change after Roblox updates?

The Velocity API surface stays consistent between updates. Roblox updates may temporarily break injection (not the API itself), which Velocity patches within 2–4 hours. Your scripts don't need to be rewritten after updates.

Can I use the HTTP API to load external scripts?

Yes. You can use game:HttpGet() or the request() function to fetch scripts from external URLs such as Pastebin and execute them with loadstring(). This is the standard way most script hubs and loaders work.

Start Using the Velocity API Today

Download Velocity Executor and get instant access to the most complete free LuaU API available. No keys, no payments, no limits.