My Code:
local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
local MarketplaceService = game:GetService("MarketplaceService")
local Workspace = game:GetService("Workspace")
local config = {
products = false,
shirts = true,
pants = true,
ugc = true,
}
local function handleRequestErrors(success: boolean, result: string): any
if not success then
return nil
end
local decodeSuccess, decodedResult = pcall(HttpService.JSONDecode, HttpService, result)
if not decodeSuccess then
return nil
end
return decodedResult
end
local function getUserGamepasses(userId: number)
if not config.gamepasses then return end
local gamesUrl = "https://games.roproxy.com/v2/users/" .. userId .. "/games?accessFilter=2&limit=50&sortOrder=Asc"
local success, result = pcall(function()
return HttpService:GetAsync(gamesUrl)
end)
local decodedGamesResult = handleRequestErrors(success, result)
if decodedGamesResult and decodedGamesResult.data and #decodedGamesResult.data > 0 then
for _, gameInfo in ipairs(decodedGamesResult.data) do
local gameId = gameInfo.id
local gamepassesUrl = "https://games.roproxy.com/v1/games/" .. gameId .. "/game-passes?limit=100&sortOrder=Asc"
local success2, result2 = pcall(function()
return HttpService:GetAsync(gamepassesUrl)
end)
local decodedGamepassesResult = handleRequestErrors(success2, result2)
if decodedGamepassesResult and decodedGamepassesResult.data and #decodedGamepassesResult.data > 0 then
for _, gamepassDetail in ipairs(decodedGamepassesResult.data) do
if gamepassDetail.price then
print(`Game Pass Adı: {gamepassDetail.displayName}, Fiyat: {gamepassDetail.price} Robux, Oyun ID: {gameId}`)
end
end
end
end
end
end
local function getUserCreatedCatalogItems(username: string, assetType: string)
local categoryId = 0
if assetType == "Shirt" then
if not config.shirts then return end
categoryId = 12
elseif assetType == "Pants" then
if not config.pants then return end
categoryId = 13
elseif assetType == "UGC" then
if not config.ugc then return end
categoryId = 3
end
if categoryId == 0 then return end
local url = `https://catalog.roproxy.com/v1/search/items/details?Category={categoryId}&CreatorName={username}`
local success, result = pcall(function()
return HttpService:GetAsync(url)
end)
local decodedResult = handleRequestErrors(success, result)
if decodedResult and decodedResult.data and #decodedResult.data > 0 then
for _, item in ipairs(decodedResult.data) do
if item.price then
print(`{assetType} Adı: {item.name}, Fiyat: {item.price} Robux, AssetId: {item.id}`)
end
end
end
end
local function getUserDeveloperProducts(userId: number)
if not config.products then return end
local gamesUrl = `https://games.roproxy.com/v2/users/{userId}/games?accessFilter=2&limit=50&sortOrder=Asc`
local success, result = pcall(function()
return HttpService:GetAsync(gamesUrl)
end)
local decodedGamesResult = handleRequestErrors(success, result)
if decodedGamesResult and decodedGamesResult.data and #decodedGamesResult.data > 0 then
for _, gameInfo in ipairs(decodedGamesResult.data) do
local productIdUrl = `https://develop.roproxy.com/v1/assets/{gameInfo.id}/product-ids`
local success2, result2 = pcall(function()
return HttpService:GetAsync(productIdUrl)
end)
local decodedProductResult = handleRequestErrors(success2, result2)
if decodedProductResult and decodedProductResult.data and #decodedProductResult.data > 0 then
for _, productId in ipairs(decodedProductResult.data) do
print(`Product ID: {productId}, Oyun Adı: {gameInfo.name}, Oyun ID: {gameInfo.id}`)
end
end
end
end
end
local placesFolder = Workspace:WaitForChild("places")
local function setupStand(stand)
local ownerIdValue = stand:WaitForChild("OwnerId", 10)
local proxyPart = stand:WaitForChild("Proxy", 10)
if not ownerIdValue or not proxyPart or not proxyPart:WaitForChild("ProximityPrompt", 10) then
warn(`Stand "${stand.Name}" için gerekli parçalar bulunamadı.`)
return
end
local prompt = proxyPart:WaitForChild("ProximityPrompt")
ownerIdValue.Changed:Connect(function(newOwnerId)
if newOwnerId ~= 0 then
local player = Players:GetPlayerByUserId(newOwnerId)
if player then
print("--- Yeni stand sahibi:", player.Name, "---")
getUserCreatedCatalogItems(player.Name, "Shirt")
getUserCreatedCatalogItems(player.Name, "Pants")
getUserCreatedCatalogItems(player.Name, "UGC")
getUserGamepasses(player.UserId)
getUserDeveloperProducts(player.UserId)
print("-------------------------------------------------")
end
end
end)
end
for _, stand in ipairs(placesFolder:GetChildren()) do
setupStand(stand)
end
placesFolder.ChildAdded:Connect(setupStand)
There’s a problem. With this code, I get the AssestID of the shirts and pants sold by the player. However, when I change the template of a shirt or pants with the code, the image doesn’t appear. However, when I manually enter the AssestID in Studio, the AssestID is automatically changed and the image of thisrt/pants appears.