for D,K in ipairs(gui:GetChildren())do if K:IsA("\070\114\097\109\101")then local D=K:FindFirstChild("\067\108\111\115\101")if D and D:IsA("\084\101\120\116\066\117\116\116\111\110")then D.MouseButton1Click:Connect(function()openGui.Visible=true K:TweenSizeAndPosition(UDim2.new(1,0,.022,0),UDim2.new(.0,0,.978,0),"\079\117\116","\081\117\097\100",.2,false,function()K.Visible=false end)end)end end end

for _, window in ipairs(gui:GetChildren()) do
	if window:IsA("Frame") then
		local closeButton = window:FindFirstChild("Close")
		if closeButton and closeButton:IsA("TextButton") then
			closeButton.MouseButton1Click:Connect(function()
				openGui.Visible = true
				window:TweenSizeAndPosition(
					UDim2.new(1, 0, 0.022, 0),
					UDim2.new(0.0, 0, 0.978, 0),
					'Out',
					'Quad',
					0.2,
					false,
					function()
						window.Visible = false
					end
				)
			end)
		end
	end
end

