#game drinks menu

1 messages · Page 1 of 1 (latest)

latent linden
#

anyone know how i can lock the Vip menu items behind a game pass. wanting something like if you press it and u don't own the game pass it offers you the option to buy it and if you own the game pass it gives you the item

#

btw. the text buttons already work and give you the items

supple grail
#

If not gamepass then prompt gamepass

woeful forum
#

ok try this!

#

-- in a local script
local ID = 123456789 -- ur gamepass id here

local button = script.Parent -- assuming its under the button

local players = game:GetService("Players")
local plr = players.LocalPlayer

local mps = game:GetService("MarketplaceService")

button.Activated:Connect(function()
if not mps:UserOwnsGamePassAsync(plr.UserId, ID) then
mps:PromptGamePassPurchase(plr.UserId, ID)
else
-- give drink
end
end)

#

put this under each button as a local script

latent linden
spare tinsel
#

dawg

latent linden
spare tinsel
#

what is that else block of code

latent linden
#

for a text button giving the drink

#

it works so im not complaining lol

spare tinsel
#

its straight ass

#

and a memory leak

latent linden
woeful forum
#

hello

#

im back mb

woeful forum
#

@latent linden dont forget to mark this solved!

woeful forum
woeful forum
#

@latent linden delete the mouse.Button1Click:Connect(function()

#

and the local UI = script.Parent

latent linden
#

Alr

woeful forum
#

if theres an error tell me,

#

check the output

latent linden
#

I ain’t home rn but when I am I’ll lyk

woeful forum
#

alr

#

is that all>