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