The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Silent Aim for FPS games script pastebin roblox
By All FPS Games on 2024-11-23 08:00 am | Syntax: LUA | Views: 16



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1. --Made by DarkFunder
  2.  
  3. local Players = game:GetService("Players")
  4. local LocalPlayer = Players.LocalPlayer
  5. local mouse = LocalPlayer:GetMouse()
  6. local Camera = workspace.CurrentCamera
  7. local Debris = game:GetService("Debris")
  8. local UserInputService = game:GetService("UserInputService")
  9. local target = false
  10. local RunService = game:GetService("RunService")
  11.  
  12. local features = {
  13. silentaim = true;
  14. fov = 500;
  15. }
  16.  
  17. function getnearest()
  18. local nearestmagnitude = math.huge
  19. local nearestenemy = nil
  20. local vector = nil
  21. for i,v in next, Players:GetChildren() do
  22. if v ~= Players.LocalPlayer then
  23. if v.Character and  v.Character:FindFirstChild("HumanoidRootPart") and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health > 0 then
  24. local vector, onScreen = Camera:WorldToScreenPoint(v.Character["HumanoidRootPart"].Position)
  25. if onScreen then
  26. local ray = Ray.new(
  27. Camera.CFrame.p,
  28. (v.Character["Head"].Position-Camera.CFrame.p).unit*500
  29. )
  30. local ignore = {
  31. LocalPlayer.Character,
  32. }
  33. local hit,position,normal=workspace:FindPartOnRayWithIgnoreList(ray,ignore)
  34. if hit and hit:FindFirstAncestorOfClass("Model") and Players:FindFirstChild(hit:FindFirstAncestorOfClass("Model").Name)then
  35. local magnitude = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(vector.X, vector.Y)).magnitude
  36. if magnitude < nearestmagnitude and magnitude <= features["fov"] then
  37. nearestenemy = v
  38. nearestmagnitude = magnitude
  39. end
  40. end
  41. end
  42. end
  43. end
  44. end
  45. return nearestenemy
  46. end
  47.  
  48.  
  49. local meta = getrawmetatable(game)
  50. setreadonly(meta, false)
  51. local oldNamecall = meta.__namecall
  52. meta.__namecall = newcclosure(function(...)
  53. local method = getnamecallmethod()
  54. local args = {...}
  55. if string.find(method,'Ray') then
  56. if target then
  57. args[2] = Ray.new(workspace.CurrentCamera.CFrame.Position, (target + Vector3.new(0,(workspace.CurrentCamera.CFrame.Position-target).Magnitude/500,0) - workspace.CurrentCamera.CFrame.Position).unit * 500)
  58. end
  59. end
  60. return oldNamecall(unpack(args))
  61. end)
  62.  
  63.  
  64. RunService:BindToRenderStep("silentaim",1,function()
  65. if UserInputService:IsMouseButtonPressed(0) and features["silentaim"] and Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChild("Humanoid") and Players.LocalPlayer.Character.Humanoid.Health > 0 then
  66. local enemy = getnearest()
  67. if enemy and enemy.Character and enemy.Character:FindFirstChild("Humanoid") and enemy.Character.Humanoid.Health > 0 then                
  68. local vector, onScreen = Camera:WorldToScreenPoint(enemy.Character["Head"].Position)
  69. local magnitude = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(vector.X, vector.Y)).magnitude
  70. target = workspace[enemy.Name]["Head"].Position
  71. end
  72. else
  73. target = nil
  74. end
  75. end)



  • Recent Roblox Scripts