Hi, i made a script that gives people a 2x boost if they own a certain gamepass I own the gamepass but i still only get + 1 leaderstats
Here is my code
local GamepassID = 10409558
local ClickAmount = 1
local debounce = false
script.Parent.ClickDetector.MouseClick:Connect(function(player)
if debounce == false then
debounce = true
local PlayerClicks = player.leaderstats.Clicks
PlayerClicks.Value = PlayerClicks.Value + ClickAmount
game.Players.PlayerAdded:Connect(function(player)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, GamepassID) then
PlayerClicks.Value = PlayerClicks + ClickAmount + 1
end
end)
wait(0.1)
debounce = false
end
end)

1 comment
Works thanks