Gamepass problem!

So, I made a gamepass wich you can buy in the gui, but I’m also going to make it buyable iwth cash so instead of the server just checking if the player has the gamepass, I made a value wich is located in the player, so the server can see if the player has it. The value can be set to true if the player buys the gamepass with money or the real gamepass for robux, but how can I send a message from the client to the server to change the gamepass value to true without people exploiting?

this is the real gamepass script the money will look just like this

local function gamepassPurchaseFinished(player, gamepassId, wasPurchased)
	if wasPurchased == true and gamepassId == doubleMoneyGamepassId then
		gamepassButton.Text = "Owned"
		moneyBuyButton.Text = "Owned"
		moneyBuyButton.BuyDoubleMoneyWithMoneyScript.Enabled = false
		script.Enabled = false
	end
end

You don’t.
Instead you use MarketplaceService.PromptGamePassPurchaseFinished on the server to see if a player successfully purchased a game pass and then handle it from there.
Here is example code on how to handle it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.