-
-
Save yondonjamts1/dbf4ba96997f47dc3dd708ec47a5b383 to your computer and use it in GitHub Desktop.
PUBG MACRO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //ahk file type | |
| ; Configuration | |
| #NoEnv ;AHK updateleri icin uyumlu. | |
| #SingleInstance force ;sadece 1i calisir. | |
| SetTitleMatchMode, 2 ; | |
| #ifwinactive, TslGame ;PUBG acikken aktif. | |
| ; Variables | |
| isMouseShown() ;mouse gorunurde calismaz. | |
| ADS = 0 ;better aim. | |
| CrouchJump = 1 ; crouch jumping. | |
| AutoFire = 0 ; autofire. | |
| Compensation = 0 ;autofiring comp. | |
| compVal = 10 ;gericekme degeri. | |
| ; | |
| isMouseShown() ; | |
| { | |
| StructSize := A_PtrSize + 16 | |
| VarSetCapacity(InfoStruct, StructSize) | |
| NumPut(StructSize, InfoStruct) | |
| DllCall("GetCursorInfo", UInt, &InfoStruct) | |
| Result := NumGet(InfoStruct, 8) | |
| if Result > 1 | |
| Return 1 | |
| else | |
| Return 0 | |
| } | |
| Loop | |
| { | |
| if isMouseShown() == 1 | |
| Suspend On | |
| else | |
| Suspend Off | |
| Sleep 1 | |
| } | |
| ; Fast Aiming | |
| *RButton:: ;Fast Aiming [default: Right Button] | |
| if ADS = 1 | |
| { ;aktifse mouse tusuna basip birakir . | |
| SendInput {RButton Down} | |
| SendInput {RButton Up} | |
| KeyWait, RButton | |
| SendInput {RButton Down} | |
| SendInput {RButton Up} | |
| } else { ;degilse sadece basili tutar. | |
| SendInput {RButton Down} | |
| KeyWait, RButton | |
| SendInput {RButton Up} | |
| } | |
| Return | |
| ; CrouchJump | |
| *XButton2:: ;Crouch jump [default: 4] | |
| if CrouchJump = 1 | |
| { | |
| SendInput {Space down} | |
| SendInput {c down} | |
| SendInput {Space up} | |
| Sleep 500 ;Keeps crouching 0.5 seconds to improve the jump. | |
| SendInput {c up} | |
| } | |
| Return | |
| ; AutoFire | |
| ~$*LButton:: ;AutoFire | |
| if AutoFire = 1 | |
| { | |
| Loop | |
| { | |
| GetKeyState, LButton, LButton, P | |
| if LButton = U | |
| Break | |
| MouseClick, Left,,, 1 | |
| Gosub, RandomSleep ;Call to RandomSleep. | |
| if Compensation = 1 | |
| { | |
| mouseXY(0, compVal) ;If active, call to Compensation. | |
| } | |
| } | |
| } | |
| Return | |
| RandomSleep: ;Random timing between clicks, just in case. | |
| Random, random, 14, 25 | |
| Sleep %random%-5 | |
| Return | |
| ; Compensation | |
| mouseXY(x,y) ;recoil (valuesu compVal'da). | |
| { | |
| DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) | |
| } | |
| ; Tooltips | |
| ToolTip(label) tooltip | |
| { | |
| ToolTip, %label%, 930, 650 ;Tooltips crosshairin altinda | |
| SetTimer, RemoveToolTip, 1300 ;1.3s sonra tooltipi kaldirir. | |
| return | |
| RemoveToolTip: | |
| SetTimer, RemoveToolTip, Off | |
| ToolTip | |
| Return | |
| } | |
| ; Hotkeyleri degistirme | |
| ;Toggles | |
| *NumPad1::(ADS = 0 ? (ADS := 1,ToolTip("ADS ON")) : (ADS := 0,ToolTip("ADS OFF"))) | |
| *NumPad2::(AutoFire = 0 ? (AutoFire := 1,ToolTip("AutoFire ON")) : (AutoFire := 0,ToolTip("AutoFire OFF"))) | |
| *NumPad3::(Compensation = 0 ? (Compensation := 1,ToolTip("Compensation ON")) : (Compensation := 0,ToolTip("Compensation OFF"))) | |
| *NumPad0::(CrouchJump = 0 ? (CrouchJump := 1,ToolTip("CrouchJump ON")) : (CrouchJump := 0,ToolTip("CrouchJump OFF"))) | |
| *NumpadAdd:: ;compensation. | |
| compVal := compVal + 5 | |
| ToolTip("Compensation " . compVal) | |
| Return | |
| *NumpadSub:: ;Substract. | |
| if compVal > 0 | |
| { | |
| compVal := compVal - 5 | |
| ToolTip("Compensation " . compVal) | |
| } | |
| Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment