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

how can I make a gui that is only opened by a gamepass?

Asked by 3 years ago
Edited 3 years ago

I was wondering how I could make a button gui when you click it will detect if you have the gamepass to open another frame but all the ways i try it wont work.

0
Please at least attempt to do this your self. SpiralRBX 224 — 3y
0
Can you please post the scripts you've tried? We cannot help you if you won't show us your trials :) . Padugz 40 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
local id = 10590821 -- change the id to yours!

game.Players.PlayerAdded:connect(function(player)
    if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, id) then
    player.PlayerGui.Gamepass.Button.Visible = true 
    end
end)

i have done it

Ad

Answer this question