local l=game:GetService("\068\097\116\097\083\116\111\114\101\083\101\114\118\105\099\101")local g=require(script.Parent.Parent.Promise)local c={}c.__index=c function c.Get(l)return g.async(function(g)g(l.dataStore:GetAsync(l.userId))end)end function c.Set(c,l)return g.async(function(g)c.dataStore:UpdateAsync(c.userId,function()return l end)g()end)end function c.new(g)return setmetatable({dataStore=l:GetDataStore(g.Name);userId=g.UserId},c)end return c

local DataStoreService = game:GetService("DataStoreService")
local Promise = require(script.Parent.Parent.Promise)

local Standard = {}
Standard.__index = Standard

function Standard:Get()
	return Promise.async(function(resolve)
		resolve(self.dataStore:GetAsync(self.userId))
	end)
end

function Standard:Set(value)
	return Promise.async(function(resolve)
		self.dataStore:UpdateAsync(self.userId, function()
			return value
		end)

		resolve()
	end)
end

function Standard.new(dataStore2)
	return setmetatable({
		dataStore = DataStoreService:GetDataStore(dataStore2.Name),
		userId = dataStore2.UserId,
	}, Standard)
end

return Standard
