function DataStore.Debug(b,...)if b.debug then print(...)end end function DataStore._GetRaw(b)if b.getRawPromise then return b.getRawPromise end b.getRawPromise=((b.savingMethod:Get()):andThen(function(V)b.value=V b:Debug("\118\097\108\117\101 \114\101\099\101\105\118\101\100")b.haveValue=true end)):finally(function()b.getting=false end)return b.getRawPromise end function DataStore._Update(V,b)if not b then for b,M in pairs(V.callbacks)do M(V.value,V)end end V.haveValue=true V.valueUpdated=true end

function DataStore:Debug(...)
	if self.debug then
		print(...)
	end
end

function DataStore:_GetRaw()
	if self.getRawPromise then
		return self.getRawPromise
	end

	self.getRawPromise = self.savingMethod:Get():andThen(function(value)
		self.value = value
		self:Debug("value received")
		self.haveValue = true
	end):finally(function()
		self.getting = false
	end)

	return self.getRawPromise
end

function DataStore:_Update(dontCallOnUpdate)
	if not dontCallOnUpdate then
		for _,callback in pairs(self.callbacks) do
			callback(self.value, self)
		end
	end

	self.haveValue = true
	self.valueUpdated = true
end
