function module.GetData(T,b,O,I)return module:DataStoreRetry(O,function()return b:GetAsync(I)end)end function module.DataStoreRetry(I,b,O)local T=0 local C=true local H=nil local y=""repeat T=T+1 C,y=pcall(function()H=O()end)if not C then wait(1)end until T==b or C if not C then end return C,H end return module

function module:GetData(dataStore, datastoreRetries, key)
	return module:DataStoreRetry(datastoreRetries, function()
		return dataStore:GetAsync(key)
	end)
end

function module:DataStoreRetry(datastoreRetries, dataStoreFunction)
	local tries = 0	
	local success = true
	local data = nil
	local errorMsg = ""
	repeat
		tries = tries + 1
		success, errorMsg = pcall(function() data = dataStoreFunction() end)
		if not success then wait(1) end
	until tries == datastoreRetries or success
	if not success then
		--warn("HD Admin | Could not access DataStore | ".. tostring(errorMsg))
		-- Cannot access DataStore
	end
	return success, data
end



return module
