OutdatedghLib - I got bored

Posts 1–15 of 16 · Page 1 of 2
ghLib - I got bored
ghLib v1
by cdrizzle
like really bored

Features:


(* = required)
Aimbot:
  • Visible(Player pEntity*, Vector vecStart*, Vector vecEnd*) Function
  • GetPosition(Player pEntity*, String strBone*, bool bPredictionOverride = false) Function
  • BoneScan(Player pEntity*, Vector vecShootPos = pLocalShootPos, String strBone = head) Function
  • CheckValid(Player pEntity*, bool bIgnoreTeam = false, bool bIgnoreFriends = false, bool bCheckVisible = false, bool bBoneScan = false, String strBone = head) Function

Anti-Anti-Aim:
  • SetPlayerAngles(Player pEntity*, Angle angAngle*) Function

Miscellaneous:
  • FakeLag(UserCmd userCmd*, int iChoke, int iSend) Function
  • Print(Color colPrefix*, String strPrefix*, color colMessage*, string strMessage*, bool bInChat = false) Function

Drawing:
  • FillRGBA(int iX*, int iY*, int iW*, int iH*, Color colDrawColor*) Function
  • OutlineRGBA(int iX*, int iY*, int iW*, int iH*, Color colDrawColor*) Function
  • DrawText(String strText*, String strFont*, int iX*, int iY*, Color colDrawColor*, bool bCenterX = false, bool bCenterY = false, bool bShadow = false, int iShadowOffsetX = 2, int iShadowOffsetY = 2, Color colShadowColor = Color(255, 255, 255, 255)) Function


Source:

Code:
/*
    [gh]Lib v1

    Credits:
        cdriza - 100% of the code
*/

require("bsendpacket")

local pLocalPlayer = LocalPlayer()
local ghLib = {}

/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Aimbot Functions

////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

ghLib.Bones = {
    "ValveBiped.Bip01_Head1",
    "ValveBiped.Anim_Attachment_RH",
    "ValveBiped.Bip01_Spine",
    "ValveBiped.Bip01_R_Hand",
    "ValveBiped.Bip01_R_Forearm",
    "ValveBiped.Bip01_R_Foot",
    "ValveBiped.Bip01_R_Thigh",
    "ValveBiped.Bip01_R_Calf",
    "ValveBiped.Bip01_R_Shoulder",
    "ValveBiped.Bip01_R_Elbow",
    "ValveBiped.Bip01_L_Hand",
    "ValveBiped.Bip01_L_Forearm",
    "ValveBiped.Bip01_L_Foot",
    "ValveBiped.Bip01_L_Thigh",
    "ValveBiped.Bip01_L_Calf",
    "ValveBiped.Bip01_L_Shoulder",
    "ValveBiped.Bip01_L_Elbow",
}

function ghLib.Visible(pEntity, vecStart, vecEnd)
    local tdData = {
        start = vecStart,
        endpos = vecend,
        filter = {pLocalPlayer, pEntity},
        mask = MASK_SHOT,
    }

    return util.TraceLine(tdData).Fraction == 1
end

function ghLib.GetPosition(pEntity, strBone, bPredictionOverride)
    local vecPos = pEntity:GetBonePosition(pEntity:LookupBone(strBone))

    if (!bPredictionOverride) then
        local vecVelocity = pEntity:GetVelocity()
        vecPos = vecPos + (vecVelocity * engine.TickInterval())

        vecVelocity = pLocalPlayer:GetVelocity()
        vecVelocity.z = 0

        vecPos = vecPos - (vecVelocity * engine.TickInterval())
    end

    return vecPos
end

function ghLib.BoneScan(pEntity, vecShootPos, strBone)
    local vecShootPos = vecShootPos && vecShootPos || pLocalPlayer:GetShootPos()
    local strDefaultBone = strBone && strBone || "ValveBiped.Bip01_Head1"
    local vecPos = ghLib.GetPosition(pEntity, strDefaultBone)

    if (ghLib.Visible(pEntity, vecShootPos, vecPos)) then
        return true, vecPos
    else
        for iIndex = 1, #ghLib.Bones do
            local strBoneID = ghLib.Bones[iIndex]
                    
            if (strBoneID == strDefaultBone) then
                continue                
            end

            vecPos = ghLib.GetPosition(pEntity, strBoneID)

            if (!ghLib.Visible(pEntity, vecShootPos, vecPos)) then
                if (iIndex == #ghLib.Bones) then
                    return false
                end

                continue
            else
                return true, vecPos
            end
        end
    end

    return false
end

function ghLib.CheckValid(pEntity, bIgnoreTeam, bIgnoreFriends, bCheckVisible, bBoneScan, strBone)
    local vecShootPos = pLocalPlayer:GetShootPos()

    if (!pEntity) then return false end
    if (pEntity == pLocalPlayer) then return false end
    if (!pEntity:IsPlayer()) then return false end
    if (pEntity:IsDormant()) then return false end
    if (0 >= pEntity:Health()) then return false end
    if (bIgnoreTeam && pEntity:Team() == pLocalPlayer:Team()) then return false end
    if (bIgnoreFriends && pEntity:GetFriendStatus() == "friend") then return false end

    if (bCheckVisible) then
        local strDefaultBone = strBone && strBone || "ValveBiped.Bip01_Head1"
        local vecPos = ghLib.GetPosition(pEntity, strDefaultBone)

        if (bBoneScan) then
            local bFound, vecBonePos = ghLib.BoneScan(pEntity, vecShootPos, strDefaultBone)
            
            return bFound, vecBonePos
        else
            return ghLib.Visible(pEntity, vecShootPos, vecPos), vecPos
        end
    end

    return true
end

/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Anti-Anti-Aim {SetAngles}

////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

ghLib.Angles = {}

function ghLib.SetPlayerAngles(pEntity, angAngle)
    angAngle.y = 
    ghLib.Angles[pEntity] = angAngle
end

/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Miscellaneous

////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

ghLib.FakeLagTick = 0

function ghLib.FakeLag(userCmd, iChoke, iSend)
    if (userCmd:CommandNumber() == 0) then
        return true
    end

    if (!iChoke) then
        iChoke = 10
    end

    if (!iSend) then
        iSend = math["Round"](iChoke / 2, 0)
    end

    if (iChoke >= 15 || 1 >= iChoke || 0 >= iSend) then
        bSendPacket = true
        return false
    end

    ghLib.FakeLagTick = ghLib.FakeLagTick + 1

    if (ghLib.FakeLagTick > (iChoke + iSend)) then
        ghLib.FakeLagTick = 1
    end

    if (iSend >= ghLib.FakeLagTick) then
        bSendPacket = true
    else
        bSendPacket = false
    end

    return true
end

function ghLib.Print(colPrefix, strPrefix, colMessage, strMessage, bChat)
    local fPrint = bChat && chat.AddText || MsgC
    strMessage = strMessage .. bChat && "" || "\n"
    fPrint(colPrefix, "[" .. strPrefix .. "]", colMessage, strMessage)
end

/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Drawing

////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

function ghLib.FillRGBA(iX, iY, iW, iH, colDrawColor)
    surface.SetDrawColor(colDrawColor.r, colDrawColor.g, colDrawColor.b, colDrawColor.a && colDrawColor.a || 255)
    surface.DrawRect(iX, iY, iW, iH)
end

function ghLib.OutlineRGBA(iX, iY, iW, iH, colDrawColor)
    surface.SetDrawColor(colDrawColor.r, colDrawColor.g, colDrawColor.b, colDrawColor.a && colDrawColor.a || 255)
    surface.DrawOutlinedRect(iX, iY, iW, iH)
end

function ghLib.DrawText(strText, strFont, iX, iY, colDrawColor, bCenterX, bCenterY, bShadow, iShadowOffsetX, iShadowOffsetY, colShadowColor)
    surface.SetFont(strFont)

    local iW, iH = surface.GetTextSize(strText)

    surface.SetTextPos(math["Round"](iX - (bCenterX && iW / 2 || 0), 0), math["Round"](iY - (bCenterY && iH / 2 || 0), 0))
    surface.SetTextColor(colDrawColor.r, colDrawColor.g, colDrawColor.b, colDrawColor.a && colDrawColor.a || 255)
    surface.DrawText(strText)

    if (bShadow) then
        iShadowOffsetX = iShadowOffsetX && iShadowOffsetX || 2
        iShadowOffsetY = iShadowOffsetY && iShadowOffsetY || 2
        colShadowColor = colShadowColor && colShadowColor || Color(255, 255, 255)

        ghLib.DrawText(strText, strFont, iX + iShadowOffsetX, iY + iShadowOffsetY, colShadowColor, bCenterX, bCenterY)
    end
end


/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Hooks

////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

function ghLib._SetAngles()
    for pEntity, angAngle in next, ghLib.Angles do
        pEntity:SetPoseParameter("aim_pitch", angAngle.x)
        pEntity:SetRenderAngles(Angle(0, angAngle.y, 0))
    end
end

hook.Add("PreDrawOpaqueRenderables", "{ghLib} SetAngles", ghLib._SetAngles)

/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Cheat

////////////////////////////////////////////////////////////////////////////////////////////////////////////*/


// Your cheat goes here!
Usage:
ghLib.*function*(args)


glhf
Great, i'm downloading garry's mod again just to try it
Quote Originally Posted by OJthejuiceman View Post
iShit myself
Implying you could even do any better?

Code:
function nanodesu.FakeLag(ucmd)
	bSendPacket = (ucmd:CommandNumber() % nanodesu.GetVar("hvFakeLagFactor")) == 0
end
Quote Originally Posted by Ariaa View Post
Implying you could even do any better?

Code:
function nanodesu.FakeLag(ucmd)
	bSendPacket = (ucmd:CommandNumber() % nanodesu.GetVar("hvFakeLagFactor")) == 0
end
no but ive seen alot better lol trust me.. even better than you could ever fathom to fabricate
Quote Originally Posted by Ariaa View Post
Implying you could even do any better?

Code:
function nanodesu.FakeLag(ucmd)
	bSendPacket = (ucmd:CommandNumber() % nanodesu.GetVar("hvFakeLagFactor")) == 0
end
already pasted into OJHEK V6.9a {CDRIZA SUX MY DIK XDDDDDDDDDD EDITION}
Code:
Lollipop.FakeLag = function( cmd ) 
	
	if ( !Lollipop.GetVar("FakeLag" , "HVH" ) || ( cmd:CommandNumber( ) == 0 ) || !Lollipop.Ply:Alive( ) || ( Lollipop.CanAttack( ) && cmd:KeyDown( IN_ATTACK ) ) ) then return end 

	if Lollipop.Variables.FLCTick < Lollipop.GetVar( "FakeChockRate" , "HVH" ) then
		
		Lollipop.Variables.FLCTick = Lollipop.Variables.FLCTick + 1
		
		bSendPacket = false

	else
		
		if Lollipop.Variables.FLSTick <= Lollipop.GetVar( "FakeSendRate" , "HVH" ) then
			
			Lollipop.Variables.FLSTick = Lollipop.Variables.FLSTick + 1
			
			--bSendPacket = true 
		
		else
			
			Lollipop.Variables.FLSTick = 1
			
			Lollipop.Variables.FLCTick = 1
			
		end

	end

end
Quote Originally Posted by zombiiju View Post
Code:
Lollipop.FakeLag = function( cmd ) 
	
	if ( !Lollipop.GetVar("FakeLag" , "HVH" ) || ( cmd:CommandNumber( ) == 0 ) || !Lollipop.Ply:Alive( ) || ( Lollipop.CanAttack( ) && cmd:KeyDown( IN_ATTACK ) ) ) then return end 

	if Lollipop.Variables.FLCTick < Lollipop.GetVar( "FakeChockRate" , "HVH" ) then
		
		Lollipop.Variables.FLCTick = Lollipop.Variables.FLCTick + 1
		
		bSendPacket = false

	else
		
		if Lollipop.Variables.FLSTick <= Lollipop.GetVar( "FakeSendRate" , "HVH" ) then
			
			Lollipop.Variables.FLSTick = Lollipop.Variables.FLSTick + 1
			
			--bSendPacket = true 
		
		else
			
			Lollipop.Variables.FLSTick = 1
			
			Lollipop.Variables.FLCTick = 1
			
		end

	end

end
That's some pretty shit code dude

I can do the exact same thing in 1 line:
Code:
bSendPacket = ((cmdnum % (choke + send)) < send)
Quote Originally Posted by Ariaa View Post
That's some pretty shit code dude

I can do the exact same thing in 1 line:
Code:
bSendPacket = ((cmdnum % (choke + send)) < send)

Nice //2shrtniger
That hungarian notation gave me aids

YOU DONT USE THAT IN LUA
Nice i'll copy and paste this in my hacks!
so im kinda new to this. where exactly do i put this code.
You get notepad++, then you go into your garrysmog>garrysmog>lua then make a new notepad++
Past the code inside, save as a Lua. And ya done, then once ingame bypass sv_allowcslua (isn't hard) then do lua_openscript_lua (name)
Thank you, needed it.
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us