Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a GAME PASS give cash in a Game?

I have been trying to do this for a while. Just need some help. NOT A DEV PRODUCT, a game pass.

3 comments

0

http://wiki.roblox.com/index.php?title=Game_pass look at the script on the bottom.

0

How would i add it so it gives money?

0

Use the PromptPurchaseFinished event and check if the 3rd parameter is true. If it is, then give them cash.

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.