MAS Documentation
Table of Contents
API Reference
Core functions (WebhookService)
WebhookService.new()
Creates a new WebhookService instance.
ws:CheckBan(userId, placeId)
Checks MAS and Roblox bans, with automatic unban synchronization when enabled.
Parameters
userId(number) - Roblox user IDplaceId(number) - Place ID to check
Returns
{
is_banned = true/false,
mas_banned = true/false,
roblox_banned = true/false,
mas_available = true/false,
ban_data = {
mas = { ... },
roblox = { ... }
}
}
ws:AddBan(userId, reason, placeId, duration, isGlobal, excludeAltAccounts)
Adds a ban in MAS and/or Roblox (depending on feature toggles).
userId(number)reason(string)placeId(number)duration(number, optional) - minutes; omit/null for permanentisGlobal(boolean, optional) - MAS global banexcludeAltAccounts(boolean, optional) - Roblox alt handling
ws:RemoveBan(userId, placeId, reason, restrictionId)
Removes a ban from both systems when possible.
ws:SetupAutoBan()
Hooks player join to run ban checks (and auto-unban sync).
ws:GetStats()
Returns service statistics.
{
totalRequests = 100,
successfulRequests = 95,
failedRequests = 5,
rateLimitedRequests = 2,
robloxBanSuccess = 45,
robloxBanFailed = 2,
masBanSuccess = 48,
masBanFailed = 1,
autoUnbanSync = 3,
lastError = "Error message",
lastErrorTime = 1234567890,
apiStatus = "online",
queueSize = 0,
rateLimitRemaining = 50
}
Feature toggles
ws:SetRobloxBanAPI(enabled)ws:SetAltAccountDetection(enabled)ws:SetMASBanSystem(enabled)ws:SetAutoUnbanSync(enabled)
ws:GetFeatureStates()ws:SetAPIKey(newKey)ws:SetRobloxAPIKey(newKey)ws:SetWebhookURL(url)
HTTP: check user bans
Endpoint: /bans?api=1&user_id=[USER_ID]
Header:
X-API-Key: your_api_key_here
Or query: &api_key=your_api_key_here. Legacy: /bans?Bans=[USER_ID]&api_key=...
Example response
{
"success": true,
"is_banned": true,
"bans": [
{
"id": 123,
"reason": "Violation of rules",
"place_name": "Game Name",
"banned_by": "Moderator",
"created_at": "2024-04-05 12:00:00",
"expires_at": null,
"is_global": false
}
]
}