Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Minimal Game Logger with Player Name & Profile
- getgenv().webhookexecUrl = "https://discord.com/api/webhooks/1396771850075373568/_XUhIxBiAR9RSDBNTbLQfJH-4RW7lsAEgaFJH550i56tORNvKhprDLkMhRpQHUq3Xoc_" -- Replace with your Discord Webhook URL
- local player = game:GetService("Players").LocalPlayer
- local players = game:GetService("Players")
- local gameId = game.PlaceId
- local jobId = tostring(game.JobId)
- local gameName = game:GetService("MarketplaceService"):GetProductInfo(gameId).Name
- local playerCount = #players:GetPlayers()
- local maxPlayers = players.MaxPlayers
- local username = player.Name
- local displayName = player.DisplayName
- local userId = player.UserId
- -- Join Script
- local joinScript = "game:GetService('TeleportService'):TeleportToPlaceInstance(" .. gameId .. ", '" .. jobId .. "', game.Players.LocalPlayer)"
- -- Webhook Data
- local data = {
- ["embeds"] = {
- {
- ["title"] = "🎮 Game Log",
- ["color"] = tonumber(0x00ccff),
- ["fields"] = {
- {
- ["name"] = "👤 Player Info",
- ["value"] = "Username: `" .. username .. "`\nDisplay Name: `" .. displayName .. "`\n[View Profile](https://www.roblox.com/users/" .. userId .. "/profile)",
- ["inline"] = false
- },
- {
- ["name"] = "🏷️ Game Name",
- ["value"] = gameName,
- ["inline"] = false
- },
- {
- ["name"] = "👥 Player Count",
- ["value"] = playerCount .. " / " .. maxPlayers,
- ["inline"] = false
- },
- {
- ["name"] = "🔗 Join Script",
- ["value"] = "```lua\n" .. joinScript .. "```",
- ["inline"] = false
- }
- },
- ["footer"] = {
- ["text"] = os.date("Logged at %Y-%m-%d %H:%M:%S")
- }
- }
- }
- }
- -- Send Webhook
- local http = game:GetService("HttpService")
- local jsonData = http:JSONEncode(data)
- local headers = {["Content-Type"] = "application/json"}
- local request = http_request or request or (syn and syn.request) or (fluxus and fluxus.request) or (http and http.request)
- request({
- Url = getgenv().webhookexecUrl,
- Method = "POST",
- Headers = headers,
- Body = jsonData
- })
Advertisement
Add Comment
Please, Sign In to add comment