No diagram provided, can you just create some diagrams for this script?
1) Colorful logical diagram of script logic
2) Flowchart style diagram for support and troubleshooting 
3) Mindmap style diagram of script logic and description comments