Silent Aim Wallbang Open Source
Key Required

Silent Aim Wallbang Open Source

[Visby] War TycoonBeboModsBeboMods 79.1K views 119 executesUpdated Oct 16, 2023
3.3/ 5(6 votes)
4267% Positive
Lua Script•83 lines (3283 chars)
local LPlayer = game:GetService("Players").LocalPlayer

local remote = game:GetService("ReplicatedStorage").BulletFireSystem.FireBullet
local LMouse = LPlayer:GetMouse()
local Camera = game:GetService("Workspace").CurrentCamera
local fovAmount = 200
local teamCheck = false

local fovCircle = Drawing.new("Circle")
fovCircle.Radius = fovAmount
fovCircle.Visible = true
fovCircle.Color = Color3.fromRGB(212, 34, 255)
fovCircle.Thickness = 1
fovCircle.NumSides = 12
fovCircle.Position = Vector2.new(0, 0)

local function UpdateFovCircle()
   local mousePos = Camera.WorldToViewportPoint(Camera, LMouse.Hit.Position)
   fovCircle.Radius = fovAmount
   fovCircle.Position = Vector2.new(mousePos.X, mousePos.Y)
end

local function IsInFov(position)
   local mousePos = Vector2.new(LMouse.X, LMouse.Y)
   local screenPosition, isVisible = Camera:WorldToViewportPoint(position)
   local distanceToMouse = (mousePos - Vector2.new(screenPosition.X, screenPosition.Y)).Magnitude
   return isVisible and distanceToMouse <= fovAmount
end

local function GetClosestPlayer()
   local ClosestDistance, ClosestPlayer = math.huge, nil

   for _, Player in game:GetService("Players"):GetPlayers() do
       if Player ~= LPlayer then
           local Character = Player.Character
           if Character and Character:FindFirstChild("Humanoid") and Character.Humanoid.Health > 0 then
               local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
               if
                   HumanoidRootPart
                   and IsInFov(HumanoidRootPart.Position)
                   and (not teamCheck or Player.Team ~= LPlayer.Team)
               then
                   local screenPosition, isVisible = Camera:WorldToViewportPoint(HumanoidRootPart.Position)
                   if isVisible then
                       local distanceToMouse = (LMouse.X - screenPosition.X) ^ 2
                           + (LMouse.Y - screenPosition.Y) ^ 2
                       if distanceToMouse < ClosestDistance then
                           ClosestPlayer = Player
                           ClosestDistance = distanceToMouse
                       end
                   end
               end
           end
       end
   end

   return ClosestPlayer
end
game:GetService("RunService").RenderStepped:Connect(UpdateFovCircle)

local oldNamecall

oldNamecall = hookmetamethod(remote, "__namecall", newcclosure(function(self, ...)
   if typeof(self) == "Instance" then
       local method = getnamecallmethod()
       if method and (method == "FireServer" and self == remote) then
           local target = GetClosestPlayer()
           local targetchar = target and target.Character or nil
           local targetHumanoidRootPart = targetchar and targetchar:FindFirstChild("HumanoidRootPart") or nil
           local targetHead = targetchar and targetchar:FindFirstChild("Head") or nil
           if targetHumanoidRootPart and targetHead then
               local remArgs = {...}
               remArgs[2] = targetHead
               remArgs[3] = targetHead.Position
               setnamecallmethod(method)
               return oldNamecall(self, unpack(remArgs))
           else
               setnamecallmethod(method)
           end
       end
   end
   return oldNamecall(self, ...)
end))

Features & Information

Silent Aim Wallbang
#war tycoon#roblox

Community Comments (2)

mumundjan09mumundjan09Oct 23, 2023(edited)

it works well when it wants to work, however it feels very inconsistent. feels like the fov circle isnt accurate and the actual fov is much smaller. and it sometimes just fails to hit the target, am not talking about going 200 mph at like 3k studs, no like sometimes it just doesnt work even when point blank. Still very good when it wants to work. just a question, would this be able to be implemented into vehicles. not talking about just machine guns but like have the main gun on a tank be homing or some ****. just snipe helis out of the sky

manlemon555manlemon555Jan 19, 2024(edited)

Can you create wallbang script but for scp roleplaying

More Scripts for [Visby] War Tycoon