Advertisement
pastebinxx

Untitled

May 2nd, 2025 (edited)
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local playerGui = game:WaitForChild("CoreGui")
  3. local moneyValue = player:WaitForChild("Moneyz")
  4.  
  5. -- Alte GUI entfernen, falls vorhanden
  6. local existingGui = playerGui:FindFirstChild("MoneyDisplay")
  7. if existingGui then
  8. existingGui:Destroy()
  9. end
  10.  
  11. -- ScreenGui erstellen
  12. local screenGui = Instance.new("ScreenGui")
  13. screenGui.Name = "MoneyDisplay"
  14. screenGui.ResetOnSpawn = false
  15. screenGui.Parent = playerGui
  16.  
  17. -- TextLabel erstellen (füllt gesamten Bildschirm aus)
  18. local textLabel = Instance.new("TextLabel")
  19. textLabel.Size = UDim2.new(1, 0, 1, 0)
  20. textLabel.Position = UDim2.new(0, 0, 0, 0)
  21. textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  22. textLabel.BackgroundTransparency = 1 -- Unsichtbarer Hintergrund
  23. textLabel.TextColor3 = Color3.new(0, 0, 0)
  24. textLabel.TextTransparency = 0 -- Unsichtbarer Text
  25. textLabel.Font = Enum.Font.SourceSansBold
  26. textLabel.TextScaled = true
  27. textLabel.Text = "Money: 0"
  28. textLabel.Parent = screenGui
  29.  
  30. -- Funktion zur Formatierung mit Tausendertrennzeichen
  31. local function formatWithCommas(number)
  32. local formatted = tostring(number)
  33. while true do
  34. formatted, k = formatted:gsub("^(-?%d+)(%d%d%d)", '%1,%2')
  35. if k == 0 then break end
  36. end
  37. return formatted
  38. end
  39.  
  40. -- Update-Loop
  41. task.spawn(function()
  42. while true do
  43. pcall(function()
  44. textLabel.Text = "Money: " .. formatWithCommas(moneyValue.Value)
  45. end)
  46. task.wait(1)
  47. end
  48. end)
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement