Advertisement
HowToRoblox

PurchaseScript

Oct 26th, 2019
3,080
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. Player = game.Players.LocalPlayer
  2.  
  3. local ErrorSound = game.Workspace.ErrorSound
  4. local SuccessSound = game.Workspace.CashSoundEffect
  5.  
  6. script.Parent.MouseButton1Click:Connect(function()
  7.            
  8.     if Player.leaderstats.Money.Value >= 70 then
  9.         Player.leaderstats.Money.Value = Player.leaderstats.Money.Value - 70
  10.    
  11.         game.ReplicatedStorage.GravityCoil:clone().Parent = Player:WaitForChild("Backpack")
  12.  
  13.         SuccessSound:Play()
  14.     else
  15.         ErrorSound:Play()  
  16.     end    
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement