I am wondering if there is a way of getting the path to the currently executing lua script file?
This is specifically not the current working directory, which could be
Shortest form which I have found looks like this:
debug.getinfo(1).source:match("@?(.*/)")
Index 1, 2- other - depends on which function in call stack you want to query. 1 is last called function (where you're in). If you're running in global context, then probably 2 is more appropriate (haven't tested by myself)