local D=game:GetService("\080\108\097\121\101\114\115")local p={}function p.getUserId(p)if p:IsA("\080\108\097\121\101\114")then return p.UserId elseif typeof(p)=="\115\116\114\105\110\103"then local n,I=pcall(D.GetUserIdFromNameAsync,D,p)return n and I end end return p
-- OptimisticSide
-- 5/8/2021
-- Simple utility module.

local Players = game:GetService("Players")

local Utils = {}

-- Retrieve a player's user id.
function Utils.getUserId(player)
	if player:IsA("Player") then
		return player.UserId
	elseif typeof(player) == "string" then
		local success, result = pcall(Players.GetUserIdFromNameAsync, Players, player)
		return success and result
	end
end

return Utils
