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