Is this correct? "לפני שאני יוצא אני אומר שלום"
I'm not a native speaker, but I'm quite certain that it is correct.
I exit is the literal translation of אני יוצא but it also means i go out
Done say להיתראות lit. "see you"
I leave, I say
What is the difference?
If you have an independent clause than it is just אני, but if you have a conjunction or an adverb, a preposition, meaning a dependent clause, you would use שאני. Here, the sentence starts with לפני so you continue with שאני.