QuickLinks -- Click here to rapidly navigate through this document

Exhibit 10.40

STOCK PURCHASE AGREEMENT

        This STOCK PURCHASE AGREEMENT (this "Agreement") is made as of
August 27, 2007, between Robert Luciano, an individual ("Seller") and Bally
Technologies, Inc., a Nevada corporation ("Bally").

RECITALS

        WHEREAS, Seller is an executive officer of Bally and has been unable to
dispose of any of his shares of Bally's common stock, par value $0.10 per share
(the "Common Stock"), for an extended period of time because Bally has not been
current in its quarterly and annual filings with the Securities and Exchange
Commission.

        WHEREAS, Seller has been desirous of selling a portion of his Common
Stock in order to gain necessary liquidity.

        WHEREAS, Seller desires to sell to Bally a to be determined number of
shares (the "Shares") of Common Stock having an aggregate purchase price equal
to Six Million Dollars ($6,000,000) (the "Aggregate Purchase Price").

        WHEREAS, Bally is willing to buy the Shares from Seller for the
Aggregate Purchase Price, subject to the terms and conditions of this Agreement.

        WHEREAS, the purchase price for each Share (the "Per Share Purchase
Price") will be determined by calculating the average per share closing price of
Bally's common stock on the New York Stock Exchange for the three business days
immediately prior to the Closing Date.

        WHEREAS, the total number of Shares sold pursuant to this Agreement will
be determined by dividing the Aggregate Purchase Price by the Per Share Purchase
Price and rounding down to the nearest whole number.

        NOW, THEREFORE, in consideration of the mutual promises and covenants
hereinafter set forth, Bally and Seller hereby agree as follows:

AGREEMENTS

        1.    Purchase and Sale of Shares.    Subject to the terms and
conditions of this Agreement, Seller shall hereby sell, and Bally shall hereby
purchase, on the Closing Date (as defined below) the Shares in consideration for
the payment of the Aggregate Purchase Price.

        2.    Purchase Price.    The closing of the transaction contemplated
herein (the "Closing") shall take place on October 15, 2007 (the "Closing Date")
at 9:00 a.m. Pacific Time, at the offices of Bally or at such other time or
place as the parties may mutually agree in writing. At the Closing, Seller shall
transfer the Shares by delivering to Bally certificates representing the Shares
duly endorsed for transfer, and Bally shall pay Seller the Aggregate Purchase
Price by check or by wire transfer in immediately available funds to the bank
account designated in the wire transfer instructions attached hereto as
Exhibit A.

        3.    Deliveries.    

        (a)   On or prior to the Closing Date, Seller shall deliver to Bally
(i) to the extent certificates were ever issued for the Shares, the certificates
evidencing the Shares or a lost certificate affidavit signed by Seller, (ii) an
executed Assignment Separate From Certificate substantially in the form

1

--------------------------------------------------------------------------------

attached hereto as Exhibit B and (iii) an executed Spousal Consent in the form
attached hereto as Exhibit C.

        (b)   Contemporaneously with delivery by Bally of the Aggregate Purchase
Price pursuant to Section 2, Bally and Seller shall deliver to each other
counterparts of a Cross-Receipt in the form attached hereto as Exhibit D.

        4.    Representations and Warranties of Seller.    Seller represents and
warrants to Bally as follows:

        (a)   Seller is the current sole owner of all right, title and interest
in the Shares and holds the Shares free and clear of all liabilities, liens,
encumbrances, pledges, voting trusts or shareholder agreements, restrictions on
transfer, preemptive rights, rights of first refusal or other charges
(collectively, "Liens"). Upon transfer of the Shares from Seller to Bally, Bally
will acquire good and marketable title to the Shares, free and clear of any
Liens.

        (b)   To the knowledge of Seller, no consent, approval, order or
authorization of, or registration, declaration or filling with, any governmental
entity or other third party is required by or with respect to Seller in
connection with the execution and delivery of this Agreement by Seller or the
consummation by Seller of the transactions contemplated hereby.

        (c)   Seller is the Chief Technology Officer and an executive officer of
Bally and is familiar with the business and financial condition of Bally. Seller
is satisfied by reason of his own knowledge and investigation, and not in
reliance on any express or implied representation of Bally or any of its other
directors, officers, agents or affiliates, as to the sale of the Shares at the
Purchase Price. Seller acknowledges that he has access to and has received
sufficient information regarding Bally to evaluate fully the merits of his
decision to sell the Shares to Bally, including having the opportunity to ask
any questions and receive answers about Bally's operations, results of
operations, financial condition and prospects and such other information as
Seller deems appropriate. Seller has carefully read this Agreement, has had an
opportunity to consult with his attorney and financial advisors in connection
with the execution thereof and fully understands the Agreement's final and
binding effect.

        (d)   Seller has such knowledge and experience in financial affairs that
Seller is capable of evaluating the merits and risks of a sale of the Shares.

        5.    Representations and Covenants of Bally.    

        (a)   The execution, delivery and performance by Bally of this Agreement
and the consummation by Bally of the transaction contemplated hereby are within
its powers and have been duly authorized by all necessary corporate action on
the part of Bally, and have been approved by Bally's board of directors. This
Agreement has been duly and validly executed and delivered by Bally and
constitutes a legal, valid and binding agreement of Bally, enforceable against
Bally in accordance with its terms, except (i) as such enforceability may be
limited by bankruptcy, insolvency, moratorium, reorganization or similar laws
affecting the enforcement of creditors' rights generally and (ii) as the remedy
of specific performance and other forms of injunctive relief may be subject to
equitable defenses and to the discretion of the court before which any
proceeding therefor may be brought.

        (b)   Bally acknowledges that the Shares have not been registered with
the Securities and Exchange Commission.

        (c)   Bally agrees to use commercially reasonable efforts to provide
Buyer with advance notice, to the extent reasonably practicable, of any upcoming
open trading period prior to the Closing Date.

2

--------------------------------------------------------------------------------

        (d)   Bally has knowledge and experience in financial matters, including
the value of its stock and Bally is capable of evaluating the merits and risks
of acquiring the Shares.

        6.    Conditions to Closing.    The obligation of Bally to consummate
the transaction contemplated herein shall be subject to satisfaction or waiver
by Bally of the following conditions:

        (a)   there has not been an open trading period, where executive
officers of Bally are not subject to a blackout period, of at least three
business days prior to the Closing Date;

        (b)   Seller remains employed as an executive officer of Bally; and

        (c)   Bally is able to repurchase the Shares without violating any
applicable law, rule or regulation.

        7.    Access to Information; Waiver.    

        (a)   Seller acknowledges that he is the Chief Technology Officer and an
executive officer of Bally and as such that he has had access to material,
non-public information regarding Bally and its condition (financial and
otherwise), results of operations, businesses, properties, plans and prospects
(collectively, "Information"). Seller also acknowledges that (i) since his
temporary leave of absence from Bally that Bally may have additional material,
non-public Information regarding Bally (the "Additional Information"); (ii) he
and his financial and legal advisors have been offered access to the Information
and the Additional Information, and he and they have reviewed such Information
and Additional Information as he and they deem appropriate, and he and they know
that the Information and the Additional Information might be material to his
decision to sell the Shares or might otherwise be materially adverse to his
interests.

        (b)   SELLER HEREBY WAIVES AND RELEASES, TO THE FULLEST EXTENT PERMITTED
BY LAW, ANY AND ALL CLAIMS AND CAUSES OF ACTION HE HAS OR MAY HAVE AGAINST
BALLY, ITS OFFICERS, DIRECTORS, AFFILIATES AND ADVISORS, DIRECTLY OR INDIRECTLY
BASED UPON, RELATING TO OR ARISING OUT OF THE SALE OF SHARES PURSUANT TO THIS
AGREEMENT, INCLUDING ANY CLAIM OR CAUSE OF ACTION BASED UPON, RELATING TO OR
ARISING OUT OF NONDISCLOSURE OF THE INFORMATION OR THE ADDITIONAL INFORMATION.

        8.    Further Assurances.    Upon request, Seller agrees to execute and
deliver any additional documents reasonably deemed by Bally to be necessary or
desirable to complete the sale of the Shares contemplated hereunder.

        9.    Governing Law.    All terms of and rights under this Agreement
shall be governed by and construed in accordance with the internal law of the
State of Nevada, without giving effect to principles of conflicts of law.

        10.    Notices.    All notices and other communications hereunder shall
be in writing and shall be deemed given if delivered personally or by commercial
delivery service, or mailed by registered or certified mail (return receipt
requested) or sent via facsimile (with acknowledgment of complete transmission)
to the parties at the following addresses (or at such other address for a party
as shall be specified by like notice):

(a) If to Bally:   Bally Technologies, Inc.
6601 South Bermuda Road
Las Vegas, Nevada 89119     Telecopy:   (702) 584-7990     Attention:   Legal
Department          

3

--------------------------------------------------------------------------------

With a copy (which does not constitute notice) to:
 
Gibson, Dunn & Crutcher LLP
333 South Grand Avenue
Los Angeles, California 90071-3197     Telecopy:   (213) 229-7520     Attention:
  Jeffrey A. Le Sage, Esq.
(b) If to Seller:
 
Robert Luciano
With a copy (which does not constitute notice) to:
 
Mark Knobel, Esq.
Avansino, Melarkey, Knobel, and Mulligan
4795 Caughlin Parkway, Suite 100
Reno, Nevada 80509

        11.    Amendments and Waivers.    This Agreement may be amended, and any
provision hereof may be waived, only by a writing signed by the party to be
charged.

        12.    Entire Agreement.    This Agreement sets forth the entire
agreement and understanding between the parties as to the subject matter hereof
and supersedes all prior oral and written and all contemporaneous oral
discussions, agreements and understandings with respect to such subject matter.

        13.    Counterparts.    This Agreement may be executed by facsimile
signature and in two or more counterparts, each of which shall constitute an
original, but all of which, when taken together, shall constitute but one
instrument. This Agreement shall become effective when one or more counterparts
have been signed by each party hereto and delivered to the other parties.

        14.    Severability.    If any provision of this Agreement or the
application thereof becomes or is declared by a court of competent jurisdiction
or other governmental entity to be illegal, void or unenforceable, the remainder
of this Agreement will continue in full force and effect and the application of
such provision to other persons or circumstances will be interpreted so as
reasonably to effect the express intent of the parties hereto. The parties
further agree to replace such void or unenforceable provision of this Agreement
with a valid and enforceable provision that will achieve, to the extent
possible, the economic, business and other purposes of such void or
unenforceable provision.

        15.    Headings.    The article and section headings contained in this
Agreement are for reference purposes only and shall not affect in any way the
meaning or interpretation of this Agreement.

        16.    Successors and Assigns.    Except as otherwise provided herein,
this Agreement and the rights and obligations of the parties hereunder shall
inure to the benefit of, and be binding upon, the parties' respective
successors, assigns and legal representatives.

        IN WITNESS WHEREOF, this Agreement is entered into as of the date first
above written.

    SELLER
 
 
By:
 
/s/  ROBERT LUCIANO      

--------------------------------------------------------------------------------

 
 
BALLY TECHNOLOGIES, INC.
 
 
By:
 
/s/  MARK LERNER      

--------------------------------------------------------------------------------

    Its:   MARK LERNER, Secretary

--------------------------------------------------------------------------------

 
 
 
 
9/07/07

4

--------------------------------------------------------------------------------

Exhibit B

Assignment Separate From Certificate

        FOR VALUE RECEIVED                        hereby sells, assigns and
transfers unto                         (                        ) shares of
Common Stock of                        , a                         Corporation,
standing in the undersigned's name on the books of said corporation [represented
by Certificate(s) No.            herewith,] and does hereby irrevocably
constitute and appoint                        attorney to transfer the said
stock on the books of the said corporation with full power of substitution in
the premises.

Dated:                        , 2007

    Signature       

--------------------------------------------------------------------------------

Signature guaranteed:(1)         

--------------------------------------------------------------------------------

       

--------------------------------------------------------------------------------

(1)The signature must be guaranteed under the medallion guaranty program by a
commercial bank having a corresponding banking relationship with a bank in the
U.S., by a member firm of the New York Stock Exchange or the American Stock
Exchange, or by a member of the National Association of Securities Dealers.

--------------------------------------------------------------------------------

Exhibit C

Spousal Consent

        I hereby consent to the sale of the Shares as provided by that certain
Stock Purchase Agreement (the "Agreement") entered into as of August 27, 2007 by
and between Robert Luciano and Bally Technologies, Inc., and agree that the sale
of the Shares as provided for in the Agreement shall apply to my community
property interest in such securities, if any.

        All capitalized terms not defined herein shall have the definitions set
forth in the Agreement.

/s/  TERESA LUCIANO      

--------------------------------------------------------------------------------

(Signature of Spouse)    
Print Name: Teresa Luciano
 
 
Dated: August 27, 2007.
 
 

--------------------------------------------------------------------------------

Exhibit D

Cross Receipt

CROSS RECEIPT

Between

Robert Luciano

and

Bally Technologies, Inc.

Dated:                        , 2007

        Reference is made to the Stock Purchase Agreement dated as
of                        , 2007 (the "Stock Purchase Agreement") between Robert
Luciano ("Seller") and Bally Technologies, Inc. ("Buyer").

        Capitalized terms used but not defined herein shall have the meanings
ascribed to such terms in the Stock Purchase Agreement.

1.Buyer hereby acknowledges receipt of the Shares, [as represented by
Certificate No.            ] (CUSIIP No.                        ), registered in
the name of Robert Luciano.

    BALLY TECHNOLOGIES, INC.
 
 
By:
 
    

--------------------------------------------------------------------------------

    Its:       

--------------------------------------------------------------------------------

2.Seller hereby acknowledges receipt from Buyer of $6,000,000 through wire
transfer to settle in same day funds, as full and complete payment for the
Shares, and in full satisfaction of the obligations of Buyer to Seller to
purchase and pay for the Shares under the Stock Purchase Agreement.

    By:       

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

QuickLinks

Exhibit 10.40