Universal Script πŸ“Œ
416 Views
25 Executions

Print Your entire Inventory

Universal Script πŸ“Œ
becausewhyy
becausewhyyPublished 10
7 months ago
Get an executor
Please login to perform these actions:

Does it work?

Early reports

100% say it works Β· 1 report in the last 2 weeks

Also noticed:

Description

prints ur entire backpack/inventory and says how many of that thing u have

View Raw
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

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Universal Script πŸ“Œ
8.4k
32.8k
Bumped 5 minutes ago
Key System
Universal Script πŸ“Œ
1.1k
2.7k
Bumped 21 minutes ago
Universal Script πŸ“Œ
1.3k
5.9k
Bumped 23 minutes ago
Script hub
22.0k
4.3k
Bumped 1 hour ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
1.0k
2.2k
Bumped 2 hours ago
Universal Script πŸ“Œ
1.6k
5.9k
Bumped 2 hours ago
Script hub
164.7k
564.9k
Bumped 5 hours ago
Key System

Script hub

Hall of Fame #6

Verified script badgeAcro Hub OP SCRIPT

Script hub
3.0k
3.8k
Bumped 6 hours ago