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

Players who own gamepass won't get double rewards?

Asked by 5 years ago
Edited 5 years ago

When a player owns this game pass they should receive double rewards if they won the game, and a normal reward if they don't own the game pass. This part of the script is located in the main script. Ask for anymore information!

  • Script type: script
  • Filtering Enabled: Yes
  • API services: Yes
  • Do I own the gamepass: Yes

Btw the variable reward is 25

local reward = 25

  game.Players.PlayerAdded:Connect(function(plr)
        if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, 6033886) then
           wait(0.5)
           plrs[1].leaderstats.Bucks.Value = plrs[1].leaderstats.Bucks.Value + reward*2
        else  
           plrs[1].leaderstats.Bucks.Value = plrs[1].leaderstats.Bucks.Value + reward  
       end 
   end)

0
and if i understand its not working? starmaq 1290 — 5y
0
How are you detecting that the player has won? BashGuy10 384 — 5y
0
The leaderstats are in the script sbob12345m 59 — 5y
0
I see how many players are left in the table sbob12345m 59 — 5y
View all comments (4 more)
0
if #plrs == 1 then...... sbob12345m 59 — 5y
0
@sbob12345m He's just getting the first player in a table, he's not checking if there is only one person in the game. awfulszn 394 — 5y
0
Is this an error with this script? sbob12345m 59 — 5y
0
There are no output errors. sbob12345m 59 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

You need to make a remote event then for now on when you are adding stuff you can connect that remote event to the leaderstat script.

0
That is not true, chima95 7 — 5y
Ad

Answer this question