yes bc im not sure of how you do it
I put the script in server script service
can you show me the script you puted?
Sure itβs just this:
local http = game:GetService('HttpService')
local MarketPlace = game:GetService('MarketplaceService')
local ServerS = game:GetService('ServerStorage')
local Prices = {}
game.Players.PlayerAdded:Connect(function(player)
local PlayerId = player.UserId --Id Here
local Proxy = "https://scandalous-productive-area.glitch.me/" .."?link="
local Url1 = "inventory.roblox.com/v2/users/"..PlayerId.."/inventory/11?limit=100&sortOrder=Asc"..PlayerId
local Encoded = http:JSONEncode(Url1)
local res = http:GetAsync(Proxy..Url1)
res = http:JSONDecode(res)
if res.data then
for i,v in pairs(res.data) do
local Info = MarketPlace:GetProductInfo(v.assetId,Enum.InfoType.Asset)
if Info.PriceInRobux ~= nil then
Prices[v.assetId] = {["Price"] = Info.PriceInRobux,["Id"] = v.assetId}
end
end
end
print(Prices)
game.ReplicatedStorage.Shirts:FireClient(player,Prices)
end)
now its working lol i think something was not right in the code
@hya123456h maybe i didnt the title really clear but what i ment was like the shirts and t-shirts you created not own
Just updated the game now so it should only do shirts u made
what did you cahnged so i change in the code
did you change the url bc i dont know how to get urls from things
Ye so now it gets the t-shirts and shirts you own.
This is just the code:
local http = game:GetService('HttpService')
local MarketPlace = game:GetService('MarketplaceService')
local ServerS = game:GetService('ServerStorage')
local Prices = {}
game.Players.PlayerAdded:Connect(function(player)
local PlayerId = player.UserId --Id Here
local Proxy = "https://scandalous-productive-area.glitch.me/" .."?link="
local Url1 = "inventory.roblox.com/v2/users/"..PlayerId.."/inventory/11?limit=100&sortOrder=Asc"..PlayerId
local Encoded = http:JSONEncode(Url1)
local res = http:GetAsync(Proxy..Url1)
res = http:JSONDecode(res)
if res.data then
for i,v in pairs(res.data) do
local Info = MarketPlace:GetProductInfo(v.assetId,Enum.InfoType.Asset)
if Info.PriceInRobux ~= nil and Info.Creator.Id == player.UserId then
print(Info)
Prices[v.assetId] = {["Price"] = Info.PriceInRobux,["Id"] = v.assetId}
end
end
end
print(Prices)
local Url2 = "inventory.roblox.com/v2/users/"..PlayerId.."/inventory/2?limit=100&sortOrder=Asc"..PlayerId
Encoded = http:JSONEncode(Url2)
res = http:GetAsync(Proxy..Url2)
res = http:JSONDecode(res)
print(res)
if res.data then
for i,v in pairs(res.data) do
local Info = MarketPlace:GetProductInfo(v.assetId,Enum.InfoType.Asset)
if Info.PriceInRobux ~= nil and Info.Creator.Id == player.UserId then
print(Info)
Prices[v.assetId] = {["Price"] = Info.PriceInRobux,["Id"] = v.assetId}
end
end
end
game.ReplicatedStorage.Shirts:FireClient(player,Prices)
end)
yo if you want it more orgenized and with name this is the code i used chatgpt lol
local http = game:GetService('HttpService')
local MarketPlace = game:GetService('MarketplaceService')
local ServerS = game:GetService('ServerStorage')
local Prices = {}
game.Players.PlayerAdded:Connect(function(player)
local PlayerId = player.UserId --Id Here
local Proxy = "https://scandalous-productive-area.glitch.me/" .. "?link="
local function processInventory(Url)
local Encoded = http:JSONEncode(Url)
local res = http:GetAsync(Proxy .. Url)
res = http:JSONDecode(res)
if res.data then
for i, v in pairs(res.data) do
local Info = MarketPlace:GetProductInfo(v.assetId, Enum.InfoType.Asset)
if Info.PriceInRobux ~= nil and Info.Creator.Id == player.UserId then
Prices[v.assetId] = {
["Price"] = Info.PriceInRobux,
["Id"] = v.assetId,
["Name"] = Info.Name, -- Include the shirt name
}
end
end
end
end
-- Process shirts
local Url1 = "inventory.roblox.com/v2/users/" .. PlayerId .. "/inventory/11?limit=100&sortOrder=Asc" .. PlayerId
processInventory(Url1)
-- Process pants
local Url2 = "inventory.roblox.com/v2/users/" .. PlayerId .. "/inventory/2?limit=100&sortOrder=Asc" .. PlayerId
processInventory(Url2)
game.ReplicatedStorage.Shirts:FireClient(player, Prices)
end)
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.