#why does it go up 200 and not 100

49 messages · Page 1 of 1 (latest)

wicked jetty
#
local ID = 827000227--put your game pass id here
MS.PromptGamePassPurchaseFinished:Connect(function(plr, id, purchased)
    if id == ID then
        if purchased == true then
            game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value += 100
        end
    end
end)``` pls help me pls
devout pendant
#

@wicked jetty it probably repeats

wicked jetty
devout pendant
wicked jetty
devout pendant
#

it

wicked jetty
#

why

#

thtas not fixing

devout pendant
#

or set a wait

devout pendant
sweet night
#

I'd say try to add a debounce

#
local MS = game:GetService("MarketplaceService")
local ID = 827000227

local debounce = false

MS.PromptGamePassPurchaseFinished:Connect(function(plr, id, purchased)
  if debounce == false then
    debounce = true
    if id == ID then
      if purchased == true then
          game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value += 100
      task.wait(1)
      debounce = false
      end
    end
  end
end)
#

Looks like this works ^^ I just tested it and it only prints once

#

Also I would have no clue as to why it fires 2 times

wicked jetty
wicked jetty
#

ig I'll test it

wicked jetty
# sweet night ``` local MS = game:GetService("MarketplaceService") local ID = 827000227 local...

so if I delete the server script and then paste its code in the local script it runs once but it goes back down

local player = game.Players.LocalPlayer
local ID = 827000227--put your game pass id here
script.Parent.MouseButton1Click:Connect(function()
    MS:PromptGamePassPurchase(player,ID)
end)
MS.PromptGamePassPurchaseFinished:Once(function(plr, id, purchased)
    if id == ID then
        if purchased == true then
            game.Players:FindFirstChild(plr.Name).leaderstats.Time.Value += 100
        end
    end
end)```
^^^^^
local script
#

@devout pendant

#

@sweet night

devout pendant
#

HUH

#

kk

wicked jetty
#

hi

wicked jetty
#

so

vale auroraBOT
#

studio** You are now Level 21! **studio

wicked jetty
#

e

#

maybe someone will come

#

one day...

devout pendant
#

e

#

e

wicked jetty
#

e

wicked jetty
#

e

wicked jetty
#

e

#

hmm

#

this post has been opened for 3 days

#

will it ever be solved?

wicked jetty
#

r

#

r

#

r

#

r

wicked jetty
#

its been 4 days now

wicked jetty
#

e

#

6 days

#

I mean 5

wicked jetty
#

er

wicked jetty
#

rrrrrrrrrrrrrrrrrrrrrrrrrrrerrrrrrrrrrrrrrrrrrerrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr/rrrrrrrrrrrrrrrrrrrrrrrrrrrr/