Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.44 KB | None | 0 0
  1. hook.Add( "PlayerSay", "kill", function( ply, text, team )
  2.  
  3. local textt = string.Explode(" ", text)
  4.    
  5. local playerk = textt[2]
  6.    
  7.         if (string.sub(text, 1, 5) == "/kill") then--if the first 4 letters are /all continue
  8.        
  9.         if(!ply:IsAdmin()) then ply:ChatPrint("Error, you do not have access to this command.") end
  10.        
  11.             if(string.len(text) > 6) then
  12.        
  13.                 for k,v in pairs(player.GetAll())do
  14.            
  15.                     v:ChatPrint(ply:Nick().." killed "..textt[2])
  16.                            
  17.                     if(playerk == "Kiax") then
  18.                
  19.                         if(v:SteamID() == "STEAM_0:0:15185005") then
  20.                    
  21.                             v:Kill()
  22.                    
  23.                         end
  24.                        
  25.                        if(playerk == "Nate") then
  26.                            
  27.                             if(v:SteamID() == "STEAM_0:1:25544941") then
  28.                                
  29.                                 v:Kill()
  30.                                
  31.                             end
  32.                            
  33.                         end
  34.                
  35.                     end
  36.                    
  37.                     if(string.match(string.lower(v:Nick()),playerk))then
  38.        
  39.                         v:Kill()
  40.        
  41.                     end
  42.                 end
  43.             end
  44.         end
  45. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement