Back to Scripts
Silent aim and wallbang open source
ScriptBlox
Free
Game: Quick Shot [FPS]
153
Views
1
Likes
0
Dislikes
BoyWife
offline
Features
Made by @kylosilly
Tags
Script Code
local user_input_service = game:GetService("UserInputService");
local run_service = game:GetService("RunService");
local workspace = game:GetService("Workspace");
local players = game:GetService("Players");
local local_player = players.LocalPlayer;
local camera = workspace.CurrentCamera;
local raycast = RaycastParams.new(); -- proudly skidded this wallbang from vape v4 wallbang
raycast.FilterType = Enum.RaycastFilterType.Include;
local target;
local function closest_target(range: number)
local closest_part, closest_distance = nil, range;
local mouse = user_input_service:GetMouseLocation();
for _, player in (players:GetPlayers()) do
if (player == local_player) then
continue;
end
local character = player.Character;
if (not character) then
continue;
end
local humanoid = character:FindFirstChildWhichIsA("Humanoid");
local head = character:FindFirstChild("Hitbox_Head");
if (not head) or (not humanoid) or (humanoid.Health <= 0) then
continue;
end
local screen_position, on_screen = camera:WorldToViewportPoint(head.Position);
if (not on_screen) then
continue;
end
local distance = (Vector2.new(screen_position.X, screen_position.Y) - Vector2.new(mouse.X, mouse.Y)).Magnitude;
if (distance < closest_distance) then
closest_part = head;
closest_distance = distance;
end
end
return closest_part;
end
run_service.RenderStepped:Connect(function()
target = closest_target(1000);
end)
local old; old = hookmetamethod(game, "__namecall", function(self, ...)
local args = {...};
if (getnamecallmethod() == "Raycast") then
if (target) then
args[2] = (target.Position - args[1]).Unit * 9e9;
raycast.FilterDescendantsInstances = {target}
args[3] = raycast;
return old(self, unpack(args));
end
end
return old(self, ...);
end)
Comments (0)
Please login to comment
Login with Discord
Loading comments...