Advertisement
ZV0K

Op Dot Lock 🔥

Aug 10th, 2023
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. local settings = {
  2. main = {
  3. DotEnabled = true, -- leave this true thusky pooh ;)
  4. Prediction = 0.11621,
  5. Part = "LowerTorso",
  6. Key = "q",
  7. Notifications = true,
  8. AirshotFunc = true
  9. },
  10. Dot = {
  11. Show = true,
  12. Color = Color3.fromRGB(128, 0, 128),
  13. Size = Vector3.new(0.9, 1.2, 0.9)
  14. }
  15. }
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. local CurrentCamera = game:GetService "Workspace".CurrentCamera
  23. local Mouse = game.Players.LocalPlayer:GetMouse()
  24. local RunService = game:GetService("RunService")
  25. local Plr = game.Players.LocalPlayer
  26.  
  27. local Part = Instance.new("Part", game.Workspace)
  28. Part.Anchored = true
  29. Part.CanCollide = false
  30. Part.Parent = game.Workspace
  31. Part.Shape = Enum.PartType.Ball
  32. Part.Size = settings.Dot.Size
  33. Part.Color = settings.Dot.Color
  34.  
  35. if settings.Dot.Show == true then
  36. Part.Transparency = 0
  37. else
  38. Part.Transparency = 1
  39. end
  40.  
  41. Mouse.KeyDown:Connect(function(KeyPressed)
  42. if KeyPressed == (settings.main.Key) then
  43. if settings.main.DotEnabled == true then
  44. settings.main.DotEnabled = false
  45. if settings.main.Notifications == true then
  46. Plr = FindClosestUser()
  47. game.StarterGui:SetCore("SendNotification", {
  48. Title = "Private Script",
  49. Text = "No longer locked on"
  50. })
  51. end
  52. else
  53. Plr = FindClosestUser()
  54. settings.main.DotEnabled = true
  55. if settings.main.Notifications == true then
  56. game.StarterGui:SetCore("SendNotification", {
  57. Title = "Private Script",
  58. Text = "Locked on to:" .. tostring(Plr.Character.Humanoid.DisplayName)
  59. })
  60. end
  61. end
  62. end
  63. end)
  64.  
  65. function FindClosestUser()
  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 settings.main.DotEnabled and Plr.Character and Plr.Character:FindFirstChild("LowerTorso") then
  85. Part.CFrame = CFrame.new(Plr.Character[settings.main.Part].Position +
  86. (Plr.Character.LowerTorso.Velocity * settings.main.Prediction))
  87. else
  88. Part.CFrame = CFrame.new(0, 9999, 0)
  89.  
  90. end
  91. end)
  92.  
  93. local mt = getrawmetatable(game)
  94. local old = mt.__namecall
  95. setreadonly(mt, false)
  96. mt.__namecall = newcclosure(function(...)
  97. local args = {...}
  98. if settings.main.DotEnabled and getnamecallmethod() == "FireServer" and args[2] == "UpdateMousePos" then
  99. args[3] = Plr.Character[settings.main.Part].Position +
  100. (Plr.Character[settings.main.Part].Velocity * settings.main.Prediction)
  101. return old(unpack(args))
  102. end
  103. return old(...)
  104. end)
  105.  
  106.  
  107. if settings.main.AirshotFunc == true then
  108. if Plr.Character.Humanoid.Jump == true and Plr.Character.Humanoid.FloorMaterial == Enum.Material.Air then
  109. settings.main.Part = "RightFoot"
  110. else
  111. Plr.Character:WaitForChild("Humanoid").StateChanged:Connect(function(old,new)
  112. if new == Enum.HumanoidStateType.Freefall then
  113. settings.main.Part = "RightFoot"
  114. else
  115. settings.main.Part = "LowerTorso"
  116. end
  117. end)
  118. end
  119. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement