Fundamentals of Creating SmartScripts