How do I make a x2 cash Gamepass?

So I was recently making a tycoon where you can buy weapons, build a house, and fight people. I have already made some game passes for extra speed and health. I tried to make a game pass that you could buy for x2 cash, but I failed. I hope we can figure this out.

Game Link: Beach Hotel Tycoon🐚🏖️ ☀️🌴Beach House Tycoon - Roblox

1 Like

make an if condition,
if the person has the gamepass then
gain1 = +gain1
gain2 = +gain2
among others…

1 Like

que tal si le añades una sala de batalla

You would make a gamepass, and use the ID to see if the any user has it. When any money is given to them, check to see if they have it. If they do, double the amount given, or else keep it the same.

local cashmulti = game.MarketplaceService:UserOwnsGamePassAsync(player, 1234) and 2 or 1
cash.Value += amount * cashmulti

set the gamepass

local marketplace = game:GetService(“MarketplaceService”)
local gamepassId = the id would go here

game.Players.PlayerAdded:connect(function(player)
wait(2)
local success, result = pcall(function()
return marketplace:UserOwnsGamePassAsync(player.UserId, gamepassId)
end)
So when a player joins, the game checks to see if they own the gamepass

Now giving the cash

if success then
	if result then
			player.stats.Cash.Value ect ect   What happens if they do own it
	else
			player.stats.Cash.Value ect ect  What happens if they dont
	end

Thanks for the solution. If you have an error with the system, tell me and I’ll solve it for you.