Update ScriptTemplate.cs

Fixed IndexOutOfRangeException for MultiSig. The original code accesses s.elements[s.elements.Count], which is an off-by-one error.
Merge pull request #1 from MicDub/patch-1

Update ScriptTemplate.cs