Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local workspace = game:GetService("Workspace")
- local itemsFolder = workspace:WaitForChild("Items")
- local runService = game:GetService("RunService")
- local function highlightItems()
- for _, model in pairs(itemsFolder:GetChildren()) do
- if model:IsA("Model") then
- local highlight = model:FindFirstChildOfClass("Highlight")
- if not highlight then
- local newHighlight = Instance.new("Highlight")
- newHighlight.FillColor = Color3.fromRGB(0, 255, 0)
- newHighlight.OutlineColor = Color3.fromRGB(0, 255, 0)
- newHighlight.FillTransparency = 0.5
- newHighlight.OutlineTransparency = 0
- newHighlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
- newHighlight.Parent = model
- end
- local billboardGui = model:FindFirstChildOfClass("BillboardGui")
- if not billboardGui then
- local newBillboardGui = Instance.new("BillboardGui")
- newBillboardGui.Size = UDim2.new(0, 100, 0, 25)
- newBillboardGui.StudsOffset = Vector3.new(0, 2, 0)
- newBillboardGui.Adornee = model:FindFirstChild("PrimaryPart") or model:FindFirstChildWhichIsA("BasePart")
- newBillboardGui.AlwaysOnTop = true
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(1, 0, 1, 0)
- textLabel.BackgroundTransparency = 1
- textLabel.TextColor3 = Color3.new(1, 1, 1)
- textLabel.Text = model.Name
- textLabel.TextScaled = true
- textLabel.Font = Enum.Font.SourceSansBold
- textLabel.Parent = newBillboardGui
- newBillboardGui.Parent = model
- end
- end
- end
- end
- while true do
- highlightItems()
- task.wait(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment