Advertisement
GreenMods

No-Scope Sniping SILENT AIM & GUN MOD [OPEN SOURCE]

Feb 17th, 2021
23,580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local LocalPlayer = Players.LocalPlayer
  3. local Mouse = LocalPlayer:GetMouse()
  4. local Network = require(LocalPlayer.PlayerScripts.GunFramework.InternalModules.network)
  5.  
  6. function GetPlayer()
  7. local MaxDist, Player = math.huge
  8. for I,V in pairs(Players:GetPlayers()) do
  9. if V == LocalPlayer then continue end
  10. if V.Team == LocalPlayer then continue end
  11. if not V.Character then continue end
  12. local Head = V.Character:FindFirstChild("Head")
  13. if not Head then continue end
  14. local Pos, Vis = workspace.CurrentCamera:WorldToScreenPoint(Head.Position)
  15. if not Vis then continue end
  16. local MyPos, TheirPos = Vector2.new(Mouse.X, Mouse.Y), Vector2.new(Pos.X, Pos.Y)
  17. local Dist = (TheirPos - MyPos).Magnitude
  18. if Dist < MaxDist then
  19. MaxDist = Dist
  20. Player = V
  21. end
  22. end
  23. return Player
  24. end
  25. Old = hookfunction(Network.send, function(self, ...)
  26. local Args = {...}
  27. if Args[1] == "bullet" then
  28. local P = GetPlayer()
  29. if P and P.Character and P.Character:FindFirstChild("Head") then
  30. Args[2] = P.Character
  31. Args[3] = P.Character.Head
  32. Args[4] = P.Character.Head.Position
  33. return Old(self, unpack(Args))
  34. end
  35. end
  36. return Old(self, ...)
  37. end)
  38. for I,V in pairs(game:GetService("ReplicatedStorage").GunModules:GetChildren()) do
  39. pcall(function()
  40. local a = require(V)
  41. a.ReloadTime = 0
  42. a.ClipSize = math.huge
  43. a.FireRate = 0
  44. a.Automatic = true
  45. end)
  46. end
  47. hookfunction(require(LocalPlayer.PlayerScripts.GunFramework.Recoil).ShootRecoil, function() end)
  48. local F = getconnections(game:GetService("LogService").MessageOut)[2].Function
  49. debug.setupvalue(F, 1, {})
  50. hookfunction(F, function() end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement