--// Made by samet.exe on discord local Bone = "HumanoidRootPart"; local ReplicatedStorage = game:GetService("ReplicatedStorage"); local Players = game:GetService("Players"); local UserInputService = game:GetService("UserInputService"); local Workspace = game:GetService("Workspace"); local RunService = game:GetService("RunService"); local LocalPlayer = Players.LocalPlayer; local Camera = Workspace.CurrentCamera; local Modules = {}; do local GunModulesPath = ReplicatedStorage:FindFirstChild("GunSystem"); if GunModulesPath then Modules.GunRaycast = require(GunModulesPath.Raycast); end; end; local Closest; local GetClosestPlayer = function(Radius) local ClosestDistance = Radius or math.huge; local Player = nil; for Index, Value in Players:GetPlayers() do if (Value ~= LocalPlayer) then local Character = Value.Character; local Root = Character and Character:FindFirstChild("HumanoidRootPart"); if not Root then continue end; local Position, Visible = Camera:WorldToViewportPoint(Root.Position); local Distance = (Vector2.new(Position.X, Position.Y) - UserInputService:GetMouseLocation()).Magnitude; if not Visible then continue end; if Distance < ClosestDistance then ClosestDistance = Distance; Player = Value; end; end; end; return Player; end; RunService.Heartbeat:Connect(function() Closest = GetClosestPlayer(); end); local OldFunc = Modules.GunRaycast.Raycast; Modules.GunRaycast.Raycast = function(DontKnow, Origin, Direction) -- Trampoline hook may be detected if (Closest and Closest.Character and Closest.Character:FindFirstChild("HumanoidRootPart")) then local BonePosition = Closest.Character[Bone].Position; Direction = CFrame.new(Origin, BonePosition).LookVector.Unit * (BonePosition - Origin).Magnitude; end; return OldFunc(DontKnow, Origin, Direction); end;