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