Well I am using taskwarrior and thinking about switching to todo.txt. I actually wanted to have some script on my server which woul create events based on some keyword in my task list. At least this should be a bit easier with todo.txt.
Lua scripting is approximately 100% of the reason why I use Simpletask, and ST is maybe 80% of the reason I use todo.txt (the other 20% is being able to do something reasonable with the file in a plain text editor)
When you create the widget, it uses whatever settings are currently in use in the app. That includes lua scripts. You can also edit it afterward. I'm a little unsure of where your confusion is, because it is quite easy to try and make two widgets and test for yourself whether it works