ASSIGNMENT OF PARTNERSHIP INTERESTS THIS ASSIGNMENT OF PARTNERSHIP INTERESTS (as amended, this "ASSIGNMENT") is executed as of May 1, 1998, by the undersigned ("ASSIGNOR") for the benefit of NationsBank of Texas, N.A.("AGENT"), as Administrative Agent for itself and for the Lenders (collectively, "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 and other parties named therein have executed a Credit Agreement dated March 25, 1998 (as amended, supplemented or restated, the "CREDIT AGREEMENT"), together with certain other Loan Documents. B. NCI Operating Corp., a Delaware corporation and a wholly-owned subsidiary of Borrower is the general partner of (i) NCI Building Systems, L.P., a Texas limited partnership, (ii) A&S Building Systems, L.P., a Texas limited partnership, (iii) MBCI Operating, L.P., a Texas limited partnership and (iv) Metal Coaters Operating, L.P., a Texas limited partnership. C. It is expressly understood among Assignor, Borrower and Lenders that the execution and delivery of this Assignment 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. D. Assignor's board of directors has determined that the Assignor may benefit directly or indirectly from Borrower's execution of the Credit Agreement as the Assignor 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 Agreement. NOW, THEREFORE, for valuable consideration, the receipt and adequacy of which are hereby acknowledged, the parties agree as follows: 1. CERTAIN DEFINITIONS. UNLESS OTHERWISE DEFINED IN THIS ASSIGNMENT, ANY CAPITALIZED TERM USED IN THIS ASSIGNMENT HAS THE MEANING GIVEN THAT TERM IN THE CREDIT AGREEMENT OR IN THE UCC. If the definition given a term in the Credit Agreement conflicts with the definition given that term in the UCC, the Credit Agreement definition shall control to the extent allowed by Law. If the definition given a term in Chapter 9 of the UCC conflicts with the definition given that term in any other chapter of the UCC, the Chapter 9 definition shall control. As used in this Assignment: "ASSIGNMENT" means this Assignment together with all schedules and annexes attached to this Assignment, and all amendments and modifications to this Assignment, the schedules and exhibits. "ASSIGNOR" includes, without limitation, Assignor as a debtor-in- possession, and any receiver, trustee, liquidator, conservator, custodian, or similar party hereafter appointed for Assignor or all or substantially all of Assignor's assets pursuant to any liquidation, conservatorship, bankruptcy, moratorium, rearrangement, receivership, insolvency, reorganization, or similar Law from time to time in effect affecting the rights of creditors generally. "COLLATERAL" means Assignors's right, title and interest in and to the Partnership Interests, including after acquired Collateral and proceeds of the Collateral. "CREDIT AGREEMENT" is defined in the Recitals. "DEFAULT" means a "Default" under and as defined in the Credit Agreement. "OBLIGATION" means the "Obligation"under and as defined in the Credit Agreement. "PARTNERSHIP INTERESTS" means all partnership interests, now or hereafter owned by Assignor in any Subsidiary and all distributions, cash, instruments and other property from time-to-time received, receivable or otherwise distributed in respect of or in exchange of any Partnership Interest. "SECURITY INTEREST" means the security interests granted and the transfers, pledges and collateral assignments made under SECTION 3 of this Assignment. "UCC" means (a) generally, and with respect to the definitions above, the Uniform Commercial Code, as adopted in Texas, as amended from time to time, and (b) with respect to rights in states other than Texas, the Uniform Commercial Code as enacted in the applicable state, as amended from time to time. 2. CREDIT AGREEMENT. This Assignment is being executed and delivered pursuant to the terms and conditions of the Credit Agreement. Each Security Interest is a "Lien" referred to in the Credit Agreement. 3. SECURITY INTEREST. In order to secure the full and complete payment and performance of the Obligation when due, Assignor hereby grants to Agent a security interest in, and pledges and assigns to Agent: (a) the Collateral, and (b) all present and future accounts, contract rights, general intangibles, chattel paper, documents, instruments, cash and noncash proceeds and other rights arising from or by virtue of, or from the voluntary or involuntary sale or other disposition of, or collections with respect to, or claims against any other person with respect to, the Collateral. Such security interest is granted, and such pledge and assignment is made, as security only and shall not subject Lenders to, or transfer or in any way affect or modify, any obligation of Assignor with respect to any of the Collateral or any transaction involving or giving rise thereto. 4. NO ASSUMPTION OR MODIFICATION. The Security Interest is given to secure the prompt, unconditional and complete payment and performance of the Obligation when due, and is given as security only. Agent does not assume and shall not be liable for any of Assignor's liabilities, duties, or obligations under or in connection with the Collateral. Agent's acceptance of this Assignment, or its taking any action in carrying out this Assignment, does not constitute Agent's approval of the Collateral or Agent's assumption 2 of any obligation under or in connection with the Collateral. This Assignment does not affect or modify Assignor's obligations with respect to the Collateral. 5. FRAUDULENT CONVEYANCE. Notwithstanding anything contained in this Assignment to the contrary, Assignor agrees that if, but for the application of this SECTION 5 the Obligation or any Security Interest would constitute a preferential transfer under 11 U.S.C. Section 547, a fraudulent conveyance under 11 U.S.C. Section 548 (or any successor section) or a fraudulent conveyance or transfer under any state fraudulent conveyance or fraudulent transfer Law or similar Law in effect from time to time (each a "FRAUDULENT CONVEYANCE"), then the Obligation and each affected Security Interest will be enforceable against Assignor to the maximum extent possible without causing the Obligation or any Security Interest to be a Fraudulent Conveyance, and shall be deemed to have been automatically amended to carry out the intent of this SECTION 5. 6. REPRESENTATIONS AND WARRANTIES. To the extent applicable, Assignor hereby adopts and restates each of the representations and warranties in the Credit Agreement and further represents and warrants to Lenders as follows: (a) Except as provided in the relevant partnership agreement, the assignment, pledge, or transfer of the Partnership Interests is not subject to any restrictions other than restrictions imposed by applicable securities and partnership laws. (b) Except as provided in the relevant partnership agreement, Assignor owns the Collateral free and clear of all liens. (c) The information contained in item B in the recitals above is true and accurate and the Collateral is accurately described in this Assignment. 7. COVENANTS. Assignor shall: (a) Promptly notify Agent of any change in any fact or circumstances represented or warranted by Assignor with respect to any of the Collateral. (b) Promptly notify Agent of any additional partnership interest that it acquires or owns in any domestic partnership that becomes a Subsidiary subsequent to the execution of this Assignment. (c) Promptly notify Agent of any claim, action or proceeding affecting the security interest granted and the pledge and assignment made under PARAGRAPH 3 or title to all or any of the Collateral and, at the request of Lenders, appear in and defend, at Assignor's expense, any such action or proceeding. (d) Except as permitted under the Credit Agreement, not sell, assign or otherwise dispose of any Collateral. (e) Not create, incur or suffer to exist any other lien upon any of the Collateral. 3 (f) At Assignor's expense and Agent's request, file or cause to be filed such applications and take such other actions as Agent may request to obtain the consent or approval of any tribunal to Agent's rights hereunder, including, without limitation, the right to sell all the Collateral upon a Default (as defined in the Credit Agreement) without additional consent or approval from such tribunal (and, because Assignor agrees that Agent's remedies at law for failure of Assignor to comply with this provision would be inadequate and that such failure would not be adequately compensable in damages, Assignor agrees that its covenants in this provision may be specifically enforced). (g) From time to time promptly execute and deliver to Agent all such other assignments, certificates, supplemental documents, and financing statements (if appropriate), and do all other acts or things as Agent may reasonably request in order to more fully create, evidence, perfect, continue and preserve the priority of the Security Interest. 8. DEFAULT; REMEDIES. Should a Default occur and be continuing, Agent may, at its election, exercise any and all rights available to a secured party under the UCC, in addition to any and all other rights afforded by the Loan Documents, at law, in equity, or otherwise, or applying by appropriate judicial proceedings for appointment of a receiver for all or part of the Collateral (and Assignor hereby consents to any such appointment). (a) NOTICE. Reasonable notification of the time and place of any public sale of the Collateral, or reasonable notification of the time after which any private sale or other intended disposition of the Collateral is to be made, shall be sent to Assignor and to any other person entitled to notice under the UCC; provided that if any of the Collateral threatens to decline speedily in value or is of the type customarily sold on a recognized market, Agent may sell or otherwise dispose of the Collateral without notification, advertisement, or other notice of any kind. It is agreed that notice sent or given not less than five Business Days prior to the taking of the action to which the notice relates is reasonable for the purposes of this subparagraph. (b) SALES OF PARTNERSHIP INTERESTS. In connection with the sale of the Collateral, Agent is authorized, but not obligated, to limit prospective purchasers to the extent deemed necessary or desirable by Agent to render such sale exempt from the registration requirements of the Securities Act of 1933, as amended, and any applicable state securities laws, and no sale so made in good faith by Lenders shall be deemed not to be "commercially reasonable" because so made. (c) APPLICATION OF PROCEEDS. Agent shall apply the proceeds of any sale or other disposition of the Collateral under this PARAGRAPH 8 in the following order: FIRST, to the payment of all its expenses incurred in preparing any of the Collateral for sale(s) or other disposition(s), in arranging for such sale(s) or other disposition(s), and in actually selling or disposing of the same (all of which are part of the Obligation); SECOND, toward repayment of amounts expended by Agent under Paragraph 8; THIRD, toward payment of the balance of the Obligation in accordance with the Credit Agreement. Any surplus remaining shall be delivered to Assignor or as a court of competent jurisdiction may direct. If the proceeds are insufficient to pay the Obligation in full, Borrower, Assignor and other Guarantors shall remain jointly and severally liable for any deficiency. 9. OTHER RIGHTS OF AGENT AND LENDERS. 4 (a) PERFORMANCE. In the event Assignor shall fail to perform any of its obligations hereunder with respect to the Collateral, then Agent may, at its option, but without being required to do so, take such action which Assignor is required, but has failed or refused, to take. Any sum which may be expended or paid by Agent under this subparagraph (including, without limitation, court costs and attorneys' fees) shall bear interest from the dates of expenditure or payment at the Maximum Rate (as defined in the Credit Agreement) until paid and, together with such interest, shall be payable by Assignor upon demand and shall be part of the Obligation. (b) COLLECTION. Upon notice from Agent, each person or entity obligated with respect to any of the Collateral, whether as an issuer, account debtor or otherwise (an "OBLIGOR") is hereby authorized and directed by Assignor to make payments on any of the Collateral (including, without limitation, dividends and other distributions) directly to Agent, regardless of whether Assignor was previously making collections thereon. Subject to Subparagraph (e) hereof, until such notice is given, Assignor is authorized to retain and expend all payments made on Collateral. Agent shall have the right in its own name or in the name of Assignor to compromise or extend time of payment with respect to all or any portion of the Collateral for such amounts and upon such terms as Agent may determine; to demand, collect, receive, receipt for, sue for, compound and give acquittances for any and all amounts due or to become due with respect to Collateral; to take control of cash and other proceeds of any Collateral; to endorse the name of Assignor on any notes, acceptances, checks, drafts, money orders or other evidences of payment on Collateral that may come into the possession of Agent; to send requests for verification of obligations to any Obligor; and to do all other acts and things necessary to carry out the intent of this agreement. If any Obligor fails or refuses to make payment on any Collateral when due, Agent is authorized, in its sole discretion, either in its own name or in the name of Assignor, to take such action as Agent shall deem appropriate for the collection of any such amounts. Regardless of any other provision hereof, however, Agent shall never be liable for its failure to collect, or for its failure to exercise diligence in the collection of, any amounts owed with respect to Collateral, nor shall it be under any duty whatever to anyone except Assignor to account for funds that it shall actually receive hereunder. Without limiting the generality of the foregoing, Agent shall have no responsibility for ascertaining any maturities, calls, conversions, exchanges, offers, tenders or similar matters relating to any Collateral, or for informing Assignor with respect to any of such matters (irrespective of whether Agent actually has, or may be deemed to have, knowledge thereof). The receipt of Agent to any Obligor shall be a full and complete release, discharge and acquittance to such Obligor, to the extent of any amount so paid to Lenders. The rights granted Agent under this subparagraph may be exercised at any time, whether or not a Default has occurred and is continuing. (c) RECORD OWNERSHIP OF PARTNERSHIP INTERESTS. Whether or not a Default has occurred and is continuing and to the extent applicable, Agent at any time may have the Collateral registered in its name, or in the name of its nominee or nominees, as assignee; and Agent shall execute and deliver to Assignor all such proxies, powers of attorney, dividend coupons or orders and other documents as Assignor may reasonably request for the purpose of enabling Assignor to exercise the voting rights and powers which it is entitled to exercise hereunder and to receive the distributions and other payments which it is authorized to receive and retain hereunder. Nothing in this Assignment shall prohibit the payment of cash distributions by the Partnership if such distribution is permitted under the Credit Agreement. (d) PARTNERSHIP ACTION. So long as no Default has occurred, Assignor shall be entitled to exercise all rights pertaining to the Collateral. After the occurrence and during the continuance of a 5 Default, the right to vote or take action as a result of owning the Collateral shall be vested exclusively in Agent. To this end, Assignor irrevocably appoints Agent the proxy and attorney-in-fact of Assignor, with full power of substitution, to vote and to act with respect to the Collateral, subject to the understanding that such proxy may not be exercised unless a Default has occurred and is continuing. The proxy herein granted is coupled with an interest, is irrevocable, and shall continue until the Obligation has been paid and performed in full. (e) CERTAIN PROCEEDS. Any and all distributions in property made on or in respect of the Collateral, and any proceeds of the Collateral, whether such distributions, or proceeds result from a subdivision, combination or reclassification of the partnership interests of Assignor or as a result of any merger, consolidation, acquisition or other exchange of assets to which Assignor may be a party, or otherwise, shall be part of the Collateral hereunder, shall, if received by Assignor, be held in trust for the benefit of Agent, and shall forthwith be delivered to Agent (accompanied by proper instruments of assignment and/or stock and/or bond powers executed by Assignor in accordance with Agent's instructions) to be held subject to the terms hereof. Any cash proceeds of Collateral which come into the possession of Agent may, at Agent's option, be applied in whole or in part to the Obligation (to the extent then due), be released in whole or in part to or on the written instructions of Assignor for any general or specific purpose, or be retained in whole or in part by Lenders as additional Collateral. 10. MISCELLANEOUS. (a) REFERENCE TO MISCELLANEOUS PROVISIONS. This Assignment is one of the "Loan Documents" referred to in the Credit Agreement, and, therefore, this Assignment is subject to the applicable provisions of SECTION 14 of the Credit Agreement, all of which are incorporated in this Assignment by reference the same as if set forth in this Assignment verbatim. (b) TERM. Upon full and final payment of the Obligation and final termination of the Lenders' commitment to lend under the Credit Agreement without Lenders' having exercised their rights under this Assignment, this Assignment shall terminate; PROVIDED THAT no Obligor on any of the Collateral shall be obligated to inquire as to the termination of this Assignment, but shall be fully protected in making payment directly to Lenders, which payment shall be promptly paid over to Assignor after termination of this Assignment. (c) NOTICE. Any notice or communication required or permitted under this Assignment must be given as prescribed in the Credit Agreement. (d) GOVERNING LAW. THIS ASSIGNMENT SHALL BE CONSTRUED--AND ITS PERFORMANCE ENFORCED--UNDER TEXAS LAW. (e) CREDIT AGREEMENT. In the event of any conflict or inconsistency between the terms hereof and the Credit Agreement, the terms of the Credit Agreement shall be controlling. 6 EXECUTED as of the date set forth in the preamble. NCI OPERATING CORP, AS ASSIGNOR By: /s/ Robert J. Medlock ---------------------------------------------- Name: Robert J. Medlock -------------------------------------------- Title: Vice President and Chief Financial Officer ------------------------------------------- NATIONSBANK OF TEXAS, N.A., AS ADMINISTRATIVE AGENT AND A LENDER By: /s/ Richard L. Nichols, Jr. ---------------------------------------------- Name: Richard L. Nichols, Jr. -------------------------------------------- Title: Vice President ------------------------------------------- 7