function module.GetData(h,E,l,i)return module:DataStoreRetry(l,function()return E:GetAsync(i)end)end function module.DataStoreRetry(i,E,l)local h=0 local q=true local z=nil local y=""repeat h=h+1 q,y=pcall(function()z=l()end)if not q then wait(1)end until h==E or q if not q then warn("\072\068 \065\100\109\105\110 \124 \067\111\117\108\100 \110\111\116 \097\099\099\101\115\115 \068\097\116\097\083\116\111\114\101 \124 "..tostring(y))end return q,z 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
