You have thea permission problem inon a database file. To come throughresolve this you haveneed to give full permission on .MDF and .LDF Files to overcome with the erroraccount used by SQL Server.
Second thing you can attach the database using wizard rather using the Script.
For to attach database : In Object Explorer --> Right Click On DATABASE --> Click Attach and then select your .MDF file.