Advertisement
Guest User

Dahood camlock free vers

a guest
May 27th, 2024
5,864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | Gaming | 0 0
  1. -- MADE BY NotDonutDh on discord/ NotDonutdh on YT This is the mid free version paid comming soon
  2.  
  3.  
  4.  
  5. game.StarterGui:SetCore(
  6. "SendNotification",
  7. {
  8. Title = "SHAZAM!",
  9. Text = "Loading . . .",
  10. }
  11. )
  12. wait(1)
  13. game.StarterGui:SetCore(
  14. "SendNotification",
  15. {
  16. Title = "SHAZAM!",
  17. Text = "Authenticating..",
  18. }
  19. )
  20. wait(1)
  21. game.StarterGui:SetCore(
  22. "SendNotification",
  23. {
  24. Title = "SHAZAM!",
  25. Text = "Setting Up...",
  26. }
  27. )
  28. wait(1)
  29. game.StarterGui:SetCore(
  30. "SendNotification",
  31. {
  32. Title = "SHAZAM!",
  33. Text = "Done!",
  34. }
  35. )
  36. wait(0.5)
  37. game.StarterGui:SetCore(
  38. "SendNotification",
  39. {
  40. Title = "SHAZAM!",
  41. Text = "made by WAM1231 on discord!",
  42. }
  43. )
  44.  
  45.  
  46. wait(0.5)
  47. game.StarterGui:SetCore(
  48. "SendNotification",
  49. {
  50. Title = "SHAZAM!",
  51. Text = "injected enjoy SHAZAM!",
  52. }
  53. )
  54.  
  55. local player = game.Players.LocalPlayer
  56. local camera = game.Workspace.CurrentCamera
  57. local runService = game:GetService("RunService")
  58. local userInputService = game:GetService("UserInputService")
  59.  
  60. local aimSpeed = 0.1 -- Adjust this value for responsiveness
  61. local isAimAssistEnabled = false
  62. local predictionFactor = 5.4 -- Adjust this value for prediction accuracy
  63. local currentTarget = nil
  64. local smoothingFactor = 0.02 -- Adjust this value for smoother camera movement
  65.  
  66. local function predictTargetPosition(target, deltaTime)
  67. local targetPosition = target.UpperTorso.Position
  68. local targetVelocity = target:FindFirstChild("Humanoid") and target.HumanoidRootPart.Velocity or Vector3.new()
  69.  
  70. local predictedPosition = targetPosition + targetVelocity * predictionFactor * deltaTime
  71. return predictedPosition
  72. end
  73.  
  74. local function aimAtTarget()
  75. if currentTarget and currentTarget.Parent then
  76. local predictedPosition = predictTargetPosition(currentTarget, runService.RenderStepped:Wait())
  77. local lookVector = (predictedPosition - camera.CFrame.Position).Unit
  78.  
  79. -- Smooth the camera movement
  80. local smoothedLookVector = (1 - smoothingFactor) * lookVector + smoothingFactor * (camera.CFrame.LookVector)
  81.  
  82. local newCFrame = CFrame.new(camera.CFrame.Position, camera.CFrame.Position + aimSpeed * smoothedLookVector)
  83. camera.CFrame = newCFrame
  84. else
  85. currentTarget = nil
  86. isAimAssistEnabled = false
  87. end
  88. end
  89.  
  90. local function findClosestPlayerToMouse()
  91. local mousePos = userInputService:GetMouseLocation()
  92. local closestPlayer = nil
  93. local shortestDistance = math.huge
  94.  
  95. for _, object in pairs(game.Players:GetPlayers()) do
  96. if object ~= player and object.Character and object.Character:FindFirstChild("Humanoid") and object.Character:FindFirstChild("UpperTorso") then
  97. local targetScreenPos, onScreen = camera:WorldToScreenPoint(object.Character.UpperTorso.Position)
  98.  
  99. if onScreen then
  100. local distance = (Vector2.new(targetScreenPos.X, targetScreenPos.Y) - mousePos).Magnitude
  101.  
  102. if distance < shortestDistance then
  103. closestPlayer = object.Character
  104. shortestDistance = distance
  105. end
  106. end
  107. end
  108. end
  109.  
  110. return closestPlayer
  111. end
  112.  
  113. local function onKeyPress(input, gameProcessedEvent)
  114. if not gameProcessedEvent then
  115. if input.KeyCode == Enum.KeyCode.V then
  116. isAimAssistEnabled = not isAimAssistEnabled
  117. if isAimAssistEnabled then
  118. currentTarget = findClosestPlayerToMouse()
  119. else
  120. currentTarget = nil
  121. end
  122. print("Aim Assist Toggled:", isAimAssistEnabled)
  123. end
  124. end
  125. end
  126.  
  127. local function onCharacterAdded(character)
  128. character:WaitForChild("Humanoid").Died:Connect(function()
  129. if currentTarget == character then
  130. currentTarget = nil
  131. end
  132. end)
  133. end
  134.  
  135. userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
  136. onKeyPress(input, gameProcessedEvent)
  137. end)
  138.  
  139. player.CharacterAdded:Connect(onCharacterAdded)
  140.  
  141. runService.RenderStepped:Connect(function(deltaTime)
  142. if isAimAssistEnabled then
  143. aimAtTarget()
  144. end
  145. end)
Tags: #dahood
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement