-- warn(">>>>>>>>>>>>>>> Gamepass:",id)


script.Parent.Activated:Connect(function()
	game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,id) -- вызов метода покупки GamePass
end)

while true do
	wait()
	gp = plr:FindFirstChild("Gamepass")
	if gp ~= nil then
		local id = script.Name
		tmp = gp:FindFirstChild(id)
		if id ~= nil then
			act=script.Parent.Activat			
			if id.Value == 0 then
				act.Text = "not active"
				act.TextColor3 = Color3.fromRGB(127,127,127)
			else
				act.Text = "Activated"
				act.TextColor3 = Color3.fromRGB(255,127,0)
			end
		end
	end
end
