Advertisement
Keimu

D Day Silent Aim Script

Feb 16th, 2023
3,689
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. --[[
  2. Made by Rileyy#0808
  3. Not many people play this but I found it fun
  4. D-DAY Silent Aim.lua
  5. ]]
  6.  
  7.  
  8. --// Variables
  9. local Players = game:GetService('Players')
  10. local RunService = game:GetService('RunService')
  11. local UserInputService = game:GetService('UserInputService')
  12.  
  13. local LocalPlayer = Players.LocalPlayer
  14. local Mouse = LocalPlayer:GetMouse()
  15. local CurrentCamera = workspace.CurrentCamera
  16.  
  17. local framework = require(game:GetService('ReplicatedStorage'):WaitForChild('Modules'):WaitForChild('Universal'):WaitForChild('Framework'))
  18. local old
  19.  
  20. --// Tables
  21. local Client = {}
  22. local Drawings = {
  23. Drawing.new('Circle'),
  24. Drawing.new('Circle')
  25. }
  26.  
  27. --// FOV
  28. Drawings[1].Color = Color3.fromRGB(248, 200, 220)
  29. Drawings[1].Thickness = 2
  30. Drawings[1].Visible = true
  31. Drawings[1].Radius = 150
  32.  
  33. Drawings[2].Thickness = 4
  34. Drawings[2].Visible = true
  35. Drawings[2].Radius = 150
  36. Drawings[2].ZIndex = -1
  37.  
  38. UserInputService.InputChanged:Connect(function(input)
  39. if input.UserInputType == Enum.UserInputType.MouseMovement then
  40. Drawings[1].Position = UserInputService:GetMouseLocation()
  41. Drawings[2].Position = UserInputService:GetMouseLocation()
  42. end
  43. end)
  44.  
  45. --// Functions
  46. local hooked = function(...)
  47. local args = {...}
  48. if Client.Target ~= nil and Client.Target:FindFirstChild('Head') and LocalPlayer.Character then
  49. print(args[3], 'Old')
  50. args[3] = CFrame.new(LocalPlayer.Character.Head.Position, Client.Target.Head.Position).LookVector
  51. print(args[3])
  52. end
  53.  
  54. return old(unpack(args))
  55. end
  56.  
  57. --// Loops
  58.  
  59. RunService.PostSimulation:Connect(function()
  60. local MousePosition = UserInputService:GetMouseLocation()
  61. Client.Target = nil
  62. Client.TargetDistance = Drawings[1].Radius
  63.  
  64. for _, player in next, Players:GetChildren() do
  65.  
  66. local character = player.Character
  67. local Humanoid = character and character:FindFirstChildWhichIsA('Humanoid')
  68. local HumanoidRootPart = character and character:FindFirstChild('HumanoidRootPart')
  69.  
  70. if not Humanoid or not HumanoidRootPart then
  71. continue
  72. end
  73.  
  74. if Humanoid.Health <= 0 then
  75. continue
  76. end
  77.  
  78. if player.Team == LocalPlayer.Team then
  79. continue
  80. end
  81.  
  82. local ScreenPosition, ScreenVisible = CurrentCamera:WorldToViewportPoint(HumanoidRootPart.Position)
  83. local MouseDistance = (MousePosition - Vector2.new(ScreenPosition.X, ScreenPosition.Y)).magnitude
  84.  
  85. if MouseDistance < Client.TargetDistance then
  86. Client.Target = character
  87. Client.TargetDistance = MouseDistance
  88. end
  89. end
  90. end)
  91.  
  92. old = hookfunction(framework.modules.Raycast, function(...)
  93. return hooked(...)
  94. end)
  95.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement