Guest User

Untitled

a guest
Sep 20th, 2019
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
  2.  
  3. while wait(5) do
  4.     --get your friends online
  5.     local friendsOnline = player:GetFriendsOnline(10)
  6.    
  7.     --populate friends string
  8.     local friendsString = "You have" ..  #friendsOnline .. " friends online!: \n "
  9.    
  10.     for i, friend in ipairs(friendsOnline) do
  11.         friendsString = friendsString .. i .. ") " .. friend.Username .. " ( " .. friend.LastLocation.. ")\n"
  12.     end
  13.    
  14.     --update gui
  15.     script.Parent.Text = friendsString
  16.  
  17. end
Advertisement
Add Comment
Please, Sign In to add comment