local Players = game:GetService("Players") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local gui = Instance.new("ScreenGui") gui.Name = "RarityScannerUI" gui.ResetOnSpawn = false gui.Parent = playerGui local frame = Instance.new("Frame") frame.Size = UDim2.fromScale(0.32, 0.45) frame.Position = UDim2.fromScale(0.05, 0.3) frame.BackgroundColor3 = Color3.fromRGB(18,18,18) frame.BackgroundTransparency = 0.2 frame.BorderSizePixel = 0 frame.Active = true frame.Draggable = true frame.Parent = gui local stroke = Instance.new("UIStroke") stroke.Thickness = 2 stroke.Color = Color3.fromRGB(55,55,55) stroke.Parent = frame local title = Instance.new("TextLabel") title.Size = UDim2.fromScale(1,0.12) title.BackgroundTransparency = 1 title.Text = "RARITY SCANNER" title.Font = Enum.Font.GothamBold title.TextScaled = true title.TextColor3 = Color3.fromRGB(255,255,255) title.Parent = frame local list = Instance.new("TextLabel") list.Size = UDim2.fromScale(0.9,0.8) list.Position = UDim2.fromScale(0.05,0.16) list.BackgroundTransparency = 1 list.TextColor3 = Color3.new(1,1,1) list.TextXAlignment = Enum.TextXAlignment.Left list.TextYAlignment = Enum.TextYAlignment.Top list.TextWrapped = true list.TextScaled = false list.TextSize = 16 list.Font = Enum.Font.Gotham list.Text = "" list.Parent = frame local rarities = { Uncommon = {Color = Color3.fromHex("#00ff00")}, Epic = {Color = Color3.fromHex("#8a2be2")}, Legendary = {Color = Color3.fromHex("#ffff00")}, Mythic = {Color = Color3.fromHex("#ff0000")}, Ethereal = {Color = Color3.fromHex("#ff1493")}, Celestial = {Color = Color3.fromHex("#00ffff")}, Zenith = {Color = Color3.fromHex("#800080")}, Divine = {Color = Color3.fromHex("#000000")}, Nil = {Color = Color3.fromHex("#635f62")} } local createdObjects = {} local function clearAll() for _, obj in ipairs(createdObjects) do if obj and obj.Parent then obj:Destroy() end end table.clear(createdObjects) end local function colorMatches(colorSeq, targetColor) local keypoints = colorSeq.Keypoints if #keypoints > 0 then local c = keypoints[1].Value return math.abs(c.R - targetColor.R) < 0.02 and math.abs(c.G - targetColor.G) < 0.02 and math.abs(c.B - targetColor.B) < 0.02 end return false end local function scan() clearAll() local counts = {} for name,_ in pairs(rarities) do counts[name] = 0 end for _, emitter in ipairs(workspace:GetDescendants()) do if emitter:IsA("ParticleEmitter") then for rarityName, data in pairs(rarities) do if colorMatches(emitter.Color, data.Color) then local parent = emitter.Parent if parent and parent:IsA("BasePart") then counts[rarityName] += 1 local h = Instance.new("Highlight") h.Adornee = parent h.FillColor = data.Color h.OutlineColor = Color3.new(1,1,1) h.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop h.Parent = parent table.insert(createdObjects, h) local billboard = Instance.new("BillboardGui") billboard.Size = UDim2.new(0,150,0,40) billboard.StudsOffset = Vector3.new(0,3,0) billboard.AlwaysOnTop = true billboard.Parent = parent local label = Instance.new("TextLabel") label.Size = UDim2.fromScale(1,1) label.BackgroundTransparency = 1 label.TextScaled = true label.Font = Enum.Font.GothamBold label.Text = rarityName label.TextColor3 = data.Color label.Parent = billboard table.insert(createdObjects, billboard) end end end end end local text = "Rarity Leaderboard\n\n" for rarityName,_ in pairs(rarities) do text ..= rarityName .. ": " .. counts[rarityName] .. "\n" end list.Text = text end task.spawn(function() while true do scan() task.wait(0.25) end end)