How to get Function's msg within a Template script?

How is this different from Get msg.payload from Template's script tag?

As they seem to be the same, I will close this thread. If they are in fact different, you can reopen the thread and explain the difference.