...You should note that BAScript is intended to be lightweight, so it has not mechanisms to handle complex data structures or large amounts of data or code. On the other hand, it has less need for memory and resources than other scripting interpreters. If you need more power you may try PascalScript.
Script Engine II is an scripting component for Delphi and FreePascal. It supports object oriented programming including partial classes and class helpers.