Advertisement
Guest User

Hood custom

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