· 6 years ago · Sep 29, 2019, 07:22 AM
1--This is just a repost of my 3rd GUI because I finnaly made an account so yeah
2-- Farewell Infortality.
3-- Version: 2.82
4-- Instances:
5local ScreenGui = Instance.new("ScreenGui")
6local Main = Instance.new("Frame")
7local TextLabel = Instance.new("TextLabel")
8local TextLabel_2 = Instance.new("TextLabel")
9local Aimbot = Instance.new("TextButton")
10local ESP = Instance.new("TextButton")
11local Close = Instance.new("TextButton")
12local OpenFrame = Instance.new("Frame")
13local Open = Instance.new("TextButton")
14--Properties:
15ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
16
17Main.Name = "Main"
18Main.Parent = ScreenGui
19Main.BackgroundColor3 = Color3.new(0.160784, 0.87451, 0.423529)
20Main.BorderSizePixel = 5
21Main.Position = UDim2.new(0.361212134, 0, 0.185935631, 0)
22Main.Size = UDim2.new(0, 647, 0, 518)
23
24TextLabel.Parent = Main
25TextLabel.BackgroundColor3 = Color3.new(0.160784, 0.87451, 0.423529)
26TextLabel.BorderSizePixel = 5
27TextLabel.Position = UDim2.new(-0.097955808, 0, -0.0013230592, 0)
28TextLabel.Size = UDim2.new(0, 773, 0, 50)
29TextLabel.Font = Enum.Font.Cartoon
30TextLabel.Text = "AimSpot Made By Kermit Is Still A Frog#1507"
31TextLabel.TextColor3 = Color3.new(1, 1, 1)
32TextLabel.TextScaled = true
33TextLabel.TextSize = 14
34TextLabel.TextWrapped = true
35
36TextLabel_2.Parent = Main
37TextLabel_2.BackgroundColor3 = Color3.new(0.160784, 0.87451, 0.423529)
38TextLabel_2.BorderSizePixel = 5
39TextLabel_2.Position = UDim2.new(-0.097955808, 0, 0.9020437, 0)
40TextLabel_2.Size = UDim2.new(0, 773, 0, 50)
41TextLabel_2.Font = Enum.Font.Cartoon
42TextLabel_2.Text = "Shout Out To JØ₴Ⱨ On Discord For The Idea"
43TextLabel_2.TextColor3 = Color3.new(1, 1, 1)
44TextLabel_2.TextScaled = true
45TextLabel_2.TextSize = 14
46TextLabel_2.TextWrapped = true
47
48Aimbot.Name = "Aimbot"
49Aimbot.Parent = Main
50Aimbot.BackgroundColor3 = Color3.new(1, 1, 1)
51Aimbot.BorderSizePixel = 5
52Aimbot.Position = UDim2.new(0.0989180803, 0, 0.293436289, 0)
53Aimbot.Size = UDim2.new(0, 200, 0, 186)
54Aimbot.Font = Enum.Font.Cartoon
55Aimbot.Text = "Aimbot"
56Aimbot.TextColor3 = Color3.new(1, 1, 1)
57Aimbot.TextScaled = true
58Aimbot.TextSize = 14
59Aimbot.TextWrapped = true
60Aimbot.MouseButton1Down:connect(function()
61loadstring(game:GetObjects('rbxassetid://340856112')[1].Source)()
62
63wait()
64
65_G.FREE_FOR_ALL = true
66
67_G.BIND = 50 -- LEFT CTRL
68_G.ESP_BIND = 52 -- LEFT ALT
69end)
70
71ESP.Name = "ESP"
72ESP.Parent = Main
73ESP.BackgroundColor3 = Color3.new(1, 1, 1)
74ESP.BorderSizePixel = 5
75ESP.Position = UDim2.new(0.591962874, 0, 0.293436289, 0)
76ESP.Size = UDim2.new(0, 200, 0, 186)
77ESP.Font = Enum.Font.Cartoon
78ESP.Text = "ESP"
79ESP.TextColor3 = Color3.new(1, 1, 1)
80ESP.TextScaled = true
81ESP.TextSize = 14
82ESP.TextWrapped = true
83ESP.MouseButton1Down:connect(function()
84-- Created By Ic3W0lf
85assert(Drawing, 'exploit not supported')
86
87local UserInputService = game:GetService'UserInputService';
88local HttpService = game:GetService'HttpService';
89local GUIService = game:GetService'GuiService';
90local RunService = game:GetService'RunService';
91local Players = game:GetService'Players';
92local LocalPlayer = Players.LocalPlayer;
93local Camera = workspace.CurrentCamera
94local Mouse = LocalPlayer:GetMouse();
95local Menu = {};
96local MouseHeld = false;
97local LastRefresh = 0;
98local OptionsFile = 'IC3_ESP_SETTINGS.dat';
99local Binding = false;
100local BindedKey = nil;
101local OIndex = 0;
102local LineBox = {};
103local UIButtons = {};
104local Sliders = {};
105local Dragging = false;
106local DraggingUI = false;
107local DragOffset = Vector2.new();
108local DraggingWhat = nil;
109local OldData = {};
110local IgnoreList = {};
111local Red = Color3.new(1, 0, 0);
112local Green = Color3.new(0, 1, 0);
113local MenuLoaded = false;
114
115shared.MenuDrawingData = shared.MenuDrawingData or { Instances = {} };
116shared.PlayerData = shared.PlayerData or {};
117shared.RSName = shared.RSName or ('UnnamedESP_by_ic3-' .. HttpService:GenerateGUID(false));
118
119local GetDataName = shared.RSName .. '-GetData';
120local UpdateName = shared.RSName .. '-Update';
121
122local Debounce = setmetatable({}, {
123__index = function(t, i)
124return rawget(t, i) or false
125end;
126});
127
128pcall(function() shared.InputBeganCon:disconnect() end);
129pcall(function() shared.InputEndedCon:disconnect() end);
130
131function GetMouseLocation()
132return UserInputService:GetMouseLocation();
133end
134
135function MouseHoveringOver(Values)
136local X1, Y1, X2, Y2 = Values[1], Values[2], Values[3], Values[4]
137local MLocation = GetMouseLocation();
138return (MLocation.x >= X1 and MLocation.x <= (X1 + (X2 - X1))) and (MLocation.y >= Y1 and MLocation.y <= (Y1 + (Y2 - Y1)));
139end
140
141function GetTableData(t) -- basically table.foreach i dont even know why i made this
142if typeof(t) ~= 'table' then return end
143return setmetatable(t, {
144__call = function(t, func)
145if typeof(func) ~= 'function' then return end;
146for i, v in pairs(t) do
147pcall(func, i, v);
148end
149end;
150});
151end
152local function Format(format, ...)
153return string.format(format, ...);
154end
155function CalculateValue(Min, Max, Percent)
156return Min + math.floor(((Max - Min) * Percent) + .5);
157end
158
159local Options = setmetatable({}, {
160__call = function(t, ...)
161local Arguments = {...};
162local Name = Arguments[1];
163OIndex = OIndex + 1; -- (typeof(Arguments[3]) == 'boolean' and 1 or 0);
164rawset(t, Name, setmetatable({
165Name = Arguments[1];
166Text = Arguments[2];
167Value = Arguments[3];
168DefaultValue = Arguments[3];
169AllArgs = Arguments;
170Index = OIndex;
171}, {
172__call = function(t, v)
173if typeof(t.Value) == 'function' then
174t.Value();
175elseif typeof(t.Value) == 'EnumItem' then
176local BT = Menu:GetInstance(Format('%s_BindText', t.Name));
177Binding = true;
178local Val = 0
179while Binding do
180wait();
181Val = (Val + 1) % 17;
182BT.Text = Val <= 8 and '|' or '';
183end
184t.Value = BindedKey;
185BT.Text = tostring(t.Value):match'%w+%.%w+%.(.+)';
186BT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - BT.TextBounds.X - 20, -10);
187else
188local NewValue = v;
189if NewValue == nil then NewValue = not t.Value; end
190rawset(t, 'Value', NewValue);
191if Arguments[2] ~= nil then
192if typeof(Arguments[3]) == 'number' then
193local AMT = Menu:GetInstance(Format('%s_AmountText', t.Name));
194AMT.Text = tostring(t.Value);
195AMT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - AMT.TextBounds.X - 10, -10);
196else
197local Inner = Menu:GetInstance(Format('%s_InnerCircle', t.Name));
198Inner.Visible = t.Value;
199end
200end
201end
202end;
203}));
204end;
205})
206
207function Load()
208local _, Result = pcall(readfile, OptionsFile);
209if _ then -- extremely ugly code yea i know but i dont care p.s. i hate pcall
210local _, Table = pcall(HttpService.JSONDecode, HttpService, Result);
211if _ then
212for i, v in pairs(Table) do
213if Options[i] ~= nil and Options[i].Value ~= nil and (typeof(Options[i].Value) == 'boolean' or typeof(Options[i].Value) == 'number') then
214Options[i].Value = v.Value;
215pcall(Options[i], v.Value);
216end
217end
218end
219end
220end
221
222Options('Enabled', 'ESP Enabled', true);
223Options('ShowTeam', 'Show Team', false);
224Options('ShowName', 'Show Names', true);
225Options('ShowDistance', 'Show Distance', true);
226Options('ShowHealth', 'Show Health', true);
227Options('ShowBoxes', 'Show Boxes', true);
228Options('ShowTracers', 'Show Tracers', true);
229Options('ShowDot', 'Show Head Dot', false);
230Options('VisCheck', 'Visibility Check', false);
231Options('Crosshair', 'Crosshair', false);
232Options('TextOutline', 'Text Outline', true);
233Options('TextSize', 'Text Size', syn and 18 or 14, 10, 24); -- cuz synapse fonts look weird???
234Options('MaxDistance', 'Max Distance', 2500, 100, 5000);
235Options('RefreshRate', 'Refresh Rate (ms)', 5, 1, 200);
236Options('MenuKey', 'Menu Key', Enum.KeyCode.F4, 1);
237Options('ResetSettings', 'Reset Settings', function()
238for i, v in pairs(Options) do
239if 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
240Options[i](Options[i].DefaultValue);
241end
242end
243end, 4);
244Options('LoadSettings', 'Load Settings', Load, 3);
245Options('SaveSettings', 'Save Settings', function()
246writefile(OptionsFile, HttpService:JSONEncode(Options));
247end, 2)
248-- Options.SaveSettings.Value();
249
250Load();
251
252Options('MenuOpen', nil, true);
253
254local function Set(t, i, v)
255t[i] = v;
256end
257local function Combine(...)
258local Output = {};
259for i, v in pairs{...} do
260if typeof(v) == 'table' then
261table.foreach(v, function(i, v)
262Output[i] = v;
263end)
264end
265end
266return Output
267end
268function IsStringEmpty(String)
269if type(String) == 'string' then
270return String:match'^%s+$' ~= nil or #String == 0 or String == '' or false;
271end
272return false
273end
274
275function NewDrawing(InstanceName)
276local Instance = Drawing.new(InstanceName);
277return (function(Properties)
278for i, v in pairs(Properties) do
279pcall(Set, Instance, i, v);
280end
281return Instance;
282end)
283end
284
285function Menu:AddMenuInstace(Name, Instance)
286if shared.MenuDrawingData.Instances[Name] ~= nil then
287shared.MenuDrawingData.Instances[Name]:Remove();
288end
289shared.MenuDrawingData.Instances[Name] = Instance;
290return Instance;
291end
292function Menu:UpdateMenuInstance(Name)
293local Instance = shared.MenuDrawingData.Instances[Name];
294if Instance ~= nil then
295return (function(Properties)
296for i, v in pairs(Properties) do
297-- print(Format('%s %s -> %s', Name, tostring(i), tostring(v)));
298pcall(Set, Instance, i, v);
299end
300return Instance;
301end)
302end
303end
304function Menu:GetInstance(Name)
305return shared.MenuDrawingData.Instances[Name];
306end
307
308function LineBox:Create(Properties)
309local Box = { Visible = true }; -- prevent errors not really though dont worry bout the Visible = true thing
310
311local Properties = Combine({
312Transparency = 1;
313Thickness = 1;
314Visible = true;
315}, Properties);
316
317Box['TopLeft'] = NewDrawing'Line'(Properties);
318Box['TopRight'] = NewDrawing'Line'(Properties);
319Box['BottomLeft'] = NewDrawing'Line'(Properties);
320Box['BottomRight'] = NewDrawing'Line'(Properties);
321
322function Box:Update(CF, Size, Color, Properties)
323if not CF or not Size then return end
324
325local TLPos, Visible1 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, Size.Y, 0)).p);
326local TRPos, Visible2 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, Size.Y, 0)).p);
327local BLPos, Visible3 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, -Size.Y, 0)).p);
328local BRPos, Visible4 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, -Size.Y, 0)).p);
329-- ## BEGIN UGLY CODE
330if Visible1 then
331Box['TopLeft'].Visible = true;
332Box['TopLeft'].Color = Color;
333Box['TopLeft'].From = Vector2.new(TLPos.X, TLPos.Y);
334Box['TopLeft'].To = Vector2.new(TRPos.X, TRPos.Y);
335else
336Box['TopLeft'].Visible = false;
337end
338if Visible2 then
339Box['TopRight'].Visible = true;
340Box['TopRight'].Color = Color;
341Box['TopRight'].From = Vector2.new(TRPos.X, TRPos.Y);
342Box['TopRight'].To = Vector2.new(BRPos.X, BRPos.Y);
343else
344Box['TopRight'].Visible = false;
345end
346if Visible3 then
347Box['BottomLeft'].Visible = true;
348Box['BottomLeft'].Color = Color;
349Box['BottomLeft'].From = Vector2.new(BLPos.X, BLPos.Y);
350Box['BottomLeft'].To = Vector2.new(TLPos.X, TLPos.Y);
351else
352Box['BottomLeft'].Visible = false;
353end
354if Visible4 then
355Box['BottomRight'].Visible = true;
356Box['BottomRight'].Color = Color;
357Box['BottomRight'].From = Vector2.new(BRPos.X, BRPos.Y);
358Box['BottomRight'].To = Vector2.new(BLPos.X, BLPos.Y);
359else
360Box['BottomRight'].Visible = false;
361end
362-- ## END UGLY CODE
363if Properties then
364GetTableData(Properties)(function(i, v)
365pcall(Set, Box['TopLeft'], i, v);
366pcall(Set, Box['TopRight'], i, v);
367pcall(Set, Box['BottomLeft'], i, v);
368pcall(Set, Box['BottomRight'], i, v);
369end)
370end
371end
372function Box:SetVisible(bool)
373pcall(Set, Box['TopLeft'], 'Visible', bool);
374pcall(Set, Box['TopRight'], 'Visible', bool);
375pcall(Set, Box['BottomLeft'], 'Visible', bool);
376pcall(Set, Box['BottomRight'], 'Visible', bool);
377end
378function Box:Remove()
379self:SetVisible(false);
380Box['TopLeft']:Remove();
381Box['TopRight']:Remove();
382Box['BottomLeft']:Remove();
383Box['BottomRight']:Remove();
384end
385
386return Box;
387end
388
389function CreateMenu(NewPosition) -- Create Menu
390local function FromHex(HEX)
391HEX = HEX:gsub('#', '');
392return Color3.fromRGB(tonumber('0x' .. HEX:sub(1, 2)), tonumber('0x' .. HEX:sub(3, 4)), tonumber('0x' .. HEX:sub(5, 6)));
393end
394
395local Colors = {
396Primary = {
397Main = FromHex'424242';
398Light = FromHex'6d6d6d';
399Dark = FromHex'1b1b1b';
400};
401Secondary = {
402Main = FromHex'e0e0e0';
403Light = FromHex'ffffff';
404Dark = FromHex'aeaeae';
405};
406};
407
408MenuLoaded = false;
409
410GetTableData(UIButtons)(function(i, v)
411v.Instance.Visible = false;
412v.Instance:Remove();
413end)
414GetTableData(Sliders)(function(i, v)
415v.Instance.Visible = false;
416v.Instance:Remove();
417end)
418
419UIButtons = {};
420Sliders = {};
421
422local BaseSize = Vector2.new(300, 580);
423local BasePosition = NewPosition or Vector2.new(Camera.ViewportSize.X / 8 - (BaseSize.X / 2), Camera.ViewportSize.Y / 2 - (BaseSize.Y / 2));
424
425Menu:AddMenuInstace('CrosshairX', NewDrawing'Line'{
426Visible = false;
427Color = Color3.new(0, 1, 0);
428Transparency = 1;
429Thickness = 1;
430});
431Menu:AddMenuInstace('CrosshairY', NewDrawing'Line'{
432Visible = false;
433Color = Color3.new(0, 1, 0);
434Transparency = 1;
435Thickness = 1;
436});
437
438delay(.025, function() -- since zindex doesnt exist
439Menu:AddMenuInstace('Main', NewDrawing'Square'{
440Size = BaseSize;
441Position = BasePosition;
442Filled = false;
443Color = Colors.Primary.Main;
444Thickness = 3;
445Visible = true;
446});
447end);
448Menu:AddMenuInstace('TopBar', NewDrawing'Square'{
449Position = BasePosition;
450Size = Vector2.new(BaseSize.X, 25);
451Color = Colors.Primary.Dark;
452Filled = true;
453Visible = true;
454});
455Menu:AddMenuInstace('TopBarTwo', NewDrawing'Square'{
456Position = BasePosition + Vector2.new(0, 25);
457Size = Vector2.new(BaseSize.X, 60);
458Color = Colors.Primary.Main;
459Filled = true;
460Visible = true;
461});
462Menu:AddMenuInstace('TopBarText', NewDrawing'Text'{
463Size = 25;
464Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(25, 15);
465Text = 'Unnamed ESP';
466Color = Colors.Secondary.Light;
467Visible = true;
468});
469Menu:AddMenuInstace('TopBarTextBR', NewDrawing'Text'{
470Size = 15;
471Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(BaseSize.X - 65, 40);
472Text = 'by ic3w0lf';
473Color = Colors.Secondary.Dark;
474Visible = true;
475});
476Menu:AddMenuInstace('Filling', NewDrawing'Square'{
477Size = BaseSize - Vector2.new(0, 85);
478Position = BasePosition + Vector2.new(0, 85);
479Filled = true;
480Color = Colors.Secondary.Main;
481Transparency= .5;
482Visible = true;
483});
484
485local CPos = 0;
486
487GetTableData(Options)(function(i, v)
488if typeof(v.Value) == 'boolean' and not IsStringEmpty(v.Text) and v.Text ~= nil then
489CPos = CPos + 25;
490local BaseSize = Vector2.new(BaseSize.X, 30);
491local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(30, v.Index * 25 - 10);
492UIButtons[#UIButtons + 1] = {
493Option = v;
494Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
495Position = BasePosition - Vector2.new(30, 15);
496Size = BaseSize;
497Visible = false;
498});
499};
500Menu:AddMenuInstace(Format('%s_OuterCircle', v.Name), NewDrawing'Circle'{
501Radius = 10;
502Position = BasePosition;
503Color = Colors.Secondary.Light;
504Filled = true;
505Visible = true;
506});
507Menu:AddMenuInstace(Format('%s_InnerCircle', v.Name), NewDrawing'Circle'{
508Radius = 7;
509Position = BasePosition;
510Color = Colors.Secondary.Dark;
511Filled = true;
512Visible = v.Value;
513});
514Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
515Text = v.Text;
516Size = 20;
517Position = BasePosition + Vector2.new(20, -10);
518Visible = true;
519Color = Colors.Primary.Dark;
520});
521end
522end)
523GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
524if typeof(v.Value) == 'number' then
525CPos = CPos + 25;
526
527local BaseSize = Vector2.new(BaseSize.X, 30);
528local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
529
530local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
531Text = v.Text;
532Size = 20;
533Position = BasePosition + Vector2.new(20, -10);
534Visible = true;
535Color = Colors.Primary.Dark;
536});
537local AMT = Menu:AddMenuInstace(Format('%s_AmountText', v.Name), NewDrawing'Text'{
538Text = tostring(v.Value);
539Size = 20;
540Position = BasePosition;
541Visible = true;
542Color = Colors.Primary.Dark;
543});
544local Line = Menu:AddMenuInstace(Format('%s_SliderLine', v.Name), NewDrawing'Line'{
545Transparency = 1;
546Color = Colors.Primary.Dark;
547Thickness = 3;
548Visible = true;
549From = BasePosition + Vector2.new(20, 20);
550To = BasePosition + Vector2.new(BaseSize.X - 10, 20);
551});
552CPos = CPos + 10;
553local Slider = Menu:AddMenuInstace(Format('%s_Slider', v.Name), NewDrawing'Circle'{
554Visible = true;
555Filled = true;
556Radius = 6;
557Color = Colors.Secondary.Dark;
558Position = BasePosition + Vector2.new(35, 20);
559})
560
561local CSlider = {Slider = Slider; Line = Line; Min = v.AllArgs[4]; Max = v.AllArgs[5]; Option = v};
562Sliders[#Sliders + 1] = CSlider;
563
564-- local Percent = (v.Value / CSlider.Max) * 100;
565-- local Size = math.abs(Line.From.X - Line.To.X);
566-- local Value = Size * (Percent / 100); -- this shit's inaccurate but fuck it i'm not even gonna bother fixing it
567
568Slider.Position = BasePosition + Vector2.new(40, 20);
569
570v.BaseSize = BaseSize;
571v.BasePosition = BasePosition;
572AMT.Position = BasePosition + Vector2.new(BaseSize.X - AMT.TextBounds.X - 10, -10)
573end
574end)
575GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
576if typeof(v.Value) == 'EnumItem' then
577CPos = CPos + 30;
578
579local BaseSize = Vector2.new(BaseSize.X, 30);
580local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
581
582UIButtons[#UIButtons + 1] = {
583Option = v;
584Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
585Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
586Visible = true;
587Transparency= .5;
588Position = BasePosition + Vector2.new(15, -10);
589Color = Colors.Secondary.Light;
590Filled = true;
591});
592};
593local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
594Text = v.Text;
595Size = 20;
596Position = BasePosition + Vector2.new(20, -10);
597Visible = true;
598Color = Colors.Primary.Dark;
599});
600local BindText = Menu:AddMenuInstace(Format('%s_BindText', v.Name), NewDrawing'Text'{
601Text = tostring(v.Value):match'%w+%.%w+%.(.+)';
602Size = 20;
603Position = BasePosition;
604Visible = true;
605Color = Colors.Primary.Dark;
606});
607
608Options[i].BaseSize = BaseSize;
609Options[i].BasePosition = BasePosition;
610BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 20, -10);
611end
612end)
613GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
614if typeof(v.Value) == 'function' then
615local BaseSize = Vector2.new(BaseSize.X, 30);
616local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos + (25 * v.AllArgs[4]) - 35);
617
618UIButtons[#UIButtons + 1] = {
619Option = v;
620Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
621Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
622Visible = true;
623Transparency= .5;
624Position = BasePosition + Vector2.new(15, -10);
625Color = Colors.Secondary.Light;
626Filled = true;
627});
628};
629local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
630Text = v.Text;
631Size = 20;
632Position = BasePosition + Vector2.new(20, -10);
633Visible = true;
634Color = Colors.Primary.Dark;
635});
636
637-- BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 10, -10);
638end
639end)
640
641delay(.1, function()
642MenuLoaded = true;
643end);
644
645-- this has to be at the bottom cuz proto drawing api doesnt have zindex :triumph:
646Menu:AddMenuInstace('Cursor1', NewDrawing'Line'{
647Visible = false;
648Color = Color3.new(1, 0, 0);
649Transparency = 1;
650Thickness = 2;
651});
652Menu:AddMenuInstace('Cursor2', NewDrawing'Line'{
653Visible = false;
654Color = Color3.new(1, 0, 0);
655Transparency = 1;
656Thickness = 2;
657});
658Menu:AddMenuInstace('Cursor3', NewDrawing'Line'{
659Visible = false;
660Color = Color3.new(1, 0, 0);
661Transparency = 1;
662Thickness = 2;
663});
664end
665
666CreateMenu();
667
668shared.InputBeganCon = UserInputService.InputBegan:connect(function(input)
669if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
670MouseHeld = true;
671local Bar = Menu:GetInstance'TopBar';
672local Values = {
673Bar.Position.X;
674Bar.Position.Y;
675Bar.Position.X + Bar.Size.X;
676Bar.Position.Y + Bar.Size.Y;
677}
678if MouseHoveringOver(Values) and not syn then -- disable dragging for synapse cuz idk why it breaks
679DraggingUI = true;
680DragOffset = Menu:GetInstance'Main'.Position - GetMouseLocation();
681else
682for i, v in pairs(Sliders) do
683local Values = {
684v.Line.From.X - (v.Slider.Radius);
685v.Line.From.Y - (v.Slider.Radius);
686v.Line.To.X + (v.Slider.Radius);
687v.Line.To.Y + (v.Slider.Radius);
688};
689if MouseHoveringOver(Values) then
690DraggingWhat = v;
691Dragging = true;
692break
693end
694end
695end
696end
697end)
698shared.InputEndedCon = UserInputService.InputEnded:connect(function(input)
699if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
700MouseHeld = false;
701for i, v in pairs(UIButtons) do
702local Values = {
703v.Instance.Position.X;
704v.Instance.Position.Y;
705v.Instance.Position.X + v.Instance.Size.X;
706v.Instance.Position.Y + v.Instance.Size.Y;
707};
708if MouseHoveringOver(Values) then
709v.Option();
710break -- prevent clicking 2 options
711end
712end
713elseif input.UserInputType.Name == 'Keyboard' then
714if Binding then
715BindedKey = input.KeyCode;
716Binding = false;
717elseif input.KeyCode == Options.MenuKey.Value or (input.KeyCode == Enum.KeyCode.Home and UserInputService:IsKeyDown(Enum.KeyCode.LeftControl)) then
718Options.MenuOpen();
719end
720end
721end)
722
723function ToggleMenu()
724if Options.MenuOpen.Value then
725GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
726if OldData[v] then
727pcall(Set, v, 'Visible', true);
728end
729end)
730else
731-- GUIService:SetMenuIsOpen(false);
732GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
733if v.Visible == true then
734OldData[v] = true;
735pcall(Set, v, 'Visible', false);
736end
737end)
738end
739end
740
741function CheckRay(Player, Distance, Position, Unit)
742local Pass = true;
743
744if Distance > 999 then return false; end
745
746local _Ray = Ray.new(Position, Unit * Distance);
747
748local List = {LocalPlayer.Character, Camera, Mouse.TargetFilter};
749
750for i,v in pairs(IgnoreList) do table.insert(List, v); end;
751
752local Hit = workspace:FindPartOnRayWithIgnoreList(_Ray, List);
753if Hit and not Hit:IsDescendantOf(Player.Character) then
754Pass = false;
755if Hit.Transparency >= .3 or not Hit.CanCollide and Hit.ClassName ~= Terrain then -- Detect invisible walls
756IgnoreList[#IgnoreList + 1] = Hit;
757end
758end
759
760return Pass;
761end
762
763function CheckPlayer(Player)
764if not Options.Enabled.Value then return false end
765
766local Pass = true;
767local Distance = 0;
768
769if Player ~= LocalPlayer and Player.Character then
770if not Options.ShowTeam.Value and Player.TeamColor == LocalPlayer.TeamColor then
771Pass = false;
772end
773
774local Head = Player.Character:FindFirstChild'Head';
775
776if Pass and Player.Character and Head then
777Distance = (Camera.CFrame.p - Head.Position).magnitude;
778if Options.VisCheck.Value then
779Pass = CheckRay(Player, Distance, Camera.CFrame.p, (Head.Position - Camera.CFrame.p).unit);
780end
781if Distance > Options.MaxDistance.Value then
782Pass = false;
783end
784end
785else
786Pass = false;
787end
788
789return Pass, Distance;
790end
791
792function UpdatePlayerData()
793if (tick() - LastRefresh) > (Options.RefreshRate.Value / 1000) then
794LastRefresh = tick();
795for i, v in pairs(Players:GetPlayers()) do
796local Data = shared.PlayerData[v.Name] or { Instances = {} };
797
798Data.Instances['Box'] = Data.Instances['Box'] or LineBox:Create{Thickness = 3};
799Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
800Transparency = 1;
801Thickness = 2;
802}
803Data.Instances['HeadDot'] = Data.Instances['HeadDot'] or NewDrawing'Circle'{
804Filled = true;
805NumSides = 30;
806}
807Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
808Size = Options.TextSize.Value;
809Center = true;
810Outline = Options.TextOutline.Value;
811Visible = true;
812};
813Data.Instances['DistanceHealthTag'] = Data.Instances['DistanceHealthTag'] or NewDrawing'Text'{
814Size = Options.TextSize.Value - 1;
815Center = true;
816Outline = Options.TextOutline.Value;
817Visible = true;
818};
819
820local NameTag = Data.Instances['NameTag'];
821local DistanceTag = Data.Instances['DistanceHealthTag'];
822local Tracer = Data.Instances['Tracer'];
823local HeadDot = Data.Instances['HeadDot'];
824local Box = Data.Instances['Box'];
825
826local Pass, Distance = CheckPlayer(v);
827
828if Pass and v.Character then
829Data.LastUpdate = tick();
830local Humanoid = v.Character:FindFirstChildOfClass'Humanoid';
831local Head = v.Character:FindFirstChild'Head';
832local HumanoidRootPart = v.Character:FindFirstChild'HumanoidRootPart';
833if v.Character ~= nil and Head then
834local ScreenPosition, Vis = Camera:WorldToViewportPoint(Head.Position);
835if Vis then
836local Color = v.TeamColor == LocalPlayer.TeamColor and Green or Red;
837
838local ScreenPositionUpper = Camera:WorldToViewportPoint(Head.CFrame * CFrame.new(0, Head.Size.Y, 0).p);
839local Scale = Head.Size.Y / 2;
840
841if Options.ShowName.Value then
842NameTag.Visible = true;
843NameTag.Text = v.Name;
844NameTag.Size = Options.TextSize.Value;
845NameTag.Outline = Options.TextOutline.Value;
846NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y);
847NameTag.Color = Color;
848if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
849NameTag.Font = Drawing.Fonts.UI;
850end
851else
852NameTag.Visible = false;
853end
854if Options.ShowDistance.Value or Options.ShowHealth.Value then
855DistanceTag.Visible = true;
856DistanceTag.Size = Options.TextSize.Value - 1;
857DistanceTag.Outline = Options.TextOutline.Value;
858DistanceTag.Color = Color3.new(1, 1, 1);
859if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
860NameTag.Font = Drawing.Fonts.UI;
861end
862
863local Str = '';
864
865if Options.ShowDistance.Value then
866Str = Str .. Format('[%d] ', Distance);
867end
868if Options.ShowHealth.Value and Humanoid then
869Str = Str .. Format('[%d/100]', Humanoid.Health / Humanoid.MaxHealth * 100);
870end
871
872DistanceTag.Text = Str;
873DistanceTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) + Vector2.new(0, NameTag.Size);
874else
875DistanceTag.Visible = false;
876end
877if Options.ShowDot.Value then
878local Top = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, Scale, 0)).p);
879local Bottom = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, -Scale, 0)).p);
880local Radius = (Top - Bottom).y;
881
882HeadDot.Visible = true;
883HeadDot.Color = Color;
884HeadDot.Position = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
885HeadDot.Radius = Radius;
886else
887HeadDot.Visible = false;
888end
889if Options.ShowTracers.Value then
890Tracer.Visible = true;
891Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y);
892Tracer.To = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
893Tracer.Color = Color;
894else
895Tracer.Visible = false;
896end
897if Options.ShowBoxes.Value and HumanoidRootPart then
898Box:Update(HumanoidRootPart.CFrame, Vector3.new(2, 3, 0) * (Scale * 2), Color);
899else
900Box:SetVisible(false);
901end
902else
903NameTag.Visible = false;
904DistanceTag.Visible = false;
905Tracer.Visible = false;
906HeadDot.Visible = false;
907
908Box:SetVisible(false);
909end
910end
911else
912NameTag.Visible = false;
913DistanceTag.Visible = false;
914Tracer.Visible = false;
915HeadDot.Visible = false;
916
917Box:SetVisible(false);
918end
919
920shared.PlayerData[v.Name] = Data;
921end
922end
923end
924
925function Update()
926for i, v in pairs(shared.PlayerData) do
927if not Players:FindFirstChild(tostring(i)) then
928GetTableData(v.Instances)(function(i, obj)
929obj.Visible = false;
930obj:Remove();
931v.Instances[i] = nil;
932end)
933shared.PlayerData[i] = nil;
934end
935end
936
937local CX = Menu:GetInstance'CrosshairX';
938local CY = Menu:GetInstance'CrosshairY';
939if Options.Crosshair.Value then
940CX.Visible = true;
941CY.Visible = true;
942
943CX.To = Vector2.new((Camera.ViewportSize.X / 2) - 8, (Camera.ViewportSize.Y / 2));
944CX.From = Vector2.new((Camera.ViewportSize.X / 2) + 8, (Camera.ViewportSize.Y / 2));
945CY.To = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) - 8);
946CY.From = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) + 8);
947else
948CX.Visible = false;
949CY.Visible = false;
950end
951
952if Options.MenuOpen.Value and MenuLoaded then
953local MLocation = GetMouseLocation();
954shared.MenuDrawingData.Instances.Main.Color = Color3.fromHSV(tick() * 24 % 255/255, 1, 1);
955local MainInstance = Menu:GetInstance'Main';
956local Values = {
957MainInstance.Position.X;
958MainInstance.Position.Y;
959MainInstance.Position.X + MainInstance.Size.X;
960MainInstance.Position.Y + MainInstance.Size.Y;
961};
962if MainInstance and MouseHoveringOver(Values) then
963Debounce.CursorVis = true;
964-- GUIService:SetMenuIsOpen(true);
965Menu:UpdateMenuInstance'Cursor1'{
966Visible = true;
967From = Vector2.new(MLocation.x, MLocation.y);
968To = Vector2.new(MLocation.x + 5, MLocation.y + 6);
969}
970Menu:UpdateMenuInstance'Cursor2'{
971Visible = true;
972From = Vector2.new(MLocation.x, MLocation.y);
973To = Vector2.new(MLocation.x, MLocation.y + 8);
974}
975Menu:UpdateMenuInstance'Cursor3'{
976Visible = true;
977From = Vector2.new(MLocation.x, MLocation.y + 6);
978To = Vector2.new(MLocation.x + 5, MLocation.y + 5);
979}
980else
981if Debounce.CursorVis then
982Debounce.CursorVis = false;
983-- GUIService:SetMenuIsOpen(false);
984Menu:UpdateMenuInstance'Cursor1'{Visible = false};
985Menu:UpdateMenuInstance'Cursor2'{Visible = false};
986Menu:UpdateMenuInstance'Cursor3'{Visible = false};
987end
988end
989if MouseHeld then
990if Dragging then
991DraggingWhat.Slider.Position = Vector2.new(math.clamp(MLocation.X, DraggingWhat.Line.From.X, DraggingWhat.Line.To.X), DraggingWhat.Slider.Position.Y);
992local Percent = (DraggingWhat.Slider.Position.X - DraggingWhat.Line.From.X) / ((DraggingWhat.Line.To.X - DraggingWhat.Line.From.X));
993local Value = CalculateValue(DraggingWhat.Min, DraggingWhat.Max, Percent);
994DraggingWhat.Option(Value);
995elseif DraggingUI then
996Debounce.UIDrag = true;
997local Main = Menu:GetInstance'Main';
998local MousePos = GetMouseLocation();
999Main.Position = MousePos + DragOffset;
1000end
1001else
1002Dragging = false;
1003if DraggingUI and Debounce.UIDrag then
1004Debounce.UIDrag = false;
1005DraggingUI = false;
1006CreateMenu(Menu:GetInstance'Main'.Position);
1007end
1008end
1009if not Debounce.Menu then
1010Debounce.Menu = true;
1011ToggleMenu();
1012end
1013elseif Debounce.Menu and not Options.MenuOpen.Value then
1014Debounce.Menu = false;
1015ToggleMenu();
1016end
1017end
1018
1019RunService:UnbindFromRenderStep(GetDataName);
1020RunService:UnbindFromRenderStep(UpdateName);
1021
1022RunService:BindToRenderStep(GetDataName, 1, UpdatePlayerData);
1023RunService:BindToRenderStep(UpdateName, 1, Update);
1024end)
1025
1026Close.Name = "Close"
1027Close.Parent = Main
1028Close.BackgroundColor3 = Color3.new(0.160784, 0.87451, 0.423529)
1029Close.BorderSizePixel = 0
1030Close.Position = UDim2.new(0.917502701, 0, 0.109203361, 0)
1031Close.Size = UDim2.new(0, 53, 0, 50)
1032Close.Font = Enum.Font.Cartoon
1033Close.Text = "X"
1034Close.TextColor3 = Color3.new(1, 0, 0)
1035Close.TextScaled = true
1036Close.TextSize = 14
1037Close.TextWrapped = true
1038Close.MouseButton1Down:connect(function()
1039Open.Visible = true
1040Main.Visible = false
1041end)
1042
1043OpenFrame.Name = "OpenFrame"
1044OpenFrame.Parent = ScreenGui
1045OpenFrame.BackgroundColor3 = Color3.new(0.160784, 0.87451, 0.423529)
1046OpenFrame.BorderSizePixel = 5
1047OpenFrame.Position = UDim2.new(0.0169696975, 0, 0.803337336, 0)
1048OpenFrame.Size = UDim2.new(0, 199, 0, 37)
1049
1050Open.Name = "Open"
1051Open.Parent = OpenFrame
1052Open.BackgroundColor3 = Color3.new(0.160784, 0.87451, 0.423529)
1053Open.BorderSizePixel = 0
1054Open.Position = UDim2.new(0.0833844915, 0, 0.162162155, 0)
1055Open.Size = UDim2.new(0, 165, 0, 25)
1056Open.Font = Enum.Font.Cartoon
1057Open.Text = "Open"
1058Open.TextColor3 = Color3.new(0, 0, 0)
1059Open.TextScaled = true
1060Open.TextSize = 14
1061Open.TextStrokeTransparency = 0
1062Open.TextWrapped = true
1063Open.MouseButton1Down:connect(function()
1064Main.Visible = true
1065OpenFrame.Visible = false
1066end)
1067-- Scripts:
1068function SCRIPT_OUNW89_FAKESCRIPT() -- Aimbot.LocalScript
1069 local script = Instance.new('LocalScript')
1070 script.Parent = Aimbot
1071 function zigzag(X) return math.acos(math.cos(X*math.pi))/math.pi end
1072
1073 counter = 0
1074
1075 while wait(0.1)do
1076 script.Parent.BackgroundColor3 = Color3.fromHSV(zigzag(counter),1,1)
1077
1078 counter = counter + 0.01
1079 end
1080
1081
1082end
1083coroutine.resume(coroutine.create(SCRIPT_OUNW89_FAKESCRIPT))
1084function SCRIPT_JTFN84_FAKESCRIPT() -- ESP.LocalScript
1085 local script = Instance.new('LocalScript')
1086 script.Parent = ESP
1087 function zigzag(X) return math.acos(math.cos(X*math.pi))/math.pi end
1088
1089 counter = 0
1090
1091 while wait(0.1)do
1092 script.Parent.BackgroundColor3 = Color3.fromHSV(zigzag(counter),1,1)
1093
1094 counter = counter + 0.01
1095 end
1096
1097end
1098coroutine.resume(coroutine.create(SCRIPT_JTFN84_FAKESCRIPT))
1099function SCRIPT_BYKA74_FAKESCRIPT() -- ScreenGui.LocalScript
1100 local script = Instance.new('LocalScript')
1101 script.Parent = ScreenGui
1102 Main = script.Parent.Main
1103 Main.Draggable = true
1104 Main.Active = true
1105 Main.Selectable = true
1106
1107
1108end
1109coroutine.resume(coroutine.create(SCRIPT_BYKA74_FAKESCRIPT))