If you are eligible to be claimed as a dependent, you can't contribute to an HSA, even if the person who could claim you, won't actually claim you. See publication 969, and search for the word "dependent", its the first or second hit.
https://www.irs.gov/publications/p969
Note that there are two questions on your tax return, "can you be claimed as a dependent by someone else" and "will the person who could claim you, actually claim you." You must answer, yes, you can be claimed, if you can be, even if you won't be. This affects several other tax provisions, not just the HSA. (The followup question about "will you be claimed" only affects certain educational credits.)
It would be worth double-checking whether or not you will really meet all the qualifications for being claimed as a dependent. But, if you were a full time student up through May, the only thing that would disqualify you is age (24 or older) or if you earned so much money that, considering all your income and expenses, you paid more than half your own living expenses for the year.