Checking if player has an item with DataStoreService

So basically I have a bool value that checks if a player has a certain item in game that gives them access to other stuff, the value sets to true if you do a certain thing, however I want the value to stay true as soon as the player unlocks it or something using DataStoreService, can anyone help me out?

PS. Sorry for the bad explanation it is a bit hard to explain.

DataStoreService has set and get value.
With this, you can do the same as badges can do.

Can you give me an example? I’m new to DataStoreService

Through I’m one of the Datastore2 users.

https://developer.roblox.com/en-us/api-reference/class/DataStore
Click the function name and you can see examples.