Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mouse = game.Players.LocalPlayer:GetMouse()
- function GetChars()
- Chars = {}
- for i,v in pairs(game.Players:GetChildren()) do
- if v ~= game.Players.LocalPlayer and v.GameStats.Team.Value ~= game.Players.LocalPlayer.GameStats.Team.Value and game.workspace:FindFirstChild(v.Name) then
- table.insert(Chars,game.workspace:FindFirstChild(v.Name))
- end
- end
- return Chars
- end
- function GetClosestPlr()
- Clr = nil
- Dist = math.huge
- for i,v in pairs(GetChars()) do
- if v:FindFirstChild('HumanoidRootPart') and game.Players.LocalPlayer.Character:FindFirstChild('HumanoidRootPart') then
- local PlrPos, onScreen = game.Workspace.CurrentCamera:WorldToViewportPoint(v.HumanoidRootPart.Position);
- local mag = (Vector2.new(PlrPos.X, PlrPos.Y) - Vector2.new(Mouse.X, Mouse.Y)).magnitude
- if mag < Dist then
- Clr = v
- Dist = mag
- end
- end
- end
- return Clr
- end
- function SilentAim()
- if game.Players.LocalPlayer.PlayerScripts.Shockwave.Disabled == false then
- old = getsenv(game.Players.LocalPlayer.PlayerScripts.Shockwave).FireManage
- getsenv(game.Players.LocalPlayer.PlayerScripts.Shockwave).FireManage = function(gunname, pos, ...)
- args = {...}
- if GetClosestPlr() ~= nil and GetClosestPlr():FindFirstChild('HumanoidRootPart') then
- pos = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, GetClosestPlr().HumanoidRootPart.Position)
- end
- return old(gunname, pos, unpack(args))
- end
- end
- end
- game.Players.LocalPlayer.PlayerScripts.Shockwave:GetPropertyChangedSignal("Disabled"):Connect(SilentAim)
Add Comment
Please, Sign In to add comment