#Plugin

1 messages · Page 1 of 1 (latest)

zinc thicket
#

`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`

versed crownBOT
#

studio** You are now Level 1! **studio

zinc thicket
#

this code lists me how many items are offsale from category of accessories and clothings, if 1+ is it puts red ! above the outfit if 3+ are it puts blue ! in first outfit

#

`local outfit = workspace.Outfits["Outfits 1"].LC

for _, child in ipairs(outfit:GetChildren()) do
if child:IsA("BillboardGui") and child.Name == "OffsaleIndicator" then
child:Destroy()
end
end`

zinc thicket
#

now this code is fine, however when i try to put this into plugin that when clicked on starts ui with 2 buttons-scan button and clearing button

#

i tried to make this code to scan all outfits in the game, however even after like 20+ unsuccesful attempts i gave up and had to ask someone for help here

#

what i would want is for scan button to scan every single outfit in the game, the scan should include only 2 categories-accessories(9) and clothing(3), if 1 or 2 items are offsale red ! should pop up above outfit, if its 3+ items then it should be blue !, then clearing button should clear every ! from outfits

#

The folder structure is really easy, under workspace there is folder outfits, under folder outfits there are many folders, they all matter since they all store outfits, all are named LC

#

Workspace
Outfits
Outfits 1,2,3,4,5,6,7,9,10,11(10 folders total)
LC

#

outfits are named LC and there is many of them in each folder

zinc thicket
#

the codes i provided work perfectly for the first outfit, they do the things i want relatively good, but when i try to make plugin for every outfit in the game for some reason it doesnt work, my other plugins that include all outfits work for some reason but this one i cannot make work no matter what i try😞

#

it also takes few second to load to check the first outfit, so i dont know maybe the studio cannot handle the plugin and it goes too fast but i doubt thats the reason

versed crownBOT
#

studio** You are now Level 2! **studio

wicked orbit
#

holy essay

#

jst get to the point 🙏

zinc thicket
zinc thicket
#

Just help me already someone

magic sphinx
#

i hate roblox apis