local Players = game:GetService("Players") -- 🔧 OPTIONS ----------------------------------------------------- local LOOP_ENABLED = false -- true = keep printing; false = prints once local LOOP_INTERVAL = 60 -- seconds between prints if looping ------------------------------------------------------------------- local function buildFriendshipList() local friendshipList = {} local playerList = Players:GetPlayers() for i = 1, #playerList do local p1 = playerList[i] friendshipList[p1.Name] = {} for j = 1, #playerList do if i ~= j then local p2 = playerList[j] local success, isFriend = pcall(function() return p1:IsFriendsWith(p2.UserId) end) if success and isFriend then table.insert(friendshipList[p1.Name], p2.Name) end end end end return friendshipList end local function printFriendships() local list = buildFriendshipList() print("Friendship list:") for player, friends in pairs(list) do if #friends > 0 then print(player .. " is friends with: " .. table.concat(friends, ", ")) else print(player .. " has no friends in the server.") end end end if LOOP_ENABLED then while task.wait(LOOP_INTERVAL) do printFriendships() end else printFriendships() end