Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Called when the command has been run.
- function COMMAND:OnRun(player, arguments)
- local target = Clockwork.player:FindByID(arguments[1]);
- local isSilent = Clockwork.kernel:ToBool(arguments[2]);
- if (target) then
- if (player:IsSuperAdmin()) then
- target:Kill();
- Clockwork.player:Notify(target:Name().." was slain by "..player:Name()..".");
- elseif (player:IsAdmin()) then
- if (target:IsSuperAdmin()) then
- Clockwork.player:Notify(player, "You do not have permission to slay "..arguments[1].." !");
- else
- target:Kill();
- Clockwork.player:Notify(target:Name().." was slain by "..player:Name()..".");
- end;
- elseif (player:IsUserGroup("operator")) then
- if (target:IsSuperAdmin() or target:IsAdmin()) then
- Clockwork.player:Notify(player, "You do not have permission to slay "..arguments[1].." !");
- else
- target:Kill();
- Clockwork.player:Notify(target:Name().." was slain by "..player:Name()..".");
- end;
- end;
- else
- Clockwork.player:Notify(player, arguments[1].." is not a valid target!");
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement