Strafe

Posts 19 of 9 · Page 1 of 1
Strafe
Okay, I have browsed the web for a while, and I am looking for a strafe hack for Gmod. I don't want this to be an insane hack. All I want this to do is that when I move my mouse left, I want it to press a. When I move my mouse right, I want it to press d. I need this to be near instant, and very realiable. I wanna use this for Bhop. Preferably it being .ahk, or if it's a different file type, please include a tutorial of how to use it. If you have any questions, please post. I am new to hacking, and I do understand that if it's .ahk it will be scripting.

Thank you in advance.
im not sure you would be able to do this in ahk, i have a lua auto strafer i could rip out of my hack if you want
Could you please? If you do, please tell me how to use it and so forth. I only have experience in .ahk and I'm new to .cfg, but I have no idea about lua.
You need to have a bypasser first of all, and I highly recommend you read the stickies on lua hacks. However, here you go.

Code:
concommand.Remove("+bhop")
concommand.Add("+bhop",function()
	local ply = LocalPlayer()
	local oldeyeang = ply:EyeAngles()
	hook.Add("CreateMove","hape",function(cmd)
		local neweyeang = ply:EyeAngles()
        if neweyeang.y > oldeyeang.y then
            oldeyeang = neweyeang
            RunConsoleCommand("+moveleft")
            RunConsoleCommand("-moveright")
            timer.Simple(.01, function() RunConsoleCommand("-moveleft") end)
        end

        if oldeyeang.y > neweyeang.y  then
            oldeyeang = neweyeang
            RunConsoleCommand("+moveright")
            RunConsoleCommand("-moveleft")
            timer.Simple(.01, function() RunConsoleCommand("-moveright") end)
	    end
	end)
end)
concommand.Remove("-hemp")
concommand.Add("-hemp",function()
    RunConsoleCommand("-moveleft")
    RunConsoleCommand("-moveright")
	hook.Remove("CreateMove","hape")
end)
I didn't test the edits i made, but it should work.
Alright. I found out how to hack lua. I made this into a .lua file and ran it through console with allowcslua 1.
It didn't work for me. I then went to a BunnyHop server, injected, and ran it. There was no difference in my bhop, and when I moved my mouse left/right, in the !showmykeys thing, it showed nothing being pressed automatically.
That's a auto strafer, a strafe hack does tons of strafes while you bhop.
Here's one released a long time ago by LordOfGears2.
pastebin code - TDdrDK5U

Code:
	

     
     
                        local bhop = { };
                        bhop.MetaPlayer = FindMetaTable( "Player")
                        bhop.oldKeyDown = bhop.MetaPlayer['KeyDown']
                        local bhopOn = true;
                        local bhopSOn = true;
                        local bhopHooks = { hook = { }, name = { } };
                        bhop.left = false
                        bhop.right = false
                        bhop.jump = false
                        bhop.what = true
                        function bhop.AddHook(hookname, name, func)
                                table.insert( bhopHooks.hook, hookname );
                                table.insert( bhopHooks.name, name );
                                hook.Add( hookname, name, func );
                        end
                        bhop.MetaPlayer['KeyDown'] = function( self, key )
                        if self != LocalPlayer() then return end
                            if (key == IN_MOVELEFT) and bhop.left then
                                return true
                            elseif (key == IN_MOVERIGHT) and bhop.right then
                                return true
                            elseif (key == IN_JUMP) and bhop.jump then
                                return true
                            else
                                return bhop.oldKeyDown( self, key )
                            end
                        end
     
                        function bhop.spamjump()
                                bhop.what = false
                                bhop.jump = true
                                timer.Simple(.05, function()
                                    bhop.jump = false
                                    timer.Simple( .25, function()
                                        bhop.what = true
                                    end)
                                end)
                        end
     
         
            local oldEyePos = LocalPlayer():EyeAngles()--This is to see where player is looking
            function bhop.CreateMove( cmd )
                            local JumpReleased = false;
                    if (cmd:KeyDown( IN_JUMP )) then
     
                            if (!JumpReleased) then
                                    if (bhopOn && !LocalPlayer():OnGround()) then --Bhop here
                                            cmd:RemoveKey( IN_JUMP );
                                            if bhop.what then
                                                bhop.spamjump()
                                            end
                                    end
                            else
                                    JumpReleased = false
                            end
                                           
                                    if(bhopSOn ) then--auto strafer
                                            local traceRes = LocalPlayer():EyeAngles()
                                   
                                            if( traceRes.y > oldEyePos.y ) then --If you move your mouse left, walk left, if you're jumping
                                                    oldEyePos = traceRes;
                                                    cmd:SetSideMove( -1000000 )
                                                    bhop.left = true
                                                    timer.Simple(1, function() bhop.left = false end)
                                            end
             
                                            if( oldEyePos.y > traceRes.y )  then --If you move your mouse right, move right,  while jumping
                                                    oldEyePos = traceRes;
                                                    cmd:SetSideMove( 1000000 )
                                                    bhop.right = true
                                                    timer.Simple(1, function() bhop.right = false end)
                                            end
                                    end
                    elseif (!JumpReleased) then
                            JumpReleased = true;
                    end
             
            end
               
            bhop.AddHook( "CreateMove", tostring(math.random(0, 133712837)), bhop.CreateMove )--add the hook
                concommand.Add( "bhop", function () --Toggler
                        if bhopOn then
                                print("Bhop off")
                                bhopOn = false;
                        else
                                print("Bhop on")
                                bhopOn = true;
                        end
                end )
                concommand.Add( "bhop_strafe",  function ()
                        if bhopSOn then
                                print("Strafe off")
                                bhopSOn = false;
                        else
                                print("Strafe on")
                                bhopSOn = true;
                        end
                end)
                concommand.Add("bhop_unload", function()
                    for i = 1, #bhopHooks.hook do
                    hook.Remove( bhopHooks.hook[i], bhopHooks.name[i] );
                    print( "Unhooked "..bhopHooks.hook[i].." using name "..bhopHooks.name[i] );
                end
                        concommand.Remove("bhop_strafe")
                        concommand.Remove("bhop")
                        bhopOn = false;
                        bhopSOn = false;
                        print("Bhop unloaded")
                        table.Empty( bhopHooks )
                        concommand.Remove( "bhop_unload" )
                end)
               
            print("Bhop loaded\nMade by LordOfGears, enjoy. \nLeave feedback, please\n\n\n")
S0nythecat, that is a good start for the kind of script that I want, but I find that it pressed both a and d at the same time. When I wiggle fast, this bring me to a complete stop. Does anyone else have a better Auto Strafer*?

EDIT: Scratch what I said about Melted Bullets script. I didn't realize you had to type +bhop into console until I read the script again. IT works great! Thanks, Bullet!!
Sorry about the dual post:
Is there a way to make it so Melted Bullet's auto strafer script only activates while pressing space? I find this script makes it impossible to serf on some bhop maps:
I also didn't want to make a separate post for this, but is there a fix to inject gmod multiple times? I mean that so I don't have to reboot gmod after I inject. aka, if I inject a server, and the server restarts, I have to reboot gmod to re-inject.
Posts 19 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?