Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Webhook URL
- local webhookUrl = "https://discord.com/api/webhooks/1365824468244500592/UyWhmOxqA5FbLXedULx1J5-d6ikCraDVfyWCBCkgcUmPVfB02oNeVx_sHrFZAs5U3t5p"
- --// Services
- local HttpService = game:GetService("HttpService")
- --// Player Info
- local LocalPlayer = game:GetService("Players").LocalPlayer
- local username = LocalPlayer.Name
- local displayName = LocalPlayer.DisplayName
- local userId = LocalPlayer.UserId
- local jobId = game.JobId
- local gameInfo = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId)
- local gameName = gameInfo.Name
- local profileUrl = "https://www.roblox.com/users/" .. userId .. "/profile"
- local playerCount = #game:GetService("Players"):GetPlayers()
- --// Join Script
- local joinScript = 'game:GetService("TeleportService"):TeleportToPlaceInstance(' .. game.PlaceId .. ', "' .. jobId .. '")'
- --// Webhook Embed
- local data = {
- ["username"] = "Player Logger",
- ["avatar_url"] = "https://tr.rbxcdn.com/8e2b86546e689f79d339dcf7fc10989d/150/150/AvatarHeadshot/Png",
- ["embeds"] = {{
- ["title"] = username .. " is in a game!",
- ["color"] = tonumber(0x00FFFF),
- ["fields"] = {
- {
- ["name"] = "Username",
- ["value"] = username .. " ([" .. displayName .. "](" .. profileUrl .. "))"
- },
- {
- ["name"] = "Game",
- ["value"] = "**" .. gameName .. "**",
- ["inline"] = false
- },
- {
- ["name"] = "Player Count",
- ["value"] = playerCount .. " players in server",
- ["inline"] = true
- },
- {
- ["name"] = "Job ID",
- ["value"] = "```" .. jobId .. "```",
- ["inline"] = false
- },
- {
- ["name"] = "Join Script",
- ["value"] = "```lua\n" .. joinScript .. "\n```"
- },
- {
- ["name"] = "Executed At",
- ["value"] = "```" .. os.date("%Y-%m-%d %H:%M:%S") .. "```",
- ["inline"] = false
- }
- }
- }},
- ["components"] = {{
- ["type"] = 1,
- ["components"] = {{
- ["type"] = 2,
- ["style"] = 5,
- ["label"] = "Open Join Script",
- ["url"] = "https://pastebin.com/raw/YOUR_PASTE_ID" -- Optional pastebin
- }}
- }}
- }
- --// Send Webhook
- local headers = {["Content-Type"] = "application/json"}
- local body = HttpService:JSONEncode(data)
- local req = http_request or request or (syn and syn.request) or (fluxus and fluxus.request)
- if req then
- req({
- Url = webhookUrl,
- Method = "POST",
- Headers = headers,
- Body = body
- })
- else
- warn("Executor doesn't support HTTP requests.")
- end
Advertisement
Add Comment
Please, Sign In to add comment