The script could be compatible. Depends whether or not you use syntax available only in SQL Server 2005.
If yes, then it will not be compatible with SQL Server 2002.
If you will not use the features of SQL Server 2005, but use only a syntax available in SQL 2000, then it will be compatible.