Follows ScriptBloxAPI Standards and Parameters
The Scripts
class in the ScriptBloxApi
library provides a set of asynchronous methods to interact with the ScriptBlox API for fetching, searching, and retrieving Roblox scripts.
- Fetch paginated script lists with filters
- Retrieve specific script data
- Get raw script code
- Access trending scripts
- Perform advanced search queries
Make sure to call these methods from an async context.
using ScriptBloxApi.Scripts;
using ScriptBloxApi.Objects;
Results scripts = await Scripts.FetchScriptsAsync();
ScriptData script = await Scripts.FetchScriptAsync("abc123");
string rawScript = await Scripts.FetchRawScriptAsync("abc123");
IReadOnlyList<Script> trending = await Scripts.FetchTrendingScriptsAsync();
IReadOnlyList<Script> searchResults = await Scripts.SearchScriptsAsync("infinite yield");
Fetches a paginated list of scripts with optional filtering and sorting.
Parameters:
Name | Type | Description |
---|---|---|
page |
int? |
Page number (default: 1) |
max |
int? |
Max results per page (1–20, default: 20) |
mode |
ScriptCost? |
Filter by script cost (free , paid ) |
patched |
bool? |
Include only patched scripts if true |
key |
bool? |
Include only key-protected scripts if true |
universal |
bool? |
Filter universal scripts |
verified |
bool? |
Include only verified scripts |
sortBy |
SortBy? |
Sort field (views , likeCount , etc.) |
order |
Order? |
Sort order (asc , desc ) |
Returns: Task<Results>
Fetches metadata for a single script by ID.
Parameters:
scriptId
: The ID of the script to fetch
Returns: Task<ScriptData>
Fetches the raw Lua source code for a script by ID.
Parameters:
scriptId
: The ID of the script
Returns: Task<string>
Gets trending scripts, optionally limited to a maximum number.
Parameters:
max
: Maximum number of scripts (1–20, default: 20)
Returns: Task<IReadOnlyList<Script>>
Performs an advanced search for scripts based on a query and filters.
Parameters:
Name | Type | Description |
---|---|---|
query |
string |
The search query |
page |
int? |
Page number (default: 1) |
max |
int? |
Max results per page (1–20, default: 20) |
mode |
ScriptCost? |
Filter by script cost (free , paid ) |
patched |
bool? |
Filter by patched state |
key |
bool? |
Filter by key-protection |
universal |
bool? |
Filter by universal scripts |
verified |
bool? |
Filter by verified scripts |
sortBy |
SortBy? |
Sort field |
order |
Order? |
Sort order |
strict |
bool? |
Use strict match if true |
Returns: Task<Results>
free
paid
views
likeCount
createdAt
updatedAt
dislikeCount
asc
desc
var results = await Scripts.SearchScriptsAsync(
query: "admin",
mode: Scripts.ScriptCost.free,
verified: true,
sortBy: Scripts.SortBy.views,
order: Scripts.Order.desc
);