GUARANTY THIS GUARANTY (as amended, this "GUARANTY") is executed as of May 1, 1998, by the undersigned ("GUARANTOR") in favor of NationsBank of Texas, N.A. ("AGENT"), as Agent for the benefit of the Lenders ("LENDERS") now or hereafter party to the Credit Agreement (as defined below). RECITALS A. NCI Building Systems, Inc., a Delaware corporation ("BORROWER"), Agent and Lenders have executed a Credit Agreement dated March 25, 1998 (as amended, supplemented or restated, the "CREDIT AGREEMENT"), together with certain other Loan Documents. B. Guarantor is a Subsidiary of Borrower and, because of its ownership by Borrower, expects to continue to receive business opportunities, financial support and management support from Borrower. Guarantor has agreed to enter into this Guaranty so that Borrower can receive the benefits of the Guaranteed Debt (as defined below) and continue to provide these services to Guarantor. C. Guarantor's board of directors has determined that Guarantor may benefit directly or indirectly from Borrower's execution of the Credit Agreement as Guarantor may be the indirect recipient of funds advanced by Lenders to Borrower under the Credit Agreement or the account party of LCs issued by Agent pursuant to the Credit Agreement, and as such the value of the consideration received and to be received by it under the Loan Documents is reasonably worth at least as much as its liability and obligation under this Guaranty. D. It is expressly understood among Borrower, Guarantor, Agent and Lenders that the execution and delivery of this Guaranty is a condition precedent to Lenders' obligations to extend credit under the Credit Agreement and Agent's obligation to issue LCs under the Credit Agreement. NOW, THEREFORE, for valuable consideration, the receipt and adequacy of which are hereby acknowledged, Guarantor guarantees to Lenders the prompt payment at maturity (by acceleration or otherwise), and at all times thereafter, of the Guaranteed Debt, as follows: 1. DEFINITIONS. UNLESS OTHERWISE DEFINED IN THIS GUARANTY, ANY CAPITALIZED TERM USED IN THIS GUARANTY SHALL HAVE THE MEANING GIVEN THAT TERM IN THE CREDIT AGREEMENT. The following terms shall have the following meanings as used in this Guaranty: 1.1 "BORROWER" includes, without limitation, Borrower as a debtor-in-possession, and any receiver, trustee, liquidator, conservator, custodian, or similar party hereafter appointed for Borrower or all or substantially all of Borrower's assets pursuant to any liquidation, conservatorship, bankruptcy, moratorium, rearrangement, receivership, insolvency, reorganization, or similar Debtor Relief Law from time to time in effect affecting the Rights of creditors generally. 1.2 "GUARANTEED DEBT" means the Obligation as defined in the Credit Agreement (including, without limitation, amounts that would become due but for operation of any applicable provision of Title 11 of the U.S. Code (including, without limitation, 11 U.S.C. Sections 502 and 506)), TOGETHER WITH all pre- and post-maturity interest thereon (including, without limitation, all post- petition interest if Borrower or any Subsidiary voluntarily or involuntarily files for bankruptcy protection) and any and all costs, attorneys' fees and expenses reasonably incurred by Agent or any Lender to enforce Borrower's, Guarantor's, or any other obligor's, payment of any of the foregoing indebtedness. 1.3 "SUBORDINATED DEBT" means all obligations of Borrower to Guarantor, whether direct, indirect, fixed, contingent, liquidated, unliquidated, joint, several, or joint and several, now or hereafter existing, due or to become due to Guarantor, or held or to be held by Guarantor, whether created directly or acquired by assignment or otherwise, and whether or not evidenced by written instrument. 2. GUARANTY. This is an absolute, irrevocable and continuing guaranty of payment of the Guaranteed Debt which will remain in effect until the Guaranteed Debt is completely paid and all commitments to lend under the Credit Agreement have terminated. The circumstance that at ANY TIME OR FROM TIME TO TIME ALL OR ANY PORTION OF THE GUARANTEED DEBT MAY BE PAID IN FULL SHALL NOT AFFECT THE GUARANTOR'S OBLIGATION WITH RESPECT TO THE GUARANTEED DEBT OF BORROWER TO AGENT AND LENDERS THEREAFTER INCURRED. THE GUARANTOR MAY NOT RESCIND OR REVOKE ITS OBLIGATIONS TO AGENT AND LENDERS WITH RESPECT TO THE GUARANTEED DEBT. 3. AMOUNT OF GUARANTY. In consummating the transactions contemplated by the Credit Agreement, Guarantor does not intend to disturb, delay, hinder, or defraud either its present or future creditors. Guarantor is familiar with, and has independently reviewed books and records regarding, the financial condition of Borrower and is familiar with the value of the security and support for the payment and performance of the Guaranteed Debt. Based upon such examination, and taking into account the fairly discounted value of Guarantor's contingent obligations under this Guaranty and the limitation of liability set forth in Section 4 hereof and the value of the subrogation and contribution claims Guarantor could make in connection with this Guaranty, and assuming each of the transaction contemplated by the Credit Agreement is consummated and Borrower makes full use of the credit facilities thereunder, the present realizable fair market value of the assets of Guarantor exceeds the total obligations of Guarantor, and Guarantor is able to realize upon its assets and pay its obligations as such obligations mature in the normal course of business. 4. LIMIT OF LIABILITY. The obligations of Guarantor hereunder shall be limited to an aggregate amount equal to the largest amount that would not render its obligations hereunder subject to avoidance under Section 548 of the U.S. Bankruptcy Code or any comparable provisions of any applicable state Law. 5. LIABILITY FOR OTHER INDEBTEDNESS OF BORROWER. If Guarantor becomes liable for any indebtedness owing by Borrower to Agent or any Lender, by endorsement or otherwise, other than under this Guaranty, such liability shall not be, in any manner, impaired or affected hereby, and the Rights of Agent or Lenders under this Guaranty shall be cumulative of any and all other Rights that Agent or Lenders may ever have against Guarantor. The exercise by Agent or Lenders of any Right or remedy under this Guaranty under the Loan Documents, or other instrument, or at Law or in equity, shall not preclude the concurrent or subsequent exercise of any other Right or remedy. 6. DEFAULT BY BORROWER. If a Default exists, Guarantor shall pay the amount of the Guaranteed Debt then due and payable to Agent and Lenders on demand and without (a) further notice of dishonor, to Guarantor, (b) any prior notice to Guarantor of the acceptance by Agent or Lenders of this Guaranty, (c) any notice having been given to Guarantor prior to such demand of the creating or incurring of such indebtedness, 2 or (d) notice of intent to accelerate or notice of acceleration to Guarantor or Borrower. To enforce such payment by Guarantor it shall not be necessary for Agent or Lenders to first or contemporaneously institute suit or exhaust remedies against Borrower or others liable on such indebtedness, or to enforce Rights against any security or collateral ever given to secure such indebtedness. 7. SUBORDINATION. All Subordinated Debt shall be expressly subordinated to the final payment in full of the Guaranteed Debt. Guarantor agrees not to receive or accept any payment from Borrower with respect to the Subordinated Debt at any time a Default exists; and, in the event Guarantor receives any payment on the Subordinated Debt in violation of the foregoing, Guarantor shall hold any such payment in trust for Agent and Lenders and promptly turn it over to Agent, in the form received (with any necessary endorsements), to be applied to the Guaranteed Debt. 8. SUBROGATION. Guarantor agrees that it will not assert, enforce, or otherwise exercise (a) any right of subrogation to any of the rights or liens of Agent or any Lender or any other beneficiary against Borrower or any other obligor on the Guaranteed Debt or any Collateral or other security, or (b) any right of recourse, reimbursement, subrogation, contribution, indemnification, or similar right against Borrower or any other obligor or other guarantor on all or any part of the Guaranteed Debt or any guarantor thereof (whether such rights in CLAUSE (a) or CLAUSE (b) arise in equity, under contract, by statute, under common law, or otherwise). 9. NO RELEASE. Guarantor hereby agrees that its obligations under the terms of this Guaranty shall not be released, diminished, impaired, reduced or affected by the occurrence of any one or more of the following events: (a) Agent's or Lenders' taking or accepting of any other security or guaranty for any or all of the Guaranteed Debt; (b) any release, surrender, exchange, subordination or loss of any security at any time existing in connection with any or all of the Guaranteed Debt; (c) any full or partial release of the liability of any other obligor on the Obligation; (d) the insolvency, becoming subject to any Debtor Relief Law, or lack of corporate power of Borrower, any of the undersigned, or any party at any time liable for the payment of any or all of the Guaranteed Debt, whether now existing or hereafter occurring; (e) any renewal, extension or rearrangement of the payment of any or all of the Guaranteed Debt, either with or without notice to or consent of Guarantor, or any adjustment, indulgence, forbearance, or compromise that may be granted or given by Agent or any Lender to Borrower, Guarantor, or any other obligor on the Obligation; (f) any neglect, delay, omission, failure or refusal of Agent or any Lender to take or prosecute any action for the collection of all or any part of the Guaranteed Debt or to foreclose or take or prosecute any action in connection with any instrument or agreement evidencing or securing any or all of the Guaranteed Debt; 3 (g) any failure of Agent or any Lender to notify Guarantor of any renewal, extension, or assignment of any or all of the Guaranteed Debt, or the release of any security or of any other action taken or refrained from being taken by Agent or any Lender against Borrower or any new agreement between Agent, any Lender, and Borrower, it being understood that neither Agent nor any Lender shall be required to give Guarantor any notice of any kind under any circumstances whatsoever with respect to or in connection with the Guaranteed Debt, other than any notice required to be given to Guarantor elsewhere herein; (h) the unenforceability of all or any part of the Guaranteed Debt against Borrower by reason of the fact that the Guaranteed Debt exceeds the amount permitted by Law, the act of creating the Guaranteed Debt, or any part thereof, is ULTRA VIRES, or the officers creating same exceeded their authority or violated their fiduciary duties in connection therewith; (i) any payment of the Obligation to Agent or Lenders is held to constitute a preference under any Debtor Relief Law or if for any other reason Agent or any Lender is required to refund such payment or make payment to someone else (and in each such instance this Guaranty shall be reinstated in an amount equal to such payment), or if there is more than one person or entity signing this Guaranty or otherwise guaranteeing payment of the Guaranteed Debt, the release of any one or more of them hereunder; or (j) any discharge, release, or other forgiveness of Borrower's personal liability for the payment of the Guaranteed Debt. 10. WAIVER. Guarantor hereby waives all rights by which it might be entitled to require suit on an accrued right of action in respect of any of the Guaranteed Debt or require suit against Borrower or others, whether arising pursuant to Section 34.02 of the Texas Business and Commerce Code, as amended (regarding Guarantor's right to require Agent or Lenders to sue Borrower on accrued right of action following Guarantor's written notice to Agent or Lenders), Section 17.001 of the Texas Civil Practice and Remedies Code, as amended (allowing suit against Guarantor without suit against Borrower, but precluding entry of judgment against Guarantor prior to entry of judgment against Borrower), Rule 31 of the Texas Rules of Civil Procedure, as amended (requiring Agent or Lenders to join Borrower in any suit against Guarantor unless judgment has been previously entered against Borrower), or otherwise. Guarantor waives notice of acceptance of this Guaranty, notice of any loan to which it may apply, and waives presentment, demand for payment, protest, notice of dishonor or nonpayment of any loan, notice of intent to accelerate, notice of acceleration, and notice of any suit or notice of the taking of other action by Lender against Borrower, Guarantor or any other person and any notice to any party liable thereon (including Guarantor). 11. RELIANCE AND DUTY TO REMAIN INFORMED. Guarantor confirms that it has executed and delivered this Guaranty after reviewing the terms and conditions of the Loan Documents and such other information as it has deemed appropriate in order to make its own credit analysis and decision to execute and deliver this Guaranty. Guarantor confirms that it has made its own independent investigation with respect to Borrower's creditworthiness and is not executing and delivering this Guaranty in reliance on any representation or warranty by Agent or Lender as to such creditworthiness. Guarantor expressly assumes all responsibilities to remain informed of the financial condition of Borrower and any circumstances affecting (a) Borrower's ability to perform under the Loan Documents to which Borrower is a party or (b) any collateral securing all or any part of the Guaranteed Debt. 4 12. REPRESENTATIONS AND WARRANTIES. Guarantor acknowledges that certain representations and warranties set forth in the Credit Agreement are in respect of it, and Guarantor reaffirms that each such representation and warranty is true and correct in all material respects. Furthermore, Guarantor represents and warrants to Agent and Lenders that Guarantor's board of directors has determined that its liability and obligation hereunder may reasonably be expected to benefit it directly or indirectly. 13. CHANGE IN GUARANTOR'S STATUS. Should Guarantor become insolvent, or fail to pay its debts generally as they become due, or voluntarily seek, consent to, or acquiesce in the benefit or benefits of any Debtor Relief Law or become a party to (or be made the subject of) any proceeding provided for by any Debtor Relief Law (other than as a creditor or claimant) that could suspend or otherwise adversely affect the Rights of Agent or Lenders granted hereunder, then, in any such event, the Guaranteed Debt shall be, as between Guarantor, Agent and Lender, a fully matured, due, and payable obligation of Guarantor to Agent or Lender (without regard to whether Borrower is then in Default or whether the Guaranteed Debt, or any part thereof is then due and owing by Borrower to Lender), payable in full by Guarantor to Agent or Lender upon demand, which shall be the estimated amount owing in respect of the contingent claim created hereunder. 14. COVENANTS. Guarantor acknowledges that certain covenants set forth in the Credit Agreement are in respect of it or shall be imposed upon it, and Guarantor covenants and agrees to promptly and properly perform, observe, and comply with each such covenant. Furthermore, Guarantor shall, jointly and severally, indemnify, protect, and hold Agent and Lenders and their respective parents, subsidiaries, directors, officers, employees, representatives, agents, successors, permitted assigns, and attorneys (collectively, the "INDEMNIFIED PARTIES") harmless from and against any and all liabilities, obligations, losses, damages, penalties, actions, judgments, suits, claims, and proceedings and all costs, expenses (including, without limitation, all reasonable attorneys' fees and legal expenses whether or not suit is brought), and reasonable disbursements of any kind or nature (the "INDEMNIFIED LIABILITIES") that may at any time be imposed on, incurred by, or asserted against the indemnified parties, in any way relating to or arising out of (a) the direct or indirect result of the violation by any Company of any Environmental Law, (b) any Company's generation, manufacture, production, storage, release, threatened release, discharge, disposal, or presence in connection with its properties of a Hazardous Substance (including, without limitation, (i) all damages from any use, generation, manufacture, production, storage, release, threatened release, discharge, disposal, or presence, or (ii) the costs of any environmental investigation, monitoring, repair, cleanup, or detoxification and the preparation and implementation of any closure, remedial, or other plans), or (c) the Loan Documents or any of the transactions contemplated therein. However, although each indemnified party has the Right to be indemnified under the Loan Documents for its own ordinary negligence, no indemnified party has the Right to be indemnified under the Loan Documents for its own fraud, gross negligence, or willful misconduct. The provisions of and undertakings and indemnification set forth in this paragraph shall survive the satisfaction and payment of the Obligation and termination of this Guaranty. 15. OFFSET CLAIMS. The Guaranteed Debt shall not be reduced, discharged or released because or by reason of any existing or future offset, claim or defense (except for the defense of complete and final payment of the Guaranteed Debt) of Borrower or any other party against Agent or Lenders or against payment of the Guaranteed Debt, whether such offset, claim, or defense arises in connection with the Guaranteed Debt or otherwise. Such claims and defenses include, without limitation, failure of consideration, breach of warranty, fraud, statute of frauds, bankruptcy, infancy, statute of limitations, lender liability, accord and satisfaction, and usury. 5 16. BINDING AGREEMENT. This Guaranty is for the benefit of Agent and Lenders and their respective successors and assigns. Guarantor acknowledges that in the event of an assignment of the Guaranteed Debt or any part thereof in accordance with the Credit Agreement, the rights and benefits under this Guaranty, to the extent applicable to the indebtedness so assigned, may be transferred with such indebtedness. This Guaranty is binding on Guarantor and its successors and permitted assigns. 17. LOAN DOCUMENT. This Guaranty is a Loan Document and, therefore, this Guaranty is subject to the applicable provisions of SECTION 14 of the Credit Agreement, all of which applicable provisions are incorporated into this Guaranty by reference as if set forth verbatim. 18. NOTICES. All notices required or permitted to be given under this Guaranty, if any, must be in writing and shall or may, as the case may be, be given in the same manner as notice is given under the Credit Agreement as follows: If to Agent: NationsBank of Texas, N.A. Corporate Finance Group 700 Louisiana Street, 8th Floor P.O. Box 2518 Houston, Texas 77252-2518 Telephone No.: (713) 247-6258 Facsimile No.: (713) 247-6360 Attention: Richard L. Nichols, Jr. Vice President with a copy to: Porter & Hedges, L.L.P. 700 Louisiana, 35th Floor Houston, Texas 77002 Telephone No.: (713) 226-0681 Facsimile No.: (713) 226-0281 Attention: F. Walter Bistline, Jr. If to Borrower: NCI Building Systems, Inc. 7301 Fairview Houston, Texas 77041 Telephone No.: (713) 466-7788 Facsimile No.: (713) 466-3368 Attention: Robert J. Medlock Chief Financial Officer 6 with a copy to: Gardere & Wynne, L.L.P. Thanksgiving Tower 1301 Elm Street, Suite 3000 Dallas, Texas 75201 Telephone No.: (214) 999-3000 Facsimile No.: (214) 999-4667 Attention: John K. Sterling If to Guarantor: Metal Building Components Holding, Inc. c/o Delaware Corporate Management, Inc. 1105 North Market Street, Suite 1300 P.O. Box 8985 Wilmington, Delaware 19899 Telephone No.: (302) 427-0803 Attention: David P. Fontello with a copy to: Gardere & Wynne, L.L.P. Thanksgiving Tower 1301 Elm Street, Suite 3000 Dallas, Texas 75201 Telephone No.: (214) 999-3000 Facsimile No.: (214) 999-4667 Attention: John K. Sterling Subject to the terms of the Credit Agreement, by giving at least 30 days written notice, any party to this Guaranty shall have the right from time to time and at any time while this Guaranty is in effect to change their respective addresses or fax numbers and each shall have the right to specify a different address or fax number within the United States of America. Nothing in this SECTION 18 shall be construed to require any notice to Guarantor not otherwise expressly required in this Guaranty. 19. GOVERNING LAW. THIS GUARANTY IS EXECUTED AND DELIVERED AS AN INCIDENT TO A LENDING TRANSACTION NEGOTIATED, CONSUMMATED, AND PERFORMABLE IN HARRIS COUNTY, TEXAS, AND SHALL BE CONSTRUED ACCORDING TO THE LAWS OF THE STATE OF TEXAS AND, AS APPLICABLE, THE LAWS OF THE UNITED STATES. 20. NO ORAL AGREEMENTS. THE RIGHTS AND OBLIGATIONS OF THE PARTIES HERETO SHALL BE DETERMINED SOLELY FROM WRITTEN AGREEMENTS, DOCUMENTS, AND INSTRUMENTS, AND ANY PRIOR ORAL AGREEMENTS BETWEEN THE PARTIES ARE SUPERSEDED BY AND MERGED INTO SUCH WRITINGS. THIS GUARANTY (AS AMENDED 7 IN WRITING FROM TIME TO TIME) AND THE OTHER WRITTEN LOAN DOCUMENTS EXECUTED BY BORROWER, AGENT, LENDERS OR GUARANTOR (OR BY BORROWER OR GUARANTOR FOR THE BENEFIT OF AGENT AND LENDERS) REPRESENT THE FINAL AGREEMENT BETWEEN BORROWER, GUARANTOR, AND LENDER AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS, OR SUBSEQUENT ORAL AGREEMENTS BY THE PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES. THIS SECTION IS INCLUDED HEREIN PURSUANT TO SECTION 26.02 OF THE TEXAS BUSINESS AND COMMERCE CODE, AS AMENDED FROM TIME TO TIME. This Guaranty is executed as of the date set forth above. METAL BUILDING COMPONENTS HOLDING, INC., a Delaware corporation By: /s/ Robert J. Medlock ----------------------------------- Name: Robert J. Medlock --------------------------------- Title: Vice President and Treasurer -------------------------------- 8