-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.ah2
125 lines (94 loc) · 2.17 KB
/
test.ah2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
CoordMode "Pixel", "Screen"
CoordMode "Mouse", "Screen"
#include <imgui>
Persistent
#UseHook
#MaxThreads 255
#MaxThreadsPerHotkey 99
#SingleInstance force
KeyHistory 0
ListLines False
SetKeyDelay -1, -1
SetMouseDelay -1
SetDefaultMouseSpeed 0
SetWinDelay -1
SetControlDelay -1
toggleGui:=0
showdemo:=0
main()
main()
{
hwnd := GUICreate("cheat", 1, 1, -100, -100, 0, 0x80)
;hwnd := GUICreate("AHK ImGui", 1000, 1000, 500, 500, 0, 0x80)
WinShow(hwnd)
;WinSetAlwaysOnTop( 1,hwnd)
StyleColorsLight()
io := GetIO()
;NumPut("Int", true, io, 204) ;io.ConfigWindowsMoveFromTitleBarOnly := True ; // Only drag window by title bar
;SetWindowTitleAlign(0.5, 0.5)
EnableDocking(True)
while(PeekMsg())
{
BeginFrame()
Begin("cheat", 0, ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoScrollbar)
static b_show_demo_window := false
CheckBox("Show demo window", &b_show_demo_window)
If(b_show_demo_window)
ShowDemoWindow()
End()
EndFrame()
}
ExitApp()
return
}
sleep(value){
return DllCall("Sleep","UInt",value)
}
_PixelSearch(X1, Y1, X2, Y2, ColorID, Variation:=0) {
PixelSearch(&OutputVarX, &OutputVarY, X1, Y1, X2, Y2, ColorID, Variation)
Return [OutputVarX, OutputVarY]
}
deg2rad(degrees) {
return degrees * ((4*ATan(1)) / 180)
}
rad2deg(radians) {
return radians * (180 / (4*ATan(1)))
}
coord2deg(delta, fov, winwidth, winheight) {
;lookAt := delta * 2 / winwidth
;return rad2deg(atan(lookAt*tan(deg2rad(fov*0.5)))) ;degrees
return rad2deg(atan(((delta<<1)/winwidth)*tan(deg2rad(fov*0.5))))
}
deg2coord(delta, fov, winwidth, winheight) {
return winwidth*0.5/tan(deg2rad(fov*0.5))*tan(deg2rad(delta))
}
;Apex Legends must use this conversion
RealFov(fov, winwidth, winheight) {
raspectRatio := (winwidth/winheight)/(4/3)
return 2*rad2deg(atan(tan(deg2rad(fov*0.5))*raspectRatio))
}
INSERT:: ;Toggle Gui
{
global toggleGui:= !toggleGui
If toggleGui
{
WinHide "ahk_class ImGui Platform"
;global aimbot_enable := 1
}
Else
{
WinShow "ahk_class ImGui Platform"
WinActivate "ahk_class ImGui Platform"
;global aimbot_enable := 0
}
}
F5::
{
;ProcessClose "chrome.exe"
Reload
}
END::
{
;ProcessClose "chrome.exe"
ExitApp()
}