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

My Gui game pass is not working?

Asked by 8 years ago
im trying to add $1000 to a game pass but nothing is happening 

buybutton = script.Parent
msp = game:GetService("MarketplaceService")
id = 421785175 --pruduct id here
p = game.Players.LocalPlayer
buybutton.MouseButton1Click:connect(function ()
    msp:PromptPruductPurchase(p,id)
end)
local passId = 421785175 --gamepass ID
local marketplaceService = game:GetService("MarketplaceService")

local passId = 421785175 -- change this to your game pass ID
function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        print(plr.Name .. " has bought the game pass with id " .. passId)
end
local passId = 421785175 --gamepass ID
local marketplaceService = game:GetService("MarketplaceService")

 marketplaceService.PromptPurchaseFinished:connect(function(player,assetId,isPurchased)player.leaderboard.money '+' (1000) 
if true then 
    give (player.leaderboard.money '+' (1000))
end

 if isPurchased then --if the player did pa
  if assetId == passId then --if what they bought is the pass
   give 'player'.leaderboard.money '+' (1000)
  end
 end
end

Answer this question