Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. _G.silentaimbotenabled = false;
  2. _G.silentfov = 90;
  3. local camera = workspace.CurrentCamera;
  4. local max_dist = 30000;
  5. local lp = game:service'Players'.LocalPlayer;
  6. local Network = {};
  7. local oldNetwork;
  8.  
  9. --do
  10. -- loadstring(game:HttpGet('https://pastebin.com/raw/c1at5DzU', true))() -- getkey()
  11. --end
  12.  
  13. for i,e in next, getreg() do
  14. if type(e) == 'function' then
  15. for i,v in next, debug.getupvalues(e) do
  16. if i == 'network' then
  17. oldNetwork = v
  18. elseif i == 'netkick' then
  19. debug.setupvalue(e, 'netkick', function() end)
  20. end
  21. end
  22. end
  23. end
  24.  
  25. do
  26. debug.setupvalue(oldNetwork.send, 'settings', error)
  27. debug.setupvalue(oldNetwork.fetch, 'settings', error)
  28. end
  29.  
  30. local remoteevent = game.ReplicatedStorage:WaitForChild("RemoteEvent")
  31. local remotefunc = game.ReplicatedStorage:WaitForChild("RemoteFunction")
  32. local fireserver = remoteevent.FireServer
  33. local invokeserver = remotefunc.InvokeServer
  34. local networkencode = require(game.ReplicatedStorage:WaitForChild("SharedModules"):WaitForChild("NetworkEncode"))
  35. local encode = networkencode.encode
  36.  
  37. function Network:send(name, ...)
  38. local args = {
  39. ...
  40. }
  41. local success = pcall(fireserver, remoteevent, false, name, args)
  42. if not success then
  43. warn("needed encode")
  44. fireserver(remoteevent, true, name, encode(args))
  45. end
  46. end
  47.  
  48. local lp = game:service'Players'.LocalPlayer
  49.  
  50. --[[spawn(function()
  51. game:service'RunService'.RenderStepped:connect(function()
  52. pcall(function()
  53. local pos, vis = nil, nil
  54. for _, p in next, game:service'Players':GetPlayers() do
  55. if p.TeamColor ~= lp.TeamColor then
  56. pos, vis = camera:WorldToScreenPoint(p.Character.Head.Position)
  57. if vis then
  58. target = p;
  59. end
  60. end
  61. end
  62. if not vis then
  63. target = nil;
  64. end
  65. end)
  66. end)
  67. end)]]
  68.  
  69. debug.setupvalue(oldNetwork.send, "pcall", function(args, ...)
  70. local real_args = {...}
  71. local name = real_args[3]
  72.  
  73. if name == 'newbullet' then
  74.  
  75. local barrel;
  76. local target;
  77.  
  78. for _, p in next, game:service'Players':GetPlayers() do
  79. if p.TeamColor ~= lp.TeamColor then
  80. local PosOnScreen = camera:WorldToScreenPoint(p.Character.Head.Position)
  81. if PosOnScreen.X > ((camera.ViewportSize.X)/2 - _G.silentfov/2) and PosOnScreen.X < ((camera.ViewportSize.X)/2 + _G.silentfov/2) and PosOnScreen.Y > ((camera.ViewportSize.Y)/2 - _G.silentfov/2) and PosOnScreen.Y < ((camera.ViewportSize.Y)/2 + _G.silentfov/2) then
  82.  
  83. local part, asd = workspace:FindPartOnRayWithIgnoreList(Ray.new(lp.Character.Head.Position, (p.Character.Head.CFrame.p - lp.Character.Head.CFrame.p).unit * max_dist), {lp.Character})
  84.  
  85. if _G.silentsightbased then
  86. if part == p.Character.Head then
  87. target = p;
  88. end
  89. else
  90. target = p;
  91. end
  92.  
  93. end
  94. end
  95. end
  96.  
  97. for i,v in next, camera:GetDescendants() do
  98. if v.Name == 'Flame' then
  99. barrel = v
  100. end
  101. end
  102. if target and _G.silentaimbotenabled then
  103. local uni = (barrel.Position - target.Character.Head.Position).unit * 100000
  104.  
  105. Network:send("newbullet", barrel.Position, uni, 1, 1, 1, tick(), 1)
  106. Network:send("bullethit", target, -100, tick() - .1, tick(), target.Character.Head.Position, barrel.Position, uni, target.Character.Head, "wallbang")
  107. return true
  108. end
  109.  
  110. end
  111.  
  112. --local name = debug.getlocal(2, "name")
  113. return pcall(args, ...)
  114. end)
  115.  
  116. --[[
  117. local lp = game:service'Players'.LocalPlayer
  118. for i,p in next, game:service'Players':GetPlayers() do
  119. if p.TeamColor ~= lp.TeamColor then
  120.  
  121. local uni = (barrel.Position - p.Character.Head.Position).unit * 100000
  122.  
  123. Network:send("bullethit", target, -100, tick() - .1, tick(), target.Character.Torso.Position, barrel.Position, uni, target.Character.Torso, "wallbang")
  124. end
  125. end
  126. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement