I have been trying to do this for a while. Just need some help. NOT A DEV PRODUCT, a game pass.
I stole this from the wiki, credits to the wiki and to UgOsMily for sending link..
Here is the script.. Follow the instructions... I am pretty sure this should be a LocalScript. in StarterGui...
You may change the variable CASHHHH to whatever leaderstat you have and change the passId to whatever gamepass Id you have Change "Amount" to how much money you wanna give to the player
---------------------EDIT VVVVV------------------------ local CASHHHH = game.Players.LocalPlayer.leaderstats.Cash -- Don't add .Value at the end of this local Amount = 100 ---------------------EDIT ^^^^^ ---------------------- local passId = 0000 --change this to your GamePass Id local marketplaceService = game:GetService("MarketplaceService") marketplaceService.PromptPurchaseFinished:connect(function(player,assetId,isPurchased) if isPurchased then if assetId == passId then CASHHHH.Value = CASHHHH.Value + Amount end end end)