Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Loot klasörünü al
- local lootFolder = game.Workspace:WaitForChild("Loot")
- -- Highlight ve isim etiketi ekleme fonksiyonu
- local function addVisuals(item)
- -- Model ise (Silah gibi)
- if item:IsA("Model") then
- local highlight = Instance.new("Highlight")
- highlight.Parent = item
- highlight.Adornee = item
- highlight.FillColor = Color3.fromRGB(170, 0, 255) -- Mor
- highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
- highlight.FillTransparency = 0.5
- highlight.OutlineTransparency = 0
- -- İsim etiketi ekle
- if item.PrimaryPart then
- local billboard = Instance.new("BillboardGui")
- billboard.Parent = item.PrimaryPart
- billboard.Adornee = item.PrimaryPart
- billboard.Size = UDim2.new(0, 50, 0, 12)
- billboard.StudsOffset = Vector3.new(0, 2, 0)
- billboard.AlwaysOnTop = true
- local label = Instance.new("TextLabel")
- label.Parent = billboard
- label.Size = UDim2.new(1, 0, 1, 0)
- label.BackgroundTransparency = 1
- label.TextColor3 = Color3.fromRGB(170, 0, 255) -- Mor yazı
- label.Font = Enum.Font.SourceSans
- label.TextSize = 12
- label.Text = item.Name
- label.TextScaled = false
- end
- -- MeshPart ise (Eşya gibi)
- elseif item:IsA("MeshPart") then
- local highlight = Instance.new("Highlight")
- highlight.Parent = item
- highlight.Adornee = item
- highlight.FillColor = Color3.fromRGB(0, 255, 0) -- Yeşil
- highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
- highlight.FillTransparency = 0.5
- highlight.OutlineTransparency = 0
- -- İsim etiketi ekle
- local billboard = Instance.new("BillboardGui")
- billboard.Parent = item
- billboard.Adornee = item
- billboard.Size = UDim2.new(0, 50, 0, 10)
- billboard.StudsOffset = Vector3.new(0, 1.5, 0)
- billboard.AlwaysOnTop = true
- local label = Instance.new("TextLabel")
- label.Parent = billboard
- label.Size = UDim2.new(1, 0, 1, 0)
- label.BackgroundTransparency = 1
- label.TextColor3 = Color3.fromRGB(0, 255, 0) -- Yeşil yazı
- label.Font = Enum.Font.SourceSans
- label.TextSize = 8
- label.Text = item.Name
- label.TextScaled = false
- end
- end
- -- Mevcut loot içeriklerine ekle
- for _, item in ipairs(lootFolder:GetDescendants()) do
- addVisuals(item)
- end
- -- Sonradan eklenenler için de
- lootFolder.DescendantAdded:Connect(function(item)
- addVisuals(item)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement