Advertisement
ImpulseYT

DH AIMLOCK

Feb 20th, 2022
25,652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.94 KB | None | 0 0
  1. -- Toggle key is Q
  2. getgenv().Target = true
  3. -- Configuration
  4. getgenv().Key = Enum.KeyCode.Q
  5. getgenv().Prediction = 0.135
  6. getgenv().ChatMode = false
  7. getgenv().NotifMode = true
  8. getgenv().PartMode = true
  9. getgenv().AirshotFunccc = true
  10. getgenv().Partz = "LowerTorso"
  11. getgenv().AutoPrediction = true
  12. --
  13. _G.Types = {
  14. Ball = Enum.PartType.Ball,
  15. Block = Enum.PartType.Block,
  16. Cylinder = Enum.PartType.Cylinder
  17. }
  18.  
  19. --variables
  20. local Tracer = Instance.new("Part", game.Workspace)
  21. Tracer.Name = "gay"
  22. Tracer.Anchored = true
  23. Tracer.CanCollide = false
  24. Tracer.Transparency = 0.8
  25. Tracer.Parent = game.Workspace
  26. Tracer.Shape = _G.Types.Block
  27. Tracer.Size = Vector3.new(14,14,14)
  28. Tracer.Color = Color3.fromRGB(128,128,128)
  29.  
  30. --
  31. local plr = game.Players.LocalPlayer
  32. local mouse = plr:GetMouse()
  33. local Runserv = game:GetService("RunService")
  34.  
  35. circle = Drawing.new("Circle")
  36. circle.Color = Color3.fromRGB(255,255,255)
  37. circle.Thickness = 0
  38. circle.NumSides = 732
  39. circle.Radius = 120
  40. circle.Thickness = 0
  41. circle.Transparency = 0.7
  42. circle.Visible = false
  43. circle.Filled = false
  44.  
  45. Runserv.RenderStepped:Connect(function()
  46. circle.Position = Vector2.new(mouse.X,mouse.Y+35)
  47. end)
  48.  
  49. local guimain = Instance.new("Folder", game.CoreGui)
  50. local CC = game:GetService"Workspace".CurrentCamera
  51. local LocalMouse = game.Players.LocalPlayer:GetMouse()
  52. local Locking = false
  53.  
  54.  
  55. --
  56. if getgenv().valiansh == true then
  57. game.StarterGui:SetCore("SendNotification", {
  58. Title = "kloy lock",
  59. Text = "loaded",
  60. Duration = 1
  61.  
  62. })
  63. return
  64. end
  65.  
  66. getgenv().valiansh = true
  67.  
  68. local UserInputService = game:GetService("UserInputService")
  69.  
  70. UserInputService.InputBegan:Connect(function(keygo,ok)
  71. if (not ok) then
  72. if (keygo.KeyCode == getgenv().Key) then
  73. if getgenv().Target == true then
  74. Locking = not Locking
  75.  
  76. if Locking then
  77. Plr = getClosestPlayerToCursor()
  78. if getgenv().ChatMode then
  79. local A_1 = "Target: "..tostring(Plr.Character.Humanoid.DisplayName) local A_2 = "All" local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest Event:FireServer(A_1, A_2)
  80. end
  81. if getgenv().NotifMode then
  82. game.StarterGui:SetCore("SendNotification", {
  83. Title = "";
  84. Text = "Target: "..tostring(Plr.Character.Humanoid.DisplayName);
  85.  
  86. })
  87. end
  88. elseif not Locking then
  89. if getgenv().ChatMode then
  90. local A_1 = "Unlocked!" local A_2 = "All" local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest Event:FireServer(A_1, A_2)
  91. end
  92. if getgenv().NotifMode then
  93. game.StarterGui:SetCore("SendNotification", {
  94. Title = "kloy lock",
  95. Text = "unlocked",
  96. Duration = 1
  97. })
  98. elseif getgenv().Target == false then
  99. game.StarterGui:SetCore("SendNotification", {
  100. Title = "kloy lock",
  101. Text = "target isn't enabled",
  102. Duration = 1
  103.  
  104. })
  105.  
  106. end
  107.  
  108.  
  109. end end
  110. end
  111. end
  112. end)
  113.  
  114. function getClosestPlayerToCursor()
  115. local closestPlayer
  116. local shortestDistance = circle.Radius
  117.  
  118. for i, v in pairs(game.Players:GetPlayers()) do
  119. if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("LowerTorso") then
  120. local pos = CC:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  121. local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(LocalMouse.X, LocalMouse.Y)).magnitude
  122. if magnitude < shortestDistance then
  123. closestPlayer = v
  124. shortestDistance = magnitude
  125. end
  126. end
  127. end
  128. return closestPlayer
  129. end
  130. --
  131. if getgenv().PartMode then
  132. game:GetService"RunService".Stepped:connect(function()
  133. if Locking and Plr.Character and Plr.Character:FindFirstChild("LowerTorso") then
  134. Tracer.CFrame = CFrame.new(Plr.Character.LowerTorso.Position+(Plr.Character.LowerTorso.Velocity*Prediction))
  135. else
  136. Tracer.CFrame = CFrame.new(0, 9999, 0)
  137.  
  138. end
  139. end)
  140. end
  141.  
  142.  
  143.  
  144. --
  145. local rawmetatable = getrawmetatable(game)
  146. local old = rawmetatable.__namecall
  147. setreadonly(rawmetatable, false)
  148. rawmetatable.__namecall = newcclosure(function(...)
  149. local args = {...}
  150. if Locking and getnamecallmethod() == "FireServer" and args[2] == "UpdateMousePos" then
  151. args[3] = Plr.Character[getgenv().Partz].Position+(Plr.Character[getgenv().Partz].Velocity*Prediction)
  152. return old(unpack(args))
  153. end
  154. return old(...)
  155. end)
  156.  
  157.  
  158. if getgenv().AirshotFunccc == true then
  159.  
  160. if Plr.Character.Humanoid.Jump == true and Plr.Character.Humanoid.FloorMaterial == Enum.Material.Air then
  161. getgenv().Partz = "RightFoot"
  162. else
  163. Plr.Character:WaitForChild("Humanoid").StateChanged:Connect(function(old,new)
  164. if new == Enum.HumanoidStateType.Freefall then
  165. getgenv().Partz = "RightFoot"
  166. else
  167. getgenv().Partz = "LowerTorso"
  168. end
  169. end)
  170. end
  171. end
  172. ---
  173. while wait() do
  174. if getgenv().AutoPrediction == true then
  175. local pingvalue = game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValueString()
  176. local split = string.split(pingvalue,'(')
  177. local ping = tonumber(split[1])
  178. if ping < 130 then
  179. getgenv().Prediction = 0.151
  180. elseif ping < 125 then
  181. getgenv().Prediction = 0.149
  182. elseif ping < 110 then
  183. getgenv().Prediction = 0.146
  184. elseif ping < 105 then
  185. getgenv().Prediction = 0.138
  186. elseif ping < 90 then
  187. getgenv().Prediction = 0.136
  188. elseif ping < 80 then
  189. getgenv().Prediction = 0.134
  190. elseif ping < 70 then
  191. getgenv().Prediction = 0.131
  192. elseif ping < 60 then
  193. getgenv().Prediction = 0.1229
  194. elseif ping < 50 then
  195. getgenv().Prediction = 0.1225
  196. elseif ping < 40 then
  197. getgenv().Prediction = 0.1256
  198. end
  199. end
  200. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement