1 | -- loadstring(game:HttpGet("https://pastecode.dev/raw/fp65jt8a/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 | -- Prediction settings |
15 | getgenv().HitPart = "HumanoidRootPart" |
16 | getgenv().Prediction = 0.232099375 |
17 | getgenv().Enabled = true |
18 | |
19 | function getClosestPlayer() |
20 | local Range = getgenv().Fov or 300 |
21 | local ClosestDistance = Range |
22 | local ClosestPlayer = nil |
23 | |
24 | for _, v in pairs(game:GetService("Players"):GetPlayers()) do |
25 | if v ~= Player and v.Character and v.Character:FindFirstChild("HumanoidRootPart") and v.Character:FindFirstChild("Humanoid") then |
26 | local Humanoid = v.Character.Humanoid |
27 | if Humanoid.Health > 0 then |
28 | local Pos = CurrentCamera:WorldToScreenPoint(v.Character.HumanoidRootPart.Position) |
29 | local Distance = (Vector2.new(Pos.X, Pos.Y) - Vector2.new(CurrentCamera.ViewportSize.X / 2, CurrentCamera.ViewportSize.Y / 2)).Magnitude |
30 | if Distance < ClosestDistance then |
31 | ClosestDistance = Distance |
32 | ClosestPlayer = v |
33 | end |
34 | end |
35 | end |
36 | end |
37 | |
38 | return ClosestPlayer |
39 | end |
40 | |
41 | local oldMouse = Player:GetMouse() |
42 | |
43 | local old |
44 | old = hookmetamethod(oldMouse, "__index", newcclosure(function(self, obj) |
45 | if obj == "Hit" then |
46 | local closestPlayer = getClosestPlayer() |
47 | if closestPlayer and closestPlayer.Character and closestPlayer.Character:FindFirstChild(Part) then |
48 | local part = closestPlayer.Character[Part] |
49 | local predictedPosition = part.Position + (part.Velocity * getgenv().Prediction) |
50 | return CFrame.new(predictedPosition) |
51 | end |
52 | end |
53 | return old(self, obj) |
54 | end)) |
55 | |
56 | setreadonly(getrawmetatable(game), true) |
57 | |
58 | RunService.RenderStepped:Connect(function() |
59 | Circle.Position = Vector2.new(CurrentCamera.ViewportSize.X / 2, CurrentCamera.ViewportSize.Y / 2) |
60 | Circle.Radius = getgenv().Fov or 300 |
61 | Circle.Visible = true |
62 | Circle.Color = Color3.fromRGB(255, 255, 255) |
63 | Circle.Thickness = 1 |
64 | Circle.Transparency = 1 |
65 | end) |
66 | |
67 | wait(1.5) |