humanoidsofsandara

da hood lock(1)

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