hi hello everyone can anyone help me. about this problem
so the story is I want to make a game like pls donate but, I want to make an icon where when people Clam Stand a Shirt and Gamepass icon will appear. I’ve tried to make it but failed. can anyone help me???
Photo Stand:
Photo
Shirt Script:
local UrlA = "https://catalog.roproxy.com/v1/search/items/details?Category=3&CreatorName="
local function getUserGeneratedTShirtsRecursive(username, SignPrices, tshirts, cursor)
tshirts = tshirts or {}
local requestUrl = UrlA
local data = HttpService:JSONDecode(HttpService:GetAsync(UrlA .. username)).data
if data then
table.sort(data,
function(a,b)
return a.price < b.price
end
)
for _, item in ipairs(data) do
local e,s = pcall(function()
table.insert(tshirts, item.id)
local newBtn = script.Template:Clone()
local price = item.price
newBtn.PurchaseButton.Text = "$"..price
--newBtn.PurchaseButton.ImageLabel.Image = "https://www.roblox.com/asset-thumbnail/image?assetId="..newBtn.ImportantValues.AssetId.."&width=420&height=420&format=png"
newBtn.LayoutOrder = price
newBtn.Name = price
newBtn.ImportantValues.AssetId.Value = item.id
newBtn.Parent = SignPrices
end)
end
end
return tshirts
end
function AssetManager:GetAssets(Player, BoothUI)
getUserGeneratedTShirtsRecursive(Player.Name, BoothUI)
end
return AssetManager
GamePass Script:
local UrlB = "https://www.roproxy.com/users/inventory/list-json?assetTypeId=34&cursor=&itemsPerPage=100&pageNumber=%s&userId=%s"
local function getUserCreatedGamepassesRecursive(userId, SignPrices, gamepasses, pageNumber, lastLength)
gamepasses = {}
pageNumber = pageNumber or 1
lastLength = lastLength or math.huge
local requestUrl = UrlB:format(pageNumber, userId)
local success, result = pcall(function()
return HttpService:GetAsync(requestUrl)
end)
if success then
if result then
local success2, result2 = pcall(function()
return HttpService:JSONDecode(result)
end)
if success2 then
if result2 then
for _, gamepass in ipairs(result2.Data.Items) do
if gamepass.Creator.Id == userId and table.find(gamepasses, gamepass.Item.AssetId) == nil then
table.insert(gamepasses, gamepass.Item.AssetId)
local e,s = pcall(function()
local newBtn = script.Template:Clone()
local price = gamepass.Product.PriceInRobux
newBtn.Name = price
newBtn.PurchaseButton.Text = "$"..price
newBtn.ImageLabel.Image = "rbxassetid://"..gamepass.IconImageAssetId
newBtn.LayoutOrder = price
newBtn.ImportantValues.AssetId.Value = gamepass.Item.AssetId
newBtn.ImportantValues.AssetType.Value = "Gamepass"
newBtn.Parent = SignPrices
end)
end
end
else
warn(result)
getUserCreatedGamepassesRecursive(userId, gamepasses, pageNumber, lastLength)
end
end
else
warn(result)
getUserCreatedGamepassesRecursive(userId, gamepasses, pageNumber, lastLength)
end
return gamepasses
end
end
function AssetManager:GetAssets(Player, BoothUI)
getUserCreatedGamepassesRecursive(Player.UserId, BoothUI)
end
return AssetManager