I want 50% more cash every minute for premium and gamepass

Hi, I want 50% more cash on roblox for premium and gamepass. How can I do it, But it will check if it is gamepass or premium only once. In short, when the player enters the game only.

Script:

spawn(function()
    while true do
        wait(60)
        Cash.Value = Cash.Value + 10
    end
end)
1 Like

You should see this article about assessing whether a player has Premium or not: Player | Documentation - Roblox Creator Hub

This article will inform you about how to determine gamepasses: MarketplaceService | Documentation - Roblox Creator Hub

Utilising the functions explained in this API, you can add some attributes to the players when they join the game which can be used to assess how much cash they get (simply adding an if statement, and if positive comparison multiply the amount by 1.5 will increase the amount by 50%).

Hope this helps,
-Tom :slight_smile:

1 Like

Thx but I just want it to check it once.

Then use the above articles to see how. Do you want people to make the script for you (which is against the rules by the way)?

You’re massively over complicating this request.

The code can be as simple as:

local CashReward = 10

if player.MembershipType == Enum.MembershipType.Premium or MarketplaceService:UserOwnsGamePassAsync(Player.UserId, GamepassID) then
     CashReward = CashReward * 1.5
end

while wait(60) do
    Cash.Value = Cash.Value + CashReward
end

Your solution checks (from the website) whether the player has premium every time the function is called, why not just do it once?

Many thanks,
-Tom :slight_smile:

4 Likes

I think he meant he wants to check the status of the player only once.

Thank you so much :slight_smile: it is working.

1 Like

Consider the case of a Premium user who thinks they can purchase the gamepass to increase it further.

You can’t restrict who does and doesn’t purchase gamepasses, so you need to be careful about people purchasing something they don’t receive due to already having Premium.

1 Like