1 | -- loadstring(game:HttpGet("https://pastecode.dev/raw/a0xsl1v0/paste1.txt"))() |
2 | |
3 | setreadonly(getrawmetatable(game), false) |
4 | |
5 | local Player = game:GetService("Players").LocalPlayer |
6 | local Settings = { |
7 | Part = "HumanoidRootPart" |
8 | } |
9 | local Part = Settings.Part |
10 | local CurrentCamera = workspace.CurrentCamera |
11 | local Circle = Drawing.new("Circle") |
12 | local RunService = game:GetService("RunService") |
13 | |
14 | function getClosestPlayer() |
15 | local Range = getgenv().Fov or 300 |
16 | local ClosestDistance = Range |
17 | local ClosestPlayer = nil |
18 | |
19 | for _, v in pairs(game:GetService("Players"):GetPlayers()) do |
20 | if v ~= Player and v.Character and v.Character:FindFirstChild("HumanoidRootPart") and v.Character:FindFirstChild("Humanoid") then |
21 | local Humanoid = v.Character.Humanoid |
22 | if Humanoid.Health > 0 then |
23 | local Pos = CurrentCamera:WorldToScreenPoint(v.Character.HumanoidRootPart.Position) |
24 | local Distance = (Vector2.new(Pos.X, Pos.Y) - Vector2.new(CurrentCamera.ViewportSize.X / 2, CurrentCamera.ViewportSize.Y / 2)).Magnitude |
25 | if Distance < ClosestDistance then |
26 | ClosestDistance = Distance |
27 | ClosestPlayer = v |
28 | end |
29 | end |
30 | end |
31 | end |
32 | |
33 | return ClosestPlayer |
34 | end |
35 | |
36 | local oldMouse = Player:GetMouse() |
37 | |
38 | local old |
39 | old = hookmetamethod(oldMouse, "__index", newcclosure(function(self, obj) |
40 | if obj == "Hit" then |
41 | local closestPlayer = getClosestPlayer() |
42 | if closestPlayer and closestPlayer.Character and closestPlayer.Character:FindFirstChild(Part) then |
43 | return closestPlayer.Character[Part].CFrame |
44 | end |
45 | end |
46 | return old(self, obj) |
47 | end)) |
48 | |
49 | setreadonly(getrawmetatable(game), true) |
50 | |
51 | RunService.RenderStepped:Connect(function() |
52 | Circle.Position = Vector2.new(CurrentCamera.ViewportSize.X / 2, CurrentCamera.ViewportSize.Y / 2) |
53 | Circle.Radius = getgenv().Fov or 300 |
54 | Circle.Visible = false |
55 | Circle.Color = Color3.fromRGB(255, 255, 255) |
56 | Circle.Thickness = 1 |
57 | Circle.Transparency = 1 |
58 | end) |
59 | |
60 | wait(1.5) |