BjeffeHund

Arsenal silent aim

May 11th, 2020
4,571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. --loadstring(game:HttpGet('https://pastebin.com/raw/T97rTkBg', true))()
  2. local cc = game.workspace.CurrentCamera
  3. local mouse = game.Players.LocalPlayer:GetMouse()
  4. function getClosestMouse(trg_part)
  5. local nearest = nil
  6. local last = math.huge
  7. for i,v in pairs(game.Players:GetPlayers()) do
  8. if v ~= game.Players.LocalPlayer and game.Players.LocalPlayer.Character and v.Character and v.Character:FindFirstChild(trg_part) and v.TeamColor ~= game.Players.LocalPlayer.TeamColor then
  9. local ePos = cc:WorldToViewportPoint(v.Character[trg_part].Position)
  10. local AccPos = Vector2.new(ePos.x, ePos.y)
  11. local mousePos = Vector2.new(cc.ViewportSize.x / 2, cc.ViewportSize.y / 2)
  12. local distance = (AccPos - mousePos).magnitude
  13. if distance < last then
  14. last = distance
  15. nearest = v
  16. end
  17. end
  18. end
  19. if nearest ~= nil then
  20. return nearest
  21. end
  22. end
  23. local gameMeta = getrawmetatable(game)
  24. setreadonly(gameMeta, false)
  25. local oldNamecall = gameMeta.__namecall
  26. gameMeta.__namecall = newcclosure(function(remote, ...)
  27. local arguments = {...}
  28. if tostring(remote) == 'HitPart' then
  29. local getclose = getClosestMouse("Head")
  30. arguments[1] = getclose.Character.Head
  31. arguments[2] = getclose.Character.Head.Position
  32. return remote.FireServer(remote, unpack(arguments))
  33. end
  34. return oldNamecall(remote, ...)
  35. end)
Add Comment
Please, Sign In to add comment