how to create backup for stored procedure,trigger and functions of a database in sql server 2008?
I guess you have framed your question to somewhat misleading. 

You want to script out all stored procedures, triggers and functions from one server and create them on the new server.

Option 1 : USING SSMS







OPTION 2 : USING TSQL - sys.sql_modules with sys.objects