Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by
iWasThisi -15
4 years ago

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!

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. Void_Frost 571 — 4y

Closed as Not Constructive by Void_Frost and youtubemasterWOW

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 4 years ago

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.

Ad