Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shared.iDrawings.FOV_Circle_Outline = Circle_Outline;
- local Line = shared.iDrawings.Tracer or Drawing.new'Line';
- Line.Color = Color3.new(1, 1, 1);
- Line.From = Vector2.new(50, 200);
- Line.To = Vector2.new(500, 200);
- Line.Thickness = 2;
- Line.Visible = true;
- shared.iDrawings.Tracer = Line;
- local Text = shared.iDrawings.Info or Drawing.new'Text';
- Text.Outline = true;
- Text.Center = true;
- Text.Visible = true;
- Text.Size = 20;
- Text.Text = '';
- Text.Color = Color3.new(1, 1, 1);
- Text.Position = Vector2.new((Line.From.X + Line.To.X) / 2, (Line.From.Y + Line.To.Y) / 2 - 25);
- Text.Transparency = 1;
- shared.iDrawings.Info = Text;
- local TSize = {};
- function CreateCircleTween()
- TSize.Circle = Tween.new(1 / 2, {
- Radius = shared.iDrawings.FOV_Circle.Radius;
- }, {
- Radius = 100;
- }, 'outBounce');
- end
- local CurrentCamera = workspace.CurrentCamera
- local Players = game.GetService(game, "Players")
- local LocalPlayer = Players.LocalPlayer
- local Mouse = LocalPlayer:GetMouse()
- function ClosestPlayer()
- local MaxDist, Closest = math.huge
- for I,V in pairs(Players.GetPlayers(Players)) do
- if V == LocalPlayer then continue end
- if V.Team == LocalPlayer then continue end
- if not V.Character then continue end
- local Head = V.Character.FindFirstChild(V.Character, "Head")
- if not Head then continue end
- local Pos, Vis = CurrentCamera.WorldToScreenPoint(CurrentCamera, Head.Position)
- if not Vis then continue end
- local MousePos, TheirPos = Vector2.new(Mouse.X, Mouse.Y), Vector2.new(Pos.X, Pos.Y)
- local Dist = (TheirPos - MousePos).Magnitude
- if Dist < MaxDist then
- MaxDist = Dist
- Closest = V
- print("working")
- end
- end
- return Closest
- end
- local MT = getrawmetatable(game)
- local OldNC = MT.__namecall
- local OldIDX = MT.__index
- setreadonly(MT, false)
- MT.__namecall = newcclosure(function(self, ...)
- local Args, Method = {...}, getnamecallmethod()
- if Method == "FindPartOnRayWithIgnoreList" and not checkcaller() then
- local CP = ClosestPlayer()
- if CP and CP.Character and CP.Character.FindFirstChild(CP.Character, "Head") then
- Args[1] = Ray.new(CurrentCamera.CFrame.Position, (CP.Character.Head.Position - CurrentCamera.CFrame.Position).Unit * 1000)
- return OldNC(self, unpack(Args))
- end
- end
- return OldNC(self, ...)
- end)
- MT.__index = newcclosure(function(self, K)
- if K == "Clips" then
- return workspace.Map
- end
- return OldIDX(self, K)
- end)
- setreadonly(MT, true)w
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement