-- Keep inside ServerScriptService
-- Make sure you turn on HTTPService in Game Settings -> Security -> Allow HTTP Request
local HttpService = game:GetService("HttpService")
local InsertService = game:GetService("InsertService")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local url = ("https://inventory.roproxy.com/v2/users/%s/inventory?assetTypes=Gear&limit=100&sortOrder=Asc"):format(tostring(player.UserId))
player.CharacterAdded:Connect(function(character)
local success, output = pcall(function() return HttpService:JSONDecode(HttpService:GetAsync(url)) end)
if not success then
warn("Couldn't find Gears on from UserId, or user's account setting's isn't set to Everyone.")
else
for i, v in pairs(output.data)do
local assetModel = InsertService:LoadAsset(v.assetId)
local gearObject = assetModel:FindFirstChildOfClass("Tool")
gearObject.Parent = player.Backpack
assetModel:Destroy()
end
end
end)
end)
Roblox used to have a feature that was enabled by default that lets users spawn with their gear they bought from the catalog into games user’s or the user made. This script aims to bring that back.
It was disabled most likely due to all the updated and deprecated code that make the tools not work or error, but not all of them. Hopefully this can be of use to someone, I wish Roblox didn’t remove this feature from their platform, not much of a reason to buy gear anymore other than cosmetics.