I have been trying for a few days to make this and it has just not been working I think my code is fine but I need some help

local id = 8075708

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
	if purchased and ido == id then
		script.Parent.Parent.ScreenGui.Visible = false
	end
end)
game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then
			script.Parent.Parent.ScreenGui.Visible = false
	end)
end)

I don't see whats wrong can someone please help me?