How to get all players shirts, pants and t-shirts of player

A new game called PLS DONATE has been introduced in Roblox, this is the most requested tutorial of everyone since no one knew how to get all players shirts and pants correctly

You need to know basic scripting and a bit of https service before reading the tutorial

This is an easy tutorial so read carefully

Enable https requests in your game

To do that, go to your game settings and do as given in the image below:

This is highly important for this tutorial

Each asset in Roblox have a different asset id

If I say asset id 11 are cool, it means Shirts are cool So, basically asset id is a id given for each asset type

This is the link: https://robloxdevforumproxy.glitch.me/users/inventory/list-json?assetTypeId=11&cursor=&itemsPerPage=100&pageNumber=%x&sortOrder=Desc&userId=1606095040

It will get all the shirts of my friend, because the userid in the link is my friend’s profile

You can see the last digits of the link is the userid, you can keep it with your id to get your shirts and pants

Note that if your inventory is private then it cannot get your shirts and pants

If you notice the link carefully, it has a assetTypeId=11, it means it will get all the asset of that type from the userid mentioned

Don’t copy paste scripts, this is not a copy paste session Its easy, so try it yourself, it would be nice

Now as you know to get the player shirts, you need to keep the userid in the link Do it like this:

local httpsservice = game:GetService("HttpService") local url = "https://robloxdevforumproxy.glitch.me/users/inventory/list-json?assetTypeId=11&cursor=&itemsPerPage=100&pageNumber=%25x&sortOrder=Desc&userId=" - the url I kept in tutorial - also make sure you remove the userid which is in the link if any local assetid = {2,11,12} - t shirt assets,shirts and pants game.Players.PlayerAdded:Connect(function(plr) local linkforplayer = url..plr.UserId - we add the userid to the link local datafromlink = httpsservice:GetAsync(linkforplayer,true) - second argument is cache, I kept it true because its needed for this system - the data we get from the link is in JSON format so we have to decode it to lua local readabledata = httpsservice:JSONDecode(datafromlink) print(readabledata) end)

Read the script carefully

Try to run it

You will notice it prints the player shirts data

This is the shirt data, i will tell later in this tutorial on how to get shirt names and all other things of it

As I told earlier, the script gets info from the link, it means all the data in the link are shirts owned by player

How to get pants and t-shirts too? If you remember I’ve told you the assetid in the link, if the asset id in the link is shirts id then it will get shirts, if its pants id it will get pants, same with t-shirts

Now, to get the t-shirts and pants, we have to replace the asset id in the link with 2,11,12 or t shirt id, shirt id, and pants id

Then it will get all player shirts and pants

This is how you do it:

local assetid = {2,11,12} - t shirt assets,shirts and pants game.Players.PlayerAdded:Connect(function(plr) for i = 1,3 do - this a number, we use this number to get the id from the asset id table local linkforplayer = "https://robloxdevforumproxy.glitch.me/users/inventory/list-json?assetTypeId="..assetid[i].."&cursor=&itemsPerPage=100&pageNumber=%25x&sortOrder=Desc&userId="..plr.UserId local datafromlink = httpsservice:GetAsync(linkforplayer,true) - second argument is cache, I kept it true because its needed for this system - the data we get from the link is in JSON format so we have to decode it to lua local readabledata = httpsservice:JSONDecode(datafromlink) print(readabledata) end end)

Try to run the script after done

You will see 3 tables:

Now, you got all the data of the player’s assets The tutorial is done

You can read further to check how to read shirts data from the table

You can actually see, each table have these:

All the items which you mostly need are in the Items table

You can actually see each item in the item table have alot of stuff too

To get all shirts, you can do

for i,v in pairs(table["Data"]["Items"]) do print[v["Creator"]) end

It prints the creator table in all the items

And to get player made shirts You can do something like

for i,v in pairs(table["Data"]["Items"]) do if v["Creator"]["CreatorTargetId"] == plr.UserId then print(v["Item"]["AssetId"].." is owned by the player") end end

However I am not showing how to make an entire game like that, because its not good and you should take permission from the owner of that game before making a copy of it

So this is how you get the player’s assets and check if the player owns them If you know basic scripting, you can easily make something like that game from referring to this basic tutorial

All asset Id

The API documentation link is here

How to get player owned shirts without public inventory

Here is a topic by Forummer which might get the player inventory even if its private Player Created Gamepasses - #3 by Forummer

Link nội dung: https://chodichvu.vn/tshirts-roblox-a88530.html