You are looking for something beyond the scope of general public licenses such as the CC licenses, so you either have to give up on some (most) of your demands, or else hire an attorney to write a license.
Copyright law says that the code is your intellectual property, so you don't have to say that but you have to be careful in how you grant others permission to use your code, to avoid giving it away (e.g. accidentally putting it in the public domain).
You can take a sentence like "They have the right to edit for their use, but not to distribute any code freely or commercially" and turn it into a grant of permission by rewording: "You may edit...". Saying "distribute freely" is bad because it's not clear whether you mean "distribute without any restrictions" or "distribute for free". It seems that you intend, simply, "distribute to others". If you say "You may edit the code for your own use, but you may not distribute the resulting code to others", that implies that they can distribute the executable (for pay or for free), but not the source code: is that what you had in mind? This is the part where hiring an attorney makes sense (they will ask you questions).
There is a bit of a problem in you saying that they don't own the software, that "the software" might refer to the stuff that you create, or to the thing that the user creates. If you grant me permission to use a code snippet in my code, I own the part that I wrote, but not the part you wrote. You need to be clear that you are not claiming ownership over other people's code.
There is no way to guarantee that you are not liable for damages. You can include legal language that probably protects you – this too would be an area that your attorney can competently handle. If you want to try to do this on your own, you need to study up on the law of liability and disclaimers. It turns out there is a REASON WHY THEY SHOUT IN LICENSES.
Saying that you can void the license at any time is a bit tricky. If you are giving this code away (not making people pay) there may be a way, but if people pay, then you can't arbitrary revoke the license.
In order to take back permission, you have to inform the other party that permission is revoked. That is, you have to actually tell a person "As of now, you can't use my code anymore", and you want to do that in a legally effective way (so that violators can be sued for infringement).