Advertisement
Sungmingamerpro13

Coins + Money(ScreenGui) Main Game

Mar 7th, 2023
858
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.69 KB | None | 0 0
  1. local MPS = game:GetService("MarketplaceService")
  2.  
  3. local player = game.Players.LocalPlayer
  4. local CoinsAmount = script.Parent.CoinsImage.TextLabel
  5. local MoneyAmount = script.Parent.CashImage.TextLabel
  6. local AddCoins = script.Parent.CoinsImage.AddCoins
  7.  
  8. player:WaitForChild("Coins"):GetPropertyChangedSignal("Value"):Connect(function()
  9.     CoinsAmount.Text = player.Coins.Value
  10. end)
  11.  
  12. CoinsAmount.Text = player.Coins.Value
  13.  
  14. player:WaitForChild("Money"):GetPropertyChangedSignal("Value"):Connect(function()
  15.     MoneyAmount.Text = player.Money.Value
  16. end)
  17.  
  18. MoneyAmount.Text = player.Money.Value
  19.  
  20. AddCoins.MouseButton1Click:Connect(function()
  21.     MPS:PromptProductPurchase(player, 1341739140)
  22. end)
  23.  
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement