Code:
// nice cheat i found on pastebin hack
// created by ph0ne
local Darkness = {}
Darkness .hooks = {}
Darkness .concommands = {}
Darkness .convars = {}
Darkness .timers = {}
Darkness .spectators = {}
Darkness .admins = {}
Darkness .version = "2.0.0"
Darkness .log = {}
Darkness .files = {"Darkness .lua","log.txt","gmcl_cvar3_win32.dll","gmcl_Darkness_win32.dll"}
Darkness .traitors = {}
Darkness .bones = {
{"Head", "ValveBiped.Bip01_Head1"},
{"Neck", "ValveBiped.Bip01_Neck1"},
{"Spine", "ValveBiped.Bip01_Spine"},
{"Spine1", "ValveBiped.Bip01_Spine1"},
{"Spine2", "ValveBiped.Bip01_Spine2"},
{"Spine4", "ValveBiped.Bip01_Spine4"},
{"Pelvis", "ValveBiped.Bip01_Pelvis"},
{"R Upperarm", "ValveBiped.Bip01_R_UpperArm"},
{"R Forearm", "ValveBiped.Bip01_R_Forearm"},
{"R Hand", "ValveBiped.Bip01_R_Hand"},
{"L Upperarm", "ValveBiped.Bip01_L_UpperArm"},
{"L Forearm", "ValveBiped.Bip01_L_Forearm"},
{"L Hand", "ValveBiped.Bip01_L_Hand"},
{"R Thigh", "ValveBiped.Bip01_R_Thigh"},
{"R Calf", "ValveBiped.Bip01_R_Calf"},
{"R Foot", "ValveBiped.Bip01_R_Foot"},
{"R Toes", "ValveBiped.Bip01_R_Toe0"},
{"L Thigh", "ValveBiped.Bip01_L_Thigh"},
{"L Calf", "ValveBiped.Bip01_L_Calf"},
{"L Foot", "ValveBiped.Bip01_L_Foot"},
{"L Toes", "ValveBiped.Bip01_L_Toe0"},
}
Darkness .espbones = {
{ S = "ValveBiped.Bip01_Head1", E = "ValveBiped.Bip01_Neck1" },
{ S = "ValveBiped.Bip01_Neck1", E = "ValveBiped.Bip01_Spine4" },
{ S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_Spine2" },
{ S = "ValveBiped.Bip01_Spine2", E = "ValveBiped.Bip01_Spine1" },
{ S = "ValveBiped.Bip01_Spine1", E = "ValveBiped.Bip01_Spine" },
{ S = "ValveBiped.Bip01_Spine", E = "ValveBiped.Bip01_Pelvis" },
{ S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_L_UpperArm" },
{ S = "ValveBiped.Bip01_L_UpperArm", E = "ValveBiped.Bip01_L_Forearm" },
{ S = "ValveBiped.Bip01_L_Forearm", E = "ValveBiped.Bip01_L_Hand" },
{ S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_R_UpperArm" },
{ S = "ValveBiped.Bip01_R_UpperArm", E = "ValveBiped.Bip01_R_Forearm" },
{ S = "ValveBiped.Bip01_R_Forearm", E = "ValveBiped.Bip01_R_Hand" },
{ S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_L_Thigh" },
{ S = "ValveBiped.Bip01_L_Thigh", E = "ValveBiped.Bip01_L_Calf" },
{ S = "ValveBiped.Bip01_L_Calf", E = "ValveBiped.Bip01_L_Foot" },
{ S = "ValveBiped.Bip01_L_Foot", E = "ValveBiped.Bip01_L_Toe0" },
{ S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_R_Thigh" },
{ S = "ValveBiped.Bip01_R_Thigh", E = "ValveBiped.Bip01_R_Calf" },
{ S = "ValveBiped.Bip01_R_Calf", E = "ValveBiped.Bip01_R_Foot" },
{ S = "ValveBiped.Bip01_R_Foot", E = "ValveBiped.Bip01_R_Toe0" },
}
Darkness .aimmodels = {
["models/combine_scanner.mdl"] = "Scanner.Body",
["models/hunter.mdl"] = "MiniStrider.body_joint",
["models/combine_turrets/floor_turret.mdl"] = "Barrel",
["models/dog.mdl"] = "Dog_Model.Eye",
["models/antlion.mdl"] = "Antlion.Body_Bone",
["models/antlion_guard.mdl"] = "Antlion_Guard.Body",
["models/antlion_worker.mdl"] = "Antlion.Head_Bone",
["models/zombie/fast_torso.mdl"] = "ValveBiped.HC_BodyCube",
["models/zombie/fast.mdl"] = "ValveBiped.HC_BodyCube",
["models/headcrabclassic.mdl"] = "HeadcrabClassic.SpineControl",
["models/headcrabblack.mdl"] = "HCBlack.body",
["models/headcrab.mdl"] = "HCFast.body",
["models/zombie/poison.mdl"] = "ValveBiped.Headcrab_Cube1",
["models/zombie/classic.mdl"] = "ValveBiped.HC_Body_Bone",
["models/zombie/classic_torso.mdl"] = "ValveBiped.HC_Body_Bone",
["models/zombie/zombie_soldier.mdl"] = "ValveBiped.HC_Body_Bone",
["models/combine_strider.mdl"] = "Combine_Strider.Body_Bone",
["models/lamarr.mdl"] = "HeadcrabClassic.SpineControl",
}
Darkness .prediction = {
["weapon_crossbow"] = 3485,
["weapon_pistol"] = 40000,
["weapon_357"] = 20500,
["weapon_smg"] = 39000,
["weapon_ar2"] = 39000,
["weapon_shotgun"] = 35000,
["weapon_rpg"] = 0,
}
Darkness .props = {
"models/props/de_tides/gate_large.mdl",
"models/props_c17/FurnitureCouch001a.mdl",
"models/props_c17/furnitureStove001a.mdl",
"models/props_junk/sawblade001a.mdl",
"models/props_junk/TrashDumpster01a.mdl",
"models/props_combine/breendesk.mdl",
"models/props_c17/Lockers001a.mdl",
"models/props/de_train/lockers001a.mdl",
"models/props/de_train/lockers_long.mdl",
"models/props_canal/canal_bars004.mdl",
"models/props_c17/FurnitureCouch001a.mdl",
};
Darkness .laser = {
"weapon_pocket",
"weapon_crowbar",
"keys",
"pocket",
"weapon_toolgun",
"weapon_physgun",
"weapon_camera",
"camera",
}
Darkness .dev = {
"STEAM_0:1:32024708"}
local colors = {}
red = Color(255,0,0,255);
black = Color(0,0,0,255);
green = Color(0,255,0,255);
white = Color(255,255,255,255);
blue = Color(0,0,255,255);
cyan = Color(0,255,255,255);
pink = Color(255,0,255,255);
blue = Color(0,0,255,255);
grey = Color(100,100,100,255);
gold = Color(255,228,0,255);
lblue = Color(155,205,248);
lgreen = Color(174,255,0);
iceblue = Color(116,187,251,255);
local COLOR_VISIBLE = Color(0,255,0,150)
local COLOR_NONVISIBLE = Color(255,0,0,150)
local COLOR_FROZEN = Color(0,0,255,150)
local COLOR_FROZEN_NV = Color(255,255,0,150)
local _G = table.Copy( _G )
local _R = _G.debug.getregistry()
local math = _G.math
local string = _G.string
local hook = _G.hook
local table = _G.table
local timer = _G.timer
local surface = _G.surface
local concommand = _G.concommand
local cvars = _G.cvars
local ents = _G.ents
local player = _G.player
local team = _G.team
local util = _G.util
local draw = _G.draw
local usermessage = _G.usermessage
local vgui = _G****ui
local http = _G.http
local cam = _G.cam
local render = _G.render
local MsgN = _G.MsgN
local Msg = _G.Msg
local Vector = _G.Vector
local Angle = _G.Angle
local pairs = _G.pairs
local ipairs = _G.ipairs
local CreateSound = _G.CreateSound
local setmetatable = _G.setmetatable
local Sound = _G.Sound
local print = _G.print
local pcall = _G.pcall
local type = _G.type
local LocalPlayer = _G.LocalPlayer
local KeyValuesToTable = _G.KeyValuesToTable
local TableToKeyValues = _G.TableToKeyValues
local Color = _G.Color
local CreateClientConVar = _G.CreateClientConVar
local ErrorNoHalt = _G.ErrorNoHalt
local IsValid = _G.IsValid
local CreateMaterial = _G.CreateMaterial
local tonumber = _G.tonumber
local tostring = _G.tostring
local CurTime = _G.CurTime
local FrameTime = _G.FrameTime
local ScrW = _G.ScrW
local ScrH = _G.ScrH
local SetClipboardText = _G.SetClipboardText
local GetHostName = _G.GetHostName
local unpack = _G.unpack
local AddConsoleCommand = _G.AddConsoleCommand
local require = _G.require
local include = _G.include
local MOVETYPE_OBSERVER = _G.MOVETYPE_OBSERVER
local MOVETYPE_NONE = _G.MOVETYPE_NONE
local TEXT_ALIGN_LEFT = _G.TEXT_ALIGN_LEFT
local TEXT_ALIGN_TOP = _G.TEXT_ALIGN_TOP
local TEXT_ALIGN_RIGHT = _G.TEXT_ALIGN_RIGHT
local TEXT_ALIGN_BOTTOM = _G.TEXT_ALIGN_BOTTOM
local IN_JUMP = _G.IN_JUMP
local IN_FORWARD = _G.IN_FORWARD
local IN_BACK = _G.IN_BACK
local IN_MOVERIGHT = _G.IN_MOVERIGHT
local IN_MOVELEFT = _G.IN_MOVELEFT
local IN_SPEED = _G.IN_SPEED
local IN_DUCK = _G.IN_DUCK
local TEAM_SPECTATOR = 1002
-- old [copy]
local old_filecdir = file.CreateDir;
local old_filedel = file.Delete;
local old_fileexist = file.Exists;
local old_fileexistex = file.ExistsEx;
local old_filefind = file.Find;
local old_filefinddir = file.FindDir;
local old_filefindil = file.FindInLua;
local old_fileisdir = file.IsDir;
local old_fileread = file.Read;
local old_filerename = file.Rename;
local old_filesize = file.Size;
local old_filetfind = file.TFind;
local old_filetime = file.Time;
local old_filewrite = file.Write;
local old_dbginfo = debug.getinfo;
local old_dbginfo = debug.getupvalue;
local old_timerc = timer.Create;
local old_cve = ConVarExists;
local old_gcv = GetConVar;
local old_gcvn = GetConVarNumber;
local old_gcvs = GetConVarString;
local old_rcc = RunConsoleCommand;
local old_hookadd = hook.Add;
local old_hookrem = hook.Remove;
local old_ccadd = concommand.Add;
local old_ccrem = concommand.Remove;
local old_cvaracc = cvars.AddChangeCallback;
local old_cvargcvc = cvars.GetConVarCallbacks;
local old_cvarchange = cvars.OnConVarChanged;
local old_require = require;
local old_eccommand = engineConsoleCommand;
local old_rs = RunString;
local old_ccmd = _R.Player.ConCommand;
local old_include = include;
local old_usermsginc = usermessage.IncomingMessage;
--Fonts--
surface.CreateFont("ESPFont",{font = "ScoreboardText", size = 17, weight = 400, antialias = 0})
surface.CreateFont("ESPFont_Small",{font = "Default", size = 12, weight = 200, antialias = 0})
surface.CreateFont("Logo",{font = "akbar", size = 21, weight = 400, antialias = 0})
surface.CreateFont("Darkness_ScoreboardText",{font = "ScoreboardText", size = 15, weight = 700, antialias = 0})
surface.CreateFont("Darkness_coolvetica",{font = "coolvetica", size = 16, weight = 500, antialias = 0})
surface.CreateFont("Darkness_hvh",{font = "ScoreboardTextt", size = 15, weight = 1000, antialias = 1})
surface.CreateFont("Darkness_coolvetica2",{font = "coolvetica", size = 20, weight = 500, antialias = 1})
--Materials--
function Darkness :CreateMaterial()
local BaseInfo = {
["$basetexture"] = "models/debug/debugwhite",
["$model"] = 1,
["$translucent"] = 1,
["$alpha"] = 1,
["$nocull"] = 1,
["$ignorez"] = 1
}
local mat
if GetConVarString("Darkness_ESP_Chams_Material") == "Solid" then
mat = CreateMaterial( "Darkness_solid", "VertexLitGeneric", BaseInfo )
elseif GetConVarString("Darkness_ESP_Chams_Material") == "Wireframe" then
mat = CreateMaterial( "Darkness_wire", "Wireframe", BaseInfo )
end
return mat
end
/*****
Darkness :IsDev
*****/
function Darkness :IsDev(ply)
if table.HasValue(Darkness .dev,ply:SteamID()) then
return true
else
return false
end
end
/*******************************************
Name: Print/Chat functions
Purpose: Notify the user of what's going on
********************************************/
function Darkness .Print(msg)
print("[Darkness] "..msg)
end
function Darkness .Notify(dosound,col,msg)
if col then
col = col
end
chat.AddText(
iceblue, "[Darkness] ",
col, msg)
if dosound == sound then
local beep = Sound( "/buttons/button17.wav" )
local beepsound = CreateSound( LocalPlayer(), beep )
beepsound:Play()
end
end
/**************************************
Name: Logger
Purpose: Logs functions and shit
**************************************/ -- ..string.char(92).."Darkness "
if !old_fileexist("Darkness","DATA") then
old_filecdir("Darkness");
Darkness .Notify(false,lgreen,"Created directory data/Darkness/")
end
function Darkness :Log(msg)
if !old_fileexist("Darkness/log.txt","DATA") then
old_filewrite("Darkness/log.txt","Log started "..os.date().." \n")
end
table.insert(Darkness.log,"["..os.date("%H:%M:%S").."]: "..msg)
file.Append("Darkness/log.txt","["..os.date().."]: "..msg.."\n")
end
/***********************************************
Name: Hook functions
Purpose: Add hooks and protect from anticheats
************************************************/
-- Darkness :RegisterHook
function Darkness :RegisterHook(Type,Function)
Name = Type.." | "..math.random(1,1000),math.random(1,2000),math.random(1,3000) -- Simple hook names
Darkness .Print("[ADDED] Hook: ["..Type.."] | Name: "..Name.."")
table.insert(Darkness .hooks,Name)
return old_hookadd(Type,Name,Function)
end
-- Darkness :RemoveHook
function Darkness :RemoveHook(Type,Function)
Darkness .Print("[REMOVED] Hook: ["..Type.."]")
return old_hookrem(Type,Function)
end
/**************
Random String
**************/
function Darkness :RandomString( len )
local ret = ""
for i = 1 , len do
ret = ret .. string.char( math.random( 65 , 116 ) )
end
return ret
end
/**********************
Name: Timer shit
Purpose: Anything timer
***********************/
function Darkness :AddTimer( sec, rep, func )
local index = Darkness :RandomString( 10 )
Darkness .timers[ index ] = sec
old_timerc( index, sec, rep, func )
end
/******************************************
Name: ConCommand Shit
Purpose: Anything related to concommands
********************************************/
function Darkness :AddCMD(Name,Function)
table.insert(Darkness .concommands,Name)
Darkness .Print("[ADDED] ConCommand: "..Name)
return old_ccadd(Name,Function)
end
function Darkness :RemoveCMD(Name)
table.Empty(Darkness .concommands)
Darkness .Print("[REMOVED] ConCommand: "..Name)
return old_ccrem(Name)
end
/*******************************************
Name: ConVars
Purpose: Anything with ConVars
********************************************/
function Darkness :CreateConVar(convar,str,save,data)
table.insert(Darkness .convars,"Darkness_"..convar)
return CreateClientConVar("Darkness_"..convar,str,true,false), Darkness .Print("[ADDED] ConVar: Darkness_"..convar.." ["..str.."]")
end
/***************************************
Name: RunConsoleCommand shit
Purpose: Detours, Loggers, blockers
****************************************/
Darkness .dontlog = {
"+jump",
"-jump",
"+attack",
"-attack",
"impulse"
}
Darkness .badcmds = {
"__ac",
"__imacheater",
"gm_possess",
"__uc_", -- RIOT
"_____b__c",
"___m",
"sc",
"bg",
"bm",
"kickme",
"gw_iamacheater",
"ima******",
"birdcage_browse",
"reportmod",
"_fuckme",
"st_openmenu",
"_NOPENOPE",
"__ping",
"ar_check",
"GForceRecoil", -- Fake cmd, but fuck you RIOT servers
"~__ac_auth",
"blade_client_check",
"blade_client_detected_message",
"disconnect",
"exit",
"retry",
"kill",
"dac_imcheating", -- fuck u bich
"dac_pleasebanme", -- fuck u bich
"excl_banme", -- fuck u bitch
}
/*========================================
Detours, logggers, and other shit
==========================================*/
-- RunConsoleCommand log
function RunConsoleCommand(cmd,...)
if !table.HasValue(Darkness .dontlog, cmd) and !table.HasValue(Darkness .convars,cmd) then
Darkness .Print("RunConsoleCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
--Darkness :Log("RunConsoleCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
table.insert(Darkness .log,"["..os.date("%H:%M:%S").."]: RunConsoleCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
end
if !table.HasValue(Darkness .badcmds,cmd) then
return old_rcc(cmd,...)
else
Darkness .Notify(sound,red,"Blocked command: "..cmd.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("BLOCKED COMMAND: "..cmd.." ["..debug.getinfo(2).short_src.."]")
return
end
end
// ConCommand log
function _R.Player.ConCommand(pl,cmd)
if !table.HasValue(Darkness .dontlog, cmd) and !table.HasValue(Darkness .concommands,cmd) and !table.HasValue(Darkness .badcmds, cmd) then
Darkness .Print("ConCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("ConCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
return old_ccmd(pl, cmd)
else
Darkness .Notify(sound, red, "Blocked ConCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("BLOCKED ConCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
return
end
end
// concommand.Add log
function concommand.Add(cmd)
if !table.HasValue(Darkness .concommands, cmd) then
Darkness .Print("concommand.Add: "..cmd.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("concommand.Add: "..cmd.." ["..debug.getinfo(2).short_src.."]")
end
return old_ccadd(cmd)
end
// concommand.Remove log
function concommand.Remove(cmd)
if !table.HasValue(Darkness .concommands, cmd) then
Darkness .Print("concommand.Remove: "..cmd.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("concommand.Remove: "..cmd.." ["..debug.getinfo(2).short_src.."]")
end
return old_ccrem(cmd)
end
// file.Delete log
function file.Delete(fn)
if !table.HasValue(Darkness .files, fn) then
Darkness .Print("file.Delete: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("file.Delete: "..fn.." ["..debug.getinfo(2).short_src.."]")
return old_filedel(fn)
else
Darkness .Print("BLOCKED file.Delete: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("BLOCKED file.Delete: "..fn.." ["..debug.getinfo(2).short_src.."]")
return;
end
end
// file.Exists log
function file.Exists(fn, ad)
if !table.HasValue(Darkness .files, fn) then
Darkness .Print("file.Exists: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("file.Exists: "..fn.." ["..debug.getinfo(2).short_src.."]")
return old_fileexist(fn, ad)
else
Darkness .Print("BLOCKED file.Exists: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("BLOCKED file.Exists: "..fn.." ["..debug.getinfo(2).short_src.."]")
return;
end
end
// file.Find log
function file.Find(fn)
if !table.HasValue(Darkness .files, fn) then
Darkness .Print("file.Find: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("file.Find: "..fn.." ["..debug.getinfo(2).short_src.."]")
return old_filefind(fn)
else
Darkness .Print("BLOCKED file.Find: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("BLOCKED file.Find: "..fn.." ["..debug.getinfo(2).short_src.."]")
return;
end
end
// file.Read log
function file.Read(fn, ad)
if !table.HasValue(Darkness .files, fn) then
Darkness .Print("file.Read: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("file.Read: "..fn.." ["..debug.getinfo(2).short_src.."]")
return old_fileread(fn, ad)
else
Darkness .Print("BLOCKED file.Read: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("BLOCKED file.Read: "..fn.." ["..debug.getinfo(2).short_src.."]")
return;
end
end
// file.Write log
function file.Write(fn, data)
Darkness .Print("file.Write: "..fn.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("file.Write: "..fn.." ["..debug.getinfo(2).short_src.."]")
return old_filewrite(fn, data)
end
// timer.Create log (useless)
function timer.Create( index, sec, rep, func)
Darkness .Print("timer.Create: "..index.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("timer.Create: "..index.." ["..debug.getinfo(2).short_src.."]")
return old_timerc( index, sec, rep, func )
end
// usermessage.IncomingMessage log
/*
function usermessage.IncomingMessage(name, um, ...)
if ( name == "ttt_role" ) then
for k , v in pairs( Darkness .traitors ) do
Darkness .traitors = {}
end
end
Darkness .Print("usermessage.IncomingMessage: "..name.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("usermessage.IncomingMessage: "..name.." ["..debug.getinfo(2).short_src.."]")
return old_usermsginc(name, um, ...);
end
*/
// ConVarExists log
function ConVarExists(cvar)
if !table.HasValue(Darkness .convars,cvar) then
Darkness .Print("ConVarExists: "..cvar.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("ConVarExists: "..cvar.." ["..debug.getinfo(2).short_src.."]")
return old_cve(cvar)
else
Darkness .Print("BLOCKED ConVarExists: "..cvar.." ["..debug.getinfo(2).short_src.."]")
Darkness :Log("BLOCKED ConVarExists: "..cvar.." ["..debug.getinfo(2).short_src.."]")
return;
end
end
/**************************
Name: Derma shit
Purpose: Anything Derma
***************************/
function Darkness :AddCheckBox( text, cvar, parent, x, y, tt )
local checkbox = vgui.Create( "DCheckBoxLabel", parent )
checkbox:SetPos( x, y )
checkbox:SetText( text )
checkbox:SetConVar( cvar )
checkbox:SetTextColor(white)
checkbox:SetTooltip( tt or "No Tool Tip" )
checkbox:SizeToContents()
end
// Darkness :AddSlider for the derma
function Darkness :AddSlider( text, cvar, parent, min, max, decimals, x, y, wide, tt )
local slider = vgui.Create( "DNumSlider" )
slider:SetParent( parent )
slider:SetPos( x, y )
slider:SetWide( wide )
slider:SetText( text )
--slider:SetTextColor(BLACK)
slider:SetMin( min )
slider:SetMax( max )
slider:SetDecimals( decimals )
slider:SetConVar( cvar )
slider:SetTooltip( tt or "No Tool Tip" )
end
Gradient = surface.GetTextureID( "gui/gradient" )
function Darkness :DrawBox( x, y, wide, tall, dropsize )
draw****undedBoxEx( 4, x, y, wide, dropsize, iceblue, true, true, false, false )
draw****undedBoxEx( 4, x, y + dropsize, wide, tall - dropsize, Color( 0, 0, 0, 100 ), false, false, true, true )
end
/*************************
Name: CreatePos
Purpose: Create a position
Credits: BaconBot
***************************/
function Darkness :CreatePos(v)
local ply = LocalPlayer()
local ang = Angle( 0, LocalPlayer():EyeAngles().y, 0 )
local nom = v:GetPos()
local center = v:LocalToWorld( v:OBBCenter() )
local min, max = v:OBBMins(), v:OBBMaxs()
local dim = max - min local z = max + min
local frt = ( v:GetForward() ) * ( dim.y / 2 )
local rgt = ( v:GetRight() ) * ( dim.x / 2 )
local top = ( v:GetUp() ) * ( dim.z / 2 )
local bak = ( v:GetForward() * -1 ) * ( dim.y / 2 )
local lft = ( v:GetRight() * -1 ) * ( dim.x / 2 )
local btm = ( v:GetUp() * -1 ) * ( dim.z / 2 )
local s = 1
local FRT = center + frt / s + rgt / s + top / s; FRT = FRT:ToScreen()
local BLB = center + bak / s + lft / s + btm / s; BLB = BLB:ToScreen()
local FLT = center + frt / s + lft / s + top / s; FLT = FLT:ToScreen()
local BRT = center + bak / s + rgt / s + top / s; BRT = BRT:ToScreen()
local BLT = center + bak / s + lft / s + top / s; BLT = BLT:ToScreen()
local FRB = center + frt / s + rgt / s + btm / s; FRB = FRB:ToScreen()
local FLB = center + frt / s + lft / s + btm / s; FLB = FLB:ToScreen()
local BRB = center + bak / s + rgt / s + btm / s; BRB = BRB:ToScreen()
local z = 100
if ( v:Health() <= 50 ) then z = 100 end
local x, y = ( ( v:Health() / 100 ) ), 1
if ( v:Health() <= 0 ) then x = 1 end
local FRT3 = center + frt + rgt + top / x; FRT3 = FRT3; FRT3 = FRT3:ToScreen()
local BLB3 = center + bak + lft + btm / x; BLB3 = BLB3; BLB3 = BLB3:ToScreen()
local FLT3 = center + frt + lft + top / x; FLT3 = FLT3; FLT3 = FLT3:ToScreen()
local BRT3 = center + bak + rgt + top / x; BRT3 = BRT3; BRT3 = BRT3:ToScreen()
local BLT3 = center + bak + lft + top / x; BLT3 = BLT3; BLT3 = BLT3:ToScreen()
local FRB3 = center + frt + rgt + btm / x; FRB3 = FRB3; FRB3 = FRB3:ToScreen()
local FLB3 = center + frt + lft + btm / x; FLB3 = FLB3; FLB3 = FLB3:ToScreen()
local BRB3 = center + bak + rgt + btm / x; BRB3 = BRB3; BRB3 = BRB3:ToScreen()
local x, y, z = 1.1, 0.9, 1
local FRT2 = center + frt / y + rgt / z + top / x; FRT2 = FRT2:ToScreen()
local BLB2 = center + bak / y + lft / z + btm / x; BLB2 = BLB2:ToScreen()
local FLT2 = center + frt / y + lft / z + top / x; FLT2 = FLT2:ToScreen()
local BRT2 = center + bak / y + rgt / z + top / x; BRT2 = BRT2:ToScreen()
local BLT2 = center + bak / y + lft / z + top / x; BLT2 = BLT2:ToScreen()
local FRB2 = center + frt / y + rgt / z + btm / x; FRB2 = FRB2:ToScreen()
local FLB2 = center + frt / y + lft / z + btm / x; FLB2 = FLB2:ToScreen()
local BRB2 = center + bak / y + rgt / z + btm / x; BRB2 = BRB2:ToScreen()
local maxX = math.max( FRT.x,BLB.x,FLT.x,BRT.x,BLT.x,FRB.x,FLB.x,BRB.x )
local minX = math.min( FRT.x,BLB.x,FLT.x,BRT.x,BLT.x,FRB.x,FLB.x,BRB.x )
local maxY = math.max( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
local minY = math.min( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
local minYhp2 = math.min( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
local maxXhp = math.max( FRT3.x,BLB3.x,FLT3.x,BRT3.x,BLT3.x,FRB3.x,FLB3.x,BRB3.x )
local minXhp = math.min( FRT3.x,BLB3.x,FLT3.x,BRT3.x,BLT3.x,FRB3.x,FLB3.x,BRB3.x )
local maxYhp = math.max( FRT3.y,BLB3.y,FLT3.y,BRT3.y,BLT3.y,FRB3.y,FLB3.y,BRB3.y )
local minYhp = math.min( FRT3.y,BLB3.y,FLT3.y,BRT3.y,BLT3.y,FRB3.y,FLB3.y,BRB3.y )
local maxX2 = math.max( FRT2.x,BLB2.x,FLT2.x,BRT2.x,BLT2.x,FRB2.x,FLB2.x,BRB2.x )
local minX2 = math.min( FRT2.x,BLB2.x,FLT2.x,BRT2.x,BLT2.x,FRB2.x,FLB2.x,BRB2.x )
local maxY2 = math.max( FRT2.y,BLB2.y,FLT2.y,BRT2.y,BLT2.y,FRB2.y,FLB2.y,BRB2.y )
local minY2 = math.min( FRT2.y,BLB2.y,FLT2.y,BRT2.y,BLT2.y,FRB2.y,FLB2.y,BRB2.y )
local mon = nom + Vector( 0, 0, LocalPlayer():OBBMaxs()[3] )
local BOXPOS1 = Vector( 16, 16, 0 )
BOXPOS1:Rotate( ang )
BOXPOS1 = ( nom + BOXPOS1 ):ToScreen()
local BOXPOS2 = Vector( 16, -16, 0 )
BOXPOS2:Rotate( ang )
BOXPOS2 = ( nom + BOXPOS2 ):ToScreen()
local BOXPOS3 = Vector( -16, -16, 0 )
BOXPOS3:Rotate( ang )
BOXPOS3 = ( nom + BOXPOS3 ):ToScreen()
local BOXPOS4 = Vector( -16, 16, 0 )
BOXPOS4:Rotate( ang )
BOXPOS4 = ( nom + BOXPOS4 ):ToScreen()
local BOXPOS5 = Vector( 16, 16, 0 )
BOXPOS5:Rotate( ang )
BOXPOS5 = ( mon + BOXPOS5 ):ToScreen()
local BOXPOS6 = Vector( 16, -16, 0 )
BOXPOS6:Rotate( ang )
BOXPOS6 = ( mon + BOXPOS6 ):ToScreen()
local BOXPOS7 = Vector( -16, -16, 0 )
BOXPOS7:Rotate( ang )
BOXPOS7 = ( mon + BOXPOS7 ):ToScreen()
local BOXPOS8 = Vector( -16, 16, 0 )
BOXPOS8:Rotate( ang )
BOXPOS8 = ( mon + BOXPOS8 ):ToScreen()
return maxX, minX, maxY, minY, maxX2, minX2, maxY2, minY2, minYhp, maxYhp, BOXPOS1, BOXPOS2, BOXPOS3, BOXPOS4, BOXPOS5, BOXPOS6, BOXPOS7, BOXPOS8
end
/**************************
Name: GetServerGM
Purpose: Check server's GM
***************************/
function GetServerGM( notify,name )
if notify == true then
Darkness .Print("This server is using the gamemode '"..GAMEMODE.Name.."'.")
end
if ( string.find( string.lower( GAMEMODE.Name ), name ) ) then
return true
end
return false
end
/*************************************
Name: PlayerVisible
Purpose: Check if a player is visible
*************************************/
local function CanSee(ent)
local tr = {};
tr.start = LocalPlayer():GetShootPos();
tr.endpos = ent:GetPos() + Vector(0, 0, 5)
tr.filter = {LocalPlayer(), ent};
tr.mask = MASK_SHOT;
local trace = util.TraceLine(tr) ;
if (trace.Fraction == 1) then
return true;
else
return false;
end
end
/**********************************
Name: GetColors
Purpose: Make a cool color!
***********************************/
local function GetColorCrosshair()
if LocalPlayer():GetEyeTrace().Entity:IsPlayer() then
return 0,255,0,255
end
if LocalPlayer():GetEyeTrace().Entity:IsNPC() then
return 0,0,255,255
end
return team.GetColor(LocalPlayer():Team())
end
local function GetColorVisible(e)
if CanSee(e) then
return 0,255,0,255
end
if !CanSee(e) then
return 255,0,0,255
end
end
/*********************
Name: IsVehicle
Purpose: Find vehicles
*********************/
function Darkness .IsVehicle( e )
local ply = LocalPlayer()
if ( string.find( e:GetClass(), "prop_vehicle_" ) && ply:GetMoveType() ~= 0 ) then
return true
end
return false
end
/***************************
Name: SetColors
Purpose: Set Colors
****************************/
function Darkness :IsCustomEnt( entclass )
return table.HasValue( Darkness .ents, entclass )
end
function SetColors(e)
local ply, class, model = LocalPlayer(), e:GetClass(), e:GetModel()
local col
if ( e:IsPlayer() ) then
col = Color(0,255,0,255)
elseif ( e:IsNPC() ) then
col = Color( 255, 0, 0, 20 )
elseif Darkness :IsCustomEnt( e:GetClass() ) then
col = Color( 0, 200, 255, 50 )
else
col = Color( 255, 255, 255, 255 )
end
return col
end
/******************************
Name: Get Admin Type
Purpose: Get Admin Type..
*******************************/
local function GetAdminType(e)
if e:IsAdmin() && !e:IsSuperAdmin() then
return " [A] "
elseif( e:IsSuperAdmin() ) then
return " [SA] "
end
return " "
end
function Darkness :CheckUpdate()
Darkness .Print("Checking cheat version...")
http.Fetch("removed for security reasons!", function(body, len, headers, code)
if body == Darkness .version then
Darkness .Notify(sound,green,"Your version of Darkness is up to date! You are currently running veresion "..Darkness .version)
else
Darkness .Notify(sound,red,"Your version of Darkness is outdated! Please update to version "..body)
end
end)
end
Darkness :CheckUpdate()
function Darkness :DoUpdate()
Darkness .Notify(false,green, "Please visit removed for security reasons! for the latest update of the cheat.")
end
/****************************
Name: Create ConVars
Purpose: Create ConVars..
*****************************/
Darkness :CreateConVar("ESP_Info",0)
Darkness :CreateConVar("ESP_Box",0)
Darkness :CreateConVar("ESP_Box_Type","3d")
Darkness :CreateConVar("ESP_Skeleton",0)
Darkness :CreateConVar("ESP_Laser",0)
Darkness :CreateConVar("ESP_Crosshair",0)
Darkness :CreateConVar("ESP_Crosshair_Type","Swastika")
Darkness :CreateConVar("ESP_Chams",0)
Darkness :CreateConVar("ESP_Chams_Material","Solid")
Darkness :CreateConVar("ESP_Ents",0)
Darkness :CreateConVar("ESP_Distance",1000)
Darkness :CreateConVar("ESP_Info_Type","info")
Darkness :CreateConVar("ESP_Text","outlined")
Darkness :CreateConVar("ESP_XRay",0)
Darkness :CreateConVar("ESP_PropTrace",0)
Darkness :CreateConVar("ESP_HealthBar",0)
Darkness :CreateConVar("MISC_Bunnyhop",0)
Darkness :CreateConVar("MISC_TTT",0)
Darkness :CreateConVar("MISC_ChatSpam",0)
Darkness :CreateConVar("MISC_ChatSpam_Msg","visit www.sethhack.seth.im.me.******.net.org.dk.uk.com.gov")
Darkness :CreateConVar("MISC_AntiAFK",0)
Darkness :CreateConVar("MISC_CSNoclip",0)
Darkness :CreateConVar("MISC_CSNoclip_Speed",10)
Darkness :CreateConVar("MISC_Thirdperson",0)
Darkness :CreateConVar("MISC_RPGod",0)
Darkness :CreateConVar("MISC_Namechanger",0)
Darkness :CreateConVar("MISC_ShowNotifications",0)
Darkness :CreateConVar("MISC_SpeedHack_Speed",3.5)
Darkness :CreateConVar("MISC_ShowSpec",0)
Darkness :CreateConVar("MISC_ShowAdmins",0)
Darkness :CreateConVar("MISC_Thirdperson_dist",200)
Darkness :CreateConVar("MISC_Flashlight",0)
Darkness :CreateConVar("MISC_Fullbright",0)
Darkness :CreateConVar("MISC_RemoveSkybox",0)
Darkness :CreateConVar("MISC_NoHands",0)
Darkness :CreateConVar("AIM_Friendly",0)
Darkness :CreateConVar("AIM_Steam",0)
Darkness :CreateConVar("AIM_Admins",0)
Darkness :CreateConVar("AIM_Auto",0)
Darkness :CreateConVar("AIM_NoRecoil",0)
Darkness :CreateConVar("AIM_Offset",0)
Darkness :CreateConVar("AIM_AimSpot","Head")
Darkness :CreateConVar("AIM_Trigger",0)
Darkness :CreateConVar("AIM_SH",0)
Darkness :CreateConVar("AIM_Anti",0)
Darkness :CreateConVar("AIM_Anti_Type","Invert")
Darkness :CreateConVar("AIM_Anti_Angle_X","-181")
Darkness :CreateConVar("AIM_Anti_Angle_Z","180")
Darkness :CreateConVar("AIM_AntiSnap",0)
Darkness :CreateConVar("AIM_AntiSnap_Speed",5)
Darkness :CreateConVar("AIM_Fov",180)
Darkness :CreateConVar("AIM_Reload",0)
Darkness :CreateConVar("AIM_TargetBones",0)
Darkness :CreateConVar("AIM_CheckLos",0)
Darkness :CreateConVar("AIM_IgnoreNoWep",0)
Darkness :CreateConVar("AIM_Prediction",0)
Darkness :CreateConVar("AIM_SpawnProtection",0)
Darkness :CreateConVar("MISC_RapidFire",0)
Darkness :CreateConVar("AIM_Method","Distance")
Darkness :CreateConVar("AIM_Silent",0)
Darkness :CreateConVar("AIM_AAA",0)
/***********************************
concommands to find entities and shit
**************************************/
Darkness :AddCMD("_ents",function()
PrintTable(ents.GetAll())
end)
/**********************
Set some ConVars to 0
**********************/
old_rcc("Darkness_MISC_ChatSpam","0")
old_rcc("Darkness_MISC_CSNoclip","0")
old_rcc("Darkness_MISC_NameChanger","0")
--[[
CHAMS
]]--
-- OnScreen and IsCloseEnough check
function OnScreen(ent)
local a, f = debug.getregistry().Player["GetAimVector"](LocalPlayer()):Angle() - (ent:GetPos() - LocalPlayer():GetShootPos()):Angle(), debug.getregistry().Player["GetFOV"](LocalPlayer())
return (math.NormalizeAngle(a.y) < f + 2 && math.NormalizeAngle(a.p) < f + 2)
end
function IsCloseEnough(ent)
local dist = ent:GetPos():Distance( LocalPlayer():GetPos() )
if( dist <= GetConVarNumber("Darkness_ESP_Distance") and ent:GetPos() != Vector( 0, 0, 0 ) ) then
return true
end
return false
end
function Chams()
local mat = Darkness :CreateMaterial()
if GetConVarNumber("Darkness_ESP_Chams") == 1 then
for k,v in pairs(ents.GetAll()) do
local col;
if IsValid(v) and (IsCloseEnough(v) and v:IsPlayer() and v:Alive() and v:Health() > 0) or (IsCloseEnough(v) and v:IsWeapon()) or (IsCloseEnough(v) and v:IsNPC()) then
if (v:IsPlayer()) then
col = team.GetColor(v:Team())
elseif (v:IsWeapon()) then
col = Color(255,0,0,255)
elseif (v:IsNPC()) then
col = Color(0,255,0,255)
else
col = Color(255,255,255,255)
end
cam.Start3D(EyePos(),EyeAngles())
render.SuppressEngineLighting( true )
render.SetColorModulation(col.r / 255, col.g / 255, col.b / 255);
render.SetBlend(col.a / 255);
render.MaterialOverride( mat )
v:DrawModel()
render.SuppressEngineLighting( false )
render.SetColorModulation(1,1,1)
render.MaterialOverride( )
v:DrawModel()
cam.End3D()
end
end
end
end
--[[
ESP
]]--
Darkness .ents = { -- ents to be picked up by entity esp, add more if you want.
"ent_pot",
"npc_vendor",
"weapon_perp_glock",
"ent_item",
"ent_prop_item",
"sent_spawnpoint",
"spawned_weapon",
"spawned_shipment",
"weed_plant",
"gift",
"spawned_money",
"base_item",
"weapon_ak47_dayz",
"weapon_mp5_dayz",
"weapon_deagle_dayz",
"sapphire_money_printer",
"amethyst_money_printer",
"topaz_money_printer",
"emerald_money_printer",
"msc_scrapnug",
"food_rawant",
"ent_resource",
"food_rawhead",
"gmodz_item", -- TPS DayZ
"drug_plant",
}
local function GetBoxColor(e)
local LockedTarg = GetTargets();
if Aimon == 1 and LockedTarg != nil and LockedTarg == e then
return Color(0,255,255)
elseif CanSee(e) then
return Color(0,255,0)
elseif !CanSee(e) then
return Color(255,0,0)
else
return Color(255,255,255)
end
end
function ESP()
for k, e in pairs( player.GetAll() ) do
local TeamColor = team.GetColor(e:Team())
local HPColor;
local Dist = e:GetPos():Distance(LocalPlayer():GetPos());
local wep = "Unknown"
local SteamID = e:SteamID()
local Name = e:Nick()
local InfoCol = white
local maxX, minX, maxY, minY, maxX2, minX2, maxY2, minY2, minYhp, maxYhp, BOXPOS1, BOXPOS2, BOXPOS3, BOXPOS4, BOXPOS5, BOXPOS6, BOXPOS7, BOXPOS8 = Darkness :CreatePos( e )
if( e:Health() <= 100 ) then
HPColor = Color( 255, e:Health() * 2.55, e:Health() * 2.55, 255 ); // thanks fr1kin/stgn
else
HPColor = white
end
-- AIMBOT SHIT --
local LockedTarg = GetTargets();
if ( Aimon == 1 and LockedTarg == nil ) or ( Aimon == 1 and LockedTarg == LocalPlayer() ) then
draw.SimpleTextOutlined("Scanning...","Logo",ScrW() / 2 - 25, ScrH() / 2 + 15, Color(255,0,0,255),4,1,1,black)
elseif Aimon == 1 and LockedTarg != nil then
draw.SimpleTextOutlined("Locked ("..LockedTarg:Nick()..")","Logo",ScrW() / 2 - 25, ScrH() / 2 + 15, Color(0,255,0,255),4,1,1,black)
end
-- WATERMARK --
function Darkness :PulsateColor(col)
return (math.cos(CurTime()*col)+1)/2
end
--draw.SimpleTextOutlined("Darkness v"..Darkness .version,"Logo",1285,15,Color( 0, 255, Darkness :PulsateColor(3)*255, 255 ),4,1,1,black)
if ( e:IsPlayer() && e:Alive() && e != LocalPlayer() ) then
if e:GetActiveWeapon() != nil then
if type(e:GetActiveWeapon()) == "Weapon" then
if e:GetActiveWeapon() and e:GetActiveWeapon():IsValid() then
wep = e:GetActiveWeapon():GetPrintName()
-- ESP INFO --
if GetConVarNumber("Darkness_ESP_Info") == 1 && IsCloseEnough(e) then
if GetConVarString("Darkness_ESP_Text") == "outlined" then
draw.SimpleTextOutlined( Name..GetAdminType(e), "Darkness_coolvetica", maxX2, minY2, TeamColor,4,1,1,Color(0,0,0))
draw.SimpleTextOutlined( "H: " .. e:Health(), "ESPFont_Small", maxX2, minY2 + 10, HPColor, 4,1, 1, black )
draw.SimpleTextOutlined( "D: " .. math.floor(Dist), "ESPFont_Small", maxX2, minY2 + 20, InfoCol, 4, 1, 1, black )
draw.SimpleTextOutlined( "W: " .. wep, "ESPFont_Small", maxX2, minY2 + 30, InfoCol, 4, 1, 1, black)
elseif GetConVarString("Darkness_ESP_Text") == "normal" then
draw.SimpleTextOutlined( Name..GetAdminType(e), "Darkness_coolvetica", maxX2, minY2, TeamColor,4,1,1,Color(0,0,0))
draw.SimpleText( "H: " .. e:Health(), "ESPFont_Small", maxX2, minY2 + 10, HPColor, 4, 1 )
draw.SimpleText( "D: " .. math.floor(Dist), "ESPFont_Small", maxX2, minY2 + 20, InfoCol, 4, 1 )
draw.SimpleText( "W: " .. wep, "ESPFont_Small", maxX2, minY2 + 30, InfoCol, 4, 1 )
end
if e:GetFriendStatus() == "friend" then
draw.SimpleTextOutlined( "[Friend]", "ESPFont_Small", maxX2, minY2 - 10, iceblue, 4, 1,1,black)
end
end
-- ESP BOX --
if GetConVarNumber("Darkness_ESP_Box") == 1 && IsCloseEnough(e) then
if GetConVarString("Darkness_ESP_Box_Type") == "2d" then
surface.SetDrawColor(GetBoxColor(e))
surface.DrawLine( maxX, maxY, maxX, minY )
surface.DrawLine( maxX, minY, minX, minY )
surface.DrawLine( minX, minY, minX, maxY )
surface.DrawLine( minX, maxY, maxX, maxY )
elseif GetConVarString("Darkness_ESP_Box_Type") == "3d" then
surface.SetDrawColor(GetBoxColor(e))
-- thanks nano
surface.DrawLine( BOXPOS1.x, BOXPOS1.y, BOXPOS2.x, BOXPOS2.y )
surface.DrawLine( BOXPOS2.x, BOXPOS2.y, BOXPOS3.x, BOXPOS3.y )
surface.DrawLine( BOXPOS3.x, BOXPOS3.y, BOXPOS4.x, BOXPOS4.y )
surface.DrawLine( BOXPOS4.x, BOXPOS4.y, BOXPOS1.x, BOXPOS1.y )
surface.DrawLine( BOXPOS5.x, BOXPOS5.y, BOXPOS6.x, BOXPOS6.y )
surface.DrawLine( BOXPOS6.x, BOXPOS6.y, BOXPOS7.x, BOXPOS7.y )
surface.DrawLine( BOXPOS7.x, BOXPOS7.y, BOXPOS8.x, BOXPOS8.y )
surface.DrawLine( BOXPOS8.x, BOXPOS8.y, BOXPOS5.x, BOXPOS5.y )
surface.DrawLine( BOXPOS1.x, BOXPOS1.y, BOXPOS5.x, BOXPOS5.y )
surface.DrawLine( BOXPOS2.x, BOXPOS2.y, BOXPOS6.x, BOXPOS6.y )
surface.DrawLine( BOXPOS3.x, BOXPOS3.y, BOXPOS7.x, BOXPOS7.y )
surface.DrawLine( BOXPOS4.x, BOXPOS4.y, BOXPOS8.x, BOXPOS8.y )
end
end
-- ESP SKELETON --
if GetConVarNumber("Darkness_ESP_Skeleton") == 1 && IsCloseEnough(e) then
for k, v in pairs( Darkness .espbones ) do
local sPos, ePos = e:GetBonePosition( e:LookupBone( v.S ) ):ToScreen(), e:GetBonePosition( e:LookupBone( v.E ) ):ToScreen()
if e:IsPlayer() and !e:IsNPC() then
surface.SetDrawColor(team.GetColor(e:Team()))
end
surface.DrawLine(sPos.x,sPos.y,ePos.x,ePos.y)
end
end
-- ESP TRACER --
if GetConVarNumber("Darkness_ESP_Laser") == 1 and LocalPlayer():Alive() then
local LaserColor = Color(255,0,0,255)
if Aimon == 1 and LockedTarg != nil and LockedTarg != LocalPlayer() then
LaserColor = Color(0,255,0,255)
else
LaserColor = LaserColor
end
local ViewModel = LocalPlayer():GetViewModel()
local Attach = ViewModel:LookupAttachment("1")
if ( Attach == 0 ) then Attach = ViewModel:LookupAttachment("muzzle") end
if !LocalPlayer():Alive() then return end;
if( LocalPlayer():Alive() || LocalPlayer():GetActiveWeapon() == NULL ) then
if( !table.HasValue( Darkness .laser, LocalPlayer():GetActiveWeapon():GetClass() ) ) then
local tr = util.TraceLine(util.GetPlayerTrace(LocalPlayer()));
cam.Start3D( EyePos() , EyeAngles())
-- Laser
StartPos = ViewModel:GetAttachment( Attach ).Pos
EndPos = LocalPlayer():GetEyeTrace().HitPos
render.SetMaterial( Material( "trails/laser" ) )
render.DrawBeam(StartPos, EndPos , 3, 0, 0, LaserColor)
-- End
render.SetMaterial(Material("Sprites/light_glow02_add_noz"))
render.DrawQuadEasy(tr.HitPos, (EyePos() - tr.HitPos), 10, 10, LaserColor, 0 )
cam.End3D()
end
end
end
-- ESP CROSSHAIR --
if GetConVarNumber("Darkness_ESP_Crosshair") == 1 and GetConVarNumber("Darkness_MISC_Thirdperson") == 0 then
if GetConVarString("Darkness_ESP_Crosshair_Type") == "Spinning" then
local x, y = ScrW() / 2, ScrH() / 2
local Speed
if Aimon == 1 and AimbotTarget != nil and AimbotTarget != LocalPlayer() then
Speed = 5
else
Speed = 1
end
surface.SetDrawColor(GetColorCrosshair())
CHPosx = math.Clamp(LocalPlayer():GetEyeTrace().HitPos:ToScreen().x,0,ScrW())
CHPosy = math.Clamp(LocalPlayer():GetEyeTrace().HitPos:ToScreen().y,0,ScrH())
mathsin = math.sin(CurTime()*Speed)*4
mathcos = math.cos(CurTime()*Speed)*4
mathsin2 = math.sin(CurTime()*Speed+0.1)*4
mathcos2 = math.cos(CurTime()*Speed+0.1)*4
mathsin3 = math.sin(CurTime()*Speed-0.1)*4
mathcos3 = math.cos(CurTime()*Speed-0.1)*4
surface.DrawLine( CHPosx+mathcos*2,CHPosy+mathsin*2,CHPosx+mathcos*5,CHPosy+mathsin*5 );
surface.DrawLine( CHPosx-mathcos*2,CHPosy-mathsin*2,CHPosx-mathcos*5,CHPosy-mathsin*5 );
surface.DrawLine( CHPosx+mathsin*2,CHPosy-mathcos*2,CHPosx+mathsin*5,CHPosy-mathcos*5 );
surface.DrawLine( CHPosx-mathsin*2,CHPosy+mathcos*2,CHPosx-mathsin*5,CHPosy+mathcos*5 );
elseif GetConVarString("Darkness_ESP_Crosshair_Type") == "Swastika" then
surface.SetDrawColor(red)
surface.DrawLine(ScrW()/2, ScrH()/2, ScrW()/2 + 20, ScrH()/2)
surface.DrawLine(ScrW()/2 + 20, ScrH()/2, ScrW()/2 + 20, ScrH()/2 + 20)
surface.DrawLine(ScrW()/2 , ScrH()/2, ScrW()/2 - 20, ScrH()/2)
surface.DrawLine(ScrW()/2 - 20 , ScrH()/2, ScrW()/2 - 20, ScrH()/2 - 20)
surface.DrawLine(ScrW()/2, ScrH()/2, ScrW()/2, ScrH()/2 - 20)
surface.DrawLine(ScrW()/2, ScrH()/2 - 20, ScrW()/2 + 20, ScrH()/2 - 20)
surface.DrawLine(ScrW()/2, ScrH()/2, ScrW()/2, ScrH()/2 + 20)
surface.DrawLine(ScrW()/2, ScrH()/2 + 20, ScrW()/2 - 20, ScrH()/2 + 20)
elseif GetConVarString("Darkness_ESP_Crosshair_Type") == "Basic" then
local x, y, s = ScrW() / 2, ScrH() / 2, 10
surface.SetDrawColor(GetColorCrosshair())
surface.DrawLine( x, y - s, x, y + s )
surface.DrawLine( x - s, y, x + s, y )
elseif GetConVarString("Darkness_ESP_Crosshair_Type") == "Diagonal" then
local x, y, w = ScrW() / 2, ScrH() / 2, 7
surface.SetDrawColor(GetColorCrosshair())
surface.DrawLine(x - w, y - w, x + w, y + w)
surface.DrawLine(x - w, y + w, x + w, y - w)
end
end
-- NOCLIP MARKER --
if GetConVarNumber("Darkness_MISC_CSNoclip") == 1 then
local me_pos = LocalPlayer():EyePos():ToScreen()
draw.SimpleText("YOU ARE HERE", "ESPFont_Small", me_pos.x,me_pos.y +10, red, 4, 1 ) // skiddie shit
end
end
end
end
end
end
for _, v in ipairs( ents.GetAll() ) do
if( v:IsValid() and Darkness :IsCustomEnt( v:GetClass() ) ) then
if GetConVarNumber("Darkness_ESP_Ents") == 1 then
local wepn = v:GetClass()
local wname = string.Replace(wepn,"weapon_","")
wname = string.Replace(wname,"_"," ")
wname = string.upper(wname)
local entpos = v:GetPos():ToScreen()
draw.SimpleText(wname, "ESPFont_Small", entpos.x,entpos.y +10, red, 4, 1 )
surface.SetDrawColor(255,0,255,255)
end
end
end
end
function XRay()
local mat = Darkness :CreateMaterial()
cam.Start3D(EyePos(), EyeAngles())
for k,v in pairs(ents.FindByClass("prop_*")) do
if (!CanSee(v)) then
PropColor = COLOR_NONVISIBLE
else
PropColor = COLOR_VISIBLE
end
if v:GetVelocity():Length() == 0 then
PropColor = COLOR_FROZEN
end
if v:GetVelocity():Length() == 0 and (!CanSee(v)) then
PropColor = COLOR_FROZEN_NV
end
if GetConVarNumber("Darkness_ESP_XRay") == 1 then
if IsValid(v) and table.HasValue(Darkness .props,v:GetModel()) and IsCloseEnough(v) then
render.SuppressEngineLighting( true )
render.SetColorModulation(PropColor.r / 255, PropColor.g / 255, PropColor.b / 255)
render.SetBlend(PropColor.a / 255);
render.MaterialOverride( mat )
v:DrawModel()
render.SuppressEngineLighting( false )
render.SetColorModulation(1,1,1)
render.MaterialOverride()
v:DrawModel()
v:SetRenderMode(RENDERMODE_TRANSALPHA)
else
v:SetColor(Color(255, 255, 255, 255))
end
end
end
cam.End3D()
end
/*****************************************
Name: Aimbot/Aim functions
Purpose: Aim for you, because you suck
Credits: isis
*******************************************/
local shouldFire = 0
// So ugly, ugh.
// There's better ways of doing this, but making a "toggle" function seemed best.
due to Errors