#game drinks menu
1 messages · Page 1 of 1 (latest)
If not gamepass then prompt gamepass
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
Yoooo ty also at the end where u wrote --give drink should i put my original script that gives the drink there?
dawg
?
what is that else block of code
a code i got from someone else
for a text button giving the drink
it works so im not complaining lol
well idk anything abt code so im grateful for any help anyone gives me
yes!
@latent linden dont forget to mark this solved!
oh @latent linden only put these in the -- give drinks area
they are
@latent linden delete the mouse.Button1Click:Connect(function()
and the local UI = script.Parent
Alr
I ain’t home rn but when I am I’ll lyk