Advertisement
Guest User

hood customs aimlock

a guest
Jul 22nd, 2022
17,958
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.82 KB | None | 0 0
  1. --.gg/lockers runs you
  2. --Made by sparkyz
  3.  
  4. getgenv().Prediction = 0.13
  5. getgenv().AimPart = "HumanoidRootPart"
  6. getgenv().Key = "C"
  7. getgenv().DisableKey = "P"
  8.  
  9. getgenv().FOV = true
  10. getgenv().ShowFOV = false
  11. getgenv().FOVSize = 55
  12.  
  13. --// Variables (Service)
  14.  
  15. local Players = game:GetService("Players")
  16. local RS = game:GetService("RunService")
  17. local WS = game:GetService("Workspace")
  18. local GS = game:GetService("GuiService")
  19. local SG = game:GetService("StarterGui")
  20.  
  21. --// Variables (regular)
  22.  
  23. local LP = Players.LocalPlayer
  24. local Mouse = LP:GetMouse()
  25. local Camera = WS.CurrentCamera
  26. local GetGuiInset = GS.GetGuiInset
  27.  
  28. local AimlockState = true
  29. local Locked
  30. local Victim
  31.  
  32. local SelectedKey = getgenv().Key
  33. local SelectedDisableKey = getgenv().DisableKey
  34.  
  35. --// Notification function
  36.  
  37. function Notify(tx)
  38. SG:SetCore("SendNotification", {
  39. Title = "HELL HOUND",
  40. Text = tx,
  41. Duration = 5
  42. })
  43. end
  44.  
  45. --// Check if aimlock is loaded
  46.  
  47. if getgenv().Loaded == true then
  48. Notify("Aimlock is already loaded!")
  49. return
  50. end
  51.  
  52. getgenv().Loaded = true
  53.  
  54. --// FOV Circle
  55.  
  56. local fov = Drawing.new("Circle")
  57. fov.Filled = false
  58. fov.Transparency = 1
  59. fov.Thickness = 1
  60. fov.Color = Color3.fromRGB(255, 255, 0)
  61. fov.NumSides = 1000
  62.  
  63. --// Functions
  64.  
  65. function update()
  66. if getgenv().FOV == true then
  67. if fov then
  68. fov.Radius = getgenv().FOVSize * 2
  69. fov.Visible = getgenv().ShowFOV
  70. fov.Position = Vector2.new(Mouse.X, Mouse.Y + GetGuiInset(GS).Y)
  71.  
  72. return fov
  73. end
  74. end
  75. end
  76.  
  77. function WTVP(arg)
  78. return Camera:WorldToViewportPoint(arg)
  79. end
  80.  
  81. function WTSP(arg)
  82. return Camera.WorldToScreenPoint(Camera, arg)
  83. end
  84.  
  85. function getClosest()
  86. local closestPlayer
  87. local shortestDistance = math.huge
  88.  
  89. for i, v in pairs(game.Players:GetPlayers()) do
  90. local notKO = v.Character:WaitForChild("BodyEffects")["K.O"].Value ~= true
  91. local notGrabbed = v.Character:FindFirstChild("GRABBING_COINSTRAINT") == nil
  92.  
  93. if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild(getgenv().AimPart) and notKO and notGrabbed then
  94. local pos = Camera:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  95. local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(Mouse.X, Mouse.Y)).magnitude
  96.  
  97. if (getgenv().FOV) then
  98. if (fov.Radius > magnitude and magnitude < shortestDistance) then
  99. closestPlayer = v
  100. shortestDistance = magnitude
  101. end
  102. else
  103. if (magnitude < shortestDistance) then
  104. closestPlayer = v
  105. shortestDistance = magnitude
  106. end
  107. end
  108. end
  109. end
  110. return closestPlayer
  111. end
  112.  
  113. --// Checks if key is down
  114.  
  115. Mouse.KeyDown:Connect(function(k)
  116. SelectedKey = SelectedKey:lower()
  117. SelectedDisableKey = SelectedDisableKey:lower()
  118. if k == SelectedKey then
  119. if AimlockState == true then
  120. Locked = not Locked
  121. if Locked then
  122. Victim = getClosest()
  123.  
  124. Notify("Locked onto: "..tostring(Victim.Character.Humanoid.DisplayName))
  125. else
  126. if Victim ~= nil then
  127. Victim = nil
  128.  
  129. Notify("Unlocked!")
  130. end
  131. end
  132. else
  133. Notify("Aimlock is not enabled!")
  134. end
  135. end
  136. if k == SelectedDisableKey then
  137. AimlockState = not AimlockState
  138. end
  139. end)
  140.  
  141. --// Loop update FOV and loop camera lock onto target
  142.  
  143. RS.RenderStepped:Connect(function()
  144. update()
  145. if AimlockState == true then
  146. if Victim ~= nil then
  147. Camera.CFrame = CFrame.new(Camera.CFrame.p, Victim.Character[getgenv().AimPart].Position + Victim.Character[getgenv().AimPart].Velocity*getgenv().Prediction)
  148. end
  149. end
  150. end)
  151. while wait() do
  152. if getgenv().AutoPrediction == true then
  153. local pingvalue = game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValueString()
  154. local split = string.split(pingvalue,'(')
  155. local ping = tonumber(split[1])
  156. if ping < 225 then
  157. getgenv().Prediction = 1.4
  158. elseif ping < 215 then
  159. getgenv().Prediction = 1.2
  160. elseif ping < 205 then
  161. getgenv().Prediction = 1.0
  162. elseif ping < 190 then
  163. getgenv().Prediction = 0.10
  164. elseif ping < 180 then
  165. getgenv().Prediction = 0.12
  166. elseif ping < 170 then
  167. getgenv().Prediction = 0.15
  168. elseif ping < 160 then
  169. getgenv().Prediction = 0.18
  170. elseif ping < 150 then
  171. getgenv().Prediction = 0.110
  172. elseif ping < 140 then
  173. getgenv().Prediction = 0.113
  174. elseif ping < 130 then
  175. getgenv().Prediction = 0.116
  176. elseif ping < 120 then
  177. getgenv().Prediction = 0.120
  178. elseif ping < 110 then
  179. getgenv().Prediction = 0.124
  180. elseif ping < 105 then
  181. getgenv().Prediction = 0.127
  182. elseif ping < 90 then
  183. getgenv().Prediction = 0.130
  184. elseif ping < 80 then
  185. getgenv().Prediction = 0.133
  186. elseif ping < 70 then
  187. getgenv().Prediction = 0.136
  188. elseif ping < 60 then
  189. getgenv().Prediction = 0.15038
  190. elseif ping < 50 then
  191. getgenv().Prediction = 0.15038
  192. elseif ping < 40 then
  193. getgenv().Prediction = 0.145
  194. elseif ping < 30 then
  195. getgenv().Prediction = 0.155
  196. elseif ping < 20 then
  197. getgenv().Prediction = 0.157
  198. end
  199. end
  200. end
  201.  
Advertisement
Comments
  • awpxxvzz
    2 years
    # C 5.83 KB | 0 0
    1. --.gg/lockers runs you
    2. --Made by sparkyz
    3.  
    4. getgenv().Prediction = 0.13
    5. getgenv().AimPart = "HumanoidRootPart"
    6. getgenv().Key = "C"
    7. getgenv().DisableKey = "P"
    8.  
    9. getgenv().FOV = true
    10. getgenv().ShowFOV = false
    11. getgenv().FOVSize = 55
    12.  
    13. --// Variables (Service)
    14.  
    15. local Players = game:GetService("Players")
    16. local RS = game:GetService("RunService")
    17. local WS = game:GetService("Workspace")
    18. local GS = game:GetService("GuiService")
    19. local SG = game:GetService("StarterGui")
    20.  
    21. --// Variables (regular)
    22.  
    23. local LP = Players.LocalPlayer
    24. local Mouse = LP:GetMouse()
    25. local Camera = WS.CurrentCamera
    26. local GetGuiInset = GS.GetGuiInset
    27.  
    28. local AimlockState = true
    29. local Locked
    30. local Victim
    31.  
    32. local SelectedKey = getgenv().Key
    33. local SelectedDisableKey = getgenv().DisableKey
    34.  
    35. --// Notification function
    36.  
    37. function Notify(tx)
    38.     SG:SetCore("SendNotification", {
    39.         Title = "HELL HOUND",
    40.         Text = tx,
    41.         Duration = 5
    42.     })
    43. end
    44.  
    45. --// Check if aimlock is loaded
    46.  
    47. if getgenv().Loaded == true then
    48.     Notify("Aimlock is already loaded!")
    49.     return
    50. end
    51.  
    52. getgenv().Loaded = true
    53.  
    54. --// FOV Circle
    55.  
    56. local fov = Drawing.new("Circle")
    57. fov.Filled = false
    58. fov.Transparency = 1
    59. fov.Thickness = 1
    60. fov.Color = Color3.fromRGB(255, 255, 0)
    61. fov.NumSides = 1000
    62.  
    63. --// Functions
    64.  
    65. function update()
    66.     if getgenv().FOV == true then
    67.         if fov then
    68.             fov.Radius = getgenv().FOVSize * 2
    69.             fov.Visible = getgenv().ShowFOV
    70.             fov.Position = Vector2.new(Mouse.X, Mouse.Y + GetGuiInset(GS).Y)
    71.  
    72.             return fov
    73.         end
    74.     end
    75. end
    76.  
    77. function WTVP(arg)
    78.     return Camera:WorldToViewportPoint(arg)
    79. end
    80.  
    81. function WTSP(arg)
    82.     return Camera.WorldToScreenPoint(Camera, arg)
    83. end
    84.  
    85. function getClosest()
    86.     local closestPlayer
    87.     local shortestDistance = math.huge
    88.  
    89.     for i, v in pairs(game.Players:GetPlayers()) do
    90.         local notKO = v.Character:WaitForChild("BodyEffects")["K.O"].Value ~= true
    91.         local notGrabbed = v.Character:FindFirstChild("GRABBING_COINSTRAINT") == nil
    92.  
    93.         if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild(getgenv().AimPart) and notKO and notGrabbed then
    94.             local pos = Camera:WorldToViewportPoint(v.Character.PrimaryPart.Position)
    95.             local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(Mouse.X, Mouse.Y)).magnitude
    96.  
    97.             if (getgenv().FOV) then
    98.                 if (fov.Radius > magnitude and magnitude < shortestDistance) then
    99.                     closestPlayer = v
    100.                     shortestDistance = magnitude
    101.                 end
    102.             else
    103.                 if (magnitude < shortestDistance) then
    104.                     closestPlayer = v
    105.                     shortestDistance = magnitude
    106.                 end
    107.             end
    108.         end
    109.     end
    110.     return closestPlayer
    111. end
    112.  
    113. --// Checks if key is down
    114.  
    115. Mouse.KeyDown:Connect(function(k)
    116.     SelectedKey = SelectedKey:lower()
    117.     SelectedDisableKey = SelectedDisableKey:lower()
    118.     if k == SelectedKey then
    119.         if AimlockState == true then
    120.             Locked = not Locked
    121.             if Locked then
    122.                 Victim = getClosest()
    123.  
    124.                 Notify("Locked onto: "..tostring(Victim.Character.Humanoid.DisplayName))
    125.             else
    126.                 if Victim ~= nil then
    127.                     Victim = nil
    128.  
    129.                     Notify("Unlocked!")
    130.                 end
    131.             end
    132.         else
    133.             Notify("Aimlock is not enabled!")
    134.         end
    135.     end
    136.     if k == SelectedDisableKey then
    137.         AimlockState = not AimlockState
    138.     end
    139. end)
    140.  
    141. --// Loop update FOV and loop camera lock onto target
    142.  
    143. RS.RenderStepped:Connect(function()
    144.     update()
    145.     if AimlockState == true then
    146.         if Victim ~= nil then
    147.             Camera.CFrame = CFrame.new(Camera.CFrame.p, Victim.Character[getgenv().AimPart].Position + Victim.Character[getgenv().AimPart].Velocity*getgenv().Prediction)
    148.         end
    149.     end
    150. end)
    151.     while wait() do
    152.         if getgenv().AutoPrediction == true then
    153.         local pingvalue = game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValueString()
    154.         local split = string.split(pingvalue,'(')
    155.         local ping = tonumber(split[1])
    156.             if ping < 225 then
    157.             getgenv().Prediction = 1.4
    158.         elseif ping < 215 then
    159.             getgenv().Prediction = 1.2
    160.         elseif ping < 205 then
    161.             getgenv().Prediction = 1.0
    162.         elseif ping < 190 then
    163.             getgenv().Prediction = 0.10
    164.         elseif ping < 180 then
    165.             getgenv().Prediction = 0.12
    166.         elseif ping < 170 then
    167.             getgenv().Prediction = 0.15
    168.         elseif ping < 160 then
    169.             getgenv().Prediction = 0.18
    170.         elseif ping < 150 then
    171.             getgenv().Prediction = 0.110
    172.         elseif ping < 140 then
    173.             getgenv().Prediction = 0.113
    174.         elseif ping < 130 then
    175.             getgenv().Prediction = 0.116
    176.         elseif ping < 120 then
    177.             getgenv().Prediction = 0.120
    178.         elseif ping < 110 then
    179.             getgenv().Prediction = 0.124
    180.         elseif ping < 105 then
    181.             getgenv().Prediction = 0.127
    182.         elseif ping < 90 then
    183.             getgenv().Prediction = 0.130
    184.         elseif ping < 80 then
    185.             getgenv().Prediction = 0.133
    186.         elseif ping < 70 then
    187.             getgenv().Prediction = 0.136
    188.         elseif ping < 60 then
    189.             getgenv().Prediction = 0.15038
    190.         elseif ping < 50 then
    191.             getgenv().Prediction = 0.15038
    192.         elseif ping < 40 then
    193.             getgenv().Prediction = 0.145
    194.         elseif ping < 30 then
    195.             getgenv().Prediction = 0.155
    196.         elseif ping < 20 then
    197.             getgenv().Prediction = 0.157
    198.         end
    199.         end
    200.     end
Add Comment
Please, Sign In to add comment
Advertisement