Advertisement
rrixh

auto kompliment random player

Jul 10th, 2023
1,949
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. function SendChat(message)
  2.  
  3. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(message, "All")
  4. end
  5.  
  6. local Players = game.Players:GetPlayers() -- Gets all the Players
  7.  
  8. if #Players > 1 then -- if there is more than one player in the game then
  9. table.remove(Players,1) -- Removes the first one from the table (you)
  10. end
  11.  
  12. local RandomPlayer = Players[math.random(1, #Players)] -- Picks a random Player
  13.  
  14. local Compliments = loadstring(game:HttpGet("https://pastebin.com/raw/8yiWALzN",true))() -- Gets the table from the pastebin
  15.  
  16. local RandomCompliment = Compliments[math.random(1,#Compliments)] -- Picks a random Compliment
  17.  
  18. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(RandomPlayer.Name..", "..RandomCompliment,"All") -- Chats it
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement