YT_PatricioTGN

Untitled

Oct 12th, 2022
1,230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. local CC = game:GetService"Workspace".CurrentCamera
  2. local Plr
  3. local enabled = falseWD
  4. local accomidationfactor = 0.129
  5. local mouse = game.Players.LocalPlayer:GetMouse()
  6. local placemarker = Instance.new("Part", game.Workspace)
  7.  
  8. function makemarker(Parent, Adornee, Color, Size, Size2)
  9. local e = Instance.new("BillboardGui", Parent)
  10. e.Name = "PP"
  11. e.Adornee = Adornee
  12. e.Size = UDim2.new(Size, Size2, Size, Size2)
  13. e.AlwaysOnTop = true
  14. local a = Instance.new("Frame", e)
  15. a.Size = UDim2.new(1, 0, 1, 0)
  16. a.BackgroundTransparency = 0
  17. a.BackgroundColor3 = Color
  18. local g = Instance.new("UICorner", a)
  19. g.CornerRadius = UDim.new(50, 50)
  20. return(e)
  21. end
  22.  
  23.  
  24. local data = game.Players:GetPlayers()
  25. function noob(player)
  26. local character
  27. repeat wait() until player.Character
  28. local handler = makemarker(guimain, player.Character:WaitForChild("HumanoidRootPart"), Color3.fromRGB(107, 184, 255), 0.3, 3)
  29. handler.Name = player.Name
  30. player.CharacterAdded:connect(function(Char) handler.Adornee = Char:WaitForChild("HumanoidRootPart") end)
  31.  
  32.  
  33. spawn(function()
  34. while wait() do
  35. if player.Character then
  36. TextLabel.Text = player.Name..tostring(player:WaitForChild("leaderstats").Wanted.Value).." | "..tostring(math.floor(player.Character:WaitForChild("Humanoid").Health))
  37. end
  38. end
  39. end)
  40. end
  41.  
  42. for i = 1, #data do
  43. if data[i] ~= game.Players.LocalPlayer then
  44. noob(data[i])
  45. end
  46. end
  47.  
  48. game.Players.PlayerAdded:connect(function(Player)
  49. noob(Player)
  50. end)
  51.  
  52. spawn(function()
  53. placemarker.Anchored = true
  54. placemarker.CanCollide = false
  55. placemarker.Size = Vector3.new(16, 16, 16)
  56. placemarker.Transparency = 1
  57. makemarker(placemarker, placemarker, Color3.fromRGB(255,255,255), 0.40, 0)
  58. end)
  59.  
  60. mouse.KeyDown:Connect(function(k)
  61. if k ~= "q" then return end
  62. if enabled then
  63. enabled = false
  64. guimain[Plr.Name].Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  65. else
  66. enabled = true
  67. Plr = getClosestPlayerToCursor()
  68. guimain[Plr.Name].Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  69. end
  70. end)
  71.  
  72. function getClosestPlayerToCursor()
  73. local closestPlayer
  74. local shortestDistance = math.huge
  75.  
  76. for i, v in pairs(game.Players:GetPlayers()) do
  77. if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") then
  78. local pos = CC:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  79. local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  80. if magnitude < shortestDistance then
  81. closestPlayer = v
  82. shortestDistance = magnitude
  83. end
  84. end
  85. end
  86. return closestPlayer
  87. end
  88.  
  89. game:GetService"RunService".Stepped:connect(function()
  90. if enabled and Plr.Character and Plr.Character:FindFirstChild("HumanoidRootPart") then
  91. placemarker.CFrame = CFrame.new(Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*accomidationfactor))
  92. else
  93. placemarker.CFrame = CFrame.new(0, 9999, 0)
  94. end
  95. end)
  96.  
  97. local mt = getrawmetatable(game)
  98. local old = mt.__namecall
  99. setreadonly(mt, false)
  100. mt.__namecall = newcclosure(function(...)
  101. local args = {...}
  102. if enabled and getnamecallmethod() == "FireServer" and args[2] == "MousePos" then
  103. args[3] = Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*accomidationfactor)
  104. return old(unpack(args))
  105. end
  106. return old(...)
  107. end)
  108.  
Add Comment
Please, Sign In to add comment