-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathKat.lua
43 lines (32 loc) · 1.62 KB
/
Kat.lua
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
local library = sharedRequire('../../UILibrary.lua');
local Utility = sharedRequire('../../utils/Utility.lua');
local Services = sharedRequire('../../utils/Services.lua');
local LocalPlayer = Services:Get('Players').LocalPlayer;
local column1 = unpack(library.columns);
do -- // Functions
local whitelistedScripts = {'KnifeClient', 'RevolverClient'};
local oldNamecall;
oldNamecall = hookmetamethod(game, '__namecall', function(self, ...)
SX_VM_CNONE();
if(checkcaller()) then return oldNamecall(self, ...) end;
if(getnamecallmethod() == 'FindPartOnRayWithIgnoreList' and library.flags.silentAim) then
local caller = getcallingscript();
local scriptName = typeof(caller) == 'Instance' and caller.Name;
local method = getnamecallmethod();
if(table.find(whitelistedScripts, scriptName)) then
local args = {...};
local target = Utility:getClosestCharacter();
local myRoot = LocalPlayer.Character and LocalPlayer.Character.PrimaryPart;
local targetRoot = target and target.Character and target.Character.PrimaryPart;
if(targetRoot and myRoot) then
args[1] = Ray.new(myRoot.Position, (targetRoot.Position - myRoot.Position).Unit * 2000);
return oldNamecall(self, unpack(args));
end;
setnamecallmethod(method);
end;
end;
return oldNamecall(self, ...);
end);
end;
local Combat = column1:AddSection('Combat')
Combat:AddToggle({text = 'Silent Aim'});