Advertisement
hacker190102

aimlock

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