local id = 808263499 game.Players.PlayerAdded:connect(function(player) local HasPass = game:GetService("GamePassService"):PlayerHasPass(player, id) if HasPass then player:findFirstChild("SpeedUI").Frame.Visible = true else player:findFirstChild("SpeedUI"):Destroy() end end)
This script is from https://scriptinghelpers.org/questions/2211/gui-that-shows-only-when-you-own-a-gamepass
But the script doesn't work now anymore in 2017. Please help me.
I don't want credit just help me please
There are 2 mistakes.
The 1st: Guis are stored in the Player's PlayerGui. So, after "player" on line 6 and 8, you need "PlayerGui".
The 2nd: findFirstChild is deprecated, I would recommend making the "f" capitalized.
If this helps, please be sure to accept my answer.
local id = 808263499 game.Players.PlayerAdded:connect(function(player) local HasPass = game:GetService("GamePassService"):PlayerHasPass(player, id) if HasPass then player.PlayerGui:WaitForChild("SpeedUI").Frame.Visible = true else player.PlayerGui:WaitForChild("SpeedUI"):Destroy() end end)