# SDK

**SDK:**

`SDK.GetRobloxBase()`: Returns the base address of the Roblox module as a number.

```lua
local base = SDK.GetRobloxBase()
print(base)
```

`SDK.WorldToScreen(Vector3)`: Converts a 3D world position into 2D screen coordinates. Returns a `Vector2`.

```lua
local screen = SDK.WorldToScreen(Vector3(0, 10, 0))
print(screen.x, screen.y)
```

`SDK.MousePosition()`: Returns the current mouse position as a `Vector2` in screen space.

```lua
local mouse = SDK.MousePosition()
print(mouse.x, mouse.y)
```

`SDK.GetKeyAsyncState(keyCode)`: Returns `true` if the given virtual key code is currently held.

```lua
if SDK.GetKeyAsyncState(0x46) then print("F held") end
```

`SDK.SetMousePosition(x, y)`: Moves the cursor to the given screen coordinates.

```lua
SDK.SetMousePosition(960, 540)
```

`SDK.MoveMouse(dx, dy)`: Moves the mouse relative to its current position.

```lua
SDK.MoveMouse(10, 0)
```

`SDK.ScreenSize()`: Returns a `Vector2` of the current screen resolution.

```lua
local size = SDK.ScreenSize()
print(size.x, size.y)
```

***

### Client

`Client.MenuOpen()`: Returns `true` if the overlay menu is currently open.

```lua
if Client.MenuOpen() then print("menu open") end
```

`Client.Keybinds()`: Returns a table of all registered `Keybind` objects.

```lua
local binds = Client.Keybinds()
for _, kb in ipairs(binds) do
    print(kb.Name, kb.KeyString, kb.Enabled)
end
```

**Keybind fields:**

* `Name` (string): Display name of the keybind.
* `Key` (number): Virtual key code.
* `KeyString` (string): Human-readable key name, e.g. `"F1"`.
* `Type` (string): Keybind type, e.g. `"Toggle"` or `"Hold"`.
* `Enabled` (boolean): Whether the keybind is currently active.


---

# 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://yerba-1.gitbook.io/yerba-docs/api/sdk.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.
