Guest User

GIVE CASH SCRIPT

a guest
Jul 12th, 2019
39,917
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- If you do not know how to use this or the GUI, check out my YouTube video tutorial on this.
  2. -- Replace the 0's with your ID's
  3. -- Delete what you dont use, besides the first part of the function
  4.  
  5.  
  6. game.StarterGui.ResetPlayerGuiOnSpawn = false
  7. old_fog = game.Lighting.FogStart
  8. local MarketplaceService = game:GetService("MarketplaceService")
  9.  
  10. function getPlayerFromId(id)
  11. for i,v in pairs(game.Players:GetChildren()) do
  12. if v.userId == id then
  13. return v
  14. end
  15. end
  16. return nil
  17. end
  18.  
  19. MarketplaceService.ProcessReceipt = function(receiptInfo)
  20. local productId = receiptInfo.ProductId
  21. local playerId = receiptInfo.PlayerId
  22. local player = getPlayerFromId(playerId)
  23. local productName
  24.  
  25. -- Down below is an example of a Cash boost
  26.  
  27. -------------------------------------------------------------------
  28.  
  29. if productId == 607636992 then
  30. local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
  31. if cashmoney then
  32. cashmoney.Value = cashmoney.Value + 1000
  33. end
  34.  
  35.  
  36. elseif productId == 607637408 then
  37. local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
  38. if cashmoney then
  39. cashmoney.Value = cashmoney.Value + 15000
  40. end
  41.  
  42.  
  43.  
  44. elseif productId == 607637715 then
  45. local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
  46. if cashmoney then
  47. cashmoney.Value = cashmoney.Value + 50000
  48. end
  49. --
  50.  
  51.  
  52. elseif productId == 607665907 then
  53. local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
  54. if cashmoney then
  55. cashmoney.Value = cashmoney.Value + 500000
  56. end
  57.  
  58.  
  59.  
  60. elseif productId == 607638408 then
  61. local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
  62. if cashmoney then
  63. cashmoney.Value = cashmoney.Value + 1000000
  64. end
RAW Paste Data