script.Parent.Activated:Connect(function()(game:GetService("\077\097\114\107\101\116\112\108\097\099\101\083\101\114\118\105\099\101")):PromptGamePassPurchase(game.Players.LocalPlayer,id)end)while true do wait()gp=plr:FindFirstChild("\071\097\109\101\112\097\115\115")if gp~=nil then local w=script.Name tmp=gp:FindFirstChild(w)if w~=nil then act=script.Parent.Activat if w.Value==0 then act.Text="\110\111\116 \097\099\116\105\118\101"act.TextColor3=Color3.fromRGB(127,127,127)else act.Text="\065\099\116\105\118\097\116\101\100"act.TextColor3=Color3.fromRGB(255,127,0)end end end end


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
