Ritual_x

DA HOOD AIMLOCK SCRIPT (AHM TRACER)

Feb 25th, 2023
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. lib = loadstring(game:HttpGet"https://pastebin.com/raw/9Cau6Xvm")()
  2. local win = lib:CreateWindow("amh#0001", Vector2.new(492, 598), Enum.KeyCode.RightShift)
  3.  
  4. local tab1 = win:CreateTab("main")
  5.  
  6. local sector1 = tab1:CreateSector("main","left")
  7.  
  8.  
  9.  
  10. local button = sector1:AddButton("enable amh", function()
  11.  
  12.  
  13. local configs = { -- main aimlock settings
  14. Main = {
  15. Enabled = true,
  16. Aimlockkey = "c",
  17. Prediction = 0.13093,
  18. Aimpart = 'HumanoidRootPart', -- Head, UpperTorso, HumanoidRootPart, LowerTorso
  19. Notifications = true,
  20. AirshotFunc = true
  21.  
  22. },
  23. Tracer = {
  24. TracerThickness = 3.5,
  25. TracerTransparency = 1,
  26. TracerColor = Color3.fromRGB(99,95,98)
  27. }
  28.  
  29. }
  30.  
  31. local RunService = game:GetService("RunService")
  32. local CurrentCamera = game:GetService "Workspace".CurrentCamera
  33. local Mouse = game.Players.LocalPlayer:GetMouse()
  34. local inset = game:GetService("GuiService"):GetGuiInset().Y
  35.  
  36. local Line = Drawing.new("Line")
  37. local Plr
  38.  
  39. Mouse.KeyDown:Connect(function(KeyPressed)
  40. if KeyPressed == (configs.Main.Aimlockkey) then
  41. if configs.Main.Enabled == true then
  42. configs.Main.Enabled = false
  43. if configs.Main.Notifications == true then
  44. Plr = FindClosestPlayer()
  45. game.StarterGui:SetCore("SendNotification", {
  46. Title = "amh#0001 | <3",
  47. Text = "unlocked",
  48. Icon = "http://www.roblox.com/asset/?id=6917008796"
  49. })
  50. end
  51. else
  52. Plr = FindClosestPlayer()
  53. configs.Main.Enabled = true
  54. if configs.Main.Notifications == true then
  55. game.StarterGui:SetCore("SendNotification", {
  56. Title = "amh#0001 | <3",
  57. Text = "locked: " .. tostring(LocalPlayer.Character.Humanoid.DisplayName),
  58. Icon = "http://www.roblox.com/asset/?id=6917008796"
  59. })
  60. end
  61. end
  62. end
  63. end)
  64.  
  65. function FindClosestPlayer()
  66. local closestPlayer
  67. local shortestDistance = math.huge
  68.  
  69. for i, v in pairs(game.Players:GetPlayers()) do
  70. if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and
  71. v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") then
  72. local pos = CurrentCamera:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  73. local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(Mouse.X, Mouse.Y)).magnitude
  74. if magnitude < shortestDistance then
  75. closestPlayer = v
  76. shortestDistance = magnitude
  77. end
  78. end
  79. end
  80. return closestPlayer
  81. end
  82.  
  83. RunService.Stepped:connect(function()
  84. if configs.Main.Enabled == true then
  85. local Vector = CurrentCamera:worldToViewportPoint(Plr.Character[configs.Main.Aimpart].Position +
  86. (Plr.Character.HumanoidRootPart.Velocity *
  87. configs.Main.Prediction))
  88. Line.Color = configs.Tracer.TracerColor
  89. Line.Thickness = configs.Tracer.TracerThickness
  90. Line.Transparency = configs.Tracer.TracerTransparency
  91.  
  92. Line.From = Vector2.new(Mouse.X, Mouse.Y + inset)
  93. Line.To = Vector2.new(Vector.X, Vector.Y)
  94. Line.Visible = true
  95. elseif configs.Main.Enabled == false then
  96. Line.Visible = false
  97. end
  98. end)
  99.  
  100. local mt = getrawmetatable(game)
  101. local old = mt.__namecall
  102. setreadonly(mt, false)
  103. mt.__namecall = newcclosure(function(...)
  104. local args = {...}
  105. if configs.Main.Enabled and getnamecallmethod() == "FireServer" and args[2] == "UpdateMousePos" then
  106. args[3] = Plr.Character[configs.Main.Aimpart].Position +
  107. (Plr.Character[configs.Main.Aimpart].Velocity * configs.Main.Prediction)
  108. return old(unpack(args))
  109. end
  110. return old(...)
  111. end)
  112.  
  113. if configs.Main.AirshotFunc == true then
  114. if Plr.Character.Humanoid.Jump == true and Plr.Character.Humanoid.FloorMaterial == Enum.Material.Air then
  115. settings.config.Part = "RightFoot"
  116. else
  117. Plr.Character:WaitForChild("Humanoid").StateChanged:Connect(function(old,new)
  118. if new == Enum.HumanoidStateType.Freefall then
  119. settings.config.Part = "RightFoot"
  120. else
  121. settings.config.Part = "LowerTorso"
  122. end
  123. end)
  124. end
  125. end
  126.  
  127.  
  128.  
  129. end)
  130.  
  131. sector1:AddTextbox("enter new pred here",false,function(bool)
  132. getgenv().Prediction = bool
  133. end)
Add Comment
Please, Sign In to add comment