Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local Player = Players.LocalPlayer
- local PlayerGui = Player.PlayerGui
- local Gui = PlayerGui:WaitForChild("MainUI")
- local Frame = Gui.Frame
- local Label = Frame.Diamonds -- Replace "Diamonds With Your Currency"
- local Leaderstats = Player:WaitForChild("leaderstats")
- local Diamonds = Leaderstats:WaitForChild("YourCurrencyHere")
- local function UpdateDiamonds(newValue) -- Change UpdateDiamonds To UpdateYourCurrencyNameHere
- Label.Text = "Diamonds: " .. tostring(newValue) -- Same Here Change Diamonds To Like Coins Or Sapphires
- end
- UpdateDiamonds(Diamonds.Value) -- Change The Function Here
- Diamonds.Changed:Connect(function(newValue) -- And Here
- UpdateDiamonds(newValue)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement