
413 Views
18 Executions
Print Your entire Inventory
Universal Script 📌
becausewhyyPublished 10
6 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
prints ur entire backpack/inventory and says how many of that thing u have
local player = game.Players.LocalPlayer
local function getAllItems()
local items = {}
local function scan(container)
if not container then return end
for _, v in pairs(container:GetChildren()) do
if v:IsA("Tool") then
items[v.Name] = (items[v.Name] or 0) + 1
end
end
end
scan(player:FindFirstChild("Backpack"))
scan(player.Character)
return items
end
local function printSortedInventory()
local items = getAllItems()
local list = {}
for name, count in pairs(items) do
table.insert(list, {name = name, count = count})
end
table.sort(list, function(a, b)
return a.count < b.count
end)
for _, item in ipairs(list) do
print(item.name .. " x" .. item.count)
end
end
printSortedInventory()
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!




