That all depends on which version of 3DGS you have A5 or A6.
Then it depends on which update you have A5.50, A5.51, A6.20, A6.21.
Lastly it depends on which editition you have, extra commercial pro trial, etc.
Gives us this information and a more accurate account of what you want to do (open the engine and add scripts doesn't make sense) and we'll get you started on physics in no time.