1 | if (not game:IsLoaded()) then |
2 | game.Loaded:Wait(); |
3 | end |
4 | |
5 | local UILibrary = loadstring(game:HttpGet("https://raw.githubusercontent.com/fatesc/fates-esp/main/ui.lua"))(); |
6 | |
7 | local PlaceId = game.PlaceId |
8 | |
9 | local Players = game:GetService("Players"); |
10 | local HttpService = game:GetService("HttpService"); |
11 | local Workspace = game:GetService("Workspace"); |
12 | local Teams = game:GetService("Teams") |
13 | local UserInputService = game:GetService("UserInputService") |
14 | local RunService = game:GetService("RunService"); |
15 | |
16 | local CurrentCamera = Workspace.CurrentCamera |
17 | local WorldToViewportPoint = CurrentCamera.WorldToViewportPoint |
18 | local GetPartsObscuringTarget = CurrentCamera.GetPartsObscuringTarget |
19 | |
20 | local Inset = game:GetService("GuiService"):GetGuiInset().Y |
21 | |
22 | local FindFirstChild = game.FindFirstChild |
23 | local FindFirstChildWhichIsA = game.FindFirstChildWhichIsA |
24 | local IsA = game.IsA |
25 | local Vector2new = Vector2.new |
26 | local Vector3new = Vector3.new |
27 | local CFramenew = CFrame.new |
28 | local Color3new = Color3.new |
29 | |
30 | local Tfind = table.find |
31 | local create = table.create |
32 | local format = string.format |
33 | local floor = math.floor |
34 | local gsub = string.gsub |
35 | local sub = string.sub |
36 | local lower = string.lower |
37 | local upper = string.upper |
38 | local random = math.random |
39 | |
40 | local DefaultSettings = { |
41 | Esp = { |
42 | NamesEnabled = true, |
43 | DisplayNamesEnabled = false, |
44 | DistanceEnabled = true, |
45 | HealthEnabled = true, |
46 | TracersEnabled = false, |
47 | BoxEsp = false, |
48 | TeamColors = true, |
49 | Thickness = 1.5, |
50 | TracerThickness = 1.6, |
51 | Transparency = .9, |
52 | TracerTrancparency = .7, |
53 | Size = 16, |
54 | RenderDistance = 9e9, |
55 | Color = Color3.fromRGB(19, 130, 226), |
56 | OutlineColor = Color3new(), |
57 | TracerTo = "Head", |
58 | BlacklistedTeams = {} |
59 | }, |
60 | Aimbot = { |
61 | Enabled = false, |
62 | SilentAim = false, |
63 | Wallbang = false, |
64 | ShowFov = false, |
65 | Snaplines = true, |
66 | ThirdPerson = false, |
67 | FirstPerson = false, |
68 | ClosestCharacter = false, |
69 | ClosestCursor = true, |
70 | Smoothness = 1, |
71 | SilentAimHitChance = 100, |
72 | FovThickness = 1, |
73 | FovTransparency = 1, |
74 | FovSize = 150, |
75 | FovColor = Color3new(1, 1, 1), |
76 | Aimlock = "Head", |
77 | SilentAimRedirect = "Head", |
78 | BlacklistedTeams = {} |
79 | }, |
80 | WindowPosition = UDim2.new(0.5, -200, 0.5, -139); |
81 | |
82 | Version = 1.2 |
83 | } |
84 | |
85 | local EncodeConfig, DecodeConfig; |
86 | do |
87 | local deepsearchset; |
88 | deepsearchset = function(tbl, ret, value) |
89 | if (type(tbl) == 'table') then |
90 | local new = {} |
91 | for i, v in next, tbl do |
92 | new[i] = v |
93 | if (type(v) == 'table') then |
94 | new[i] = deepsearchset(v, ret, value); |
95 | end |
96 | if (ret(i, v)) then |
97 | new[i] = value(i, v); |
98 | end |
99 | end |
100 | return new |
101 | end |
102 | end |
103 | |
104 | DecodeConfig = function(Config) |
105 | local DecodedConfig = deepsearchset(Config, function(Index, Value) |
106 | return type(Value) == "table" and (Value.HSVColor or Value.Position); |
107 | end, function(Index, Value) |
108 | local Color = Value.HSVColor |
109 | local Position = Value.Position |
110 | if (Color) then |
111 | return Color3.fromHSV(Color.H, Color.S, Color.V); |
112 | end |
113 | if (Position and Position.Y and Position.X) then |
114 | return UDim2.new(UDim.new(Position.X.Scale, Position.X.Offset), UDim.new(Position.Y.Scale, Position.Y.Offset)); |
115 | else |
116 | return DefaultSettings.WindowPosition; |
117 | end |
118 | end); |
119 | return DecodedConfig |
120 | end |
121 | |
122 | EncodeConfig = function(Config) |
123 | local ToHSV = Color3new().ToHSV |
124 | local EncodedConfig = deepsearchset(Config, function(Index, Value) |
125 | return typeof(Value) == "Color3" or typeof(Value) == "UDim2" |
126 | end, function(Index, Value) |
127 | local Color = typeof(Value) == "Color3" |
128 | local Position = typeof(Value) == "UDim2" |
129 | if (Color) then |
130 | local H, S, V = ToHSV(Value); |
131 | return { HSVColor = { H = H, S = S, V = V } }; |
132 | end |
133 | if (Position) then |
134 | return { Position = { |
135 | X = { Scale = Value.X.Scale, Offset = Value.X.Offset }; |
136 | Y = { Scale = Value.Y.Scale, Offset = Value.Y.Offset } |
137 | } }; |
138 | end |
139 | end) |
140 | return EncodedConfig |
141 | end |
142 | end |
143 | |
144 | local GetConfig = function() |
145 | local read, data = pcall(readfile, "fates-esp.json"); |
146 | local canDecode, config = pcall(HttpService.JSONDecode, HttpService, data); |
147 | if (read and canDecode) then |
148 | local Decoded = DecodeConfig(config); |
149 | if (Decoded.Version ~= DefaultSettings.Version) then |
150 | local Encoded = HttpService:JSONEncode(EncodeConfig(DefaultSettings)); |
151 | writefile("fates-esp.json", Encoded); |
152 | return DefaultSettings; |
153 | end |
154 | return Decoded; |
155 | else |
156 | local Encoded = HttpService:JSONEncode(EncodeConfig(DefaultSettings)); |
157 | writefile("fates-esp.json", Encoded); |
158 | return DefaultSettings |
159 | end |
160 | end |
161 | |
162 | local Settings = GetConfig(); |
163 | |
164 | local LocalPlayer = Players.LocalPlayer |
165 | local Mouse = LocalPlayer:GetMouse(); |
166 | local MouseVector = Vector2new(Mouse.X, Mouse.Y); |
167 | local Characters = {} |
168 | |
169 | local CustomGet = { |
170 | [0] = function() |
171 | return {} |
172 | end |
173 | } |
174 | |
175 | local Get; |
176 | if (CustomGet[PlaceId]) then |
177 | Get = CustomGet[PlaceId](); |
178 | end |
179 | |
180 | local GetCharacter = function(Player) |
181 | if (Get) then |
182 | return Get.GetCharacter(Player); |
183 | end |
184 | return Player.Character |
185 | end |
186 | local CharacterAdded = function(Player, Callback) |
187 | if (Get) then |
188 | return |
189 | end |
190 | Player.CharacterAdded:Connect(Callback); |
191 | end |
192 | local CharacterRemoving = function(Player, Callback) |
193 | if (Get) then |
194 | return |
195 | end |
196 | Player.CharacterRemoving:Connect(Callback); |
197 | end |
198 | |
199 | local GetTeam = function(Player) |
200 | if (Get) then |
201 | return Get.GetTeam(Player); |
202 | end |
203 | return Player.Team |
204 | end |
205 | |
206 | local Drawings = {} |
207 | |
208 | local AimbotSettings = Settings.Aimbot |
209 | local EspSettings = Settings.Esp |
210 | |
211 | local FOV = Drawing.new("Circle"); |
212 | FOV.Color = AimbotSettings.FovColor |
213 | FOV.Thickness = AimbotSettings.FovThickness |
214 | FOV.Transparency = AimbotSettings.FovTransparency |
215 | FOV.Filled = false |
216 | FOV.Radius = AimbotSettings.FovSize |
217 | |
218 | local Snaplines = Drawing.new("Line"); |
219 | Snaplines.Color = AimbotSettings.FovColor |
220 | Snaplines.Thickness = .1 |
221 | Snaplines.Transparency = 1 |
222 | Snaplines.Visible = AimbotSettings.Snaplines |
223 | |
224 | table.insert(Drawings, FOV); |
225 | table.insert(Drawings, Snaplines); |
226 | |
227 | local HandlePlayer = function(Player) |
228 | local Character = GetCharacter(Player); |
229 | if (Character) then |
230 | Characters[Player] = Character |
231 | end |
232 | CharacterAdded(Player, function(Char) |
233 | Characters[Player] = Char |
234 | end); |
235 | CharacterRemoving(Player, function(Char) |
236 | Characters[Player] = nil |
237 | local PlayerDrawings = Drawings[Player] |
238 | if (PlayerDrawings) then |
239 | PlayerDrawings.Text.Visible = false |
240 | PlayerDrawings.Box.Visible = false |
241 | PlayerDrawings.Tracer.Visible = false |
242 | end |
243 | end); |
244 | |
245 | if (Player == LocalPlayer) then return; end |
246 | |
247 | local Text = Drawing.new("Text"); |
248 | Text.Color = EspSettings.Color |
249 | Text.OutlineColor = EspSettings.OutlineColor |
250 | Text.Size = EspSettings.Size |
251 | Text.Transparency = EspSettings.Transparency |
252 | Text.Center = true |
253 | Text.Outline = true |
254 | |
255 | local Tracer = Drawing.new("Line"); |
256 | Tracer.Color = EspSettings.Color |
257 | Tracer.From = Vector2new(CurrentCamera.ViewportSize.X / 2, CurrentCamera.ViewportSize.Y); |
258 | Tracer.Thickness = EspSettings.TracerThickness |
259 | Tracer.Transparency = EspSettings.TracerTrancparency |
260 | |
261 | local Box = Drawing.new("Quad"); |
262 | Box.Thickness = EspSettings.Thickness |
263 | Box.Transparency = EspSettings.Transparency |
264 | Box.Filled = false |
265 | Box.Color = EspSettings.Color |
266 | |
267 | Drawings[Player] = { Text = Text, Tracer = Tracer, Box = Box } |
268 | end |
269 | |
270 | for Index, Player in pairs(Players:GetPlayers()) do |
271 | HandlePlayer(Player); |
272 | end |
273 | Players.PlayerAdded:Connect(function(Player) |
274 | HandlePlayer(Player); |
275 | end); |
276 | |
277 | Players.PlayerRemoving:Connect(function(Player) |
278 | Characters[Player] = nil |
279 | local PlayerDrawings = Drawings[Player] |
280 | for Index, Drawing in pairs(PlayerDrawings or {}) do |
281 | Drawing.Visible = false |
282 | end |
283 | Drawings[Player] = nil |
284 | end); |
285 | |
286 | local SetProperties = function(Properties) |
287 | for Player, PlayerDrawings in pairs(Drawings) do |
288 | if (type(Player) ~= "number") then |
289 | for Property, Value in pairs(Properties.Tracer or {}) do |
290 | PlayerDrawings.Tracer[Property] = Value |
291 | end |
292 | for Property, Value in pairs(Properties.Text or {}) do |
293 | PlayerDrawings.Text[Property] = Value |
294 | end |
295 | for Property, Value in pairs(Properties.Box or {}) do |
296 | PlayerDrawings.Box[Property] = Value |
297 | end |
298 | end |
299 | end |
300 | end |
301 | |
302 | |
303 | local GetClosestPlayerAndRender = function() |
304 | MouseVector = Vector2new(Mouse.X, Mouse.Y + Inset); |
305 | local Closest = create(4); |
306 | local Vector2Distance = math.huge |
307 | local Vector3DistanceOnScreen = math.huge |
308 | local Vector3Distance = math.huge |
309 | |
310 | if (AimbotSettings.ShowFov) then |
311 | FOV.Position = MouseVector |
312 | FOV.Visible = true |
313 | Snaplines.Visible = false |
314 | else |
315 | FOV.Visible = false |
316 | end |
317 | |
318 | local LocalRoot = Characters[LocalPlayer] and FindFirstChild(Characters[LocalPlayer], "HumanoidRootPart"); |
319 | for Player, Character in pairs(Characters) do |
320 | if (Player == LocalPlayer) then continue; end |
321 | local PlayerDrawings = Drawings[Player] |
322 | local PlayerRoot = FindFirstChild(Character, "HumanoidRootPart"); |
323 | local PlayerTeam = GetTeam(Player); |
324 | if (PlayerRoot) then |
325 | local Redirect = FindFirstChild(Character, AimbotSettings.Aimlock); |
326 | if (not Redirect) then |
327 | PlayerDrawings.Text.Visible = false |
328 | PlayerDrawings.Box.Visible = false |
329 | PlayerDrawings.Tracer.Visible = false |
330 | continue; |
331 | end |
332 | local RedirectPos = Redirect.Position |
333 | local Tuple, Visible = WorldToViewportPoint(CurrentCamera, RedirectPos); |
334 | local CharacterVec2 = Vector2new(Tuple.X, Tuple.Y); |
335 | local Vector2Magnitude = (MouseVector - CharacterVec2).Magnitude |
336 | local Vector3Magnitude = LocalRoot and (RedirectPos - LocalRoot.Position).Magnitude or math.huge |
337 | local InRenderDistance = Vector3Magnitude <= EspSettings.RenderDistance |
338 | |
339 | if (not Tfind(AimbotSettings.BlacklistedTeams, PlayerTeam)) then |
340 | local InFovRadius = Vector2Magnitude <= FOV.Radius |
341 | if (InFovRadius) then |
342 | if (Visible and Vector2Magnitude <= Vector2Distance and AimbotSettings.ClosestCursor) then |
343 | Vector2Distance = Vector2Magnitude |
344 | Closest = {Character, CharacterVec2, Player, Redirect} |
345 | if (AimbotSettings.Snaplines and AimbotSettings.ShowFov) then |
346 | Snaplines.Visible = true |
347 | Snaplines.From = MouseVector |
348 | Snaplines.To = CharacterVec2 |
349 | else |
350 | Snaplines.Visible = false |
351 | end |
352 | end |
353 | |
354 | if (Visible and Vector3Magnitude <= Vector3DistanceOnScreen and Settings.ClosestPlayer) then |
355 | Vector3DistanceOnScreen = Vector3Magnitude |
356 | Closest = {Character, CharacterVec2, Player, Redirect} |
357 | end |
358 | end |
359 | end |
360 | |
361 | if (InRenderDistance and Visible and not Tfind(EspSettings.BlacklistedTeams, PlayerTeam)) then |
362 | local CharacterHumanoid = FindFirstChildWhichIsA(Character, "Humanoid") or { Health = 0, MaxHealth = 0 }; |
363 | PlayerDrawings.Text.Text = format("%s\n%s%s", |
364 | EspSettings.NamesEnabled and Player.Name or "", |
365 | EspSettings.DistanceEnabled and format("[%s]", |
366 | floor(Vector3Magnitude) |
367 | ) or "", |
368 | EspSettings.HealthEnabled and format(" [%s/%s]", |
369 | floor(CharacterHumanoid.Health), |
370 | floor(CharacterHumanoid.MaxHealth) |
371 | ) or "" |
372 | ); |
373 | |
374 | PlayerDrawings.Text.Position = Vector2new(Tuple.X, Tuple.Y - 40); |
375 | |
376 | if (EspSettings.TracersEnabled) then |
377 | PlayerDrawings.Tracer.To = CharacterVec2 |
378 | end |
379 | |
380 | if (EspSettings.BoxEsp) then |
381 | local Parts = {} |
382 | for Index, Part in pairs(Character:GetChildren()) do |
383 | if (IsA(Part, "BasePart")) then |
384 | local ViewportPos = WorldToViewportPoint(CurrentCamera, Part.Position); |
385 | Parts[Part] = Vector2new(ViewportPos.X, ViewportPos.Y); |
386 | end |
387 | end |
388 | |
389 | local Top, Bottom, Left, Right |
390 | local Distance = math.huge |
391 | local ClosestPart = nil |
392 | for i2, Pos in next, Parts do |
393 | local Mag = (Pos - Vector2new(Tuple.X, 0)).Magnitude; |
394 | if (Mag <= Distance) then |
395 | ClosestPart = Pos |
396 | Distance = Mag |
397 | end |
398 | end |
399 | Top = ClosestPart |
400 | ClosestPart = nil |
401 | Distance = math.huge |
402 | for i2, Pos in next, Parts do |
403 | local Mag = (Pos - Vector2new(Tuple.X, CurrentCamera.ViewportSize.Y)).Magnitude; |
404 | if (Mag <= Distance) then |
405 | ClosestPart = Pos |
406 | Distance = Mag |
407 | end |
408 | end |
409 | Bottom = ClosestPart |
410 | ClosestPart = nil |
411 | Distance = math.huge |
412 | for i2, Pos in next, Parts do |
413 | local Mag = (Pos - Vector2new(0, Tuple.Y)).Magnitude; |
414 | if (Mag <= Distance) then |
415 | ClosestPart = Pos |
416 | Distance = Mag |
417 | end |
418 | end |
419 | Left = ClosestPart |
420 | ClosestPart = nil |
421 | Distance = math.huge |
422 | for i2, Pos in next, Parts do |
423 | local Mag = (Pos - Vector2new(CurrentCamera.ViewportSize.X, Tuple.Y)).Magnitude; |
424 | if (Mag <= Distance) then |
425 | ClosestPart = Pos |
426 | Distance = Mag |
427 | end |
428 | end |
429 | Right = ClosestPart |
430 | ClosestPart = nil |
431 | Distance = math.huge |
432 | |
433 | PlayerDrawings.Box.PointA = Vector2new(Right.X, Top.Y); |
434 | PlayerDrawings.Box.PointB = Vector2new(Left.X, Top.Y); |
435 | PlayerDrawings.Box.PointC = Vector2new(Left.X, Bottom.Y); |
436 | PlayerDrawings.Box.PointD = Vector2new(Right.X, Bottom.Y); |
437 | end |
438 | |
439 | if (EspSettings.TeamColors) then |
440 | local TeamColor; |
441 | if (PlayerTeam) then |
442 | local BrickTeamColor = PlayerTeam.TeamColor |
443 | TeamColor = BrickTeamColor.Color |
444 | else |
445 | TeamColor = Color3new(0.639216, 0.635294, 0.647059); |
446 | end |
447 | PlayerDrawings.Text.Color = TeamColor |
448 | PlayerDrawings.Box.Color = TeamColor |
449 | PlayerDrawings.Tracer.Color = TeamColor |
450 | end |
451 | |
452 | PlayerDrawings.Text.Visible = true |
453 | PlayerDrawings.Box.Visible = EspSettings.BoxEsp |
454 | PlayerDrawings.Tracer.Visible = EspSettings.TracersEnabled |
455 | else |
456 | PlayerDrawings.Text.Visible = false |
457 | PlayerDrawings.Box.Visible = false |
458 | PlayerDrawings.Tracer.Visible = false |
459 | end |
460 | else |
461 | PlayerDrawings.Text.Visible = false |
462 | PlayerDrawings.Box.Visible = false |
463 | PlayerDrawings.Tracer.Visible = false |
464 | end |
465 | end |
466 | |
467 | return unpack(Closest); |
468 | end |
469 | |
470 | local Locked, SwitchedCamera = false, false |
471 | UserInputService.InputBegan:Connect(function(Inp) |
472 | if (AimbotSettings.Enabled and Inp.UserInputType == Enum.UserInputType.MouseButton2) then |
473 | Locked = true |
474 | if (AimbotSettings.FirstPerson and LocalPlayer.CameraMode ~= Enum.CameraMode.LockFirstPerson) then |
475 | LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson |
476 | SwitchedCamera = true |
477 | end |
478 | end |
479 | end); |
480 | UserInputService.InputEnded:Connect(function(Inp) |
481 | if (AimbotSettings.Enabled and Inp.UserInputType == Enum.UserInputType.MouseButton2) then |
482 | Locked = false |
483 | if (SwitchedCamera) then |
484 | LocalPlayer.CameraMode = Enum.CameraMode.Classic |
485 | end |
486 | end |
487 | end); |
488 | |
489 | local ClosestCharacter, Vector, Player, Aimlock; |
490 | RunService.RenderStepped:Connect(function() |
491 | ClosestCharacter, Vector, Player, Aimlock = GetClosestPlayerAndRender(); |
492 | if (Locked and AimbotSettings.Enabled and ClosestCharacter) then |
493 | if (AimbotSettings.FirstPerson) then |
494 | if (syn) then |
495 | CurrentCamera.CoordinateFrame = CFramenew(CurrentCamera.CoordinateFrame.p, Aimlock.Position); |
496 | else |
497 | mousemoverel((Vector.X - MouseVector.X) / AimbotSettings.Smoothness, (Vector.Y - MouseVector.Y) / AimbotSettings.Smoothness); |
498 | end |
499 | elseif (AimbotSettings.ThirdPerson) then |
500 | mousemoveabs(Vector.X, Vector.Y); |
501 | end |
502 | end |
503 | end); |
504 | |
505 | local Hooks = { |
506 | HookedFunctions = {}, |
507 | OldMetaMethods = {}, |
508 | MetaMethodHooks = {}, |
509 | HookedSignals = {} |
510 | } |
511 | |
512 | local OtherDeprecated = { |
513 | children = "GetChildren" |
514 | } |
515 | |
516 | local RealMethods = {} |
517 | local FakeMethods = {} |
518 | |
519 | local HookedFunctions = Hooks.HookedFunctions |
520 | local MetaMethodHooks = Hooks.MetaMethodHooks |
521 | local OldMetaMethods = Hooks.OldMetaMethods |
522 | |
523 | local randomised = random(1, 10); |
524 | local randomisedVector = Vector3new(random(1, 10), random(1, 10), random(1, 10)); |
525 | Mouse.Move:Connect(function() |
526 | randomised = random(1, 10); |
527 | randomisedVector = Vector3new(random(1, 10), random(1, 10), random(1, 10)); |
528 | end); |
529 | |
530 | local x = setmetatable({}, { |
531 | __index = function(...) |
532 | print("index", ...); |
533 | end, |
534 | __add = function(...) |
535 | print("add", ...); |
536 | end, |
537 | __sub = function(...) |
538 | print("sub", ...); |
539 | end, |
540 | __mul = function(...) |
541 | print("mul", ...); |
542 | end |
543 | }); |
544 | |
545 | MetaMethodHooks.Index = function(...) |
546 | local __Index = OldMetaMethods.__index |
547 | |
548 | if (Player and Aimlock and ... == Mouse and not checkcaller()) then |
549 | local CallingScript = getfenv(2).script; |
550 | if (CallingScript.Name == "CallingScript") then |
551 | return __Index(...); |
552 | end |
553 | |
554 | local _Mouse, Index = ... |
555 | if (type(Index) == 'string') then |
556 | Index = gsub(sub(Index, 0, 100), "%z.*", ""); |
557 | end |
558 | local PassedChance = random(1, 100) < AimbotSettings.SilentAimHitChance |
559 | if (PassedChance and AimbotSettings.SilentAim) then |
560 | local Parts = GetPartsObscuringTarget(CurrentCamera, {CurrentCamera.CFrame.Position, Aimlock.Position}, {LocalPlayer.Character, ClosestCharacter}); |
561 | |
562 | Index = string.gsub(Index, "^%l", upper); |
563 | local Hit = #Parts == 0 or AimbotSettings.Wallbang |
564 | if (not Hit) then |
565 | return __Index(...); |
566 | end |
567 | if (Index == "Target") then |
568 | return Aimlock |
569 | end |
570 | if (Index == "Hit") then |
571 | local hit = __Index(...); |
572 | local pos = Aimlock.Position + randomisedVector / 10 |
573 | return CFramenew(pos.X, pos.Y, pos.Z, unpack({hit:components()}, 4)); |
574 | end |
575 | if (Index == "X") then |
576 | return Vector.X + randomised / 10 |
577 | end |
578 | if (Index == "Y") then |
579 | return Vector.Y + randomised / 10 |
580 | end |
581 | end |
582 | end |
583 | |
584 | return __Index(...); |
585 | end |
586 | |
587 | MetaMethodHooks.Namecall = function(...) |
588 | local __Namecall = OldMetaMethods.__namecall |
589 | local self = ... |
590 | local Method = gsub(getnamecallmethod() or "", "^%l", upper); |
591 | local Hooked = HookedFunctions[Method] |
592 | if (Hooked and self == Hooked[1]) then |
593 | return Hooked[3](...); |
594 | end |
595 | |
596 | return __Namecall(...); |
597 | end |
598 | |
599 | for MMName, MMFunc in pairs(MetaMethodHooks) do |
600 | local MetaMethod = string.format("__%s", string.lower(MMName)); |
601 | Hooks.OldMetaMethods[MetaMethod] = hookmetamethod(game, MetaMethod, MMFunc); |
602 | end |
603 | |
604 | HookedFunctions.FindPartOnRay = {Workspace, Workspace.FindPartOnRay, function(...) |
605 | local OldFindPartOnRay = HookedFunctions.FindPartOnRay[4] |
606 | if (AimbotSettings.SilentAim and Player and Aimlock and not checkcaller()) then |
607 | local PassedChance = random(1, 100) < AimbotSettings.SilentAimHitChance |
608 | if (ClosestCharacter and PassedChance) then |
609 | local Parts = GetPartsObscuringTarget(CurrentCamera, {CurrentCamera.CFrame.Position, Aimlock.Position}, {LocalPlayer.Character, ClosestCharacter}); |
610 | if (#Parts == 0 or AimbotSettings.Wallbang) then |
611 | return Aimlock, Aimlock.Position + (Vector3new(random(1, 10), random(1, 10), random(1, 10)) / 10), Vector3new(0, 1, 0), Aimlock.Material |
612 | end |
613 | end |
614 | end |
615 | return OldFindPartOnRay(...); |
616 | end}; |
617 | |
618 | HookedFunctions.FindPartOnRayWithIgnoreList = {Workspace, Workspace.FindPartOnRayWithIgnoreList, function(...) |
619 | local OldFindPartOnRayWithIgnoreList = HookedFunctions.FindPartOnRayWithIgnoreList[4] |
620 | if (Player and Aimlock and not checkcaller()) then |
621 | local CallingScript = getcallingscript(); |
622 | local PassedChance = random(1, 100) < AimbotSettings.SilentAimHitChance |
623 | if (CallingScript.Name ~= "ControlModule" and ClosestCharacter and PassedChance) then |
624 | local Parts = GetPartsObscuringTarget(CurrentCamera, {CurrentCamera.CFrame.Position, Aimlock.Position}, {LocalPlayer.Character, ClosestCharacter}); |
625 | if (#Parts == 0 or AimbotSettings.Wallbang) then |
626 | return Aimlock, Aimlock.Position + (Vector3new(random(1, 10), random(1, 10), random(1, 10)) / 10), Vector3new(0, 1, 0), Aimlock.Material |
627 | end |
628 | end |
629 | end |
630 | return OldFindPartOnRayWithIgnoreList(...); |
631 | end}; |
632 | |
633 | for Index, Function in pairs(HookedFunctions) do |
634 | Function[4] = hookfunction(Function[2], Function[3]); |
635 | end |
636 | |
637 | local MainUI = UILibrary.new(Color3.fromRGB(255, 79, 87)); |
638 | local Window = MainUI:LoadWindow('<font color="#ff4f57">FuxkingFATES</font>\nbest esp\nNOTBYLULAS', UDim2.fromOffset(400, 279)); |
639 | local ESP = Window.NewPage("esp"); |
640 | local Aimbot = Window.NewPage("aimbot"); |
641 | local EspSettingsUI = ESP.NewSection("Esp"); |
642 | local TracerSettingsUI = ESP.NewSection("Tracers"); |
643 | local SilentAim = Aimbot.NewSection("Silent Aim"); |
644 | local Aimbot = Aimbot.NewSection("Aimbot"); |
645 | |
646 | EspSettingsUI.Toggle("Show Niggaz", EspSettings.NamesEnabled, function(Callback) |
647 | EspSettings.NamesEnabled = Callback |
648 | end); |
649 | EspSettingsUI.Toggle("Show Health", EspSettings.HealthEnabled, function(Callback) |
650 | EspSettings.HealthEnabled = Callback |
651 | end); |
652 | EspSettingsUI.Toggle("Show Distanxe", EspSettings.DistanceEnabled, function(Callback) |
653 | EspSettings.DistanceEnabled = Callback |
654 | end); |
655 | EspSettingsUI.Toggle("Box Esp", EspSettings.BoxEsp, function(Callback) |
656 | EspSettings.BoxEsp = Callback |
657 | SetProperties({ Box = { Visible = Callback } }); |
658 | end); |
659 | EspSettingsUI.Slider("Render Distanxe", { Min = 0, Max = 50000, Default = math.clamp(EspSettings.RenderDistance, 0, 50000), Step = 10 }, function(Callback) |
660 | EspSettings.RenderDistance = Callback |
661 | end); |
662 | EspSettingsUI.Slider("Esp Size", { Min = 0, Max = 30, Default = EspSettings.Size, Step = 1}, function(Callback) |
663 | EspSettings.Size = Callback |
664 | SetProperties({ Text = { Size = Callback } }); |
665 | end); |
666 | EspSettingsUI.ColorPicker("Esp Kolor", EspSettings.Color, function(Callback) |
667 | EspSettings.TeamColors = false |
668 | EspSettings.Color = Callback |
669 | SetProperties({ Box = { Color = Callback }, Text = { Color = Callback }, Tracer = { Color = Callback } }); |
670 | end); |
671 | EspSettingsUI.Toggle("Team Kolors", EspSettings.TeamColors, function(Callback) |
672 | EspSettings.TeamColors = Callback |
673 | if (not Callback) then |
674 | SetProperties({ Tracer = { Color = EspSettings.Color }; Box = { Color = EspSettings.Color }; Text = { Color = EspSettings.Color } }) |
675 | end |
676 | end); |
677 | EspSettingsUI.Dropdown("Teams", {"Allies", "Enemies", "All"}, function(Callback) |
678 | table.clear(EspSettings.BlacklistedTeams); |
679 | if (Callback == "Enemies") then |
680 | table.insert(EspSettings.BlacklistedTeams, LocalPlayer.Team); |
681 | end |
682 | if (Callback == "Allies") then |
683 | local AllTeams = Teams:GetTeams(); |
684 | table.remove(AllTeams, table.find(AllTeams, LocalPlayer.Team)); |
685 | EspSettings.BlacklistedTeams = AllTeams |
686 | end |
687 | end); |
688 | TracerSettingsUI.Toggle("Enable Traxers", EspSettings.TracersEnabled, function(Callback) |
689 | EspSettings.TracersEnabled = Callback |
690 | SetProperties({ Tracer = { Visible = Callback } }); |
691 | end); |
692 | TracerSettingsUI.Dropdown("To", {"Head", "Torso"}, function(Callback) |
693 | AimbotSettings.Aimlock = Callback == "Torso" and "HumanoidRootPart" or Callback |
694 | end); |
695 | TracerSettingsUI.Dropdown("From", {"Top", "Bottom", "Left", "Right"}, function(Callback) |
696 | local ViewportSize = CurrentCamera.ViewportSize |
697 | local From = Callback == "Top" and Vector2new(ViewportSize.X / 2, ViewportSize.Y - ViewportSize.Y) or Callback == "Bottom" and Vector2new(ViewportSize.X / 2, ViewportSize.Y) or Callback == "Left" and Vector2new(ViewportSize.X - ViewportSize.X, ViewportSize.Y / 2) or Callback == "Right" and Vector2new(ViewportSize.X, ViewportSize.Y / 2); |
698 | EspSettings.TracerFrom = From |
699 | SetProperties({ Tracer = { From = From } }); |
700 | end); |
701 | TracerSettingsUI.Slider("Traxer Transparenxy", {Min = 0, Max = 1, Default = EspSettings.TracerTrancparency, Step = .1}, function(Callback) |
702 | EspSettings.TracerTrancparency = Callback |
703 | SetProperties({ Tracer = { Transparency = Callback } }); |
704 | end); |
705 | TracerSettingsUI.Slider("Traxer Thikkness", {Min = 0, Max = 5, Default = EspSettings.TracerThickness, Step = .1}, function(Callback) |
706 | EspSettings.TracerThickness = Callback |
707 | SetProperties({ Tracer = { Thickness = Callback } }); |
708 | end); |
709 | |
710 | SilentAim.Toggle("Silent Aim", AimbotSettings.SilentAim, function(Callback) |
711 | AimbotSettings.SilentAim = Callback |
712 | end); |
713 | SilentAim.Toggle("Wallbang", AimbotSettings.Wallbang, function(Callback) |
714 | AimbotSettings.Wallbang = Callback |
715 | end); |
716 | SilentAim.Dropdown("Redirekt", {"Head", "Torso"}, function(Callback) |
717 | AimbotSettings.SilentAimRedirect = Callback |
718 | end); |
719 | SilentAim.Slider("Hit Chance", {Min = 0, Max = 100, Default = AimbotSettings.SilentAimHitChance, Step = 1}, function(Callback) |
720 | AimbotSettings.SilentAimHitChance = Callback |
721 | end); |
722 | |
723 | SilentAim.Dropdown("Loxk Type", {"Closest Cursor", "Closest Player"}, function(Callback) |
724 | if (Callback == "Closest Cursor") then |
725 | AimbotSettings.ClosestCharacter = false |
726 | AimbotSettings.ClosestCursor = true |
727 | else |
728 | AimbotSettings.ClosestCharacter = true |
729 | AimbotSettings.ClosestCursor = false |
730 | end |
731 | end); |
732 | |
733 | Aimbot.Toggle("Aimbot (M2)", AimbotSettings.Enabled, function(Callback) |
734 | AimbotSettings.Enabled = Callback |
735 | if (not AimbotSettings.FirstPerson and not AimbotSettings.ThirdPerson) then |
736 | AimbotSettings.FirstPerson = true |
737 | end |
738 | end); |
739 | Aimbot.Slider("Aimbot Smoothness", {Min = 1, Max = 10, Default = AimbotSettings.Smoothness, Step = .5}, function(Callback) |
740 | AimbotSettings.Smoothness = Callback |
741 | end); |
742 | local sortTeams = function(Callback) |
743 | table.clear(AimbotSettings.BlacklistedTeams); |
744 | if (Callback == "Enemies") then |
745 | table.insert(AimbotSettings.BlacklistedTeams, LocalPlayer.Team); |
746 | end |
747 | if (Callback == "Allies") then |
748 | local AllTeams = Teams:GetTeams(); |
749 | table.remove(AllTeams, table.find(AllTeams, LocalPlayer.Team)); |
750 | AimbotSettings.BlacklistedTeams = AllTeams |
751 | end |
752 | end |
753 | Aimbot.Dropdown("Team Target", {"Niggaz", "Enemies", "All"}, sortTeams); |
754 | sortTeams("Enemies"); |
755 | Aimbot.Dropdown("Aimloxk Type", {"3rd Person", "1st Person"}, function(callback) |
756 | if (callback == "Third Person") then |
757 | AimbotSettings.ThirdPerson = true |
758 | AimbotSettings.FirstPerson = false |
759 | else |
760 | AimbotSettings.ThirdPerson = false |
761 | AimbotSettings.FirstPerson = true |
762 | end |
763 | end); |
764 | |
765 | Aimbot.Toggle("Field Of View", AimbotSettings.ShowFov, function(Callback) |
766 | AimbotSettings.ShowFov = Callback |
767 | FOV.Visible = Callback |
768 | end); |
769 | Aimbot.ColorPicker("Fov Kolor", AimbotSettings.FovColor, function(Callback) |
770 | AimbotSettings.FovColor = Callback |
771 | FOV.Color = Callback |
772 | Snaplines.Color = Callback |
773 | end); |
774 | Aimbot.Slider("Fov Size", {Min = 70, Max = 500, Default = AimbotSettings.FovSize, Step = 10}, function(Callback) |
775 | AimbotSettings.FovSize = Callback |
776 | FOV.Radius = Callback |
777 | end); |
778 | Aimbot.Toggle("Enable Snaplines", AimbotSettings.Snaplines, function(Callback) |
779 | AimbotSettings.Snaplines = Callback |
780 | end); |
781 | Window.SetPosition(Settings.WindowPosition); |
782 | |
783 | if (gethui) then |
784 | MainUI.UI.Parent = gethui(); |
785 | else |
786 | local protect_gui = (syn or getgenv()).protect_gui |
787 | if (protect_gui) then |
788 | protect_gui(MainUI.UI); |
789 | end |
790 | MainUI.UI.Parent = game:GetService("CoreGui"); |
791 | end |
792 | |
793 | while wait(5) do |
794 | Settings.WindowPosition = Window.GetPosition(); |
795 | local Encoded = HttpService:JSONEncode(EncodeConfig(Settings)); |
796 | writefile("fates-esp.json", Encoded); |
797 | end |