forked from soupg/DX9WareScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPingAdjust1.lua
More file actions
71 lines (57 loc) · 2.21 KB
/
PingAdjust1.lua
File metadata and controls
71 lines (57 loc) · 2.21 KB
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
local down_key = '[Z]'
local up_key = '[X]'
local info_location = {169, 7} -- X, Y Location of where the info box showing ping and sense is located
--// This table can be expanded / lowered / replaced. The scripts adjusts to any valid set.
local sets = {
[40] = 7.62,
[50] = 7.46,
[60] = 7.22,
[70] = 7.02,
[80] = 6.82,
[90] = 6.612,
[100] = 6.41,
[110] = 6.18,
}
--// Actual Script //--
local key = dx9.GetKey()
local Lib = loadstring(dx9.Get("https://raw.githubusercontent.com/soupg/DXLibUI/main/main.lua"))()
info_location[2] = info_location[2] - 19 -- Adjusting Offset
--// Init
if Lib.FirstRun then
for i,v in pairs(sets) do
_G.Lib.Increment = i -- Sets initial ping as last value from table
end
dx9.SetAimbotValue("prediction", sets[_G.Lib.Increment])
end
if key == up_key then
local root = 6969696969
for i,v in pairs(sets) do
if i > _G.Lib.Increment and i < root then
root = i
end
end
if root ~= 6969696969 then
_G.Lib.Increment = root
dx9.SetAimbotValue("prediction", sets[root])
Lib:Notify("[+] "..root)
end
elseif key == down_key then
local root = -6969696969
for i,v in pairs(sets) do
if i < _G.Lib.Increment and i > root then
root = i
end
end
if root ~= -6969696969 then
_G.Lib.Increment = root
dx9.SetAimbotValue("prediction", sets[_G.Lib.Increment])
Lib:Notify("[-] "..root)
end
end
--// Drawing Box
local text = "PRED: "..sets[_G.Lib.Increment].." | PING: "..down_key.." - ".._G.Lib.Increment.." + "..up_key
local length = dx9.CalcTextWidth(text)
dx9.DrawFilledBox( { info_location[1] + 4 , info_location[2] + 19 } , { info_location[1] + 4 + length + 12, info_location[2] + 22 + (18) } , Lib.CurrentRainbowColor )
dx9.DrawFilledBox( { info_location[1] + 5 , info_location[2] + 20 } , { info_location[1] + 3 + length + 12, info_location[2] + 21 + (18) } , Lib.OutlineColor )
dx9.DrawFilledBox( { info_location[1] + 6 , info_location[2] + 21 } , { info_location[1] + 2 + length + 12, info_location[2] + 20 + (18) } , Lib.MainColor )
dx9.DrawString( { info_location[1] + 11 , info_location[2] + 20 } , Lib.FontColor , text )