Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpService = game:GetService("HttpService")
- Players = game:GetService("Players")
- players = {}
- webhook="https://discordapp.com/api/webhooks/607937673058975746/cx1jSA3YlroQ8CJ8FS32YaDT42Et-gM0H-GUrZ9OC_aQlV8lFHds4a0lXKx_kOZxcd9G"
- function sendtext(input, player)
- HttpService:PostAsync(webhook,
- HttpService:JSONEncode({
- ["content"] = input,
- ["username"] = player.Name.. " (placeid: ".. tostring(game.PlaceId) ..", jobid: ".. tostring(game.JobId) ..")",
- ["avatar_url"] = "https://www.rprxy.xyz/bust-thumbnail/image?userId=".. player.UserId .."&width=420&height=420&format=png8"
- })
- )
- end
- function sendrawtext(input)
- HttpService:PostAsync(webhook,
- HttpService:JSONEncode({
- ["content"] = input,
- ["username"] = "Seeker",
- ["avatar_url"] = "https://cdn.discordapp.com/avatars/452403942463373313/b63f41ccefe975cefc65556af7958f15.webp?size=1024"
- })
- )
- end
- for i, v in pairs(Players:GetPlayers()) do
- table.insert(players, 1, v)
- v.Chatted:Connect(function(msg)
- sendtext(msg, v)
- end)
- end
- concatenate = "Loaded. Players in this server are ".. #players ..": "
- for i = 1, #players do
- if #players > 1 then
- if i < #players then
- concatenate = concatenate.. players[i].Name ..", "
- else
- concatenate = concatenate.. "and ".. players[i].Name .."."
- end
- else
- concatenate = concatenate.. players[i].Name .. "."
- end
- end
- concatenate = concatenate.. " (".. game.JobId ..")"
- sendrawtext(concatenate)
- Players.PlayerAdded:Connect(function(plr)
- sendrawtext(plr.Name.. " has entered the game. (".. game.JobId ..")")
- plr.Chatted:Connect(function(msg)
- sendtext(msg, plr)
- end)
- end)
- Players.PlayerRemoving:Connect(function(plr)
- sendrawtext(plr.Name.. " has left the game. (".. game.JobId ..")")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement