I haven’t tried it yet, but I think the real question here is how to replicate the struct data structure from the decompiled scripts. There is an example of how to do that in LUA here and in JavaScript here.