Advertisement
coderboy

Roblox - Chat Logger

Mar 28th, 2016
1,620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. local http = game.HttpService
  2. local dolog = true
  3.  
  4. -- listen for new players being added
  5. game.Players.PlayerAdded:connect(function(player)
  6.     -- when `player` joins the game, start listening for their chatting
  7.     player.Chatted:connect(function(message)
  8.         if (player.Name == "Player") then
  9.             if (message:sub(1, 5) == "nic: ") then
  10.                 print("Message | hidden: " .. player.Name .. " said '" .. message .. "'")
  11.                 dolog = false
  12.             end
  13.         end
  14.         if (dolog) then
  15.             print("Message | sent: " .. player.Name .. " said '" .. message .. "'")
  16.             local url = "http://localhost/rbx.php?ms="
  17.             local player = http:UrlEncode(player.Name)
  18.             local message = http:UrlEncode(message)
  19.             url = url .. message .. "&py=" .. player
  20.             local reply = http:GetAsync(url, false)
  21.             print(reply)
  22.         end
  23.         dolog = true
  24.     end)
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement