for N,R in ipairs(gui:GetChildren())do if R:IsA("\070\114\097\109\101")then local N=R:FindFirstChild("\067\108\111\115\101")if N and N:IsA("\084\101\120\116\066\117\116\116\111\110")then N.MouseButton1Click:Connect(function()openGui.Visible=true R:TweenSizeAndPosition(UDim2.new(1,0,.022,0),UDim2.new(.0,0,.978,0),"\079\117\116","\081\117\097\100",.2,false,function()R.Visible=false end)end)end end end
-- Set up the event handlers for the Close TextButtons in the windows
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
