App Inventor 2 is an non-traditional programming language that largely does not use scripts. The language used in AI2's source code is a combination of several languages - Java, Blockly and others.
The source code , however, for an App Inventor 2 Project, is the aia file. You can print out the contents of the aia file by opening the file using a program like pkunzip (change yourProject.aia to yourProject.zip) and unzipping and printing out the resulting files.
To print out the actual blocks, you can either capture a png image of all your blocks by going to the Blocks screen, riight-clicking on a white area of the screen and selecting Download Blocks as an Image. If your project is very large, you may have to use an alternate technique:
====================== Screen Capture +++++++++++++
On Windows Ctr + PrtScn keyboard keys pressed at same time copies an image of the screen to the Windows Clipboard. Open Paint and save the image by placing the contents of the clipboard into Paint. Save the image to your desktop or another folder as a png or jpg file. On Win 7 and above you can use the Snipping tool (in Accessories) to capture an image of blocks directly from the screen. Capture what you need and Save the file to a folder on your PC.
On a Mac, command-shift-3 (whole-screen) or command-shift-4 (drag a rectangle) to take a screenshot. The image file will appear on your desktop.
Also you can use the new App Inventor feature to create an image of all your blocks in one step ... use the tool on the Blocks screen by right-clicking the screen, then selecting Download blocks as an image.
=========================
Be aware, there are NO Java files. If your project required that you produce Java files then you should have written it using Eclipse or Android Studio 2 or another Java based compiler.