Exports

The oxb exports for your own resources: ban, kick, unban, screenshots, recordings, threat score, play time and bypass.


You can use oxb from your scripts. The server exports are the most common; the client ones are few and the script marking ones are in Exceptions and compatibility.

Server exports#

ExportWhat it does
banPlayer(source, reason, details?, duration?)Bans a connected player. reason is the reason; duration in seconds (without a value, it uses the duration of Settings).
kickPlayer(source, reason, details?, duration?)Kicks a connected player.
unbanPlayer(banId)Removes a ban by its ID.
unbanAllPlayers(from?)Removes all the bans.
getBanInfo(banId)Returns exists, data of the ban.
screenshot(source, webhook)Takes a screenshot of the player and sends it to the webhook.
captureLastSeconds(source, webhook)Records the last seconds of the player's game and sends them to the webhook.
getThreatScore(playerId)The threat score of the player (0 to 100).
getPlayTime(playerId)The time played by the player.
hasBypass(playerId)true if the player has the BYPASS permission.
Server
-- ban from your own system
exports.oxb:banPlayer(source, "Abuse of the economy system", { item = "money" }, 86400)
 
-- do not let in whoever carries too much risk
AddEventHandler("playerConnecting", function(name, setKickReason, deferrals)
local src = source
local score = exports.oxb:getThreatScore(src)
if score and score > 80 then
setKickReason("Your account has a risky history.")
CancelEvent()
end
end)
 
-- is it part of the test team?
if exports.oxb:hasBypass(source) then return end

Client exports#

ExportWhat it does
banPlayer(message, details?, duration?)Bans the local player. Use it from a client script of yours.
kickPlayer(message, details?, duration?)Kicks the local player.
isRunning()Tells whether oxb is running on the client.

Last updated: November 11, 2026