If you want a button to duplicate a record and delete the original, you can use a script in Scripting app. You do not need to use an automation.
On the other hand, duplicating a record and delete the original is a very unusual workflow. Do you need to have a new record with a new created time? Do you need a new record to trigger an automation in an external system?
If you want a script, you should decide if you want to learn scripting or if you just want working code. If you want to learn scripting, the resources that Scott pointed out are very helpful. If you just want working code and have budget for an experienced script writer, feel free to make an appointment with me to discuss you scripting needs.