Scale9 is a simple script to draw a sprite and scale it after subdividing it into a 3x3 grid. All you need to do is pass in a sprite and a subImage index.
draw_sprite_scale9 (sprite, subImage, left, top, right, bottom);
End User Licence Agreement (EULA).