function DataStore.Get(F,G,h)if h then return F.value end local e=0 if not F.haveValue then while not F.haveValue and not pcall(F._GetRaw,F)do if F.backupRetries then e=e+1 if e>=F.backupRetries then F.backup=true F.haveValue=true F.value=F.backupValue break end end end if F.value~=nil then for G,h in pairs(F.beforeInitialGet)do F.value=h(F.value,F)end end end local o if F.value==nil and G~=nil then o=G else o=F.value end o=clone(o)F.value=o return o end
--[[**
	<description>
	Gets the result from the data store. Will yield the first time it is called.
	</description>

	<parameter name = "defaultValue">
	The default result if there is no result in the data store.
	</parameter>

	<parameter name = "dontAttemptGet">
	If there is no cached result, just return nil.
	</parameter>

	<returns>
	The value in the data store if there is no cached result. The cached result otherwise.
	</returns>
**--]]
function DataStore:Get(defaultValue, dontAttemptGet)
	if dontAttemptGet then
		return self.value
	end

	local backupCount = 0

	if not self.haveValue then
		while not self.haveValue and not pcall(self._GetRaw, self) do
			if self.backupRetries then
				backupCount = backupCount + 1

				if backupCount >= self.backupRetries then
					self.backup = true
					self.haveValue = true
					self.value = self.backupValue
					break
				end
			end
		end

		if self.value ~= nil then
			for _, modifier in pairs(self.beforeInitialGet) do
				self.value = modifier(self.value, self)
			end
		end
	end

	local value

	if self.value == nil and defaultValue ~= nil then --not using "not" because false is a possible value
		value = defaultValue
	else
		value = self.value
	end

	value = clone(value)

	self.value = value

	return value
end
