<PAGE>   1

                                                                   EXHIBIT 10.21

              SIXTH AMENDMENT TO FOURTH AMENDED AND RESTATED CREDIT
                              FACILITIES AGREEMENT

     THIS SIXTH AMENDMENT TO FOURTH AMENDED AND RESTATED CREDIT FACILITIES
AGREEMENT (this "Amendment") is entered into as of June 26, 2000, by and among
DT INDUSTRIES, INC., a Delaware corporation ("Domestic Borrower"), DT INDUSTRIES
(UK) II LIMITED, ASSEMBLY TECHNOLOGIE & AUTOMATION GMBH, KALISH INC., formerly
Kalish Canada Inc., and DT CANADA INC. (together with Domestic Borrower,
separately and collectively, "Borrower"), BANK OF AMERICA, N.A., formerly
NationsBank, N.A., as administrative agent ("Administrative Agent"), and the
other lenders listed on the signature pages hereof (the "Lenders").

                                    RECITALS

          (a) Borrower, Administrative Agent and the Lenders are parties to that
     certain Fourth Amended and Restated Credit Facilities Agreement dated as of
     July 21,1997 (as amended through the date hereof, the "Credit Agreement";
     terms defined in the Credit Agreement and not otherwise defined herein
     shall be used herein as defined in the Credit Agreement).

          (b) Borrower, Administrative Agent, and the Lenders desire to amend
     the Credit Agreement as described below, subject to the terms and
     conditions contained herein.

     NOW, THEREFORE, in consideration of the covenants, conditions and
agreements hereafter set forth, and for other good and valuable consideration,
the receipt and adequacy of which are all hereby acknowledged, the parties
hereto covenant and agree as follows:

     1. AMENDMENTS TO THE CREDIT AGREEMENT. The Credit Agreement is hereby
amended as follows:

          (a) Section 6.1.2. is entirely amended, as follows:

          6.1.2. PRINCIPAL. Borrower shall repay the entire amount of the
          Aggregate Revolving Loan as then outstanding on July 2, 2001. Canadian
          Borrowers shall repay the entire amount of the Canadian Term Loan on
          July 2, 2001.

          (b) All references to "April 1, 2001" in Section 14.11. are hereby
     amended to be references to "July 2, 2001".

          (c) All references to "$10,500,000" in Section 14.11. are hereby
     amended to be references to "$14,000,000".

     2. ACKNOWLEDGMENT OF THE BORROWER. The Borrower acknowledges and agrees
that the Lenders executing this Amendment have done so in their sole discretion
and



<PAGE>   2

without any obligation. The Borrower further acknowledges and agrees that any
action taken or not taken by the Lenders or the Administrative Agent prior to,
on or after the date hereof shall not constitute a waiver or modification of any
term, covenant or provision of any Loan Document or prejudice any rights or
remedies which the Administrative Agent or any Lender now has or may have in the
future under any Loan Document, Applicable Law or otherwise, all of which rights
and remedies are expressly reserved by the Administrative Agent and the Lenders.

     3. AMENDMENT FEE. Borrower shall pay to the Administrative Agent, for the
pro rata benefit of each Lender, an amendment fee (the "Amendment Fee") in an
amount equal to the product of (a) 0.10% multiplied by (b) an amount equal to
the sum of (i) such Lender's portion of the Commitment plus (ii) the aggregate
amount of the Canadian Term Loan owed to such Lender as of the date hereof,
which Amendment Fee shall be earned and due and payable as of the date of this
Amendment.

     4. CONTINGENT FEE. Unless the Loan Obligations are paid in full and all
commitments to lend under the Credit Agreement are cancelled before November 8,
2000, Borrower shall pay to the Administrative Agent, for the pro rata benefit
of each Lender, an additional amendment fee (the "Contingent Fee") in an amount
equal to the product of (a) 0.15% multiplied by (b) an amount equal to the sum
of (i) such Lender's portion of the Commitment plus (ii) the aggregate amount of
the Canadian Term Loan owed to such Lender as of November 8, 2000, which
Contingent Fee shall be earned and due and payable on November 8, 2000.

     5. SUBSIDIARIES ACKNOWLEDGMENT. By signing below, each of the Domestic
Borrower's Subsidiaries which has executed a guaranty of the Loan Obligations
(a) consents and agrees to this Amendment's execution and delivery, (b) ratifies
and confirms its obligations under its guaranty, (c) acknowledges and agrees
that its obligations under its guaranty are not released, diminished, impaired,
reduced, or otherwise adversely affected by this Amendment, and (d) acknowledges
and agrees that it has no claims or offsets against, or defenses or
counterclaims to, its guaranty.

     6. RELEASE.

          (a) Upon this Amendment becoming effective, the Domestic Borrower and
     each of its Subsidiaries hereby unconditionally and irrevocably remises,
     acquits, and fully and forever releases and discharges the Administrative
     Agent and the Lenders and all respective affiliates and subsidiaries of the
     Administrative Agent and the Lenders, their respective officers, servants,
     employees, agents, attorneys, principals, directors and shareholders, and
     their respective heirs, legal representatives, successors and assigns
     (collectively, the "Released Lender Parties") from any and all claims,
     demands, causes of action, obligations, remedies, suits, damages and
     liabilities (collectively, the "Borrower Claims") of any nature whatsoever,
     whether now known, suspected or claimed, whether arising under common law,
     in equity or under statute, which the Domestic Borrower or any of its
     Subsidiaries ever had or now has against the Released Lender Parties which
     may have arisen at any time on or prior to the date of this Amendment and
     which were in


                                       2

<PAGE>   3

     any manner related to any of the Loan Documents or the enforcement or
     attempted enforcement by the Administrative Agent or the Lenders of rights,
     remedies or recourses related thereto.

          (b) Upon this Amendment becoming effective, the Domestic Borrower and
     each of its Subsidiaries covenants and agrees never to commence,
     voluntarily aid in any way, prosecute or cause to be commenced or
     prosecuted against any of the Released Lender Parties any action or other
     proceeding based upon any of the Borrower Claims which may have arisen at
     any time on or prior to the date of this Amendment and were in any manner
     related to any of the Loan Documents.

          (c) The agreements of the Domestic Borrower and each of its
     Subsidiaries set forth in this Section 6 shall survive termination of this
     Amendment and the other Loan Documents.

     7. REPRESENTATIONS AND WARRANTIES. By its execution and delivery hereof,
the Borrower represents and warrants to the Lenders that, as of the date hereof:

          (a) the representations and warranties contained in the Credit
     Agreement and the other Loan Documents are true and correct on and as of
     the date hereof as if made on and as of such date; and

          (b) no event has occurred and is continuing which constitutes a
     Default or an Event of Default.

     8. CONDITIONS OF EFFECTIVENESS. This Amendment shall be effective as of
June 26, 2000, so long as each of the following conditions precedent shall have
been satisfied:

          (a) All reasonable out-of-pocket fees and expenses in connection with
     the Loan Documents, including this Amendment, including legal and other
     professional fees and expenses incurred on or prior to the date of this
     Amendment by Administrative Agent or any Lender, including, without
     limitation, the fees and expenses of Winstead Sechrest & Minick P.C. and
     Arthur Andersen L.L.P., shall have been paid.

          (b) Administrative Agent and each Lender shall have received each of
     the following, in form and substance satisfactory to Administrative Agent,
     Lenders and Administrative Agent's counsel:

               (i) payment of the Amendment Fee; and

               (ii) such other documents, certificates and instruments as the
          Administrative Agent shall require prior to the date hereof.

     9. REFERENCE TO CREDIT AGREEMENT. Upon the effectiveness of this Amendment,
each reference in the Credit Agreement to "this Agreement," "hereunder," or
words




                                       3
<PAGE>   4

of like import shall mean and be a reference to the Credit Agreement, as
affected and amended by this Amendment.

     10. COUNTERPARTS; EXECUTION VIA FACSIMILE. This Amendment may be executed
in one or more counterparts, each of which shall be deemed an original, but all
of which together shall constitute one and the same instrument. This Amendment
may be validly executed and delivered by facsimile or other electronic
transmission.

     11. GOVERNING LAW: BINDING EFFECT. This Amendment shall be governed by and
construed in accordance with the laws of the State of Texas and shall be binding
upon the Borrower, the Administrative Agent, each Lender and their respective
successors and assigns.

     12. HEADINGS. Section headings in this Amendment are included herein for
convenience of reference only and shall not constitute a part of this Amendment
for any other purpose.

     13. LOAN DOCUMENT. This Amendment is a Loan Document and is subject to all
provisions of the Credit Agreement applicable to Loan Documents, all of which
are incorporated in this Amendment by reference the same as if set forth in this
Amendment verbatim.

     14. NO ORAL AGREEMENTS. THIS WRITTEN AGREEMENT AND THE OTHER LOAN DOCUMENTS
REPRESENT THE FINAL AGREEMENT BETWEEN THE PARTIES AND MAY NOT BE CONTRADICTED BY
EVIDENCE OF PRIOR, CONTEMPORANEOUS, OR SUBSEQUENT ORAL AGREEMENTS OF THE
PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]




                                       4
<PAGE>   5

     IN WITNESS WHEREOF, the parties hereto have executed this Amendment as the
date first above written.

BORROWER:

<TABLE>
<S>                                             <C>
DT INDUSTRIES, INC.,                            KALISH INC. formerly Kalish Canada Inc.,
a Delaware corporation                          a New Brunswick, Canada corporation


By:        /s/ Bruce P. Erdel                   By:           /s/ Bruce P. Erdel
   --------------------------------------          --------------------------------------
   Bruce P. Erdel, Senior Vice President-          Bruce P. Erdel, Vice President and
   Finance and Administration                      Treasurer

DT CANADA INC.,                                 ASSEMBLY TECHNOLOGIE &
a New Brunswick, Canada corporation             AUTOMATION GMBH, a German
                                                limited liability company


By:      /s/ Bruce P. Erdel                     By:            /s/ Bruce P. Erdel
   --------------------------------------          --------------------------------------
   Bruce P. Erdel, Vice President                  Bruce P. Erdel, Geschaftsfuhrer
   and Treasurer


DT INDUSTRIES (UK) II LIMITED,
a corporation of England and Wales


By:      /s/ Bruce P. Erdel
   --------------------------------------
   Bruce P. Erdel, Director

SUBSIDIARIES:

ADVANCED ASSEMBLY AUTOMATION, INC.              ASSEMBLY TECHNOLOGY & TEST, INC.

By:    /s/ Bruce P. Erdel                       By:    /s/ Bruce P. Erdel
       -----------------------------------             ----------------------------------
Name:  Bruce P. Erdel                           Name:  Bruce P. Erdel
       -----------------------------------             ----------------------------------
Title: Vice President                           Title: Vice President
       -----------------------------------             ----------------------------------
</TABLE>






                                       5
<PAGE>   6

DETROIT TOOL AND ENGINEERING CO.         DETROIT TOOL METAL PRODUCTS CO.

By:    /s/ Bruce P. Erdel                By:    /s/ Bruce P. Erdel
       -------------------------------          -----------------------------
Name:  Bruce P. Erdel                    Name:  Bruce P. Erdel
       -------------------------------          -----------------------------
Title: Vice President                    Title: Vice President
       -------------------------------          -----------------------------


HANSFORD MANUFACTURING CORPORATION       PHARMA GROUP, INC.

By:    /s/ Bruce P. Erdel                By:    /s/ Bruce P. Erdel
       -------------------------------          -----------------------------
Name:  Bruce P. Erdel                    Name:  Bruce P. Erdel
       -------------------------------          -----------------------------
Title: Vice President                    Title: Vice President
       -------------------------------          -----------------------------


MID-WEST AUTOMATION ENTERPRISES, INC.    MID-WEST AUTOMATION SYSTEMS, INC.

By:    /s/ Bruce P. Erdel                By:    /s/ Bruce P. Erdel
       -------------------------------          -----------------------------
Name:  Bruce P. Erdel                    Name:  Bruce P. Erdel
       -------------------------------          -----------------------------
Title: Vice President                    Title: Vice President
       -------------------------------          -----------------------------


SENCORP SYSTEMS, INC.                    ARMAC INDUSTRIES, CO.

By:    /s/ Bruce P. Erdel                By:    /s/ Bruce P. Erdel
       -------------------------------          -----------------------------
Name:  Bruce P. Erdel                    Name:  Bruce P. Erdel
       -------------------------------          -----------------------------
Title: Vice President                    Title: Vice President
       -------------------------------          -----------------------------


ASSEMBLY MACHINES, INC.                  VANGUARD TECHNICAL SOLUTIONS, INC.

By:    /s/ Bruce P. Erdel                By:    /s/ Bruce P. Erdel
       -------------------------------          -----------------------------
Name:  Bruce P. Erdel                    Name:  Bruce P. Erdel
       -------------------------------          -----------------------------
Title: Vice President                    Title: Vice President
       -------------------------------          -----------------------------




                                       6
<PAGE>   7

ADMINISTRATIVE AGENT AND LENDERS:

BANK OF AMERICA, N.A., formerly           DRESDNER BANK AG, NEW YORK
NationsBank, N.A., as Administrative      AND GRAND CAYMAN BRANCHES
Agent and a Lender

By:     /s/ William E. Livingstone, IV    By:    /s/ James Jerz
   -------------------------------------         ------------------------------
   William E. Livingstone, IV             Name:  James Jerz
   Managing Director                             ------------------------------
                                          Title: Vice President
                                                 ------------------------------

                                          By:    /s/ Craig Payne
                                                 ------------------------------
                                          Name:  Craig Payne
                                                 ------------------------------
                                          Title: Assistant Treasurer
                                                 ------------------------------

MERRILL LYNCH, PIERCE,                    THE BANK OF NOVA SCOTIA
FENNER & SMITH, INCORPORATED

By:    /s/ Graham Goldsmith               By:    /s/ F.C.E. Ashby
       ---------------------------------         ------------------------------
Name:  Graham Goldsmith                   Name:  F.C.E. Ashby
       ---------------------------------         ------------------------------
Title: Director                           Title: Senior Manager Loan Operations
       ---------------------------------         ------------------------------


THE SAKURA BANK, LIMITED                  FIRSTAR BANK, N.A.



By:    /s/ Yoshikazu Nagura               By:     /s/ Timothy N. Scheer
       ---------------------------------          -----------------------------
Name:  Yoshikazu Nagura                   Name:   Timothy N. Scheer
       ---------------------------------          -----------------------------
Title: Senior Vice President              Title:  Vice President
       ---------------------------------          -----------------------------


GENERAL ELECTRIC CAPITAL                  THE SUMITOMO BANK, LIMITED
CORPORATION

By:    /s/ Gregory Hong                   By:    /s/ Suresh S. Tata
       ---------------------------------         ------------------------------
Name:  Gregory Hong                       Name:  Suresh S. Tata
       ---------------------------------         ------------------------------
Title: Duly Authorized Signatory          Title: Senior Vice President
       ---------------------------------         ------------------------------


NATIONAL CITY BANK

By:    /s/ David Lucht
       ---------------------------------
Name:  David Lucht
       ---------------------------------
Title: EVP, Senior Credit Officer
       ---------------------------------



                                       7