Plugins don’t live in the root directory, and they don’t include wp-load.php or the admin.php files directly. Plugins live in the wp-content/plugins directory, and have a specific form of header, and they don’t need to include anything because WordPress includes them.
You’re doing it the wrong way around, basically. A plugin would not include/require WordPress’s files.
Oh, and your code doesn’t work because you’re trying to include admin files from outside the admin directory, which means that the admin-specific cookies can’t be set correctly. There are workarounds, but if you’re starting off trying to develop plugins, then this is entirely the wrong approach.