If this is a stock script then doing this is fine for your own game, and probably ok from TGCs POV for you to share but you should really ask them first.
Even if it is a stock script it could have been written by a third party author in which case you should ask them if it is OK for you to share it like this.
This is no different from taking a helicopter model, for example, and chopping off the blades and sharing it on here. i.e. that would be frowned upon by the original artist! (I know this as I did it and got told off!
)
Of course another, better way, would be to make a tutorial thread, using this script as an example, showing others how to modify a script to suit another purpose. That way people could make the changes themselves and hopefully learn a bit about Lua scripting in the process.
Been there, done that, got all the T-Shirts!