There is nothing ungrammatical about the word ain't. There might be some usage issues, however.