If you want to generate scripts from database for creating database objects, there is a simple way. Here is an example for generating scripts for specific tables also for the data that is stored in that table.
Right-click on database. Choose Tasks, Generate Scripts…
Welcome screen press Next
Choose the database.
This step is important if you want to script the data that is stored in the tables. Script Data choose True. Then you have to choose object types. We will choose Tables.
Choose for which table do you want to generate scripts. You will have option to Script to File, Script to Clipboard and Script to New Query Window.
Summary – press Finish
Close – and you will have ready your scripts 🙂