· 6 years ago · Oct 16, 2019, 11:14 PM
1assert(Drawing, 'exploit not supported')
2
3local UserInputService = game:GetService'UserInputService';
4local HttpService = game:GetService'HttpService';
5local GUIService = game:GetService'GuiService';
6local RunService = game:GetService'RunService';
7local Players = game:GetService'Players';
8local LocalPlayer = Players.LocalPlayer;
9local Camera = workspace.CurrentCamera
10local Mouse = LocalPlayer:GetMouse();
11local Menu = {};
12local MouseHeld = false;
13local LastRefresh = 0;
14local OptionsFile = 'IC3_ESP_SETTINGS.dat';
15local Binding = false;
16local BindedKey = nil;
17local OIndex = 0;
18local LineBox = {};
19local UIButtons = {};
20local Sliders = {};
21local Dragging = false;
22local DraggingUI = false;
23local DragOffset = Vector2.new();
24local DraggingWhat = nil;
25local OldData = {};
26local IgnoreList = {};
27local Red = Color3.new(1, 0, 0);
28local Green = Color3.new(0, 1, 0);
29local MenuLoaded = false;
30local ErrorLogging = false;
31shared.MenuDrawingData = shared.MenuDrawingData or { Instances = {} };
32shared.InstanceData = shared.InstanceData or {};
33shared.RSName = shared.RSName or ('UnnamedESP_by_ic3-' .. HttpService:GenerateGUID(false));
34
35local GetDataName = shared.RSName .. '-GetData';
36local UpdateName = shared.RSName .. '-Update';
37
38local Debounce = setmetatable({}, {
39 __index = function(t, i)
40 return rawget(t, i) or false
41 end;
42});
43
44if shared.UESP_InputBeganCon then pcall(function() shared.UESP_InputBeganCon:disconnect() end); end
45if shared.UESP_InputEndedCon then pcall(function() shared.UESP_InputEndedCon:disconnect() end); end
46
47local RealPrint, LastPrintTick = print, 0;
48local LatestPrints = setmetatable({}, {
49 __index = function(t, i)
50 return rawget(t, i) or 0;
51 end
52});
53
54local function print(...)
55 local Content = unpack{...};
56 local print = RealPrint;
57
58 if tick() - LatestPrints[Content] > 5 then
59 LatestPrints[Content] = tick();
60 print(Content);
61 end
62end
63
64local function Set(t, i, v)
65 t[i] = v;
66end
67
68function HookCharacter(Character) -- Bad Business shit
69 warn(Character, Players[Character.Name]);
70
71 -- if true then return true; end
72 if Character:FindFirstChild'Root' and Players:FindFirstChild(Character.Name) then
73 Players[Character.Name].Character = Character;
74
75 print('p', Players[Character.Name].Character);
76
77 -- warn(OriginalIndex, OriginalNewIndex, tableToString(shared.BBCharacters[Character]));
78
79 -- MT.__index = newcclosure(function(self, Index, ...)
80 -- warn(getcallingmethod());
81 -- if input.down.f then
82 -- print(self, Index, tableToString{...});
83 -- end
84 -- if checkcaller() then
85
86 -- end
87
88 -- return OriginalIndex(self, Index, ...);
89 -- end);
90 -- MT.__namecall = newcclosure(function(self, Index, ...)
91 -- local Arguments = {...};
92
93 -- if checkcaller() then
94 -- if input.down.f then
95 -- print(self, Index, tableToString(Arguments));
96 -- end
97 -- end
98
99 -- return OriginalNamecall(self, Index, ...);
100 -- end)
101 end
102
103 return true;
104end
105
106local Teams = {};
107local CustomTeams = {}
108
109local RenderList = {Instances = {}};
110function RenderList:AddOrUpdateInstance(Instance, Obj2Draw, Text, Color)
111 -- print(Instance, Obj2Draw, Text, Color);
112 RenderList.Instances[Instance] = { ParentInstance = Instance; Instance = Obj2Draw; Text = Text; Color = Color };
113 return RenderList.Instances[Instance];
114end
115
116if bind then
117 -- bind('f2', function()
118 -- print(RenderList:AddOrUpdateInstance(LocalPlayer.Character, LocalPlayer.Character.Head, 'nigger', Color3.fromRGB(255, 255, 0)));
119 -- end)
120 -- bind('f3', function()
121 -- if tableToString then print(tableToString(RenderList)); end
122 -- end)
123end
124
125local CustomPlayerTag;
126local CustomESP;
127local function IsStringEmpty(String)
128 if type(String) == 'string' then
129 return String:match'^%s+$' ~= nil or #String == 0 or String == '' or false;
130 end
131 return false
132end
133local Modules = {
134 [3016661674] = {
135 CustomPlayerTag = function(Player)
136 local Name = '';
137
138 if Player:FindFirstChild'leaderstats' then
139 local Prefix = '';
140 local Extra = {};
141 Name = Name .. '\n[';
142
143 if Player.leaderstats:FindFirstChild'Prestige' and Player.leaderstats.Prestige.ClassName == 'IntValue' and Player.leaderstats.Prestige.Value > 0 then
144 Name = Name .. '#' .. tostring(Player.leaderstats.Prestige.Value) .. ' ';
145 end
146 if Player.leaderstats:FindFirstChild'HouseRank' and Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.HouseRank.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.HouseRank.Value) then
147 Prefix = Player.leaderstats.HouseRank.Value == 'Owner' and (Player.leaderstats.Gender.Value == 'Female' and 'Lady ' or 'Lord ') or '';
148 end
149 if Player.leaderstats:FindFirstChild'FirstName' and Player.leaderstats.FirstName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.FirstName.Value) then
150 Name = Name .. '' .. Prefix .. Player.leaderstats.FirstName.Value;
151 end
152 if Player.leaderstats:FindFirstChild'LastName' and Player.leaderstats.LastName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.LastName.Value) then
153 Name = Name .. ' ' .. Player.leaderstats.LastName.Value;
154 end
155
156 if not IsStringEmpty(Name) then Name = Name .. ']'; end
157
158 if Player.Character then
159 if Player.Character:FindFirstChild'ManaAbilities' and Player.Character.ManaAbilities:FindFirstChild'ManaSprint' then table.insert(Extra, 'D1'); end
160
161 if Player.Character:FindFirstChild'Vampirism' then table.insert(Extra, 'V'); end
162 if Player.Character:FindFirstChild'Observe' then table.insert(Extra, 'ILL'); end
163 if Player.Character:FindFirstChild'Inferi' then table.insert(Extra, 'NEC'); end
164 -- if Player.Character:FindFirstChild'Inferi' then table.insert(Extra, ''); end
165 if Player.Character:FindFirstChild'World\'s Pulse' then table.insert(Extra, 'DZIN'); end
166 -- if Player.Character:FindFirstChild'Fimbulvetr' then table.insert(Extra, 'FIMB'); end
167 -- if Player.Character:FindFirstChild'Gate' then table.insert(Extra, 'GATE'); end
168 end
169 if Player:FindFirstChild'Backpack' then
170 if Player.Backpack:FindFirstChild'Observe' then table.insert(Extra, 'ILL'); end
171 if Player.Backpack:FindFirstChild'Inferi' then table.insert(Extra, 'NEC'); end
172 if Player.Backpack:FindFirstChild'World\'s Pulse' then table.insert(Extra, 'DZIN'); end
173 -- if Player.Backpack:FindFirstChild'ObserveBlock' then table.insert(Extra, 'OB'); end
174 -- if Player.Backpack:FindFirstChild'Fimbulvetr' then table.insert(Extra, 'FIMB'); end
175 -- if Player.Backpack:FindFirstChild'Gate' then table.insert(Extra, 'GATE'); end
176 -- if Player.Backpack:FindFirstChild'Gate' then table.insert(Extra, ''); end
177 end
178
179 if #Extra > 0 then Name = Name .. ' [' .. table.concat(Extra, '-') .. ']'; end
180 -- if Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.Gender.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.Gender.Value) then
181 -- Name = Name .. string.format(' [%s]', Player.leaderstats.Gender.Value:sub(1, 1));
182 -- end
183 end
184
185 return Name;
186 end;
187 };
188 [3541987450] = {
189 CustomPlayerTag = function(Player)
190 local Name = '';
191
192 if Player:FindFirstChild'leaderstats' then
193 Name = Name .. '\n[';
194 local Prefix = '';
195 if Player.leaderstats:FindFirstChild'Prestige' and Player.leaderstats.Prestige.ClassName == 'IntValue' and Player.leaderstats.Prestige.Value > 0 then
196 Name = Name .. '#' .. tostring(Player.leaderstats.Prestige.Value) .. ' ';
197 end
198 if Player.leaderstats:FindFirstChild'HouseRank' and Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.HouseRank.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.HouseRank.Value) then
199 Prefix = Player.leaderstats.HouseRank.Value == 'Owner' and (Player.leaderstats.Gender.Value == 'Female' and 'Lady ' or 'Lord ') or '';
200 end
201 if Player.leaderstats:FindFirstChild'FirstName' and Player.leaderstats.FirstName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.FirstName.Value) then
202 Name = Name .. '' .. Prefix .. Player.leaderstats.FirstName.Value;
203 end
204 if Player.leaderstats:FindFirstChild'LastName' and Player.leaderstats.LastName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.LastName.Value) then
205 Name = Name .. ' ' .. Player.leaderstats.LastName.Value;
206 end
207 if Player.leaderstats:FindFirstChild'UberTitle' and Player.leaderstats.UberTitle.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.UberTitle.Value) then
208 Name = Name .. ', ' .. Player.leaderstats.UberTitle.Value;
209 end
210 if not IsStringEmpty(Name) then Name = Name .. ']'; end
211 -- if Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.Gender.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.Gender.Value) then
212 -- Name = Name .. string.format(' [%s]', Player.leaderstats.Gender.Value:sub(1, 1));
213 -- end
214 end
215
216 return Name;
217 end;
218 }
219}
220
221if Modules[game.PlaceId]then
222 local Module = Modules[game.PlaceId];
223 CustomPlayerTag = Module.CustomPlayerTag or nil;
224 CustomESP = Module.CustomESP or nil;
225end
226
227local function GetMouseLocation()
228 return UserInputService:GetMouseLocation();
229end
230
231local function MouseHoveringOver(Values)
232 local X1, Y1, X2, Y2 = Values[1], Values[2], Values[3], Values[4]
233 local MLocation = GetMouseLocation();
234 return (MLocation.x >= X1 and MLocation.x <= (X1 + (X2 - X1))) and (MLocation.y >= Y1 and MLocation.y <= (Y1 + (Y2 - Y1)));
235end
236
237local function GetTableData(t) -- basically table.foreach i dont even know why i made this
238 if typeof(t) ~= 'table' then return end
239 return setmetatable(t, {
240 __call = function(t, func)
241 if typeof(func) ~= 'function' then return end;
242 for i, v in pairs(t) do
243 pcall(func, i, v);
244 end
245 end;
246 });
247end
248local function Format(format, ...)
249 return string.format(format, ...);
250end
251local function CalculateValue(Min, Max, Percent)
252 return Min + math.floor(((Max - Min) * Percent) + .5);
253end
254
255local function NewDrawing(InstanceName)
256 local Instance = Drawing.new(InstanceName);
257 return (function(Properties)
258 for i, v in pairs(Properties) do
259 pcall(Set, Instance, i, v);
260 end
261 return Instance;
262 end)
263end
264
265function Menu:AddMenuInstance(Name, DrawingType, Properties)
266 -- if shared.MenuDrawingData.Instances[Name] ~= nil then
267 -- shared.MenuDrawingData.Instances[Name]:Remove();
268 -- end
269 local Instance;
270
271 if shared.MenuDrawingData.Instances[Name] ~= nil then
272 Instance = shared.MenuDrawingData.Instances[Name];
273 for i, v in pairs(Properties) do
274 pcall(Set, Instance, i, v);
275 end
276 else
277 Instance = NewDrawing(DrawingType)(Properties);
278 end
279
280 shared.MenuDrawingData.Instances[Name] = Instance;
281
282 return Instance;
283end
284function Menu:UpdateMenuInstance(Name)
285 local Instance = shared.MenuDrawingData.Instances[Name];
286 if Instance ~= nil then
287 return (function(Properties)
288 for i, v in pairs(Properties) do
289 -- print(Format('%s %s -> %s', Name, tostring(i), tostring(v)));
290 pcall(Set, Instance, i, v);
291 end
292 return Instance;
293 end)
294 end
295end
296function Menu:GetInstance(Name)
297 return shared.MenuDrawingData.Instances[Name];
298end
299
300local Options = setmetatable({}, {
301 __call = function(t, ...)
302 local Arguments = {...};
303 local Name = Arguments[1];
304 OIndex = OIndex + 1; -- (typeof(Arguments[3]) == 'boolean' and 1 or 0);
305 rawset(t, Name, setmetatable({
306 Name = Arguments[1];
307 Text = Arguments[2];
308 Value = Arguments[3];
309 DefaultValue = Arguments[3];
310 AllArgs = Arguments;
311 Index = OIndex;
312 }, {
313 __call = function(t, v)
314 local self = t;
315
316 if typeof(t.Value) == 'function' then
317 t.Value();
318 elseif typeof(t.Value) == 'EnumItem' then
319 local BT = Menu:GetInstance(Format('%s_BindText', t.Name));
320 Binding = true;
321 local Val = 0
322 while Binding do
323 wait();
324 Val = (Val + 1) % 17;
325 BT.Text = Val <= 8 and '|' or '';
326 end
327 t.Value = BindedKey;
328 BT.Text = tostring(t.Value):match'%w+%.%w+%.(.+)';
329 BT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - BT.TextBounds.X - 20, -10);
330 else
331 local NewValue = v;
332 if NewValue == nil then NewValue = not t.Value; end
333 rawset(t, 'Value', NewValue);
334
335 if Arguments[2] ~= nil and Menu:GetInstance'TopBar'.Visible then
336 if typeof(Arguments[3]) == 'number' then
337 local AMT = Menu:GetInstance(Format('%s_AmountText', t.Name));
338 if AMT then
339 AMT.Text = tostring(t.Value);
340 AMT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - AMT.TextBounds.X - 10, -10);
341 end
342 else
343 local Inner = Menu:GetInstance(Format('%s_InnerCircle', t.Name));
344 if Inner then Inner.Visible = t.Value; end
345 end
346 end
347 end
348 end;
349 }));
350 end;
351})
352local function Load()
353 local Val, Result = pcall(readfile, OptionsFile);
354 if Val then -- extremely ugly code yea i know but i dont care p.s. i hate pcall
355 local Val2, Table = pcall(HttpService.JSONDecode, HttpService, Result);
356 if Val2 then
357 for i, v in pairs(Table) do
358 if Options[i]~=nil and Options[i].Value~=nil and(typeof(Options[i].Value) == 'boolean' or typeof(Options[i].Value) == 'number') then
359 Options[i].Value = v.Value;
360 pcall(Options[i], v.Value);
361 end
362 end
363 end
364 end
365end
366Options('Enabled', 'ESP Enabled', true);
367Options('ShowTeam', 'Show Team', false);
368Options('ShowTeamColor', 'Show Team Color', false);
369Options('ShowName', 'Show Names', true);
370Options('ShowDistance', 'Show Distance', true);
371Options('ShowHealth', 'Show Health', true);
372Options('ShowBoxes', 'Show Boxes', true);
373Options('ShowTracers', 'Show Tracers', true);
374Options('ShowDot', 'Show Head Dot', false);
375Options('VisCheck', 'Visibility Check', false);
376Options('Crosshair', 'Crosshair', false);
377Options('TextOutline', 'Text Outline', true);
378Options('Rainbow', 'Rainbow Mode', false);
379Options('TextSize', 'Text Size', syn and 18 or 14, 10, 24); -- cuz synapse fonts look weird???
380Options('MaxDistance', 'Max Distance', 2500, 100, 25000);
381Options('RefreshRate', 'Refresh Rate (ms)', 5, 1, 200);
382Options('MenuKey', 'Menu Key', Enum.KeyCode.F4, 1);
383Options('ToggleKey', 'Toggle Key', Enum.KeyCode.F3, 1);
384Options('ResetSettings', 'Reset Settings', function()
385 for i, v in pairs(Options) do
386 if Options[i] ~= nil and Options[i].Value ~= nil and Options[i].Text ~= nil and (typeof(Options[i].Value) == 'boolean' or typeof(Options[i].Value) == 'number') then
387 Options[i](Options[i].DefaultValue);
388 end
389 end
390end, 4);
391Options('LoadSettings', 'Load Settings', Load, 3);
392Options('SaveSettings', 'Save Settings', function()
393 writefile(OptionsFile, HttpService:JSONEncode(Options));
394end, 2)
395-- Options.SaveSettings.Value();
396
397Load();
398
399Options('MenuOpen', nil, true);
400
401local function Combine(...)
402 local Output = {};
403 for i, v in pairs{...} do
404 if typeof(v) == 'table' then
405 table.foreach(v, function(i, v)
406 Output[i] = v;
407 end)
408 end
409 end
410 return Output
411end
412
413function LineBox:Create(Properties)
414 local Box = { Visible = true }; -- prevent errors not really though dont worry bout the Visible = true thing
415
416 local Properties = Combine({
417 Transparency = 1;
418 Thickness = 1;
419 Visible = true;
420 }, Properties);
421
422 Box['TopLeft'] = NewDrawing'Line'(Properties);
423 Box['TopRight'] = NewDrawing'Line'(Properties);
424 Box['BottomLeft'] = NewDrawing'Line'(Properties);
425 Box['BottomRight'] = NewDrawing'Line'(Properties);
426
427 function Box:Update(CF, Size, Color, Properties)
428 if not CF or not Size then return end
429
430 local TLPos, Visible1 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, Size.Y, 0)).p);
431 local TRPos, Visible2 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, Size.Y, 0)).p);
432 local BLPos, Visible3 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, -Size.Y, 0)).p);
433 local BRPos, Visible4 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, -Size.Y, 0)).p);
434
435 Visible1 = TLPos.Z > 0 -- (commented | reason: random flashes);
436 Visible2 = TRPos.Z > 0 -- (commented | reason: random flashes);
437 Visible3 = BLPos.Z > 0 -- (commented | reason: random flashes);
438 Visible4 = BRPos.Z > 0 -- (commented | reason: random flashes);
439
440 -- ## BEGIN UGLY CODE
441 if Visible1 then
442 Box['TopLeft'].Visible = true;
443 Box['TopLeft'].Color = Color;
444 Box['TopLeft'].From = Vector2.new(TLPos.X, TLPos.Y);
445 Box['TopLeft'].To = Vector2.new(TRPos.X, TRPos.Y);
446 else
447 Box['TopLeft'].Visible = false;
448 end
449 if Visible2 then
450 Box['TopRight'].Visible = true;
451 Box['TopRight'].Color = Color;
452 Box['TopRight'].From = Vector2.new(TRPos.X, TRPos.Y);
453 Box['TopRight'].To = Vector2.new(BRPos.X, BRPos.Y);
454 else
455 Box['TopRight'].Visible = false;
456 end
457 if Visible3 then
458 Box['BottomLeft'].Visible = true;
459 Box['BottomLeft'].Color = Color;
460 Box['BottomLeft'].From = Vector2.new(BLPos.X, BLPos.Y);
461 Box['BottomLeft'].To = Vector2.new(TLPos.X, TLPos.Y);
462 else
463 Box['BottomLeft'].Visible = false;
464 end
465 if Visible4 then
466 Box['BottomRight'].Visible = true;
467 Box['BottomRight'].Color = Color;
468 Box['BottomRight'].From = Vector2.new(BRPos.X, BRPos.Y);
469 Box['BottomRight'].To = Vector2.new(BLPos.X, BLPos.Y);
470 else
471 Box['BottomRight'].Visible = false;
472 end
473 -- ## END UGLY CODE
474 if Properties then
475 GetTableData(Properties)(function(i, v)
476 pcall(Set, Box['TopLeft'], i, v);
477 pcall(Set, Box['TopRight'], i, v);
478 pcall(Set, Box['BottomLeft'], i, v);
479 pcall(Set, Box['BottomRight'], i, v);
480 end)
481 end
482 end
483 function Box:SetVisible(bool)
484 pcall(Set, Box['TopLeft'], 'Visible', bool);
485 pcall(Set, Box['TopRight'], 'Visible', bool);
486 pcall(Set, Box['BottomLeft'], 'Visible', bool);
487 pcall(Set, Box['BottomRight'], 'Visible', bool);
488 end
489 function Box:Remove()
490 self:SetVisible(false);
491 Box['TopLeft']:Remove();
492 Box['TopRight']:Remove();
493 Box['BottomLeft']:Remove();
494 Box['BottomRight']:Remove();
495 end
496
497 return Box;
498end
499
500local function CreateMenu(NewPosition) -- Create Menu
501 local function FromHex(HEX)
502 HEX = HEX:gsub('#', '');
503 return Color3.fromRGB(tonumber('0x' .. HEX:sub(1, 2)), tonumber('0x' .. HEX:sub(3, 4)), tonumber('0x' .. HEX:sub(5, 6)));
504 end
505
506 local Colors = {
507 Primary = {
508 Main = FromHex'424242';
509 Light = FromHex'6d6d6d';
510 Dark = FromHex'1b1b1b';
511 };
512 Secondary = {
513 Main = FromHex'e0e0e0';
514 Light = FromHex'ffffff';
515 Dark = FromHex'aeaeae';
516 };
517 };
518
519 MenuLoaded = false;
520
521 -- GetTableData(UIButtons)(function(i, v)
522 -- v.Instance.Visible = false;
523 -- v.Instance:Remove();
524 -- end)
525 -- GetTableData(Sliders)(function(i, v)
526 -- v.Instance.Visible = false;
527 -- v.Instance:Remove();
528 -- end)
529
530 UIButtons = {};
531 Sliders = {};
532
533 local BaseSize = Vector2.new(300, 630);
534 local BasePosition = NewPosition or Vector2.new(Camera.ViewportSize.X / 8 - (BaseSize.X / 2), Camera.ViewportSize.Y / 2 - (BaseSize.Y / 2));
535
536 Menu:AddMenuInstance('CrosshairX', 'Line', {
537 Visible = false;
538 Color = Color3.new(0, 1, 0);
539 Transparency = 1;
540 Thickness = 1;
541 });
542 Menu:AddMenuInstance('CrosshairY', 'Line', {
543 Visible = false;
544 Color = Color3.new(0, 1, 0);
545 Transparency = 1;
546 Thickness = 1;
547 });
548
549 delay(.025, function() -- since zindex doesnt exist
550 Menu:AddMenuInstance('Main', 'Square', {
551 Size = BaseSize;
552 Position = BasePosition;
553 Filled = false;
554 Color = Colors.Primary.Main;
555 Thickness = 3;
556 Visible = true;
557 });
558 end);
559 Menu:AddMenuInstance('TopBar', 'Square', {
560 Position = BasePosition;
561 Size = Vector2.new(BaseSize.X, 15);
562 Color = Colors.Primary.Dark;
563 Filled = true;
564 Visible = true;
565 });
566 Menu:AddMenuInstance('TopBarTwo', 'Square', {
567 Position = BasePosition + Vector2.new(0, 15);
568 Size = Vector2.new(BaseSize.X, 45);
569 Color = Colors.Primary.Main;
570 Filled = true;
571 Visible = true;
572 });
573 Menu:AddMenuInstance('TopBarText', 'Text', {
574 Size = 25;
575 Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(25, 10);
576 Text = 'Unnamed ESP';
577 Color = Colors.Secondary.Light;
578 Visible = true;
579 });
580 Menu:AddMenuInstance('TopBarTextBR', 'Text', {
581 Size = 15;
582 Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(BaseSize.X - 65, 25);
583 Text = 'by ic3w0lf';
584 Color = Colors.Secondary.Dark;
585 Visible = true;
586 });
587 Menu:AddMenuInstance('Filling', 'Square', {
588 Size = BaseSize - Vector2.new(0, 60);
589 Position = BasePosition + Vector2.new(0, 60);
590 Filled = true;
591 Color = Colors.Secondary.Main;
592 Transparency= .5;
593 Visible = true;
594 });
595
596 local CPos = 0;
597
598 GetTableData(Options)(function(i, v)
599 if typeof(v.Value) == 'boolean' and not IsStringEmpty(v.Text) and v.Text ~= nil then
600 CPos = CPos + 25;
601 local BaseSize = Vector2.new(BaseSize.X, 30);
602 local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(30, v.Index * 25 - 10);
603 UIButtons[#UIButtons + 1] = {
604 Option = v;
605 Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
606 Position = BasePosition - Vector2.new(30, 15);
607 Size = BaseSize;
608 Visible = false;
609 });
610 };
611 Menu:AddMenuInstance(Format('%s_OuterCircle', v.Name), 'Circle', {
612 Radius = 10;
613 Position = BasePosition;
614 Color = Colors.Secondary.Light;
615 Filled = true;
616 Visible = true;
617 });
618 Menu:AddMenuInstance(Format('%s_InnerCircle', v.Name), 'Circle', {
619 Radius = 7;
620 Position = BasePosition;
621 Color = Colors.Secondary.Dark;
622 Filled = true;
623 Visible = v.Value;
624 });
625 Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
626 Text = v.Text;
627 Size = 20;
628 Position = BasePosition + Vector2.new(20, -10);
629 Visible = true;
630 Color = Colors.Primary.Dark;
631 });
632 end
633 end)
634 GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
635 if typeof(v.Value) == 'number' then
636 CPos = CPos + 25;
637
638 local BaseSize = Vector2.new(BaseSize.X, 30);
639 local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
640
641 local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
642 Text = v.Text;
643 Size = 20;
644 Position = BasePosition + Vector2.new(20, -10);
645 Visible = true;
646 Color = Colors.Primary.Dark;
647 });
648 local AMT = Menu:AddMenuInstance(Format('%s_AmountText', v.Name), 'Text', {
649 Text = tostring(v.Value);
650 Size = 20;
651 Position = BasePosition;
652 Visible = true;
653 Color = Colors.Primary.Dark;
654 });
655 local Line = Menu:AddMenuInstance(Format('%s_SliderLine', v.Name), 'Line', {
656 Transparency = 1;
657 Color = Colors.Primary.Dark;
658 Thickness = 3;
659 Visible = true;
660 From = BasePosition + Vector2.new(20, 20);
661 To = BasePosition + Vector2.new(BaseSize.X - 10, 20);
662 });
663 CPos = CPos + 10;
664 local Slider = Menu:AddMenuInstance(Format('%s_Slider', v.Name), 'Circle', {
665 Visible = true;
666 Filled = true;
667 Radius = 6;
668 Color = Colors.Secondary.Dark;
669 Position = BasePosition + Vector2.new(35, 20);
670 })
671
672 local CSlider = {Slider = Slider; Line = Line; Min = v.AllArgs[4]; Max = v.AllArgs[5]; Option = v};
673 Sliders[#Sliders + 1] = CSlider;
674
675 -- local Percent = (v.Value / CSlider.Max) * 100;
676 -- local Size = math.abs(Line.From.X - Line.To.X);
677 -- local Value = Size * (Percent / 100); -- this shit's inaccurate but fuck it i'm not even gonna bother fixing it
678
679 Slider.Position = BasePosition + Vector2.new(40, 20);
680
681 v.BaseSize = BaseSize;
682 v.BasePosition = BasePosition;
683 AMT.Position = BasePosition + Vector2.new(BaseSize.X - AMT.TextBounds.X - 10, -10)
684 end
685 end)
686 local FirstItem = false;
687 GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
688 if typeof(v.Value) == 'EnumItem' then
689 CPos = CPos + (not FirstItem and 30 or 25);
690 FirstItem = true;
691
692 local BaseSize = Vector2.new(BaseSize.X, FirstItem and 30 or 25);
693 local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
694
695 UIButtons[#UIButtons + 1] = {
696 Option = v;
697 Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
698 Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
699 Visible = true;
700 Transparency= .5;
701 Position = BasePosition + Vector2.new(15, -10);
702 Color = Colors.Secondary.Light;
703 Filled = true;
704 });
705 };
706 local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
707 Text = v.Text;
708 Size = 20;
709 Position = BasePosition + Vector2.new(20, -10);
710 Visible = true;
711 Color = Colors.Primary.Dark;
712 });
713 local BindText = Menu:AddMenuInstance(Format('%s_BindText', v.Name), 'Text', {
714 Text = tostring(v.Value):match'%w+%.%w+%.(.+)';
715 Size = 20;
716 Position = BasePosition;
717 Visible = true;
718 Color = Colors.Primary.Dark;
719 });
720
721 Options[i].BaseSize = BaseSize;
722 Options[i].BasePosition = BasePosition;
723 BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 20, -10);
724 end
725 end)
726 GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
727 if typeof(v.Value) == 'function' then
728 local BaseSize = Vector2.new(BaseSize.X, 30);
729 local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos + (25 * v.AllArgs[4]) - 35);
730
731 UIButtons[#UIButtons + 1] = {
732 Option = v;
733 Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
734 Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
735 Visible = true;
736 Transparency= .5;
737 Position = BasePosition + Vector2.new(15, -10);
738 Color = Colors.Secondary.Light;
739 Filled = true;
740 });
741 };
742 local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
743 Text = v.Text;
744 Size = 20;
745 Position = BasePosition + Vector2.new(20, -10);
746 Visible = true;
747 Color = Colors.Primary.Dark;
748 });
749
750 -- BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 10, -10);
751 end
752 end)
753
754 delay(.1, function()
755 MenuLoaded = true;
756 end);
757
758 -- this has to be at the bottom cuz proto drawing api doesnt have zindex :triumph:
759 Menu:AddMenuInstance('Cursor1', 'Line', {
760 Visible = false;
761 Color = Color3.new(1, 0, 0);
762 Transparency = 1;
763 Thickness = 2;
764 });
765 Menu:AddMenuInstance('Cursor2', 'Line', {
766 Visible = false;
767 Color = Color3.new(1, 0, 0);
768 Transparency = 1;
769 Thickness = 2;
770 });
771 Menu:AddMenuInstance('Cursor3', 'Line', {
772 Visible = false;
773 Color = Color3.new(1, 0, 0);
774 Transparency = 1;
775 Thickness = 2;
776 });
777end
778
779CreateMenu();
780
781shared.UESP_InputBeganCon = UserInputService.InputBegan:connect(function(input)
782 if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
783 MouseHeld = true;
784 local Bar = Menu:GetInstance'TopBar';
785 local Values = {
786 Bar.Position.X;
787 Bar.Position.Y;
788 Bar.Position.X + Bar.Size.X;
789 Bar.Position.Y + Bar.Size.Y;
790 }
791 if MouseHoveringOver(Values) then -- and not syn then -- disable dragging for synapse cuz idk why it breaks
792 DraggingUI = true;
793 DragOffset = Menu:GetInstance'Main'.Position - GetMouseLocation();
794 else
795 for i, v in pairs(Sliders) do
796 local Values = {
797 v.Line.From.X - (v.Slider.Radius);
798 v.Line.From.Y - (v.Slider.Radius);
799 v.Line.To.X + (v.Slider.Radius);
800 v.Line.To.Y + (v.Slider.Radius);
801 };
802 if MouseHoveringOver(Values) then
803 DraggingWhat = v;
804 Dragging = true;
805 break
806 end
807 end
808 end
809 end
810end)
811shared.UESP_InputEndedCon = UserInputService.InputEnded:connect(function(input)
812 if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
813 MouseHeld = false;
814 for i, v in pairs(UIButtons) do
815 local Values = {
816 v.Instance.Position.X;
817 v.Instance.Position.Y;
818 v.Instance.Position.X + v.Instance.Size.X;
819 v.Instance.Position.Y + v.Instance.Size.Y;
820 };
821 if MouseHoveringOver(Values) then
822 v.Option();
823 break -- prevent clicking 2 options
824 end
825 end
826 elseif input.UserInputType.Name == 'Keyboard' then
827 if Binding then
828 BindedKey = input.KeyCode;
829 Binding = false;
830 elseif input.KeyCode == Options.MenuKey.Value or (input.KeyCode == Enum.KeyCode.Home and UserInputService:IsKeyDown(Enum.KeyCode.LeftControl)) then
831 Options.MenuOpen();
832 elseif input.KeyCode == Options.ToggleKey.Value then
833 Options.Enabled();
834 end
835 end
836end)
837
838local function ToggleMenu()
839 if Options.MenuOpen.Value then
840 GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
841 if OldData[v] then
842 pcall(Set, v, 'Visible', true);
843 end
844 end)
845 else
846 -- GUIService:SetMenuIsOpen(false);
847 GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
848 OldData[v] = v.Visible;
849 if v.Visible then
850 pcall(Set, v, 'Visible', false);
851 end
852 end)
853 end
854end
855
856local function CheckRay(Instance, Distance, Position, Unit)
857 local Pass = true;
858 local Model = Instance;
859
860 if Distance > 999 then return false; end
861
862 if Instance:IsA'Player' and not Instance.Character then
863 return false;
864 elseif Instance:IsA'Player' and Instance.Character then
865 Model = Instance.Character
866 else
867 Model = Instance.Parent;
868 if Model.Parent == workspace then
869 Model = Instance;
870 end
871 end
872
873 local _Ray = Ray.new(Position, Unit * Distance);
874
875 local List = {LocalPlayer.Character, Camera, Mouse.TargetFilter};
876
877 for i,v in pairs(IgnoreList) do table.insert(List, v); end;
878
879 local Hit = workspace:FindPartOnRayWithIgnoreList(_Ray, List);
880
881 if Hit and not Hit:IsDescendantOf(Model) then
882 Pass = false;
883 if Hit.Transparency >= .3 or not Hit.CanCollide and Hit.ClassName ~= 'Terrain' then -- Detect invisible walls
884 IgnoreList[#IgnoreList + 1] = Hit;
885 end
886 end
887
888 return Pass;
889end
890local function CheckTeam(Player)
891 if Player.Neutral and LocalPlayer.Neutral then return true; end
892 return Player.TeamColor == LocalPlayer.TeamColor;
893end
894
895local CustomTeam = CustomTeams[game.PlaceId];
896
897if CustomTeam then
898 warn(ypcall(CustomTeam.Initialize));
899 CheckTeam = CustomTeam.CheckTeam;
900end
901
902local function CheckPlayer(Player)
903 if not Options.Enabled.Value then return false end
904
905 local Pass = true;
906 local Distance = 0;
907 local Head,Hum=Player:FindFirstChild'Head',Player:FindFirstChild'Humanoid'
908 if Player ~= LocalPlayer and Player:IsA'Player'and Player.Character then
909 if not Options.ShowTeam.Value and CheckTeam(Player) then
910 Pass = false;
911 end
912
913 local Head = Player.Character:FindFirstChild'Head';
914
915 if Pass and Player.Character and Head then
916 Distance = (Camera.CFrame.Position - Head.Position).Magnitude;
917 if Options.VisCheck.Value then
918 Pass = CheckRay(Player, Distance, Camera.CFrame.Position, (Head.Position - Camera.CFrame.Position).Unit);
919 end
920 if Distance > Options.MaxDistance.Value then
921 Pass = false;
922 end
923 end
924 elseif Player:IsA'Model'and Head and Hum and Hum.Health>0 then
925 Distance = (Camera.CFrame.Position - Head.Position).Magnitude;
926 if Options.VisCheck.Value then
927 Pass = CheckRay(Player, Distance, Camera.CFrame.Position, (Head.Position - Camera.CFrame.Position).Unit);
928 end
929 if Distance > Options.MaxDistance.Value then
930 Pass = false;
931 end
932 else
933 Pass = false;
934 end
935
936 return Pass, Distance;
937end
938
939local function CheckDistance(Ins)
940 if not Options.Enabled.Value then return false end
941
942 local Pass = true;
943 local Distance = 0;
944
945 if Ins then
946 Distance = (Camera.CFrame.Position - Ins.Position).Magnitude;
947 if Options.VisCheck.Value then
948 Pass = CheckRay(Ins, Distance, Camera.CFrame.Position, (Ins.Position - Camera.CFrame.Position).Unit);
949 end
950 if Distance > Options.MaxDistance.Value then
951 Pass = false;
952 end
953 else
954 Pass = false;
955 end
956
957 return Pass, Distance;
958end
959
960local function UpdatePlayerData()
961 if (tick() - LastRefresh) > (Options.RefreshRate.Value / 1000) then
962 LastRefresh = tick();
963 if CustomESP and Options.Enabled.Value then
964 pcall(CustomESP);
965 end
966 for i, v in pairs(RenderList.Instances) do
967 if v.Instance ~= nil and v.Instance.Parent ~= nil and v.Instance:IsA'BasePart' then
968 local Data = shared.InstanceData[v.Instance:GetDebugId()] or { Instances = {}; DontDelete = true };
969
970 Data.Instance = v.Instance;
971
972 Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
973 Transparency = 1;
974 Thickness = 2;
975 }
976 Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
977 Size = Options.TextSize.Value;
978 Center = true;
979 Outline = Options.TextOutline.Value;
980 Visible = true;
981 };
982 Data.Instances['DistanceTag'] = Data.Instances['DistanceTag'] or NewDrawing'Text'{
983 Size = Options.TextSize.Value - 1;
984 Center = true;
985 Outline = Options.TextOutline.Value;
986 Visible = true;
987 };
988
989 local NameTag = Data.Instances['NameTag'];
990 local DistanceTag = Data.Instances['DistanceTag'];
991 local Tracer = Data.Instances['Tracer'];
992
993 local Pass, Distance = CheckDistance(v.Instance);
994
995 if Pass then
996 local ScreenPosition, Vis = Camera:WorldToViewportPoint(v.Instance.Position);
997
998 if ScreenPosition.Z > 0 then
999 local Color = v.Color;
1000
1001 local ScreenPositionUpper = ScreenPosition
1002 -- Camera:WorldToViewportPoint((v.Instance.CFrame * CFrame.new(0, v.Instance.Size.Y, 0)).p);
1003
1004 if Options.ShowName.Value then
1005 LocalPlayer.NameDisplayDistance = 0;
1006 NameTag.Visible = true;
1007 NameTag.Text = v.Text;
1008 NameTag.Size = Options.TextSize.Value;
1009 NameTag.Outline = Options.TextOutline.Value;
1010 NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y);
1011 NameTag.Color = Color;
1012 if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
1013 NameTag.Font = Drawing.Fonts.Monospace;
1014 end
1015 else
1016 LocalPlayer.NameDisplayDistance = 100;
1017 NameTag.Visible = false;
1018 end
1019 if Options.ShowDistance.Value or Options.ShowHealth.Value then
1020 DistanceTag.Visible = true;
1021 DistanceTag.Size = Options.TextSize.Value - 1;
1022 DistanceTag.Outline = Options.TextOutline.Value;
1023 DistanceTag.Color = Color3.new(1, 1, 1);
1024 if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
1025 NameTag.Font = Drawing.Fonts.Monospace;
1026 end
1027
1028 local Str = '';
1029
1030 if Options.ShowDistance.Value then
1031 Str = Str .. Format('[%d] ', Distance);
1032 end
1033
1034 DistanceTag.Text = Str;
1035 DistanceTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) + Vector2.new(0, NameTag.TextBounds.Y);
1036 else
1037 DistanceTag.Visible = false;
1038 end
1039 if Options.ShowTracers.Value then
1040 Tracer.Visible = true;
1041 Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y);
1042 Tracer.To = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
1043 Tracer.Color = Color;
1044 else
1045 Tracer.Visible = false;
1046 end
1047 else
1048 NameTag.Visible = false;
1049 DistanceTag.Visible = false;
1050 Tracer.Visible = false;
1051 end
1052 else
1053 NameTag.Visible = false;
1054 DistanceTag.Visible = false;
1055 Tracer.Visible = false;
1056 end
1057
1058 Data.Instances['NameTag'] = NameTag;
1059 Data.Instances['DistanceTag'] = DistanceTag;
1060 Data.Instances['Tracer'] = Tracer;
1061
1062 shared.InstanceData[v.Instance:GetDebugId()] = Data;
1063 end
1064 end
1065 for i, v in next,Players:GetPlayers()do
1066 local Data = shared.InstanceData[v.Name] or { Instances = {}; };
1067
1068 Data.Instances['Box'] = Data.Instances['Box'] or LineBox:Create{Thickness = 3};
1069 Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
1070 Transparency = 1;
1071 Thickness = 2;
1072 }
1073 Data.Instances['HeadDot'] = Data.Instances['HeadDot'] or NewDrawing'Circle'{
1074 Filled = true;
1075 NumSides = 30;
1076 }
1077 Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
1078 Size = Options.TextSize.Value;
1079 Center = true;
1080 Outline = Options.TextOutline.Value;
1081 Visible = true;
1082 };
1083 Data.Instances['DistanceHealthTag'] = Data.Instances['DistanceHealthTag'] or NewDrawing'Text'{
1084 Size = Options.TextSize.Value - 1;
1085 Center = true;
1086 Outline = Options.TextOutline.Value;
1087 Visible = true;
1088 };
1089
1090 local NameTag = Data.Instances['NameTag'];
1091 local DistanceTag = Data.Instances['DistanceHealthTag'];
1092 local Tracer = Data.Instances['Tracer'];
1093 local HeadDot = Data.Instances['HeadDot'];
1094 local Box = Data.Instances['Box'];
1095
1096 local Pass, Distance = CheckPlayer(v);
1097
1098 if Pass and v.Character then
1099 local Humanoid = v.Character:FindFirstChildOfClass'Humanoid';
1100 local Head = v.Character:FindFirstChild'Head';
1101 local HumanoidRootPart = v.Character:FindFirstChild'HumanoidRootPart';
1102 if v.Character ~= nil and Head and HumanoidRootPart then
1103 local ScreenPosition, Vis = Camera:WorldToViewportPoint(Head.Position);
1104
1105 if ScreenPosition.Z > 0 then
1106 local Color = Options.Rainbow.Value and Color3.fromHSV(tick() * 128 % 255/255, 1, 1) or (CheckTeam(v) and Green or Red);
1107
1108 if (Options.ShowTeamColor.Value) then Color = v.TeamColor.Color; end
1109
1110 local ScreenPositionUpper = Camera:WorldToViewportPoint((HumanoidRootPart:GetRenderCFrame() * CFrame.new(0, Head.Size.Y + HumanoidRootPart.Size.Y, 0)).p);
1111 local Scale = Head.Size.Y / 2;
1112
1113 if Options.ShowName.Value then
1114 NameTag.Visible = true;
1115 NameTag.Text = v.Name .. (CustomPlayerTag and CustomPlayerTag(v) or '');
1116 NameTag.Size = Options.TextSize.Value;
1117 NameTag.Outline = Options.TextOutline.Value;
1118 NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) - Vector2.new(0, NameTag.TextBounds.Y);
1119 NameTag.Color = Color;
1120 NameTag.Transparency= 0.85;
1121 if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
1122 NameTag.Font = Drawing.Fonts.Monospace;
1123 end
1124 else
1125 NameTag.Visible = false;
1126 end
1127 if Options.ShowDistance.Value or Options.ShowHealth.Value then
1128 DistanceTag.Visible = true;
1129 DistanceTag.Size = Options.TextSize.Value - 1;
1130 DistanceTag.Outline = Options.TextOutline.Value;
1131 DistanceTag.Color = Color3.new(1, 1, 1);
1132 DistanceTag.Transparency= 0.85;
1133 if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
1134 NameTag.Font = Drawing.Fonts.Monospace;
1135 end
1136
1137 local Str = '';
1138
1139 if Options.ShowDistance.Value then
1140 Str = Str .. Format('[%d] ', Distance);
1141 end
1142 if Options.ShowHealth.Value and Humanoid then
1143 Str = Str .. Format('[%d/%d] [%s%%]', Humanoid.Health, Humanoid.MaxHealth, math.floor(Humanoid.Health / Humanoid.MaxHealth * 100));
1144 -- Str = Str .. Format('[%d/%d] [%s%%]', Humanoid.Health, Humanoid.MaxHealth, math.floor(Humanoid.Health / Humanoid.MaxHealth * 100));
1145 end
1146
1147 DistanceTag.Text = Str;
1148 DistanceTag.Position = (NameTag.Visible and NameTag.Position + Vector2.new(0, NameTag.TextBounds.Y) or Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y));
1149 else
1150 DistanceTag.Visible = false;
1151 end
1152 if Options.ShowDot.Value and Vis then
1153 local Top = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, Scale, 0)).p);
1154 local Bottom = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, -Scale, 0)).p);
1155 local Radius = (Top - Bottom).y;
1156
1157 HeadDot.Visible = true;
1158 HeadDot.Color = Color;
1159 HeadDot.Position = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
1160 HeadDot.Radius = Radius;
1161 else
1162 HeadDot.Visible = false;
1163 end
1164 if Options.ShowTracers.Value then
1165 Tracer.Visible = true;
1166 Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y);
1167 Tracer.To = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
1168 Tracer.Color = Color;
1169 else
1170 Tracer.Visible = false;
1171 end
1172 if Options.ShowBoxes.Value and Vis and HumanoidRootPart then
1173 Box:Update(HumanoidRootPart.CFrame, Vector3.new(2, 3, 0) * (Scale * 2), Color);
1174 else
1175 Box:SetVisible(false);
1176 end
1177 else
1178 NameTag.Visible = false;
1179 DistanceTag.Visible = false;
1180 Tracer.Visible = false;
1181 HeadDot.Visible = false;
1182
1183 Box:SetVisible(false);
1184 end
1185 end
1186 else
1187 NameTag.Visible = false;
1188 DistanceTag.Visible = false;
1189 Tracer.Visible = false;
1190 HeadDot.Visible = false;
1191
1192 Box:SetVisible(false);
1193 end
1194
1195 shared.InstanceData[v.Name] = Data;
1196 end
1197 end
1198 for i, v in next,workspace:WaitForChild'Live':GetChildren()do
1199 local Data = shared.InstanceData[v.Name] or { Instances = {}; };
1200
1201 Data.Instances['Box'] = Data.Instances['Box'] or LineBox:Create{Thickness = 3};
1202 Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
1203 Transparency = 1;
1204 Thickness = 2;
1205 }
1206 Data.Instances['HeadDot'] = Data.Instances['HeadDot'] or NewDrawing'Circle'{
1207 Filled = true;
1208 NumSides = 30;
1209 }
1210 Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
1211 Size = Options.TextSize.Value;
1212 Center = true;
1213 Outline = Options.TextOutline.Value;
1214 Visible = true;
1215 };
1216 Data.Instances['DistanceHealthTag'] = Data.Instances['DistanceHealthTag'] or NewDrawing'Text'{
1217 Size = Options.TextSize.Value - 1;
1218 Center = true;
1219 Outline = Options.TextOutline.Value;
1220 Visible = true;
1221 };
1222
1223 local NameTag = Data.Instances['NameTag'];
1224 local DistanceTag = Data.Instances['DistanceHealthTag'];
1225 local Tracer = Data.Instances['Tracer'];
1226 local HeadDot = Data.Instances['HeadDot'];
1227 local Box = Data.Instances['Box'];
1228
1229 local Pass, Distance = CheckPlayer(v);
1230
1231 if not Pass and Distance then
1232 local Humanoid = v.Character:FindFirstChildOfClass'Humanoid';
1233 local Head = v.Character:FindFirstChild'Head';
1234 local HumanoidRootPart = v.Character:FindFirstChild'HumanoidRootPart';
1235 if Head and HumanoidRootPart then
1236 local ScreenPosition, Vis = Camera:WorldToViewportPoint(Head.Position);
1237
1238 if ScreenPosition.Z > 0 then
1239 local Color = Options.Rainbow.Value and Color3.fromHSV(tick() * 128 % 255/255, 1, 1) or (CheckTeam(v) and Green or Red);
1240
1241 if (Options.ShowTeamColor.Value) then Color = v.TeamColor.Color; end
1242
1243 local ScreenPositionUpper = Camera:WorldToViewportPoint((HumanoidRootPart:GetRenderCFrame() * CFrame.new(0, Head.Size.Y + HumanoidRootPart.Size.Y, 0)).p);
1244 local Scale = Head.Size.Y / 2;
1245
1246 if Options.ShowName.Value then
1247 NameTag.Visible = true;
1248 NameTag.Text = v.Name .. (CustomPlayerTag and CustomPlayerTag(v) or '');
1249 NameTag.Size = Options.TextSize.Value;
1250 NameTag.Outline = Options.TextOutline.Value;
1251 NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) - Vector2.new(0, NameTag.TextBounds.Y);
1252 NameTag.Color = Color;
1253 NameTag.Transparency= 0.85;
1254 if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
1255 NameTag.Font = Drawing.Fonts.Monospace;
1256 end
1257 else
1258 NameTag.Visible = false;
1259 end
1260 if Options.ShowDistance.Value or Options.ShowHealth.Value then
1261 DistanceTag.Visible = true;
1262 DistanceTag.Size = Options.TextSize.Value - 1;
1263 DistanceTag.Outline = Options.TextOutline.Value;
1264 DistanceTag.Color = Color3.new(1, 1, 1);
1265 DistanceTag.Transparency= 0.85;
1266 if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
1267 NameTag.Font = Drawing.Fonts.Monospace;
1268 end
1269
1270 local Str = '';
1271
1272 if Options.ShowDistance.Value then
1273 Str = Str .. Format('[%d] ', Distance);
1274 end
1275 if Options.ShowHealth.Value and Humanoid then
1276 Str = Str .. Format('[%d/%d] [%s%%]', Humanoid.Health, Humanoid.MaxHealth, math.floor(Humanoid.Health / Humanoid.MaxHealth * 100));
1277 -- Str = Str .. Format('[%d/%d] [%s%%]', Humanoid.Health, Humanoid.MaxHealth, math.floor(Humanoid.Health / Humanoid.MaxHealth * 100));
1278 end
1279
1280 DistanceTag.Text = Str;
1281 DistanceTag.Position = (NameTag.Visible and NameTag.Position + Vector2.new(0, NameTag.TextBounds.Y) or Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y));
1282 else
1283 DistanceTag.Visible = false;
1284 end
1285 if Options.ShowDot.Value and Vis then
1286 local Top = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, Scale, 0)).p);
1287 local Bottom = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, -Scale, 0)).p);
1288 local Radius = (Top - Bottom).y;
1289
1290 HeadDot.Visible = true;
1291 HeadDot.Color = Color;
1292 HeadDot.Position = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
1293 HeadDot.Radius = Radius;
1294 else
1295 HeadDot.Visible = false;
1296 end
1297 if Options.ShowTracers.Value then
1298 Tracer.Visible = true;
1299 Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y);
1300 Tracer.To = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
1301 Tracer.Color = Color;
1302 else
1303 Tracer.Visible = false;
1304 end
1305 if Options.ShowBoxes.Value and Vis and HumanoidRootPart then
1306 Box:Update(HumanoidRootPart.CFrame, Vector3.new(2, 3, 0) * (Scale * 2), Color);
1307 else
1308 Box:SetVisible(false);
1309 end
1310 else
1311 NameTag.Visible = false;
1312 DistanceTag.Visible = false;
1313 Tracer.Visible = false;
1314 HeadDot.Visible = false;
1315
1316 Box:SetVisible(false);
1317 end
1318 end
1319 else
1320 NameTag.Visible = false;
1321 DistanceTag.Visible = false;
1322 Tracer.Visible = false;
1323 HeadDot.Visible = false;
1324
1325 Box:SetVisible(false);
1326 end
1327
1328 shared.InstanceData[v.Name] = Data;
1329 end
1330end
1331local LastInvalidCheck = 0;
1332local function Update()
1333 if tick() - LastInvalidCheck > 1 then
1334 LastInvalidCheck = tick();
1335
1336 if Camera.Parent ~= workspace then
1337 Camera = workspace.CurrentCamera;
1338 end
1339
1340 for i, v in pairs(shared.InstanceData) do
1341 if not Players:FindFirstChild(tostring(i)) then
1342 if not shared.InstanceData[i].DontDelete then
1343 GetTableData(v.Instances)(function(i, obj)
1344 obj.Visible = false;
1345 obj:Remove();
1346 v.Instances[i] = nil;
1347 end)
1348 shared.InstanceData[i] = nil;
1349 else
1350 if not shared.InstanceData[i].Instance or not shared.InstanceData[i].Instance.Parent then
1351 GetTableData(v.Instances)(function(i, obj)
1352 obj.Visible = false;
1353 obj:Remove();
1354 v.Instances[i] = nil;
1355 end)
1356 shared.InstanceData[i] = nil;
1357 end
1358 end
1359 end
1360 end
1361 end
1362
1363 local CX = Menu:GetInstance'CrosshairX';
1364 local CY = Menu:GetInstance'CrosshairY';
1365
1366 if Options.Crosshair.Value then
1367 CX.Visible = true;
1368 CY.Visible = true;
1369
1370 CX.To = Vector2.new((Camera.ViewportSize.X / 2) - 8, (Camera.ViewportSize.Y / 2));
1371 CX.From = Vector2.new((Camera.ViewportSize.X / 2) + 8, (Camera.ViewportSize.Y / 2));
1372 CY.To = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) - 8);
1373 CY.From = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) + 8);
1374 else
1375 CX.Visible = false;
1376 CY.Visible = false;
1377 end
1378
1379 if Options.MenuOpen.Value and MenuLoaded then
1380 local MLocation = GetMouseLocation();
1381 shared.MenuDrawingData.Instances.Main.Color = Color3.fromHSV(tick() * 24 % 255/255, 1, 1);
1382 local MainInstance = Menu:GetInstance'Main';
1383
1384 local Values = {
1385 MainInstance.Position.X;
1386 MainInstance.Position.Y;
1387 MainInstance.Position.X + MainInstance.Size.X;
1388 MainInstance.Position.Y + MainInstance.Size.Y;
1389 };
1390
1391 if MainInstance and MouseHoveringOver(Values) then
1392 Debounce.CursorVis = true;
1393 -- GUIService:SetMenuIsOpen(true);
1394 Menu:UpdateMenuInstance'Cursor1'{
1395 Visible = true;
1396 From = Vector2.new(MLocation.x, MLocation.y);
1397 To = Vector2.new(MLocation.x + 5, MLocation.y + 6);
1398 }
1399 Menu:UpdateMenuInstance'Cursor2'{
1400 Visible = true;
1401 From = Vector2.new(MLocation.x, MLocation.y);
1402 To = Vector2.new(MLocation.x, MLocation.y + 8);
1403 }
1404 Menu:UpdateMenuInstance'Cursor3'{
1405 Visible = true;
1406 From = Vector2.new(MLocation.x, MLocation.y + 6);
1407 To = Vector2.new(MLocation.x + 5, MLocation.y + 5);
1408 }
1409 else
1410 if Debounce.CursorVis then
1411 Debounce.CursorVis = false;
1412 -- GUIService:SetMenuIsOpen(false);
1413 Menu:UpdateMenuInstance'Cursor1'{Visible = false};
1414 Menu:UpdateMenuInstance'Cursor2'{Visible = false};
1415 Menu:UpdateMenuInstance'Cursor3'{Visible = false};
1416 end
1417 end
1418 if MouseHeld then
1419 if Dragging then
1420 DraggingWhat.Slider.Position = Vector2.new(math.clamp(MLocation.X, DraggingWhat.Line.From.X, DraggingWhat.Line.To.X), DraggingWhat.Slider.Position.Y);
1421 local Percent = (DraggingWhat.Slider.Position.X - DraggingWhat.Line.From.X) / ((DraggingWhat.Line.To.X - DraggingWhat.Line.From.X));
1422 local Value = CalculateValue(DraggingWhat.Min, DraggingWhat.Max, Percent);
1423 DraggingWhat.Option(Value);
1424 elseif DraggingUI then
1425 Debounce.UIDrag = true;
1426 local Main = Menu:GetInstance'Main';
1427 local MousePos = GetMouseLocation();
1428 Main.Position = MousePos + DragOffset;
1429 end
1430 else
1431 Dragging = false;
1432 if DraggingUI and Debounce.UIDrag then
1433 Debounce.UIDrag = false;
1434 DraggingUI = false;
1435 CreateMenu(Menu:GetInstance'Main'.Position);
1436 end
1437 end
1438 if not Debounce.Menu then
1439 Debounce.Menu = true;
1440 ToggleMenu();
1441 end
1442 elseif Debounce.Menu and not Options.MenuOpen.Value then
1443 Debounce.Menu = false;
1444 ToggleMenu();
1445 end
1446end
1447RunService:UnbindFromRenderStep(GetDataName);
1448RunService:UnbindFromRenderStep(UpdateName);
1449RunService:BindToRenderStep(GetDataName, 1, UpdatePlayerData);
1450RunService:BindToRenderStep(UpdateName, 1, Update);