How do i root Android x86_64?
If you are using an x86_64 build from http://www.android-x86.org/download, such as android-x86_64-5.1-rc1.img, it is already rooted.  There's no need to run a root script.

If that's not where you're getting your image from, please update your answer to add that important detail.