Need some help with lua scripting for a digital speedometer

Hi guys, new user here! :) I am trying to make a digital speedo for my locomotive and I understood what needs to be done in 3DS Max and the blueprint editor to get it ready, but I have no idea how to make it work in lua. Can anyone help me get started or offer a line of example code so I know where to start? Any help would be appreciated.
Thanks
Thanks