local map = { god = {"ASS_God", "%LOCALPLAYER%", "1"}; ungod = {"ASS_God", "%LOCALPLAYER%", "0"}; heal = {"ASS_GiveTakeHealth", "%LOCALPLAYER%", "100"}; ["1337"] = {"ASS_GiveTakeHealth", "%LOCALPLAYER%", function(l) return 1337 - l:Health() end}; slap = {"ASS_SlapPlayer", "%NAMEGIVEN%"}; kick = {"ASS_KickPlayer", "%NAMEGIVEN%"}; tel = {"ASS_TeleportToTarget", "%LOCALPLAYER%"}; speed = {"ASS_Speed", "%LOCALPLAYER%", "1"}; nospeed = {"ASS_Speed", "%LOCALPLAYER%", "0"}; } local function ChatText(ply, name, text, filter) local localPly = LocalPlayer() if ply != localPly:EntIndex() then return end if string.Left(text, 1) != "!" then return end //if string.Right(text, 8) != ", please" then return end local det = string.Explode(" ", string.sub(text, 2)) if #det < 1 then return end local command = det[1] table.remove(det, 1) if map[command] then local args = {} for k, v in pairs(map[command]) do if type(v) == "string" then if v == "%LOCALPLAYER%" then args[k] = localPly:UniqueID() elseif v == "%TARGET%" then local trace = localPly:GetEyeTrace() if ValidEntity(trace.Entity) && trace.Entity:IsPlayer() then args[k] = trace.Entity:UniqueID() else localPly:ChatPrint("Valid target not found.") return end elseif v == "%NAMEGIVEN%" then if det[1] then for _, ply in pairs(player.GetAll()) do if string.Left(string.lower(ply:Name()), string.len(det[1])) == string.lower(det[1]) then args[k] = ply:UniqueID() break end end end if !det[1] || !args[k] then localPly:ChatPrint("Please specify a valid target.") return end else args[k] = v end elseif type(v) == "function" then args[k] = v(LocalPlayer()) end end RunConsoleCommand(unpack(args)) end end hook.Add("ChatText", "ASSPlease", ChatText)