
Key RequiredUniversal

if not game:GetService("RunService"):IsClient() then return end -- Ensure it's running on the client
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local function getPlayerInventory(player)
local inventory = {}
-- Check equipped tools
if player.Character then
for _, item in pairs(player.Character:GetChildren()) do
if item:IsA("Tool") then
table.insert(inventory, item.Name)
end
end
end
-- Check backpack tools
local backpack = player:FindFirstChild("Backpack")
if backpack then
for _, item in pairs(backpack:GetChildren()) do
if item:IsA("Tool") then
table.insert(inventory, item.Name)
end
end
end
if #inventory == 0 then
table.insert(inventory, "No Items")
end
return inventory
end
local function createOverheadGui(player)
if player == Players.LocalPlayer then return end -- Don't track yourself
local character = player.Character
if not character then return end
local head = character:FindFirstChild("Head")
if not head then return end
-- Remove existing GUI if it's already there
local existingGui = head:FindFirstChild("InventoryDisplay")
if existingGui then existingGui:Destroy() end
-- Create BillboardGui
local billboard = Instance.new("BillboardGui")
billboard.Name = "InventoryDisplay"
billboard.Size = UDim2.new(5, 0, 2, 0)
billboard.StudsOffset = Vector3.new(0, 3, 0)
billboard.AlwaysOnTop = true
billboard.Parent = head
local textLabel = Instance.new("TextLabel")
textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.BackgroundTransparency = 1
textLabel.TextScaled = true
textLabel.TextColor3 = Color3.new(1, 1, 1)
textLabel.TextStrokeTransparency = 0
textLabel.Font = Enum.Font.SourceSansBold
textLabel.Parent = billboard
end
local function updateOverheadGui(player)
if player == Players.LocalPlayer then return end -- Don't track yourself
local character = player.Character
if not character then return end
local head = character:FindFirstChild("Head")
if not head then return end
local billboard = head:FindFirstChild("InventoryDisplay")
if not billboard then
createOverheadGui(player)
billboard = head:FindFirstChild("InventoryDisplay")
end
local textLabel = billboard and billboard:FindFirstChildOfClass("TextLabel")
if textLabel then
local inventory = getPlayerInventory(player)
textLabel.Text = table.concat(inventory, ", ")
end
end
local function trackPlayer(player)
if player == Players.LocalPlayer then return end -- Don't track yourself
while true do
updateOverheadGui(player)
wait(1) -- Update every second
end
end
for _, player in ipairs(Players:GetPlayers()) do
if player ~= Players.LocalPlayer then
task.spawn(trackPlayer, player)
end
end
Players.PlayerAdded:Connect(function(player)
if player ~= Players.LocalPlayer then
task.spawn(trackPlayer, player)
end
end)No comments yet for this script.



