This repository has been archived by the owner on May 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkimbladiLock
79 lines (65 loc) · 2.41 KB
/
kimbladiLock
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
-- // Dependencies
local Aiming = loadstring(game:HttpGet("https://pastebin.com/raw/jFAnx5jV"))()
Aiming.TeamCheck(false)
-- // Services
local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
-- // Vars
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local CurrentCamera = Workspace.CurrentCamera
local DaHoodSettings = {
SilentAim = true,
AimLock = true,
Prediction = 0.165,
AimLockKeybind = Enum.KeyCode.E
}
getgenv().DaHoodSettings = DaHoodSettings
-- // Overwrite to account downed
function Aiming.Check()
-- // Check A
if not (Aiming.Enabled == true and Aiming.Selected ~= LocalPlayer and Aiming.SelectedPart ~= nil) then
return false
end
-- // Check if downed
local Character = Aiming.Character(Aiming.Selected)
local KOd = Character:WaitForChild("BodyEffects")["K.O"].Value
local Grabbed = Character:FindFirstChild("GRABBING_CONSTRAINT") ~= nil
-- // Check B
if (KOd or Grabbed) then
return false
end
-- //
return true
end
-- // Hook
local __index
__index = hookmetamethod(game, "__index", function(t, k)
-- // Check if it trying to get our mouse's hit or target and see if we can use it
if (t:IsA("Mouse") and (k == "Hit" or k == "Target") and Aiming.Check()) then
-- // Vars
local SelectedPart = Aiming.SelectedPart
-- // Hit/Target
if (DaHoodSettings.SilentAim and (k == "Hit" or k == "Target")) then
-- // Hit to account prediction
local Hit = SelectedPart.CFrame + (SelectedPart.Velocity * DaHoodSettings.Prediction)
-- // Return modded val
return (k == "Hit" and Hit or SelectedPart)
end
end
-- // Return
return __index(t, k)
end)
-- // Aimlock
RunService:BindToRenderStep("AimLock", 0, function()
if (DaHoodSettings.AimLock and Aiming.Check() and UserInputService:IsKeyDown(DaHoodSettings.AimLockKeybind)) then
-- // Vars
local SelectedPart = Aiming.SelectedPart
-- // Hit to account prediction
local Hit = SelectedPart.CFrame + (SelectedPart.Velocity * DaHoodSettings.Prediction)
-- // Set the camera to face towards the Hit
CurrentCamera.CFrame = CFrame.lookAt(CurrentCamera.CFrame.Position, Hit.Position)
end
end)