When I began to learn about FMP and basic database technology I read "The Filemaker Pro 8 Bible". I can't say for certain if it would meet your needs (assuming there's a version 10 out there) but I learned quite a bit from it, and I knew next to nothing to start. One of the ways to understand scripting is to start out doing manually, with standard menu commands, what you wish your script to do, then begin in the script editor searching for commands on the left that suit your purpose. Write down your manual steps in your own words for reference first perhaps. You'll find script steps that do just about everything, including commands not available from the menus. When you speak of "If" and "EndIf" be careful not to confuse Functions with Script Steps. "If" is a Logical Function as well, but "EndIf" is not. For example, if you insert an "If" script step and click specify, you'll be shown a list of fields and functions. I find the explanations of functions quite carefully expressed in the Filemaker documentation. They're very specific things. The FMP Bible went a little further in the example department, which may be good for you. It can take years to get truly skilled with this stuff, but with a bit of work you can get acceptable results quite quickly. Also, you can ask script/calculations questions here and be reasonably certain to get a correct reply. Some amazing developers visit here.
Read the books, but make sure to get out there and try it. I learned how to script by looking through the filemaker provided database examples. Read through them step by step, understanding what is going on, and what is happening to the data.
And you're always welcome to post a copy of your script here with any questions you have, if you create such a script and it doesn't work the way you expect.