#How to add a gamepass counter

1 messages · Page 1 of 1 (latest)

frigid hull
#

Hello guys so basically I have gamepasses each one gives a different amount of the dropped currency. How do I make it show on this leaderboard whenever someone buys one of the gamepasses. Don't tell me what code to write but what should i do the idea of it. How do i make a gamepass register on the leaderboard when i buy it?

local Players = game:GetService("Players")

local function leaderboardSetup(player)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player
    
    local gold = Instance.new("IntValue")
    gold.Name = "Dropped"
    gold.Value = 0
    gold.Parent = leaderstats
    
end


Players.PlayerAdded:Connect(leaderboardSetup)

sharp drift
#

if the player bought Game Pass additions for the drop

#

on the leaderboards

frigid hull
#

like i dont want it to count how many gamepasses they bought I want it to add how much of the currency they bought yk

sharp drift
#

ik that well suck

fallow dragon
#

just copy the code where you add the value to the players currency and make it being added to some other leaderstats value

frigid hull
#

oh ok thanks

agile patio
#

like

#

create a leaderstat for it

#

and then yk, when a gamepass is bought

#

alongside giving them whatever they bought, do the plr.leaderstats.GamePass(orwtvr).Value += 1