Advertisement
Pyaguti

script

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