<PAGE>
                                                                    EXHIBIT 10.4


                              CITRIX SYSTEMS, INC.

                           THIRD AMENDED AND RESTATED
                        1995 EMPLOYEE STOCK PURCHASE PLAN


ARTICLE 1 - PURPOSE.

         This Third Amended and Restated 1995 Employee Stock Purchase Plan (the
"Plan") is effective as of July 1, 2002, and is intended to encourage stock
ownership by all eligible employees of Citrix Systems, Inc. (the "Company"), a
Delaware corporation, and its participating subsidiaries (as defined in Article
17) so that they may share in the growth of the Company by acquiring or
increasing their proprietary interest in the Company. The Plan is designed to
encourage eligible employees to remain in the employ of the Company and its
participating subsidiaries. The Plan is intended to constitute an "employee
stock purchase plan" within the meaning of Section 423(b) of the Internal
Revenue Code of 1986, as amended (the "Code").

ARTICLE 2 - ADMINISTRATION OF THE PLAN.

         The Plan may be administered by a committee appointed by the Board of
Directors of the Company (the "Committee"). The Committee shall consist of not
less than two members of the Company's Board of Directors. The Board of
Directors may from time to time remove members from, or add members to, the
Committee. Vacancies on the Committee, howsoever caused, shall be filled by the
Board of Directors. The Committee may select one of its members as Chairman, and
shall hold meetings at such times and places as it may determine. Acts by a
majority of the Committee, or acts reduced to or approved in writing by a
majority of the members of the Committee, shall be the valid acts of the
Committee.

         The interpretation and construction by the Committee of any provisions
of the Plan or of any option granted under it shall be final, unless otherwise
determined by the Board of Directors. The Committee may from time to time adopt
such rules and regulations for carrying out the Plan as it may deem best,
provided that any such rules and regulations shall be applied on a uniform basis
to all employees under the Plan. No member of the Board of Directors or the
Committee shall be liable for any action or determination made in good faith
with respect to the Plan or any option granted under it.

         In the event the Board of Directors fails to appoint or refrains from
appointing a Committee, the Board of Directors shall have all power and
authority to administer the Plan. In such event, the word "Committee" wherever
used herein shall be deemed to mean the Board of Directors.

         Each member of the Committee shall be a "disinterested director" --
i.e., except as otherwise permitted under Section 16(b) of the Securities


<PAGE>

Exchange Act of 1934 (the "Exchange Act") and paragraph (c)(2)(i) of Rule 16b-3
thereunder, no member of the Committee shall be granted, nor shall have been
granted, "equity securities" (within the meaning of 17 C.F.R. section
240.16a-1(d)) pursuant to the Plan or any other plan of the Company or its
"affiliates" (as defined in the Exchange Act) at any time during the period
commencing with the date which is one year after date on which his service on
the Committee ceases. Notwithstanding the preceding sentence, (i) the grant or
award of such an equity security to a member of the Committee prior to the date
of the effectiveness of the Company's initial registration statement under
Section 12 of the Exchange Act shall not cause the Committee member to fail to
be "disinterested," and (ii) a member of the Committee may receive stock options
under the Citrix Systems, Inc. 1995 Non-Employee Director Stock Option Plan.

ARTICLE 3 - ELIGIBLE EMPLOYEES.

         All employees of the Company or any of its participating subsidiaries
whose customary employment is more than twenty (20) hours per week and for more
than five (5) months in any calendar year shall be eligible to receive options
under the Plan to purchase common stock of the Company, and all eligible
employees shall have the same rights and privileges hereunder. Persons who are
eligible employees on the first business day of any Payment Period (as defined
in Article 5) shall receive their options as of such day. Persons who become
eligible employees after any date on which options are granted under the Plan
shall be granted options on the first day of the next succeeding Payment Period
on which options are granted to eligible employees under the Plan. Directors who
are not employees of the Company shall not be eligible to receive options under
this Plan. In no event, however, may an employee be granted an option if such
employee, immediately after the option was granted, would be treated as owning
stock possessing five percent (5%) or more of the total combined voting power or
value of all classes of stock of the Company or of any parent corporation or
subsidiary corporation, as the terms "parent corporation" and "subsidiary
corporation" are defined in Section 424(e) and (f) of the Code. For purposes of
determining stock ownership under this paragraph, the rules of Section 424(d) of
the Code shall apply, and stock which the employee may purchase under
outstanding options shall be treated as stock owned by the employee.

ARTICLE 4 - STOCK SUBJECT TO THE PLAN.

         The stock subject to the options under the Plan shall be shares of the
Company's authorized but unissued common stock, par value $0.001 per share (the
"Common Stock"), or shares of Common Stock reacquired by the Company, including
shares purchased in the open market. The aggregate number of shares which may be
issued pursuant to the Plan is 9,000,000 (as adjusted for stock splits that
occurred prior to the second amendment and restatement of the Plan), subject to
adjustment as provided in Article 12. If any option granted under the Plan shall
expire or terminate for any reason without having been exercised in full or
shall cease for any reason to be exercisable in whole or in part, the
unpurchased shares subject thereto shall again be available under the Plan.




                                     - 2 -
<PAGE>


ARTICLE 5 - PAYMENT PERIOD AND STOCK OPTIONS.

         The payment periods during which payroll deductions will be accumulated
under the Plan , shall consist of periods commencing on July 16 and January 16
and ending on February 1 and August 1 of each calendar year, respectively (each,
a "Payment Period" and collectively, the "Payment Periods"); provided that the
initial Payment Period shall commence on July 1, 2002, and end on February 1,
2003.

         Twice each year, on the first business day of each Payment Period, the
Company will grant to each eligible employee who is then a participant in the
Plan an option to purchase on the last day of such Payment Period, at the Option
Price hereinafter provided for, a maximum of 12,000 shares (as adjusted for
stock splits that occurred prior to the second amendment and restatement of the
Plan), on condition that such employee remains eligible to participate in the
Plan throughout the remainder of such Payment Period. The participant shall be
entitled to exercise the option so granted only to the extent of the
participant's accumulated payroll deductions on the 15th day of the month
immediately preceding the last day of a Payment Period (each, a "Payroll Cut-off
Date"). Any payroll deductions accumulated between a Payroll Cut-off Date and
the end of the Payment Period to which such Payroll Cut-off Date applies shall
be applied to the Payment Period that commenced immediately after such Payroll
Cut-off Date. If a participant's accumulated payroll deductions on a Payroll
Cut-off Date would enable a participant to purchase more than 12,000 shares
except for the 12,000 share limitation, the excess of the amount of the
accumulated payroll deductions over the aggregate purchase price of the 12,000
shares shall be promptly refunded to such participant by the Company, without
interest. The Option Price per share for each Payment Period shall be the lesser
of (i) 85% of the fair market value of the Common Stock on the first business
day of the Payment Period and (ii) 85% of the fair market value of the Common
Stock on the last business day of the Payment Period, in either event rounded up
to the nearest whole cent. The foregoing limitation on the number of shares
subject to option and the Option Price shall be subject to adjustment as
provided in Article 12.

         For purposes of the Plan, "fair market value of the Common Stock" on
any business day shall mean (i) the average (on that date) of the high and low
prices of the Common Stock on the principal national securities exchange on
which the Common Stock is traded, if the Common Stock is then traded on a
national securities exchange; or (ii) the last reported sale price (on that
date) of the Common Stock on the Nasdaq Stock Market, if the Common Stock is not
then traded on a national securities exchange; or (iii) the average of the
closing bid and asked prices last quoted (on that date) by an established
quotation service for over-the-counter securities, if the Common Stock is not
reported on the Nasdaq Stock Market; or (iv) if the Common Stock is not publicly
traded, the fair market value of the Common Stock as determined by the Committee
after taking into consideration all factors which it deems appropriate,
including, without limitation, recent sale and offer prices of the Common Stock
in private transactions negotiated at arm's length.




                                     - 3 -
<PAGE>

         For purposes of the Plan, the term "business day" means a day on which
there is trading on the Nasdaq Stock Market or the aforementioned national
securities exchange, whichever is applicable pursuant to the preceding
paragraph.

         No employee shall be granted an option which permits the employee's
right to purchase stock under the Plan, and under all other Section 423(b)
employee stock purchase plans of the Company and any parent or subsidiary
corporations, to accrue at a rate which exceeds $25,000 of fair market value of
such stock (determined on the date or dates that options on such stock were
granted) for each calendar year in which such option is outstanding at any time.
The purpose of the limitation in the preceding sentence is to comply with
Section 423(b)(8) of the Code. If the participant's accumulated payroll
deductions on the last day of the Payment Period with respect to such Payment
Period would otherwise enable the participant to purchase Common Stock in excess
of the Section 423(b)(8) limitation described in this paragraph, the excess of
the amount of the accumulated payroll deductions over the aggregate purchase
price of the shares actually purchased shall be promptly refunded to the
participant by the Company, without interest.

ARTICLE 6 - EXERCISE OF OPTION.

         Each eligible employee who continues to be a participant in the Plan on
the last day of a Payment Period shall be deemed to have exercised his or her
option on such date and shall be deemed to have purchased from the Company such
number of full shares of Common Stock reserved for the purpose of the Plan as
the participant's accumulated payroll deductions on the applicable Payroll
Cut-off Date will pay for at the Option Price, subject to the 12,000 share limit
of the option and the Section 423(b)(8) limitation described in Article 5. If
the individual is not a participant on the last day of a Payment Period, then he
or she shall not be entitled to exercise his or her option. Only full shares of
Common Stock may be purchased under the Plan. With respect to any Payment
Period, unused payroll deductions remaining in a participant's account by reason
of the inability to purchase a fractional share shall be applied to the most
recently commenced Payment Period.

ARTICLE 7 - AUTHORIZATION FOR ENTERING THE PLAN.

         An employee may elect to enter the Plan by filling out, signing and
delivering to the Company an authorization:

                  A. Stating the percentage to be deducted regularly from the
employee's pay;

                  B. Authorizing the purchase of stock for the employee in each
Payment Period in accordance with the terms of the Plan; and

                  C. Specifying the exact name or names in which stock purchased
for the employee is to be issued as provided under Article 11 hereof.



                                     - 4 -
<PAGE>

Such authorization must be received by the Company at least ten business days
before the first day of the next succeeding Payment Period and shall take effect
only if the employee is an eligible employee on the first business day of such
Payment Period.

         Unless a participant files a new authorization or withdraws from the
Plan, the deductions and purchases under the authorization the participant has
on file under the Plan will continue from one Payment Period to succeeding
Payment Periods as long as the Plan remains in effect.

         The Company will accumulate and hold for each participant's account the
amounts deducted from his or her pay. No interest will be paid on these amounts.

ARTICLE 8 - MAXIMUM AMOUNT OF PAYROLL DEDUCTIONS.

         An employee may authorize payroll deductions in an amount (expressed as
a whole percentage) not less than one percent (1%) but not more than ten percent
(10%) of the employee's total compensation, including base pay or salary and any
overtime, bonuses or commissions.

ARTICLE 9 - CHANGE IN PAYROLL DEDUCTIONS.

         Deductions may not be increased or decreased between the commencement
of a Payment Period and the Payroll Cut-off Date applicable to such Payment
Period. However, a participant may withdraw in full from the Plan at any time,
except, with respect to withdrawal from a Payment Period, on the last day of
such Payment Period.

ARTICLE 10 - WITHDRAWAL FROM THE PLAN.

         An employee may withdraw from the Plan (in whole but not in part) at
any time, except, with respect to withdrawal from a Payment Period, on the last
day of such Payment Period, by delivering a withdrawal notice to the Company, in
which case the Company will promptly refund the entire balance of the employee's
deductions not previously used to purchase stock under the Plan.

         To re-enter the Plan, an employee who has previously withdrawn must
file a new authorization at least ten business days before the first day of the
next Payment Period in which he or she wishes to participate. The employee's
re-entry into the Plan becomes effective at the beginning of such Payment
Period, provided that he or she is an eligible employee on the first business
day of such Payment Period.

ARTICLE 11 - ISSUANCE OF STOCK.

         Certificates for stock issued to participants shall be delivered as
soon as practicable after each Payment Period by the Company's transfer agent.



                                     - 5 -
<PAGE>


         Stock purchased under the Plan shall be issued only in the name of the
participant, or if the participant's authorization so specifies, in the name of
the participant and another person of legal age as joint tenants with rights of
survivorship.

ARTICLE 12 - ADJUSTMENTS.

         Upon the happening of any of the following described events, a
participant's rights under options granted under the Plan shall be adjusted as
hereinafter provided:

                  A. In the event that the shares of Common Stock shall be
subdivided or combined into a greater or smaller number of shares or if, upon a
reorganization, split-up, liquidation, recapitalization or the like of the
Company, the shares of Common Stock shall be exchanged for other securities of
the Company, each participant shall be entitled, subject to the conditions
herein stated, to purchase such number of shares of Common Stock or amount of
other securities of the Company as were exchangeable for the number of shares of
Common Stock that such participant would have been entitled to purchase except
for such action, and appropriate adjustments shall be made in the purchase price
per share to reflect such subdivision, combination or exchange; and

                  B. In the event the Company shall issue any of its shares as a
stock dividend upon or with respect to the shares of stock of the class which
shall at the time be subject to option hereunder, each participant upon
exercising such an option shall be entitled to receive (for the purchase price
paid upon such exercise) the shares as to which the participant is exercising
his or her option and, in addition thereto (at no additional cost), such number
of shares of the class or classes in which such stock dividend or dividends were
declared or paid, and such amount of cash in lieu of fractional shares, as is
equal to the number of shares thereof and the amount of cash in lieu of
fractional shares, respectively, which the participant would have received if
the participant had been the holder of the shares as to which the participant is
exercising his or her option at all times between the date of the granting of
such option and the date of its exercise.

         Upon the happening of any of the foregoing events, the class and
aggregate number of shares set forth in Article 4 hereof which are subject to
options which have been or may be granted under the Plan and the limitations set
forth in the second paragraph of Article 5 shall also be appropriately adjusted
to reflect the events specified in paragraphs A. and B. above. Notwithstanding
the foregoing, any adjustments made pursuant to paragraphs A. or B. shall be
made only after the Committee, based on advice of counsel for the Company,
determines whether such adjustments would constitute a "modification" (as that
term is defined in Section 424 of the Code). If the Committee determines that
such adjustments would constitute a modification, it may refrain from making
such adjustments.

         If the Company is to be consolidated with or acquired by another entity
in a merger, a sale of all or substantially all of the Company's assets or
otherwise (an "Acquisition"), the Committee shall, with respect to options then
outstanding under the Plan, either (i) make appropriate provision for the
exchange of such options on an equitable basis for the consideration payable



                                     - 6 -
<PAGE>

with respect to the outstanding shares of the Company's Common Stock in
connection with the Acquisition, or (ii) terminate all outstanding options in
exchange for a cash payment equal to the excess of the fair market value of the
shares subject to the options (determined as of the date of the Acquisition)
over the Option Price thereof (determined with reference only to the first
business day of the applicable Payment Period).

         The Committee shall determine the adjustments to be made under this
Article 12, and its determination shall be conclusive.

ARTICLE 13 - NO TRANSFER OR ASSIGNMENT OF EMPLOYEE'S RIGHTS.

         An employee's rights under the Plan are the employee's alone and may
not be transferred or assigned to, or availed of by, any other person other than
by will or the laws of descent and distribution. Any option granted under the
Plan to an employee may be exercised, during the employee's lifetime, only by
the employee.

ARTICLE 14 - TERMINATION OF EMPLOYEE'S RIGHTS.

         Whenever a participant ceases to be an eligible employee because of
retirement, voluntary or involuntary termination, resignation, layoff,
discharge, death or for any other reason, his or her rights under the Plan shall
immediately terminate, and the Company shall promptly refund, without interest,
the entire balance of his or her payroll deduction account under the Plan.
Notwithstanding the foregoing, eligible employment shall be treated as
continuing intact while a participant is on military leave, sick leave or other
bona fide leave of absence, for up to 90 days, or for so long as the
participant's right to re-employment is guaranteed either by statute or by
contract, if longer than 90 days.

         If a participant's payroll deductions are interrupted by any legal
process, a withdrawal notice will be considered as having been received from the
participant on the day the interruption occurs.

ARTICLE 15 - TERMINATION AND AMENDMENTS TO PLAN.

         Unless terminated sooner as provided below, the Plan shall terminate on
September 29, 2005. The Plan may be terminated at any time by the Company's
Board of Directors but such termination shall not affect options then
outstanding under the Plan. It will terminate in any case when all or
substantially all of the unissued shares of stock reserved for the purposes of
the Plan have been purchased. If at any time shares of stock reserved for the
purpose of the Plan remain available for purchase but not in sufficient number
to satisfy all then unfilled purchase requirements, the available shares shall
be apportioned among participants in proportion to the amount of payroll
deductions accumulated on behalf of each participant that would otherwise be
used to purchase stock, and the Plan shall terminate. Upon such termination or
any other termination of the Plan, all payroll deductions not used to purchase
stock will be refunded, without interest.



                                     - 7 -
<PAGE>


         The Committee or the Board of Directors may from time to time adopt
amendments to the Plan provided that, without the approval of the stockholders
of the Company, no amendment may (i) materially increase the number of shares
that may be issued under the Plan; (ii) change the class of employees eligible
to receive options under the Plan, if such action would be treated as the
adoption of a new plan for purposes of Section 423(b) of the Code; or (iii)
cause Rule 16b-3 under the Securities Exchange Act of 1934 to become
inapplicable to the Plan.

ARTICLE 16 - LIMITS ON SALE OF STOCK PURCHASED UNDER THE PLAN.

         The Plan is intended to provide shares of Common Stock for investment
and not for resale. The Company does not, however, intend to restrict or
influence any employee in the conduct of his or her own affairs. An employee
may, therefore, sell stock purchased under the Plan at any time the employee
chooses, subject to compliance with any policies of the Company, applicable
federal or state securities laws and subject to any restrictions imposed under
Article 21 to ensure that tax withholding obligations are satisfied. THE
EMPLOYEE ASSUMES THE RISK OF ANY MARKET FLUCTUATIONS IN THE PRICE OF THE STOCK.

ARTICLE 17 - PARTICIPATING SUBSIDIARIES.

         The term "participating subsidiary" shall mean any present or future
subsidiary of the Company, as that term is defined in Section 424(f) of the
Code, which is designated from time to time by the Board of Directors to
participate in the Plan. The Board of Directors shall have the power to make
such designation before or after the Plan is approved by the stockholders.

ARTICLE 18 - OPTIONEES NOT STOCKHOLDERS.

         Neither the granting of an option to an employee nor the deductions
from his or her pay shall constitute such employee a stockholder of the shares
covered by an option until such shares have been actually purchased by the
employee.

ARTICLE 19 - APPLICATION OF FUNDS.

         The proceeds received by the Company from the sale of Common Stock
pursuant to options granted under the Plan will be used for general corporate
purposes.

ARTICLE 20 - NOTICE TO COMPANY OF DISQUALIFYING DISPOSITION.

         By electing to participate in the Plan, each participant agrees to
notify the Company in writing immediately after the participant transfers Common
Stock acquired under the Plan, if such transfer occurs within two years after
the first business day of the Payment Period in which such Common Stock was
acquired. Each participant further agrees to provide any information about such
a transfer as may be requested by the Company or any subsidiary corporation in
order to assist it in complying with the tax laws. Such dispositions generally
are treated as "disqualifying dispositions" under Sections 421 and 424 of the
Code, which have certain tax consequences to participants and to the Company and
its participating subsidiaries.




                                     - 8 -
<PAGE>

ARTICLE 21 - WITHHOLDING OF ADDITIONAL INCOME TAXES.

         By electing to participate in the Plan, each participant acknowledges
that the Company and its participating subsidiaries are required to withhold
taxes with respect to the amounts deducted from the participant's compensation
and accumulated for the benefit of the participant under the Plan, and each
participant agrees that the Company and its participating subsidiaries may
deduct additional amounts from the participant's compensation, when amounts are
added to the participant's account, used to purchase Common Stock or refunded,
in order to satisfy such withholding obligations. Each participant further
acknowledges that when Common Stock is purchased under the Plan the Company and
its participating subsidiaries may be required to withhold taxes with respect to
all or a portion of the difference between the fair market value of the Common
Stock purchased and its purchase price, and each participant agrees that such
taxes may be withheld from compensation otherwise payable to such participant.
It is intended that tax withholding will be accomplished in such a manner that
the full amount of payroll deductions elected by the participant under Article 7
will be used to purchase Common Stock. However, if amounts sufficient to satisfy
applicable tax withholding obligations have not been withheld from compensation
otherwise payable to any participant, then, notwithstanding any other provision
of the Plan, the Company may withhold such taxes from the participant's
accumulated payroll deductions and apply the net amount to the purchase of
Common Stock, unless the participant pays to the Company, prior to the exercise
date, an amount sufficient to satisfy such withholding obligations. Each
participant further acknowledges that the Company and its participating
subsidiaries may be required to withhold taxes in connection with the
disposition of stock acquired under the Plan and agrees that the Company or any
participating subsidiary may take whatever action it considers appropriate to
satisfy such withholding requirements, including deducting from compensation
otherwise payable to such participant an amount sufficient to satisfy such
withholding requirements or conditioning any disposition of Common Stock by the
participant upon the payment to the Company or such subsidiary of an amount
sufficient to satisfy such withholding requirements.

ARTICLE 22 - GOVERNMENTAL REGULATIONS.

         The Company's obligation to sell and deliver shares of Common Stock
under the Plan is subject to the approval of any governmental authority required
in connection with the authorization, issuance or sale of such shares.

         Government regulations may impose reporting or other obligations on the
Company with respect to the Plan. For example, the Company may be required to
identify shares of Common Stock issued under the Plan on its stock ownership
records and send tax information statements to employees and former employees
who transfer title to such shares.

ARTICLE 23 - GOVERNING LAW.

         The validity and construction of the Plan shall be governed by the laws
of the State of Delaware, without giving effect to the principles of conflicts
of law thereof.



                                     - 9 -
<PAGE>


ARTICLE 24 - APPROVAL OF BOARD OF DIRECTORS AND STOCKHOLDERS OF THE COMPANY.

         The Plan was adopted by the Board of Directors on September 28, 1995
and was approved by the stockholders of the Company as of October 16, 1995.

         The Plan was amended and restated by the Board of Directors on June 14,
2000 to, effective January 1, 2001, a) delete a requirement in Article 3 that
employees have completed one year of employment to be eligible to participate in
the Plan and b) increase the maximum amount of payroll deductions in Article 8
from 5% to 10% of such employee's total compensation.

         No stockholder approval was required.

         The Plan was further amended and restated by the Board of Directors on
January 31, 2002 to, effective July 1, 2002, change the Payment Periods to
periods commencing on July 16 and January 16 of each year and ending on February
1 and August 1 of each year.

         No stockholder approval was required.

         The Plan was further amended by the Board of Directors on June 27, 2002
to, effective July 1, 2002, revise the definition of the Option Price so that
the Option Price per share is rounded up to the nearest whole cent.

         No stockholder approval was required.



                                     - 10 -