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

Can anyone help me with this script?

Asked by 9 years ago
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

Log in to vote
0
Answered by 9 years ago

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
Ad

Answer this question