Is it ok to be rude to people when I'm texting them?
No! Why would you want to be rude to people?
That seems like the best way to get a girlfriend.
It can certainly seem like people who are rude and inconsiderate tend to attract the attention of women.  But this does not mean that it's okay for you to start behaving that way, because it will only offend others, and won't help you find any meaningful connections with them.
What if I just want sex?
Regardless of the reason, it's not right to be mean to other people. Whether you are looking for a relationship or casual sex, just be yourself and be honest. You will find someone who wants to be with you!