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

Marketplace Show Gamepass is Not for Sale?

Asked by 4 years ago
Edited 4 years ago

As attempt, The script Works Fine, But Fails to Market the Gamepass Sales Event for the Players.

And The Gamepass is for Sale as well.

Gamepass

Gyazo

01while not _G["GameDatabase"] do wait() end
02while not _G["GameDatabase"].ready do wait() end
03local CheckBought = _G["GameDatabase"].action["CheckBought"]
04 
05local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
06local pname = player.Name
07 
08local pass_val = "PassTwoMore"
09local pass_id = 7199111
10 
11function UpdatePassInfo()
12    if CheckBought(pname, pass_val) then
13        script.Parent.BuyBtt.Visible = false
14        script.Parent.Bought.Visible = true
15    else
View all 25 lines...

Is there By chance, The MarketplaceService is not a supportive method now?

0
Use PromptGamePassPurchase PrismaticFruits 842 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
1local plr = game.Players.LocalPlayer
2id = GpIdHere
3local ms = game:GetService("Marketplace service")
4ms:PromptGamePassPurchase(plr,id)
5repeat wait() until ms:UserOwnsGamePassAsync(plr.UserId,id)
6--do whatever

Put that in a local script in StarterGui and it should be fine.

0
you spelt id wrong so it wouldn't be fine AnasBahauddin1978 715 — 4y
0
Oops my auto-correct lol. PrismaticFruits 842 — 4y
0
Fixed it. PrismaticFruits 842 — 4y
1
Ah, Just one Simple Mistake, And I was not fully aware that Was a feature, Thanks a much! S0NIC_Dev 61 — 4y
Ad

Answer this question