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