Hello, it has come to my attention that methods related to humanoid descriptions and character loading return placeholder results for banned users. These placeholder results are consistent between banned accounts(however they may change in future updates). I thought to make a Roblox script that checks if users are banned or not, based on if their humanoid descriptions match exactly that placeholder. This method can give a false result if a user intentionally sets their character settings to exactly that of the placeholder(but it should work for most cases). It doesn’t require HTTP service, since it’s using built in APIs.
Anyways, here’s the code:
local bodyParts = {"Head", "LeftArm", "LeftLeg", "RightArm", "RightLeg", "Torso"}
local arrays = {
accessories = {"Back", "Face", "Front", "Hair", "Hat", "Neck", "Shoulders", "Waist"},
anims = {"Climb", "Fall", "Idle", "Jump", "Mood", "Run", "Swim", "Walk"},
colors = table.clone(bodyParts),
scales = {"Depth", "Head", "Height", "Width"},
clothes = {"GraphicTShirt", "Pants", "Shirt"}
}
arrays.bodyParts = table.clone(bodyParts)
table.insert(arrays.bodyParts, "Face")
local function attach(arr: {string}, s: string): () for i, v in pairs(arr) do arr[i] = v..s end end
attach(arrays.accessories, "Accessory")
attach(arrays.anims, "Animation")
attach(arrays.colors, "Color")
attach(arrays.scales, "Scale")
local gray = Color3.fromRGB(163, 162, 165)
local function check(description: HumanoidDescription, arr: {string}, val: any): boolean
for _, s in pairs(arr) do
if description[s] ~= val then return true end
end
return false
end
local function validDescription(description: HumanoidDescription): boolean
return check(description, arrays.accessories, "") or check(description, arrays.anims, 0)
or check(description, arrays.colors, gray) or check(description, arrays.bodyParts, 0)
or check(description, arrays.clothes, 0) or check(description, arrays.scales, 1)
or description.BodyTypeScale ~= 0 or description.ProportionScale ~= 0
end
local function validChild(c: BodyPartDescription): boolean
return not c:IsA("BodyPartDescription") or c.AssetId ~= 0 or c.Color ~= gray or c.Instance ~= nil
end
return function(userId: number): boolean
local description = game.Players:GetHumanoidDescriptionFromUserId(userId)
if validDescription(description) then return false end
local children = description:GetChildren()
if #children ~= 6 then return false end
local available = table.clone(bodyParts)
for _, v in pairs(children) do
if validChild(v) then return false end
local index = table.find(available, v.BodyPart.Name)
if not index then return false end
table.remove(available, index)
if #v:GetChildren() ~= 0 then return false end
end
return true
end
put it in a module script then run as follows:
local isBanned = require(script.ModuleScript)
print(isBanned(4)) --true
print(isBanned(1)) --false
the isBanned
function can error if the API request raises an error, I did that intentionally so you can handle errors and retry logic yourself by wrapping the isBanned
method in a pcall
.
PS: You can also do this with the character result of CreateHumanoidModelFromUserId
, basically check all the properties of each instance it has and if they match the default gray avatar or not. I just don’t want to make a topic for it because it’s very similar in nature with the humanoid description one(so you can steal ideas from here if you want to make it yourself).