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

Where Would I Start To Make a 2x gamepass? where would i put the script?

Ok so I was trying to make a 2x gamepass for coins but I don't know where to start. can someone please help me make the script. Thanks!

2 comments

0

This is NOT a request site, and you shouldn't ask people to write scripts for you.I have included a link to something you'll want to learn about. You also should learn about basic scripting, DataStores/saving data, and other things before worrying about gamepasses.

1 answer

Hello.


You'd first have to check if the player owns a gamepass. If they do then it will multiply the number of points they get. If they don't, they'll just get the normal amount of points.


Code:

local money = player.leaderstats.Money

local normalIncrease = 1

if game:GetService("MarketplaceService"):UserOwnsGamepassAsync(player.UserId, yourGamepassIdHere) then
	money.Value = money.Value + normalIncrease * 2
else
	money.Value = money.Value + normalIncrease
end

The UserOwnsGamepassAsync() requires two arguments.

  1. The player's UserId.

  2. The gamepass Id.

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