We're usually not a request forum, at least, most of us.
Most of the folks here would rather help you with what code you've tried, and assist in understanding errors you get when you try your own code.
All the code examples you'd need are actually within the two functions you're trying not to have to use; the best way for you to learn would be to try to figure out how to combine them into one command.
What have you tried?
Have you even tried making your own ulx lua module file?