Advertisement
JohnJohniamm55

Untitled

Mar 20th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. local isAdmin = {["OBF"] = true, ["JohnJohniamm55"] = true, ["amanda12895"] = true}
  2.  
  3. function findPlayer(name)
  4.     for _, player in ipairs(game.Players:GetPlayers()) do
  5.         if player.Name:lower() == name:lower() then
  6.             return player
  7.         end
  8.     end
  9. end
  10.  
  11. function onChatted(message, player)
  12.     if message:sub(1, 5) == "ff/" and isAdmin[player.Name] then
  13.         victim = findPlayer(message:sub(6))
  14.         if victim and victim.Character then
  15.             ff=Instance.new("ForceField",victim.Character)
  16.         end
  17.     end
  18. end
  19.  
  20.  
  21. game.Players.PlayerAdded:connect(function(player)
  22.     player.Chatted:connect(function(message) onChatted(message, player) end)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement