return function(K)if cachedUsernames[K]then return cachedUsernames[K]else local L local M=pcall(function()L=game.Players:GetNameFromUserIdAsync(K)end)if not M then return end cachedUsernames[K]=L return L end end
--[[
	
	Cleaner alternative to GetNameFromUserIdAsync that caches to avoid constant yielding.
	
	Functions.UserIdToUsername(
		userId,					<-- |REQ| 	User ID
	)
	
--]]

return function(userId)
	--- Check cache
	if cachedUsernames[userId] then
		--- Return cache
		return cachedUsernames[userId]
	else
		--- Grab username from web
		local username
		local success = pcall(function()
			username = game.Players:GetNameFromUserIdAsync(userId)
		end)

		--- Failed :(
		if not success then
			return
		end

		--- Success! Updating cache
		cachedUsernames[userId] = username

		--
		return username
	end
end
