PostInvisionHook for Garry's Mod

Posts 114 of 14 · Page 1 of 1
InvisionHook for Garry's Mod
well here it is, something thats basically just copypasted together, but it works nice i guess.
it's my first real try at a cheat so go crazy on hating me for it.

Code:
print( "" );
print( "InvisionHook for Garry's Mod V1.0" );
print( "M4D3 BY 7H3 A$AP CR3W" );
print( "" );

function aimbot() -- Starting the function
    local ply = LocalPlayer() -- Getting ourselves
    local trace = util.GetPlayerTrace( ply ) -- Player Trace part. 1
    local traceRes = util.TraceLine( trace ) -- Player Trace part. 2
    if traceRes.HitNonWorld then -- If the aimbot aims at something that isn't the map..
        local target = traceRes.Entity -- It's obviously an entity.
        if target:IsPlayer() then -- But it must be a player.
            local targethead = target:LookupBone("ValveBiped.Bip01_Head1") -- In this aimbot we only aim for the head.
            local targetheadpos,targetheadang = target:GetBonePosition(targethead) -- Get the position/angle of the head.
            ply:SetEyeAngles((targetheadpos - ply:GetShootPos()):Angle()) -- And finally, we snap our aim to the head of the target.
        end
    end
end
hook.Add("Think","aimbot",aimbot) -- The hook will spam "aimbot" until it finds a target..

local function MESPCheck(v)
    if v:Alive() == true && v:Health() ~= 0 && v:Health() >= 0 && v ~= LocalPlayer() && LocalPlayer():Alive() then
        return true
    else
        return false
    end
end


hook.Add( "HUDPaint", "aimbot.Wallhack", function()
for k,v in pairs ( player.GetAll() ) do
 
        local Position = ( v:GetPos() + Vector( 0,0,80 ) ):ToScreen()
        local Name = ""
 
        if v == LocalPlayer() then Name = "" else Name = v:Name() end
 
end
 
end )
 
local shouldDraw = true
 
local hzCross = CreateClientConVar("HZ_Crosshair","0",false)
 
function Crosshair1()
surface.SetDrawColor(team.GetColor(LocalPlayer():Team()))
surface.DrawLine(ScrW() / 2 - 10, ScrH() / 2, ScrW() / 2 + 11 , ScrH() / 2)
surface.DrawLine(ScrW() / 2 - 0, ScrH() / 2 - 10, ScrW() / 2 - 0 , ScrH() / 2 + 11)
end
hook.Add("HUDPaint","CustomCross",Crosshair1)

local function coordinates( ent )
local min, max = ent:OBBMins(), ent:OBBMaxs()
local corners = {
        Vector( min.x, min.y, min.z ),
        Vector( min.x, min.y, max.z ),
        Vector( min.x, max.y, min.z ),
        Vector( min.x, max.y, max.z ),
        Vector( max.x, min.y, min.z ),
        Vector( max.x, min.y, max.z ),
        Vector( max.x, max.y, min.z ),
        Vector( max.x, max.y, max.z )
}
 
local minX, minY, maxX, maxY = ScrW() * 2, ScrH() * 2, 0, 0
for _, corner in pairs( corners ) do
        local onScreen = ent:LocalToWorld( corner ):ToScreen()
        minX, minY = math.min( minX, onScreen.x ), math.min( minY, onScreen.y )
        maxX, maxY = math.max( maxX, onScreen.x ), math.max( maxY, onScreen.y )
end
 
return minX, minY, maxX, maxY
end
hook.Add("HUDPaint", "Example", function()
for k,v in pairs(player.GetAll()) do
        local x1,y1,x2,y2 = coordinates(v)
         surface.SetDrawColor(color_white)
 
 
        surface.DrawLine( x1, y1, math.min( x1 + 5, x2 ), y1 )
        surface.DrawLine( x1, y1, x1, math.min( y1 + 5, y2 ) )
 
 
        surface.DrawLine( x2, y1, math.max( x2 - 5, x1 ), y1 )
        surface.DrawLine( x2, y1, x2, math.min( y1 + 5, y2 ) )
 
 
        surface.DrawLine( x1, y2, math.min( x1 + 5, x2 ), y2 )
        surface.DrawLine( x1, y2, x1, math.max( y2 - 5, y1 ) )
 
 
        surface.DrawLine( x2, y2, math.max( x2 - 5, x1 ), y2 )
        surface.DrawLine( x2, y2, x2, math.max( y2 - 5, y1 ) )
end
end)

local struc = {}
struc.pos = {}
struc.pos[1] = 100 -- x pos
struc.pos[2] = 200 -- y pos
struc.color = Color(255,0,0,255) -- Red
struc.text = "Hello World" -- Text
struc.font = "DefaultFixed" -- Font
struc.xalign = TEXT_ALIGN_CENTER -- Horizontal Alignment
struc.yalign = TEXT_ALIGN_CENTER -- Vertical Alignment
draw.Text( struc )

local InvisionHop = true
hook.Add("Think", "InvisionHop", function()
if InvisionHop then
     if (input.IsKeyDown( KEY_SPACE ) ) then
        if LocalPlayer():IsOnGround() then
            RunConsoleCommand("+jump")
            HasJumped = 1
        else
            RunConsoleCommand("-jump")
            HasJumped = 0
        end
    elseif InvisionHop and LocalPlayer():IsOnGround() then
        if HasJumped == 1 then
            RunConsoleCommand("-jump")
            HasJumped = 0
        end
    end
end
end)

concommand.Add("hop_toggle", function()
if InvisionHop then
    InvisionHop = !InvisionHop
    print( "InvisionHop Turned OFF" );
else
    InvisionHop = !InvisionHop
    print( "InvisionHop Turned ON" );
end
end)

local Spammer = CreateClientConVar("InvisionSpam", "0", true, false)
local function Spam()
    if Spammer:GetBool() then
        RunConsoleCommand("say", "INVISIONHOOK OWNS ME AND OWNS ALL.")
    end
end
timer.Create("Spammins", 1.5,0,Spam)

local function norecoil()    
if GetConVarNumber("norecoil") == 1 and LocalPlayer().GetActiveWeapon != nil then
local wep = LocalPlayer():GetActiveWeapon()
if wep.data then
wep.data.Recoil = 0
wep.data.Cone = 0
wep.data.Spread = 0
end
if wep.Primary then
wep.Primary.Recoil = 0
wep.Primary.Cone = 0
wep.Primary.Spread = 0
end
end
end
hook.Add("Tick", "norecoil", norecoil)

CreateClientConVar( "norecoil", 0, true, false)
commands are below. feel free to copy paste this without giving me any credit. i dont give a fuck really.

norecoil 1/0 | does what it says on the tin really
InvisionSpam 1/0 | spams the chat with some cancer
hop_toggle | toggles bunnyhopping

bunnyhop is on by default. the rest arent. also, this is a lua file. (if you couldn't tell)

aimbot is quite shit, only locks on when your mouse is near their head, aims to the neck because gmod's bones are cancer.
bunnyhop is ok i guess
esp is just box-corner esp
spam is simple as fuck
norecoil may or may not work i dont know tbh
it also has a custom piss yellow crosshair. i dont know what to say about that its just a crosshair

anyways have fun dont give credit if you copy paste you dont need to its not my code i just threw everything together.

INB4 HOW TO USE
wtf is this lol

print( "" );
print( "InvisionHook for Garry's Mod V1.0" );
print( "M4D3 BY 7H3 A$AP CR3W" );
print( "" );
print("\nInvisionHook for Garry's Mod V1.0\nM4D3 BY 7H3 A$AP CR3W\n"); ?
stop
just please stop
Quote Originally Posted by MrLethalVids View Post
print("\nInvisionHook for Garry's Mod V1.0\nM4D3 BY 7H3 A$AP CR3W\n"); ?
yeah see the thing is im terrible at coding


Quote Originally Posted by time007 View Post
stop
just please stop
nah ill keep trying until i get better
Quote Originally Posted by Cvhmine View Post
nah ill keep trying until i get better
This isn't exactly what I'd call "trying". It's just a cluster-fuck of unused functions and bad coding practices.
Quote Originally Posted by Cyaegha View Post
This isn't exactly what I'd call "trying". It's just a cluster-fuck of unused functions and bad coding practices.
have to start somewhere right
Quote Originally Posted by Cyaegha View Post
This isn't exactly what I'd call "trying". It's just a cluster-fuck of unused functions and bad coding practices.
>coding practices in lua
What's next Hungarian notation in ruby?
How do I execute the pFakelag + Antiaim?
Quote Originally Posted by memory420 View Post
How do I execute the pFakelag + Antiaim?
dont think it has that. if it does ill make a few commands to turn it on and off.




Quote Originally Posted by IAmPhage View Post
What's next Hungarian notation in ruby?
lol
Quote Originally Posted by Cvhmine View Post
dont think it has that. if it does ill make a few commands to turn it on and off.
You don't even know what "your" own script does?
Quote Originally Posted by Cyaegha View Post
You don't even know what "your" own script does?
because i copypasted most of it. i just added a bunch of scripts together. im not taking credit for this mate
Nice try, but i would suggest writing something small and easy then get into some tuts. nobody gets programming without getting there hands dirty in some code. watch some vids and read some lines in other cheats. you would learn better and faster if u tried to recreate the things u see.
Quote Originally Posted by Zekiheil View Post
Nice try, but i would suggest writing something small and easy then get into some tuts. nobody gets programming without getting there hands dirty in some code. watch some vids and read some lines in other cheats. you would learn better and faster if u tried to recreate the things u see.
i would do that but because i know basically nothing about coding, so i dont know what any of the shit does.
Quote Originally Posted by Cvhmine View Post
i would do that but because i know basically nothing about coding, so i dont know what any of the shit does.
so dont release something when you cant code
Posts 114 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?