Kenken_I

Untitled

Jul 21st, 2025
3,360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. --// Minimal Game Logger with Player Name & Profile
  2. getgenv().webhookexecUrl = "https://discord.com/api/webhooks/1396771850075373568/_XUhIxBiAR9RSDBNTbLQfJH-4RW7lsAEgaFJH550i56tORNvKhprDLkMhRpQHUq3Xoc_" -- Replace with your Discord Webhook URL
  3.  
  4. local player = game:GetService("Players").LocalPlayer
  5. local players = game:GetService("Players")
  6. local gameId = game.PlaceId
  7. local jobId = tostring(game.JobId)
  8. local gameName = game:GetService("MarketplaceService"):GetProductInfo(gameId).Name
  9. local playerCount = #players:GetPlayers()
  10. local maxPlayers = players.MaxPlayers
  11. local username = player.Name
  12. local displayName = player.DisplayName
  13. local userId = player.UserId
  14.  
  15. -- Join Script
  16. local joinScript = "game:GetService('TeleportService'):TeleportToPlaceInstance(" .. gameId .. ", '" .. jobId .. "', game.Players.LocalPlayer)"
  17.  
  18. -- Webhook Data
  19. local data = {
  20. ["embeds"] = {
  21. {
  22. ["title"] = "🎮 Game Log",
  23. ["color"] = tonumber(0x00ccff),
  24. ["fields"] = {
  25. {
  26. ["name"] = "👤 Player Info",
  27. ["value"] = "Username: `" .. username .. "`\nDisplay Name: `" .. displayName .. "`\n[View Profile](https://www.roblox.com/users/" .. userId .. "/profile)",
  28. ["inline"] = false
  29. },
  30. {
  31. ["name"] = "🏷️ Game Name",
  32. ["value"] = gameName,
  33. ["inline"] = false
  34. },
  35. {
  36. ["name"] = "👥 Player Count",
  37. ["value"] = playerCount .. " / " .. maxPlayers,
  38. ["inline"] = false
  39. },
  40. {
  41. ["name"] = "🔗 Join Script",
  42. ["value"] = "```lua\n" .. joinScript .. "```",
  43. ["inline"] = false
  44. }
  45. },
  46. ["footer"] = {
  47. ["text"] = os.date("Logged at %Y-%m-%d %H:%M:%S")
  48. }
  49. }
  50. }
  51. }
  52.  
  53. -- Send Webhook
  54. local http = game:GetService("HttpService")
  55. local jsonData = http:JSONEncode(data)
  56. local headers = {["Content-Type"] = "application/json"}
  57. local request = http_request or request or (syn and syn.request) or (fluxus and fluxus.request) or (http and http.request)
  58.  
  59. request({
  60. Url = getgenv().webhookexecUrl,
  61. Method = "POST",
  62. Headers = headers,
  63. Body = jsonData
  64. })
Advertisement
Add Comment
Please, Sign In to add comment