Advertisement
DR0NK

Untitled

Aug 4th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.53 KB | None | 0 0
  1. -- , head '#0666
  2. -- π—΅π˜π˜π—½π˜€://π—±π—Άπ˜€π—°π—Όπ—Ώπ—±.𝗴𝗴/𝗗𝗭π—ͺπ—™πŸ΅π˜†π—±π—―π—žπ˜†
  3.  
  4. game:GetService("StarterGui"):SetCore("SendNotification",{
  5. Title = "executed!";
  6. Text = ", head '#0666";
  7. Duration = 3.5;
  8. })
  9.  
  10. local Camera = game:GetService("Workspace").CurrentCamera local Players = game:GetService("Players") local LocalPlayer = game:GetService("Players").LocalPlayer local function GetClosestPlayer() local ClosestPlayer = nil local FarthestDistance = math.huge for i, v in pairs(Players.GetPlayers(Players)) do if v ~= LocalPlayer and v.Character and v.Character.FindFirstChild(v.Character, "HumanoidRootPart") then local DistanceFromPlayer = (LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).Magnitude if DistanceFromPlayer < FarthestDistance then FarthestDistance = DistanceFromPlayer ClosestPlayer = v end end end if ClosestPlayer then return ClosestPlayer end end local GameMetaTable = getrawmetatable(game) local OldGameMetaTableNamecall = GameMetaTable.__namecall setreadonly(GameMetaTable, false) GameMetaTable.__namecall = newcclosure(function(object, ...) local NamecallMethod = getnamecallmethod() local Arguments = {...} if tostring(NamecallMethod) == "FindPartOnRayWithIgnoreList" then local ClosestPlayer = GetClosestPlayer() if ClosestPlayer and ClosestPlayer.Character then Arguments[1] = Ray.new(Camera.CFrame.Position, (ClosestPlayer.Character.Head.Position - Camera.CFrame.Position).Unit * (Camera.CFrame.Position - ClosestPlayer.Character.Head.Position).Magnitude) end end return OldGameMetaTableNamecall(object, unpack(Arguments)) end) setreadonly(GameMetaTable, true)
  11.  
  12. local Enabled = true
  13. local Prediction = 0.1398
  14. local Notifications = true
  15. local AimPart = "UpperTorso"
  16.  
  17.  
  18. local Tool = Instance.new("Tool")
  19. Tool.RequiresHandle = false
  20. Tool.Name = "head lock Tool"
  21.  
  22.  
  23. local Camera = game:GetService("Workspace").CurrentCamera
  24. local Mouse = game.Players.LocalPlayer:GetMouse()
  25. local Plr
  26.  
  27. local Part = Instance.new("Part", game.Workspace)
  28.  
  29. Part.Anchored = true
  30. Part.CanCollide = false
  31. Part.Color = Color3.fromRGB(0, 0, 176)
  32. Part.Material = Enum.Material.Neon
  33. Part.Size = Vector3.new(0.93, 0.93, 0.93)
  34. Part.Shape = Enum.PartType.Block
  35.  
  36. function FindClosestPlayer()
  37. local closestPlayer
  38. local shortestDistance = math.huge
  39.  
  40. for i, v in pairs(game.Players:GetPlayers()) do
  41. if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and
  42. v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") then
  43. local pos = Camera:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  44. local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(Mouse.X, Mouse.Y)).magnitude
  45. if magnitude < shortestDistance then
  46. closestPlayer = v
  47. shortestDistance = magnitude
  48. end
  49. end
  50. end
  51. return closestPlayer
  52. end
  53.  
  54. Tool.Activated:Connect(function()
  55.  
  56. if Enabled == true then
  57. Enabled = false
  58. if Notifications == true then
  59.  
  60. Plr = FindClosestPlayer()
  61. TargetPlayer = tostring(Plr)
  62. game.StarterGui:SetCore("SendNotification", {
  63. Title = "",
  64. Text = ""
  65. })
  66. end
  67.  
  68. else
  69. Plr = FindClosestPlayer()
  70. TargetPlayer = tostring(Plr)
  71.  
  72. Enabled = true
  73.  
  74. if Notifications == true then
  75.  
  76. Plr = FindClosestPlayer()
  77. TargetPlayer = tostring(Plr)
  78. game.StarterGui:SetCore("SendNotification", {
  79. Title = "",
  80. Text = "" .. tostring(TargetPlayer)
  81. })
  82. end
  83. end
  84. end)
  85.  
  86. game:GetService("RunService").Stepped:Connect(function()
  87. if Enabled == true then
  88.  
  89. Part.Position = game.Players[TargetPlayer].Character.HumanoidRootPart.Position
  90. else
  91. Part.CFrame = CFrame.new(0, -9999, 0)
  92.  
  93. end
  94. end)
  95.  
  96. local mt = getrawmetatable(game)
  97. local old = mt.__namecall
  98. setreadonly(mt, false)
  99. mt.__namecall = newcclosure(function(...)
  100. local args = { ... }
  101.  
  102. if Enabled and getnamecallmethod() == "FireServer" and args[2] == "UpdateMousePos" then
  103. args[3] = game.Players[TargetPlayer].Character[AimPart].Position +
  104.  
  105. (game.Players[TargetPlayer].Character[AimPart].Velocity * Prediction)
  106.  
  107. return old(unpack(args))
  108. end
  109. return old(...)
  110. end)
  111.  
  112. Tool.Parent = game.Players.LocalPlayer.Backpack
  113.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement