Client API & Remotes Reference
Client SDKComplete API specification for ReplicatedStorage.RAC.ClientAPI and underlying Admin RemoteFunctions.
# Overview
The ClientAPI module (ReplicatedStorage.RAC.ClientAPI) provides a typed, developer-friendly interface for building custom administrative GUIs.
local RACClient = require(game.ReplicatedStorage.RAC.ClientAPI)
Every method below automatically interfaces with RAC's secure server backend (AdminServer.luau), which verifies admin permissions via PermissionManager on every call.
# Method Index
# 1. ClientAPI.GetOverviewData()
Fetches high-level security metrics and system status.
- Returns:
(success: boolean, stats: DashboardStats?, userRole: string?) - Stats Schema:
{ totalMonitored: number, -- Total active players suspiciousPlayers: number, -- Players with risk > 20 activeIncidents: number, -- Incidents in recent buffer totalPunishments: number, -- Total bans/kicks issued dataStoreHealthy: boolean, -- DataStore availability flag uptimeSeconds: number, -- Engine uptime in seconds categoryBreakdown: { -- Incident count per category Movement: number, Combat: number, PlayerState: number, Remote: number, Economy: number, Instance: number, Honeypot: number, }, recentDetections: { DetectionIncident }, recentAnalyses: { AIAnalysisReport }, }
# 2. ClientAPI.GetLivePlayers()
Returns an array of all active players in the server with real-time risk scores and connection metrics.
- Returns:
(success: boolean, players: { PlayerTelemetry }?) - PlayerTelemetry Object:
{ userId: number, username: string, displayName: string, joinTime: number, riskScore: number, -- Normalized risk (0 - 150) detectionCount: number, -- Total violations in current session ping: number, -- Round-trip latency in milliseconds position: { X: number, Y: number, Z: number }, isSeated: boolean, -- True if player is seated/driving isExempt: boolean, -- True if active temporary exemption }
# 3. ClientAPI.GetPlayerDetail(userId: number)
Retrieves an in-depth investigation dossier for a specific player.
- Arguments:
userId(number): Target Roblox UserID.
- Returns:
(success: boolean, detail: any)- Returns incident history, position history, and the full explainable
AIAnalysisReport.
- Returns incident history, position history, and the full explainable
# 4. ClientAPI.PunishPlayer(punishmentType, targetUserId, targetUsername, reason, durationSeconds)
Authoritatively executes a disciplinary action on a player.
- Arguments:
punishmentType:"Warning"|"Freeze"|"Kick"|"TempBan"|"PermBan"targetUserId(number): Target player UserID.targetUsername(string): Target player Username.reason(string): Explanatory reason (shown in kick/ban dialogues).durationSeconds(number?): Duration in seconds (used forTempBan, default: $86,400\text{s}$ / 24h).
- Returns:
(success: boolean, errorMessage: string?)
# 5. ClientAPI.UnbanPlayer(targetUserId: number)
Revokes an active ban across all servers via MessagingService.
- Arguments:
targetUserId(number): UserID to unban.
- Returns:
(success: boolean, errorMessage: string?)
# 6. ClientAPI.ToggleDetector(detectorName: string, enabled: boolean)
Enables or disables an individual detector module at runtime without server restarts.
- Arguments:
detectorName(string): Module name (e.g."SpeedDetector","FlyDetector").enabled(boolean): New state.
- Returns:
(success: boolean, errorMessage: string?)
# 7. ClientAPI.GetAdminLogs()
Returns the chronological audit log of all administrative actions.
- Returns:
(success: boolean, logs: { AdminActionRecord }?)
# Event Listeners
# ClientAPI.OnDetection(callback: (incident) -> ())
Fires whenever any detector reports a verified violation. Use this to render real-time toast alerts or log notifications in your custom UI:
RACClient.OnDetection(function(incident)
print(string.format("🚨 Violation: %s on %s (Risk: +%d)",
incident.detectorName,
incident.username,
incident.riskAdded
))
end)
# ClientAPI.OnWarning(callback: (warning) -> ())
Fires when the server issues a warning modal to the local player:
RACClient.OnWarning(function(warningData)
print("Warning received from server:", warningData.reason)
end)
# Next Steps
- Follow the implementation tutorial in Building Custom Admin GUIs.
- Review Role-Based Access Control.