`local MarketplaceService = game:GetService("MarketplaceService")
local hd = workspace.Outfits["Outfits 1"].LC.HumanoidDescription
local outfitModel = workspace.Outfits["Outfits 1"].LC
local ids = {}
-- Accessories
for _, acc in ipairs(hd:GetAccessories(true)) do
table.insert(ids, acc.AssetId)
end
-- Clothing
for _, prop in ipairs({"Shirt", "Pants", "GraphicTShirt"}) do
local id = tonumber(hd[prop]) or 0
if id > 0 then
table.insert(ids, id)
end
end
-- Count offsale
local offsaleCount = 0
for _, id in ipairs(ids) do
local success, info = pcall(function()
return MarketplaceService:GetProductInfo(id, Enum.InfoType.Asset)
end)
if success and info and not info.IsForSale then
offsaleCount += 1
end
end
print("Offsale items:", offsaleCount)
-- Create the "!" indicator
if offsaleCount >= 1 then
local exMark = Instance.new("BillboardGui")
exMark.Name = "OffsaleIndicator"
exMark.Size = UDim2.new(0, 50, 0, 50)
exMark.StudsOffset = Vector3.new(0, 4, 0)
exMark.AlwaysOnTop = true
exMark.Adornee = outfitModel:FindFirstChildWhichIsA("BasePart")
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.BackgroundTransparency = 1
label.Text = "!"
label.TextScaled = true
if offsaleCount >= 3 then
label.TextColor3 = Color3.fromRGB(0, 150, 255) -- Blue
elseif offsaleCount == 2 then
label.TextColor3 = Color3.fromRGB(0, 255, 0) -- Green
else
label.TextColor3 = Color3.fromRGB(255, 0, 0) -- Red
end
label.Font = Enum.Font.SourceSansBold
label.Parent = exMark
exMark.Parent = outfitModel
end`
** You are now Level 1! **