You can just say 가세요 (ga-seyo). Often older people use this word when saying ‘goodbye’ to younger people. It is a polite way of saying ‘go’.
You can say ‘goodbye’ by using the phrase 잘 가요 ‘jal gayo’, which literally means ‘go well’. This expression can only be used when the other person is leaving.
Or say 안녕하세요.