The spatial index, as with other objects, have their own script <object> as
menus and need to be done separately. This can be done to the clipboard and pasted to the query window generated by the script table as
command.
I can't confirm at the moment, but I suspect that the primary key and other constraints come out in the script table as
options since the are an integral part of the table definition, whereas indexes are not.
The generate and publish scripts
wizard can also be used, but it is a lot of steps if you are just doing a few items.
Technet, How to: Generate a Script