Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can anyone help me with this script?

local passid = 157704756
local GamePassService = Game:GetService("GamePassService")
local character = player.Character

if GamePassService:PlayerHasPass(player, passid) then
print("Human passed test") 
else script.Parent:remove()
end 

I want to make it work if the player has the gamepass , the gui will show to them. if they dont have the gamepass then it won't show. please help me i need it!

1 answer

Just change the print line on line 6 to a line that will show the Gui. For example:

if GamePassService:PlayerHasPass(player, passid) then
player.PlayerGui.Frame.Visible = true
else
player.PlayerGui.Frame.Visible = false
end

This discussion is preserved as it was. New answers, comments, and votes are closed.