In my time contributing to this community, yours is the first report that I can recall the cites error #510. This error does not, to my knowledge, appear in Apple’s support documentation. Whilst it will not directly help with this specific error, here is a link to the full list of error codes published by Apple:
iOS update and restore errors - Apple Support
Your notes are unclear as to what you have tried, or the process that you have actually followed in restoring the iPad. So, starting at the beginning…
If your iPad is disabled, or you have forgotten your iPad passcode, you have no alternative other than to follow this process:
If you’ve forgotten the passcode on your iPad, or your iPad is disabled – Apple Support
You’ll need access to either a PC (with iTunes installed) or a Mac (with iTunes or Finder - as appropriate for the installed version of MacOS).
Download and use iTunes for Windows – Apple Support
Update to the latest version of iTunes – Apple Support
Use of a PC or Mac is unavoidable. If you don’t have access to a suitable computer of your own, that of a helpful friend or family member will suffice. Alternatively, the technicians at the Genius Bar of your local Apple Store will be delighted to assist.
If the iPad is not recognised by your computer when connected, these support pages may be helpful with troubleshooting:
If your computer doesn't recognize your iPhone, iPad, or iPod - Apple Support
If you see an error when you update or restore your iPhone, iPad, or iPod - Apple Support
If your Windows PC doesn't recognize your iPhone, iPad, or iPod - Apple Support
You may also need your AppleID and associated password. If these have also been forgotten, they can be recovered here:
https://iforgot.apple.com
To recover your credentials, you’ll need access to one of the following:
- Your primary email address mailbox that corresponds with your AppleID
- Any of the secondary/recovery email addresses that should be configured for your AppleID account
- Any of the trusted telephone numbers (fixed line or Cellular/Mobile) that are associated with your AppleID
Unless you AppleID account has not been fully/correctly configured, or has been seriously neglected, recovery of the AppleID and password should not be difficult.
More information about recovery of your AppleID:
If you forgot your Apple ID - Apple Support
More information about recovery of your AppleID password:
If you forgot your Apple ID password - Apple Support
When you recover access to your credentials, you would be well advised to log-in to your AppleID account from a web browser - and verify/update any email addresses and trusted telephone numbers:
https://appleid.apple.com