Glock, I had been in your situation before. I am fairly certain that your cat has a urinary track infection. Especially if your cat is not neutered.
Which cats have UTIs, they begin to associate the litter box with their pain. So they go outside the box.
Please take your cat to a vet. And get the cat neutered if it is not. Unfixed cats are much more susceptible to UTIs and other infections.