Hi,
Here are some reference to script database to local, see:
How to: Script Replication Objects
Publish a Database (SQL Server Management Studio)
Copy a database from SQL Server on a webserver to local SQL Server Express instance
hope it helps you.
With regards,
Angie