· 6 years ago · Dec 14, 2019, 11:04 AM
1print("Yeah this works on some exploits. It works on free exploits that are based on Axon, or EasyExploits Api and other that I may not know about. But uhhhh you make this work my holding shift. It makes you jump and if you look left it should press A and if you look right then it should press D. Look at my pastebin profile for the ahk version.")
2
3local Players = game:GetService"Players"
4local LocalPlayer = Players.LocalPlayer
5local UIS = game:GetService"UserInputService"
6local Mouse = LocalPlayer:GetMouse()
7local Toggle = false
8local Keys = {}
9local Key = Enum.KeyCode.LeftShift
10
11local function GetKeyState(key)
12 if (Keys[key] == nil) then Keys[key] = false end
13 return Keys[key]
14end
15
16local function PressKey(key)
17 if (not GetKeyState(key)) then
18 keypress(key)
19 Keys[key] = true
20 end
21end
22
23local function ReleaseKey(key)
24 if (GetKeyState(key)) then
25 keyrelease(key)
26 Keys[key] = false
27 end
28end
29
30local function ReleaseKeys()
31 for i, v in next, Keys do
32 if (v == true) then
33 keyrelease(i)
34 Keys[i] = false
35 end
36 end
37end
38
39local Move = UIS.InputChanged:connect(function(input)
40 if (Toggle) then
41 local delta = input.Delta
42 if (deltaX == 0) then
43 ReleaseKeys()
44 elseif (delta.X < 0) then
45 ReleaseKey(0x44) -- D
46 PressKey(0x41) -- A
47 elseif (delta.X > 0) then
48 ReleaseKey(0x41) -- A
49 PressKey(0x44) -- D
50 end
51 else
52 ReleaseKeys()
53 end
54end)
55
56local KeyDown = UIS.InputBegan:connect(function(input)
57 if (input.KeyCode == Key) then
58 PressKey(0x20)
59 print("[Strafehack] On")
60 Toggle = true
61 end
62end)
63
64local KeyUp = UIS.InputEnded:connect(function(input)
65 if (input.KeyCode == Key) then
66 ReleaseKey(0x20)
67 print("[Strafehack] Off")
68 Toggle = false
69 end
70end)
71
72_G.AC_DC = function() KeyUp:disconnect() KeyDown:disconnect() Move:disconnect() end
73
74print("[Strafehack] Initiated")