Advertisement
Guest User

Main Server Script

a guest
Aug 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. local ProxyService = require(script.Parent.ProxyService)
  2. local HttpService = game:GetService("HttpService")
  3. local InsertService = game:GetService("InsertService")
  4.  
  5. local Proxy = ProxyService:New('https://quatcatalog.herokuapp.com/', '62bef16c9ef8693271d5f6191340f23bfb57dbf5fcdba6a03d8f3dec9bd52af4')
  6.  
  7. local playerService = game.Players
  8.  
  9. local function dothething(id,name)
  10.     local json = Proxy:Get('https://api.roblox.com/users/'..tostring(id)..'/onlinestatus').body
  11.     local json = HttpService:JSONDecode(json)
  12.     local lastonline = json.LastOnline
  13.     lastonline = lastonline:sub(1,lastonline:find("T")-1)
  14.     print(name.." was last online at date: "..lastonline)
  15. end
  16.  
  17. playerService.PlayerAdded:connect(function(plr)
  18.     plr.Chatted:connect(function(text)
  19.         local userId = playerService:GetUserIdFromNameAsync(text)
  20.         if userId ~= nil then
  21.             dothething(userId,text)
  22.         end
  23.     end)
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement