Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local playerGui = game:WaitForChild("CoreGui")
- local moneyValue = player:WaitForChild("Moneyz")
- -- Alte GUI entfernen, falls vorhanden
- local existingGui = playerGui:FindFirstChild("MoneyDisplay")
- if existingGui then
- existingGui:Destroy()
- end
- -- ScreenGui erstellen
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "MoneyDisplay"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = playerGui
- -- TextLabel erstellen (füllt gesamten Bildschirm aus)
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(1, 0, 1, 0)
- textLabel.Position = UDim2.new(0, 0, 0, 0)
- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- textLabel.BackgroundTransparency = 1 -- Unsichtbarer Hintergrund
- textLabel.TextColor3 = Color3.new(0, 0, 0)
- textLabel.TextTransparency = 0 -- Unsichtbarer Text
- textLabel.Font = Enum.Font.SourceSansBold
- textLabel.TextScaled = true
- textLabel.Text = "Money: 0"
- textLabel.Parent = screenGui
- -- Funktion zur Formatierung mit Tausendertrennzeichen
- local function formatWithCommas(number)
- local formatted = tostring(number)
- while true do
- formatted, k = formatted:gsub("^(-?%d+)(%d%d%d)", '%1,%2')
- if k == 0 then break end
- end
- return formatted
- end
- -- Update-Loop
- task.spawn(function()
- while true do
- pcall(function()
- textLabel.Text = "Money: " .. formatWithCommas(moneyValue.Value)
- end)
- task.wait(1)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement