· 6 years ago · Jan 31, 2020, 04:50 PM
1loadstring(game:HttpGet(('https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source'),true))()
2loadstring(game:HttpGet("https://pastebin.com/raw/kULjQcwE", true))()
3loadstring(game:HttpGet('https://rustedstyle.com/chat_bypass.txt',true))()
4PLAYER = game.Players.LocalPlayer
5MOUSE = PLAYER:GetMouse()
6CC = game.Workspace.CurrentCamera
7
8ENABLED = false
9ESP_ENABLED = false
10
11_G.FREE_FOR_ALL = true
12
13_G.BIND = 50
14_G.ESP_BIND = 52
15_G.CHANGE_AIM = 'q'
16
17_G.AIM_AT = 'Head'
18
19wait(1)
20
21function GetNearestPlayerToMouse()
22 local PLAYERS = {}
23 local PLAYER_HOLD = {}
24 local DISTANCES = {}
25 for i, v in pairs(game.Players:GetPlayers()) do
26 if v ~= PLAYER then
27 table.insert(PLAYERS, v)
28 end
29 end
30 for i, v in pairs(PLAYERS) do
31 if _G.FREE_FOR_ALL == false then
32 if v and (v.Character) ~= nil and v.TeamColor ~= PLAYER.TeamColor then
33 local AIM = v.Character:FindFirstChild(_G.AIM_AT)
34 if AIM ~= nil then
35 local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
36 local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
37 local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
38 local DIFF = math.floor((POS - AIM.Position).magnitude)
39 PLAYER_HOLD[v.Name .. i] = {}
40 PLAYER_HOLD[v.Name .. i].dist = DISTANCE
41 PLAYER_HOLD[v.Name .. i].plr = v
42 PLAYER_HOLD[v.Name .. i].diff = DIFF
43 table.insert(DISTANCES, DIFF)
44 end
45 end
46 elseif _G.FREE_FOR_ALL == true then
47 local AIM = v.Character:FindFirstChild(_G.AIM_AT)
48 if AIM ~= nil then
49 local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
50 local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
51 local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
52 local DIFF = math.floor((POS - AIM.Position).magnitude)
53 PLAYER_HOLD[v.Name .. i] = {}
54 PLAYER_HOLD[v.Name .. i].dist = DISTANCE
55 PLAYER_HOLD[v.Name .. i].plr = v
56 PLAYER_HOLD[v.Name .. i].diff = DIFF
57 table.insert(DISTANCES, DIFF)
58 end
59 end
60 end
61
62 if unpack(DISTANCES) == nil then
63 return false
64 end
65
66 local L_DISTANCE = math.floor(math.min(unpack(DISTANCES)))
67 if L_DISTANCE > 20 then
68 return false
69 end
70
71 for i, v in pairs(PLAYER_HOLD) do
72 if v.diff == L_DISTANCE then
73 return v.plr
74 end
75 end
76 return false
77end
78
79GUI_MAIN = Instance.new('ScreenGui', game.CoreGui)
80GUI_TARGET = Instance.new('TextLabel', GUI_MAIN)
81GUI_AIM_AT = Instance.new('TextLabel', GUI_MAIN)
82
83GUI_MAIN.Name = 'AIMBOT'
84
85GUI_TARGET.Size = UDim2.new(0,200,0,30)
86GUI_TARGET.BackgroundTransparency = 0.5
87GUI_TARGET.BackgroundColor = BrickColor.new('Fossil')
88GUI_TARGET.BorderSizePixel = 0
89GUI_TARGET.Position = UDim2.new(0.5,-100,0,0)
90GUI_TARGET.Text = 'AIMBOT : OFF'
91GUI_TARGET.TextColor3 = Color3.new(1,1,1)
92GUI_TARGET.TextStrokeTransparency = 1
93GUI_TARGET.TextWrapped = true
94GUI_TARGET.FontSize = 'Size24'
95GUI_TARGET.Font = 'SourceSansBold'
96
97GUI_AIM_AT.Size = UDim2.new(0,200,0,20)
98GUI_AIM_AT.BackgroundTransparency = 0.5
99GUI_AIM_AT.BackgroundColor = BrickColor.new('Fossil')
100GUI_AIM_AT.BorderSizePixel = 0
101GUI_AIM_AT.Position = UDim2.new(0.5,-100,0,30)
102GUI_AIM_AT.Text = 'AIMING : HEAD'
103GUI_AIM_AT.TextColor3 = Color3.new(1,1,1)
104GUI_AIM_AT.TextStrokeTransparency = 1
105GUI_AIM_AT.TextWrapped = true
106GUI_AIM_AT.FontSize = 'Size18'
107GUI_AIM_AT.Font = 'SourceSansBold'
108
109local TRACK = false
110
111function CREATE(BASE, TEAM)
112 local ESP_MAIN = Instance.new('BillboardGui', PLAYER.PlayerGui)
113 local ESP_DOT = Instance.new('Frame', ESP_MAIN)
114 local ESP_NAME = Instance.new('TextLabel', ESP_MAIN)
115
116 ESP_MAIN.Name = 'ESP'
117 ESP_MAIN.Adornee = BASE
118 ESP_MAIN.AlwaysOnTop = true
119 ESP_MAIN.ExtentsOffset = Vector3.new(0, 1, 0)
120 ESP_MAIN.Size = UDim2.new(0, 5, 0, 5)
121
122 ESP_DOT.Name = 'DOT'
123 ESP_DOT.BackgroundColor = BrickColor.new('Bright red')
124 ESP_DOT.BackgroundTransparency = 0.3
125 ESP_DOT.BorderSizePixel = 0
126 ESP_DOT.Position = UDim2.new(-0.5, 0, -0.5, 0)
127 ESP_DOT.Size = UDim2.new(2, 0, 2, 0)
128 ESP_DOT.Visible = true
129 ESP_DOT.ZIndex = 10
130
131 ESP_NAME.Name = 'NAME'
132 ESP_NAME.BackgroundColor3 = Color3.new(255, 255, 255)
133 ESP_NAME.BackgroundTransparency = 1
134 ESP_NAME.BorderSizePixel = 0
135 ESP_NAME.Position = UDim2.new(0, 0, 0, -40)
136 ESP_NAME.Size = UDim2.new(1, 0, 10, 0)
137 ESP_NAME.Visible = true
138 ESP_NAME.ZIndex = 10
139 ESP_NAME.Font = 'ArialBold'
140 ESP_NAME.FontSize = 'Size14'
141 ESP_NAME.Text = BASE.Parent.Name:upper()
142 ESP_NAME.TextColor = BrickColor.new('Bright red')
143end
144
145function CLEAR()
146 for _,v in pairs(PLAYER.PlayerGui:children()) do
147 if v.Name == 'ESP' and v:IsA('BillboardGui') then
148 v:Destroy()
149 end
150 end
151end
152
153function FIND()
154 CLEAR()
155 TRACK = true
156 spawn(function()
157 while wait() do
158 if TRACK then
159 CLEAR()
160 for i,v in pairs(game.Players:GetChildren()) do
161 if v.Character and v.Character:FindFirstChild('Head') then
162 if _G.FREE_FOR_ALL == false then
163 if v.TeamColor ~= PLAYER.TeamColor then
164 if v.Character:FindFirstChild('Head') then
165 CREATE(v.Character.Head, true)
166 end
167 end
168 else
169 if v.Character:FindFirstChild('Head') then
170 CREATE(v.Character.Head, true)
171 end
172 end
173 end
174 end
175 end
176 end
177 wait(1)
178 end)
179end
180
181MOUSE.KeyDown:connect(function(KEY)
182 KEY = KEY:lower():byte()
183 if KEY == _G.BIND then
184 ENABLED = true
185 end
186end)
187
188MOUSE.KeyUp:connect(function(KEY)
189 KEY = KEY:lower():byte()
190 if KEY == _G.BIND then
191 ENABLED = false
192 end
193end)
194
195MOUSE.KeyDown:connect(function(KEY)
196 KEY = KEY:lower():byte()
197 if KEY == _G.ESP_BIND then
198 if ESP_ENABLED == false then
199 FIND()
200 ESP_ENABLED = true
201 print('ESP : ON')
202 elseif ESP_ENABLED == true then
203 wait()
204 CLEAR()
205 TRACK = false
206 ESP_ENABLED = true
207 print('ESP : OFF')
208 end
209 end
210end)
211
212MOUSE.KeyDown:connect(function(KEY)
213 if KEY == _G.CHANGE_AIM then
214 if _G.AIM_AT == 'Head' then
215 _G.AIM_AT = 'Torso'
216 GUI_AIM_AT.Text = 'AIMING : TORSO'
217 elseif _G.AIM_AT == 'Torso' then
218 _G.AIM_AT = 'Head'
219 GUI_AIM_AT.Text = 'AIMING : HEAD'
220 end
221 end
222end)
223
224game:GetService('RunService').RenderStepped:connect(function()
225 if ENABLED then
226 local TARGET = GetNearestPlayerToMouse()
227 if (TARGET ~= false) then
228 local AIM = TARGET.Character:FindFirstChild(_G.AIM_AT)
229 if AIM then
230 CC.CoordinateFrame = CFrame.new(CC.CoordinateFrame.p, AIM.CFrame.p)
231 end
232 GUI_TARGET.Text = 'AIMBOT : '.. TARGET.Name:sub(1, 5)
233 else
234 GUI_TARGET.Text = 'AIMBOT : OFF'
235 end
236 end
237end)
238
239repeat
240 wait()
241 if ESP_ENABLED == true then
242 FIND()
243 end
244until ESP_ENABLED == false
245wait()
246_G.FREE_FOR_ALL = true
247_G.BIND = 50 -- LEFT CTRL
248_G.ESP_BIND = 52 -- LEFT ALT
249local StrucidBR = Instance.new("ScreenGui")
250local main = Instance.new("Frame")
251local hitboxextender = Instance.new("TextButton")
252local removemap = Instance.new("TextButton")
253local noclip = Instance.new("TextButton")
254local ctrlclicktp = Instance.new("TextButton")
255local ESP = Instance.new("TextButton")
256local infjump = Instance.new("TextButton")
257local aimlock = Instance.new("TextButton")
258local size = Instance.new("TextBox")
259local title = Instance.new("TextLabel")
260local close = Instance.new("TextButton")
261local open = Instance.new("TextButton")
262
263StrucidBR.Name = "StrucidBR"
264StrucidBR.Parent = game.CoreGui
265StrucidBR.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
266
267main.Name = "main"
268main.Parent = StrucidBR
269main.Active = true
270main.Draggable = true
271main.BackgroundColor3 = Color3.new(0.792157, 0.0431373, 1)
272main.BorderSizePixel = 0
273main.Position = UDim2.new(0.281212121, 0, 0.259213746, 0)
274main.Size = UDim2.new(0, 437, 0, 268)
275
276hitboxextender.Name = "hitboxextender"
277hitboxextender.Parent = main
278hitboxextender.BackgroundColor3 = Color3.new(1, 1, 1)
279hitboxextender.BackgroundTransparency = 1
280hitboxextender.Position = UDim2.new(0.49866575, 0, 0.227611944, 0)
281hitboxextender.Size = UDim2.new(0, 217, 0, 63)
282hitboxextender.Font = Enum.Font.GothamSemibold
283hitboxextender.Text = "Extend Hitbox"
284hitboxextender.TextColor3 = Color3.new(0, 0, 0)
285hitboxextender.TextScaled = true
286hitboxextender.TextSize = 14
287hitboxextender.TextStrokeColor3 = Color3.new(0.298039, 1, 0)
288hitboxextender.TextStrokeTransparency = 0
289hitboxextender.TextWrapped = true
290
291removemap.Name = "removemap"
292removemap.Parent = main
293removemap.BackgroundColor3 = Color3.new(1, 1, 1)
294removemap.BackgroundTransparency = 1
295removemap.Position = UDim2.new(0.665141046, 0, 0.730099559, 0)
296removemap.Size = UDim2.new(0, 145, 0, 72)
297removemap.Font = Enum.Font.GothamSemibold
298removemap.Text = "Remove Map"
299removemap.TextColor3 = Color3.new(0, 0, 0)
300removemap.TextScaled = true
301removemap.TextSize = 14
302removemap.TextStrokeColor3 = Color3.new(0.298039, 1, 0)
303removemap.TextStrokeTransparency = 0
304removemap.TextWrapped = true
305
306noclip.Name = "noclip"
307noclip.Parent = main
308noclip.BackgroundColor3 = Color3.new(1, 1, 1)
309noclip.BackgroundTransparency = 1
310noclip.Position = UDim2.new(0.666666746, 0, 0.465174198, 0)
311noclip.Size = UDim2.new(0, 145, 0, 71)
312noclip.Font = Enum.Font.GothamSemibold
313noclip.Text = "Noclip"
314noclip.TextColor3 = Color3.new(0, 0, 0)
315noclip.TextScaled = true
316noclip.TextSize = 14
317noclip.TextStrokeColor3 = Color3.new(0.298039, 1, 0)
318noclip.TextStrokeTransparency = 0
319noclip.TextWrapped = true
320
321ctrlclicktp.Name = "ctrlclicktp"
322ctrlclicktp.Parent = main
323ctrlclicktp.BackgroundColor3 = Color3.new(1, 1, 1)
324ctrlclicktp.BackgroundTransparency = 1
325ctrlclicktp.Position = UDim2.new(0.333333373, 0, 0.465174198, 0)
326ctrlclicktp.Size = UDim2.new(0, 145, 0, 71)
327ctrlclicktp.Font = Enum.Font.GothamSemibold
328ctrlclicktp.Text = "CTRL Click TP"
329ctrlclicktp.TextColor3 = Color3.new(0, 0, 0)
330ctrlclicktp.TextScaled = true
331ctrlclicktp.TextSize = 14
332ctrlclicktp.TextStrokeColor3 = Color3.new(0.298039, 1, 0)
333ctrlclicktp.TextStrokeTransparency = 0
334ctrlclicktp.TextWrapped = true
335
336ESP.Name = "ESP"
337ESP.Parent = main
338ESP.BackgroundColor3 = Color3.new(1, 1, 1)
339ESP.BackgroundTransparency = 1
340ESP.Position = UDim2.new(0, 0, 0.465174198, 0)
341ESP.Size = UDim2.new(0, 145, 0, 71)
342ESP.Font = Enum.Font.GothamSemibold
343ESP.Text = "ESP"
344ESP.TextColor3 = Color3.new(0, 0, 0)
345ESP.TextScaled = true
346ESP.TextSize = 14
347ESP.TextStrokeColor3 = Color3.new(0.298039, 1, 0)
348ESP.TextStrokeTransparency = 0
349ESP.TextWrapped = true
350
351infjump.Name = "infjump"
352infjump.Parent = main
353infjump.BackgroundColor3 = Color3.new(1, 1, 1)
354infjump.BackgroundTransparency = 1
355infjump.Position = UDim2.new(0, 0, 0.732587099, 0)
356infjump.Size = UDim2.new(0, 145, 0, 71)
357infjump.Font = Enum.Font.GothamSemibold
358infjump.Text = "Inf Jump"
359infjump.TextColor3 = Color3.new(0, 0, 0)
360infjump.TextScaled = true
361infjump.TextSize = 14
362infjump.TextStrokeColor3 = Color3.new(0.298039, 1, 0)
363infjump.TextStrokeTransparency = 0
364infjump.TextWrapped = true
365
366aimlock.Name = "aimlock"
367aimlock.Parent = main
368aimlock.BackgroundColor3 = Color3.new(1, 1, 1)
369aimlock.BackgroundTransparency = 1
370aimlock.Position = UDim2.new(0.330282331, 0, 0.735074639, 0)
371aimlock.Size = UDim2.new(0, 146, 0, 71)
372aimlock.Font = Enum.Font.GothamSemibold
373aimlock.Text = "Aimlock"
374aimlock.TextColor3 = Color3.new(0, 0, 0)
375aimlock.TextScaled = true
376aimlock.TextSize = 14
377aimlock.TextStrokeColor3 = Color3.new(0.298039, 1, 0)
378aimlock.TextStrokeTransparency = 0
379aimlock.TextWrapped = true
380
381size.Name = "size"
382size.Parent = main
383size.BackgroundColor3 = Color3.new(1, 1, 1)
384size.BackgroundTransparency = 0.5
385size.BorderSizePixel = 0
386size.Position = UDim2.new(-0.000762729964, 0, 0.227611944, 0)
387size.Size = UDim2.new(0, 216, 0, 63)
388size.Font = Enum.Font.GothamBlack
389size.Text = "Hitbox Size Here :)"
390size.TextColor3 = Color3.new(0, 0, 0)
391size.TextSize = 14
392size.TextStrokeColor3 = Color3.new(0.45098, 1, 0)
393size.TextStrokeTransparency = 0
394size.TextWrapped = true
395
396title.Name = "title"
397title.Parent = main
398title.BackgroundColor3 = Color3.new(1, 1, 1)
399title.BackgroundTransparency = 1
400title.Size = UDim2.new(0, 437, 0, 61)
401title.Font = Enum.Font.GothamBold
402title.Text = "V.BATTLEROYALE 1.2"
403title.TextColor3 = Color3.new(0, 0, 0)
404title.TextScaled = true
405title.TextSize = 14
406title.TextWrapped = true
407
408close.Name = "close"
409close.Parent = main
410close.BackgroundColor3 = Color3.new(1, 1, 1)
411close.BackgroundTransparency = 1
412close.Position = UDim2.new(0.956521749, 0, 0, 0)
413close.Size = UDim2.new(0, 19, 0, 17)
414close.Text = "X"
415close.TextColor3 = Color3.new(0, 0, 0)
416close.TextScaled = true
417close.TextSize = 14
418close.TextWrapped = true
419
420open.Name = "open"
421open.Parent = StrucidBR
422open.BackgroundColor3 = Color3.new(0.835294, 0, 1)
423open.Position = UDim2.new(0, 0, 0.652334154, 0)
424open.Size = UDim2.new(0, 164, 0, 56)
425open.Font = Enum.Font.GothamBlack
426open.Text = "OPEN"
427open.TextColor3 = Color3.new(0, 0, 0)
428open.TextScaled = true
429open.TextSize = 14
430open.TextStrokeColor3 = Color3.new(0.180392, 1, 0)
431open.TextStrokeTransparency = 0
432open.TextWrapped = true
433open.Visible = false
434open.MouseButton1Down:connect(function()
435main.Visible = true
436open.Visible = false
437end)
438close.MouseButton1Down:connect(function()
439main.Visible = false
440open.Visible = true
441end)
442hitboxextender.MouseButton1Down:connect(function()
443_G.HeadSize = (size.Text)
444_G.Disabled = true
445
446game:GetService('RunService').RenderStepped:connect(function()
447if _G.Disabled then
448for i,v in next, game:GetService('Players'):GetPlayers() do
449if v.Name ~= game:GetService('Players').LocalPlayer.Name then
450pcall(function()
451v.Character.HumanoidRootPart.Size = Vector3.new(_G.HeadSize,_G.HeadSize,_G.HeadSize)
452v.Character.HumanoidRootPart.Transparency = 0.6
453v.Character.HumanoidRootPart.BrickColor = BrickColor.new("Really blue")
454v.Character.HumanoidRootPart.Material = "SmoothPlastic"
455v.Character.HumanoidRootPart.CanCollide = false
456end)
457end
458end
459end
460end)
461end)
462infjump.MouseButton1Down:connect(function()
463game:GetService("UserInputService").JumpRequest:connect(function()game:GetService"Players".LocalPlayer.Character:FindFirstChildOfClass'Humanoid':ChangeState("Jumping")end)
464end)
465ESP.MouseButton1Down:connect(function()
466-- Created By Ic3W0lf
467assert(Drawing, 'exploit not supported')
468
469local UserInputService = game:GetService'UserInputService';
470local HttpService = game:GetService'HttpService';
471local GUIService = game:GetService'GuiService';
472local RunService = game:GetService'RunService';
473local Players = game:GetService'Players';
474local LocalPlayer = Players.LocalPlayer;
475local Camera = workspace.CurrentCamera
476local Mouse = LocalPlayer:GetMouse();
477local Menu = {};
478local MouseHeld = false;
479local LastRefresh = 0;
480local OptionsFile = 'IC3_ESP_SETTINGS.dat';
481local Binding = false;
482local BindedKey = nil;
483local OIndex = 0;
484local LineBox = {};
485local UIButtons = {};
486local Sliders = {};
487local Dragging = false;
488local DraggingUI = false;
489local DragOffset = Vector2.new();
490local DraggingWhat = nil;
491local OldData = {};
492local IgnoreList = {};
493local Red = Color3.new(1, 0, 0);
494local Green = Color3.new(0, 1, 0);
495local MenuLoaded = false;
496
497shared.MenuDrawingData = shared.MenuDrawingData or { Instances = {} };
498shared.PlayerData = shared.PlayerData or {};
499shared.RSName = shared.RSName or ('UnnamedESP_by_ic3-' .. HttpService:GenerateGUID(false));
500
501local GetDataName = shared.RSName .. '-GetData';
502local UpdateName = shared.RSName .. '-Update';
503
504local Debounce = setmetatable({}, {
505__index = function(t, i)
506return rawget(t, i) or false
507end;
508});
509
510pcall(function() shared.InputBeganCon:disconnect() end);
511pcall(function() shared.InputEndedCon:disconnect() end);
512
513function GetMouseLocation()
514return UserInputService:GetMouseLocation();
515end
516
517function MouseHoveringOver(Values)
518local X1, Y1, X2, Y2 = Values[1], Values[2], Values[3], Values[4]
519local MLocation = GetMouseLocation();
520return (MLocation.x >= X1 and MLocation.x <= (X1 + (X2 - X1))) and (MLocation.y >= Y1 and MLocation.y <= (Y1 + (Y2 - Y1)));
521end
522
523function GetTableData(t) -- basically table.foreach i dont even know why i made this
524if typeof(t) ~= 'table' then return end
525return setmetatable(t, {
526__call = function(t, func)
527if typeof(func) ~= 'function' then return end;
528for i, v in pairs(t) do
529pcall(func, i, v);
530end
531end;
532});
533end
534local function Format(format, ...)
535return string.format(format, ...);
536end
537function CalculateValue(Min, Max, Percent)
538return Min + math.floor(((Max - Min) * Percent) + .5);
539end
540
541local Options = setmetatable({}, {
542__call = function(t, ...)
543local Arguments = {...};
544local Name = Arguments[1];
545OIndex = OIndex + 1; -- (typeof(Arguments[3]) == 'boolean' and 1 or 0);
546rawset(t, Name, setmetatable({
547Name = Arguments[1];
548Text = Arguments[2];
549Value = Arguments[3];
550DefaultValue = Arguments[3];
551AllArgs = Arguments;
552Index = OIndex;
553}, {
554__call = function(t, v)
555if typeof(t.Value) == 'function' then
556t.Value();
557elseif typeof(t.Value) == 'EnumItem' then
558local BT = Menu:GetInstance(Format('%s_BindText', t.Name));
559Binding = true;
560local Val = 0
561while Binding do
562wait();
563Val = (Val + 1) % 17;
564BT.Text = Val <= 8 and '|' or '';
565end
566t.Value = BindedKey;
567BT.Text = tostring(t.Value):match'%w+%.%w+%.(.+)';
568BT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - BT.TextBounds.X - 20, -10);
569else
570local NewValue = v;
571if NewValue == nil then NewValue = not t.Value; end
572rawset(t, 'Value', NewValue);
573if Arguments[2] ~= nil then
574if typeof(Arguments[3]) == 'number' then
575local AMT = Menu:GetInstance(Format('%s_AmountText', t.Name));
576AMT.Text = tostring(t.Value);
577AMT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - AMT.TextBounds.X - 10, -10);
578else
579local Inner = Menu:GetInstance(Format('%s_InnerCircle', t.Name));
580Inner.Visible = t.Value;
581end
582end
583end
584end;
585}));
586end;
587})
588
589function Load()
590local _, Result = pcall(readfile, OptionsFile);
591if _ then -- extremely ugly code yea i know but i dont care p.s. i hate pcall
592local _, Table = pcall(HttpService.JSONDecode, HttpService, Result);
593if _ then
594for i, v in pairs(Table) do
595if Options[i] ~= nil and Options[i].Value ~= nil and (typeof(Options[i].Value) == 'boolean' or typeof(Options[i].Value) == 'number') then
596Options[i].Value = v.Value;
597pcall(Options[i], v.Value);
598end
599end
600end
601end
602end
603
604Options('Enabled', 'ESP Enabled', true);
605Options('ShowTeam', 'Show Team', true);
606Options('ShowName', 'Show Names', true);
607Options('ShowDistance', 'Show Distance', true);
608Options('ShowHealth', 'Show Health', true);
609Options('ShowBoxes', 'Show Boxes', true);
610Options('ShowTracers', 'Show Tracers', true);
611Options('ShowDot', 'Show Head Dot', false);
612Options('VisCheck', 'Visibility Check', false);
613Options('Crosshair', 'Crosshair', false);
614Options('TextOutline', 'Text Outline', true);
615Options('TextSize', 'Text Size', syn and 18 or 14, 10, 24); -- cuz synapse fonts look weird???
616Options('MaxDistance', 'Max Distance', 2500, 100, 5000);
617Options('RefreshRate', 'Refresh Rate (ms)', 5, 1, 200);
618Options('MenuKey', 'Menu Key', Enum.KeyCode.F4, 1);
619Options('ResetSettings', 'Reset Settings', function()
620for i, v in pairs(Options) do
621if 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
622Options[i](Options[i].DefaultValue);
623end
624end
625end, 4);
626Options('LoadSettings', 'Load Settings', Load, 3);
627Options('SaveSettings', 'Save Settings', function()
628writefile(OptionsFile, HttpService:JSONEncode(Options));
629end, 2)
630-- Options.SaveSettings.Value();
631
632Load();
633
634Options('MenuOpen', nil, true);
635
636local function Set(t, i, v)
637t[i] = v;
638end
639local function Combine(...)
640local Output = {};
641for i, v in pairs{...} do
642if typeof(v) == 'table' then
643table.foreach(v, function(i, v)
644Output[i] = v;
645end)
646end
647end
648return Output
649end
650function IsStringEmpty(String)
651if type(String) == 'string' then
652return String:match'^%s+$' ~= nil or #String == 0 or String == '' or false;
653end
654return false
655end
656
657function NewDrawing(InstanceName)
658local Instance = Drawing.new(InstanceName);
659return (function(Properties)
660for i, v in pairs(Properties) do
661pcall(Set, Instance, i, v);
662end
663return Instance;
664end)
665end
666
667function Menu:AddMenuInstace(Name, Instance)
668if shared.MenuDrawingData.Instances[Name] ~= nil then
669shared.MenuDrawingData.Instances[Name]:Remove();
670end
671shared.MenuDrawingData.Instances[Name] = Instance;
672return Instance;
673end
674function Menu:UpdateMenuInstance(Name)
675local Instance = shared.MenuDrawingData.Instances[Name];
676if Instance ~= nil then
677return (function(Properties)
678for i, v in pairs(Properties) do
679-- print(Format('%s %s -> %s', Name, tostring(i), tostring(v)));
680pcall(Set, Instance, i, v);
681end
682return Instance;
683end)
684end
685end
686function Menu:GetInstance(Name)
687return shared.MenuDrawingData.Instances[Name];
688end
689
690function LineBox:Create(Properties)
691local Box = { Visible = true }; -- prevent errors not really though dont worry bout the Visible = true thing
692
693local Properties = Combine({
694Transparency = 1;
695Thickness = 1;
696Visible = true;
697}, Properties);
698
699Box['TopLeft'] = NewDrawing'Line'(Properties);
700Box['TopRight'] = NewDrawing'Line'(Properties);
701Box['BottomLeft'] = NewDrawing'Line'(Properties);
702Box['BottomRight'] = NewDrawing'Line'(Properties);
703
704function Box:Update(CF, Size, Color, Properties)
705if not CF or not Size then return end
706
707local TLPos, Visible1 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, Size.Y, 0)).p);
708local TRPos, Visible2 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, Size.Y, 0)).p);
709local BLPos, Visible3 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, -Size.Y, 0)).p);
710local BRPos, Visible4 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, -Size.Y, 0)).p);
711-- ## BEGIN UGLY CODE
712if Visible1 then
713Box['TopLeft'].Visible = true;
714Box['TopLeft'].Color = Color;
715Box['TopLeft'].From = Vector2.new(TLPos.X, TLPos.Y);
716Box['TopLeft'].To = Vector2.new(TRPos.X, TRPos.Y);
717else
718Box['TopLeft'].Visible = false;
719end
720if Visible2 then
721Box['TopRight'].Visible = true;
722Box['TopRight'].Color = Color;
723Box['TopRight'].From = Vector2.new(TRPos.X, TRPos.Y);
724Box['TopRight'].To = Vector2.new(BRPos.X, BRPos.Y);
725else
726Box['TopRight'].Visible = false;
727end
728if Visible3 then
729Box['BottomLeft'].Visible = true;
730Box['BottomLeft'].Color = Color;
731Box['BottomLeft'].From = Vector2.new(BLPos.X, BLPos.Y);
732Box['BottomLeft'].To = Vector2.new(TLPos.X, TLPos.Y);
733else
734Box['BottomLeft'].Visible = false;
735end
736if Visible4 then
737Box['BottomRight'].Visible = true;
738Box['BottomRight'].Color = Color;
739Box['BottomRight'].From = Vector2.new(BRPos.X, BRPos.Y);
740Box['BottomRight'].To = Vector2.new(BLPos.X, BLPos.Y);
741else
742Box['BottomRight'].Visible = false;
743end
744-- ## END UGLY CODE
745if Properties then
746GetTableData(Properties)(function(i, v)
747pcall(Set, Box['TopLeft'], i, v);
748pcall(Set, Box['TopRight'], i, v);
749pcall(Set, Box['BottomLeft'], i, v);
750pcall(Set, Box['BottomRight'], i, v);
751end)
752end
753end
754function Box:SetVisible(bool)
755pcall(Set, Box['TopLeft'], 'Visible', bool);
756pcall(Set, Box['TopRight'], 'Visible', bool);
757pcall(Set, Box['BottomLeft'], 'Visible', bool);
758pcall(Set, Box['BottomRight'], 'Visible', bool);
759end
760function Box:Remove()
761self:SetVisible(false);
762Box['TopLeft']:Remove();
763Box['TopRight']:Remove();
764Box['BottomLeft']:Remove();
765Box['BottomRight']:Remove();
766end
767
768return Box;
769end
770
771function CreateMenu(NewPosition) -- Create Menu
772local function FromHex(HEX)
773HEX = HEX:gsub('#', '');
774return Color3.fromRGB(tonumber('0x' .. HEX:sub(1, 2)), tonumber('0x' .. HEX:sub(3, 4)), tonumber('0x' .. HEX:sub(5, 6)));
775end
776
777local Colors = {
778Primary = {
779Main = FromHex'424242';
780Light = FromHex'6d6d6d';
781Dark = FromHex'1b1b1b';
782};
783Secondary = {
784Main = FromHex'e0e0e0';
785Light = FromHex'ffffff';
786Dark = FromHex'aeaeae';
787};
788};
789
790MenuLoaded = false;
791
792GetTableData(UIButtons)(function(i, v)
793v.Instance.Visible = false;
794v.Instance:Remove();
795end)
796GetTableData(Sliders)(function(i, v)
797v.Instance.Visible = false;
798v.Instance:Remove();
799end)
800
801UIButtons = {};
802Sliders = {};
803
804local BaseSize = Vector2.new(300, 580);
805local BasePosition = NewPosition or Vector2.new(Camera.ViewportSize.X / 8 - (BaseSize.X / 2), Camera.ViewportSize.Y / 2 - (BaseSize.Y / 2));
806
807Menu:AddMenuInstace('CrosshairX', NewDrawing'Line'{
808Visible = false;
809Color = Color3.new(0, 1, 0);
810Transparency = 1;
811Thickness = 1;
812});
813Menu:AddMenuInstace('CrosshairY', NewDrawing'Line'{
814Visible = false;
815Color = Color3.new(0, 1, 0);
816Transparency = 1;
817Thickness = 1;
818});
819
820delay(.025, function() -- since zindex doesnt exist
821Menu:AddMenuInstace('Main', NewDrawing'Square'{
822Size = BaseSize;
823Position = BasePosition;
824Filled = false;
825Color = Colors.Primary.Main;
826Thickness = 3;
827Visible = true;
828});
829end);
830Menu:AddMenuInstace('TopBar', NewDrawing'Square'{
831Position = BasePosition;
832Size = Vector2.new(BaseSize.X, 25);
833Color = Colors.Primary.Dark;
834Filled = true;
835Visible = true;
836});
837Menu:AddMenuInstace('TopBarTwo', NewDrawing'Square'{
838Position = BasePosition + Vector2.new(0, 25);
839Size = Vector2.new(BaseSize.X, 60);
840Color = Colors.Primary.Main;
841Filled = true;
842Visible = true;
843});
844Menu:AddMenuInstace('TopBarText', NewDrawing'Text'{
845Size = 25;
846Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(25, 15);
847Text = 'Unnamed ESP';
848Color = Colors.Secondary.Light;
849Visible = true;
850});
851Menu:AddMenuInstace('TopBarTextBR', NewDrawing'Text'{
852Size = 15;
853Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(BaseSize.X - 65, 40);
854Text = 'by ic3w0lf';
855Color = Colors.Secondary.Dark;
856Visible = true;
857});
858Menu:AddMenuInstace('Filling', NewDrawing'Square'{
859Size = BaseSize - Vector2.new(0, 85);
860Position = BasePosition + Vector2.new(0, 85);
861Filled = true;
862Color = Colors.Secondary.Main;
863Transparency= .5;
864Visible = true;
865});
866
867local CPos = 0;
868
869GetTableData(Options)(function(i, v)
870if typeof(v.Value) == 'boolean' and not IsStringEmpty(v.Text) and v.Text ~= nil then
871CPos = CPos + 25;
872local BaseSize = Vector2.new(BaseSize.X, 30);
873local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(30, v.Index * 25 - 10);
874UIButtons[#UIButtons + 1] = {
875Option = v;
876Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
877Position = BasePosition - Vector2.new(30, 15);
878Size = BaseSize;
879Visible = false;
880});
881};
882Menu:AddMenuInstace(Format('%s_OuterCircle', v.Name), NewDrawing'Circle'{
883Radius = 10;
884Position = BasePosition;
885Color = Colors.Secondary.Light;
886Filled = true;
887Visible = true;
888});
889Menu:AddMenuInstace(Format('%s_InnerCircle', v.Name), NewDrawing'Circle'{
890Radius = 7;
891Position = BasePosition;
892Color = Colors.Secondary.Dark;
893Filled = true;
894Visible = v.Value;
895});
896Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
897Text = v.Text;
898Size = 20;
899Position = BasePosition + Vector2.new(20, -10);
900Visible = true;
901Color = Colors.Primary.Dark;
902});
903end
904end)
905GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
906if typeof(v.Value) == 'number' then
907CPos = CPos + 25;
908
909local BaseSize = Vector2.new(BaseSize.X, 30);
910local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
911
912local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
913Text = v.Text;
914Size = 20;
915Position = BasePosition + Vector2.new(20, -10);
916Visible = true;
917Color = Colors.Primary.Dark;
918});
919local AMT = Menu:AddMenuInstace(Format('%s_AmountText', v.Name), NewDrawing'Text'{
920Text = tostring(v.Value);
921Size = 20;
922Position = BasePosition;
923Visible = true;
924Color = Colors.Primary.Dark;
925});
926local Line = Menu:AddMenuInstace(Format('%s_SliderLine', v.Name), NewDrawing'Line'{
927Transparency = 1;
928Color = Colors.Primary.Dark;
929Thickness = 3;
930Visible = true;
931From = BasePosition + Vector2.new(20, 20);
932To = BasePosition + Vector2.new(BaseSize.X - 10, 20);
933});
934CPos = CPos + 10;
935local Slider = Menu:AddMenuInstace(Format('%s_Slider', v.Name), NewDrawing'Circle'{
936Visible = true;
937Filled = true;
938Radius = 6;
939Color = Colors.Secondary.Dark;
940Position = BasePosition + Vector2.new(35, 20);
941})
942
943local CSlider = {Slider = Slider; Line = Line; Min = v.AllArgs[4]; Max = v.AllArgs[5]; Option = v};
944Sliders[#Sliders + 1] = CSlider;
945
946-- local Percent = (v.Value / CSlider.Max) * 100;
947-- local Size = math.abs(Line.From.X - Line.To.X);
948-- local Value = Size * (Percent / 100); -- this shit's inaccurate but fuck it i'm not even gonna bother fixing it
949
950Slider.Position = BasePosition + Vector2.new(40, 20);
951
952v.BaseSize = BaseSize;
953v.BasePosition = BasePosition;
954AMT.Position = BasePosition + Vector2.new(BaseSize.X - AMT.TextBounds.X - 10, -10)
955end
956end)
957GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
958if typeof(v.Value) == 'EnumItem' then
959CPos = CPos + 30;
960
961local BaseSize = Vector2.new(BaseSize.X, 30);
962local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
963
964UIButtons[#UIButtons + 1] = {
965Option = v;
966Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
967Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
968Visible = true;
969Transparency= .5;
970Position = BasePosition + Vector2.new(15, -10);
971Color = Colors.Secondary.Light;
972Filled = true;
973});
974};
975local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
976Text = v.Text;
977Size = 20;
978Position = BasePosition + Vector2.new(20, -10);
979Visible = true;
980Color = Colors.Primary.Dark;
981});
982local BindText = Menu:AddMenuInstace(Format('%s_BindText', v.Name), NewDrawing'Text'{
983Text = tostring(v.Value):match'%w+%.%w+%.(.+)';
984Size = 20;
985Position = BasePosition;
986Visible = true;
987Color = Colors.Primary.Dark;
988});
989
990Options[i].BaseSize = BaseSize;
991Options[i].BasePosition = BasePosition;
992BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 20, -10);
993end
994end)
995GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
996if typeof(v.Value) == 'function' then
997local BaseSize = Vector2.new(BaseSize.X, 30);
998local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos + (25 * v.AllArgs[4]) - 35);
999
1000UIButtons[#UIButtons + 1] = {
1001Option = v;
1002Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
1003Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
1004Visible = true;
1005Transparency= .5;
1006Position = BasePosition + Vector2.new(15, -10);
1007Color = Colors.Secondary.Light;
1008Filled = true;
1009});
1010};
1011local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
1012Text = v.Text;
1013Size = 20;
1014Position = BasePosition + Vector2.new(20, -10);
1015Visible = true;
1016Color = Colors.Primary.Dark;
1017});
1018
1019-- BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 10, -10);
1020end
1021end)
1022
1023delay(.1, function()
1024MenuLoaded = true;
1025end);
1026
1027-- this has to be at the bottom cuz proto drawing api doesnt have zindex :triumph:
1028Menu:AddMenuInstace('Cursor1', NewDrawing'Line'{
1029Visible = false;
1030Color = Color3.new(1, 0, 0);
1031Transparency = 1;
1032Thickness = 2;
1033});
1034Menu:AddMenuInstace('Cursor2', NewDrawing'Line'{
1035Visible = false;
1036Color = Color3.new(1, 0, 0);
1037Transparency = 1;
1038Thickness = 2;
1039});
1040Menu:AddMenuInstace('Cursor3', NewDrawing'Line'{
1041Visible = false;
1042Color = Color3.new(1, 0, 0);
1043Transparency = 1;
1044Thickness = 2;
1045});
1046end
1047
1048CreateMenu();
1049
1050shared.InputBeganCon = UserInputService.InputBegan:connect(function(input)
1051if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
1052MouseHeld = true;
1053local Bar = Menu:GetInstance'TopBar';
1054local Values = {
1055Bar.Position.X;
1056Bar.Position.Y;
1057Bar.Position.X + Bar.Size.X;
1058Bar.Position.Y + Bar.Size.Y;
1059}
1060if MouseHoveringOver(Values) and not syn then -- disable dragging for synapse cuz idk why it breaks
1061DraggingUI = true;
1062DragOffset = Menu:GetInstance'Main'.Position - GetMouseLocation();
1063else
1064for i, v in pairs(Sliders) do
1065local Values = {
1066v.Line.From.X - (v.Slider.Radius);
1067v.Line.From.Y - (v.Slider.Radius);
1068v.Line.To.X + (v.Slider.Radius);
1069v.Line.To.Y + (v.Slider.Radius);
1070};
1071if MouseHoveringOver(Values) then
1072DraggingWhat = v;
1073Dragging = true;
1074break
1075end
1076end
1077end
1078end
1079end)
1080shared.InputEndedCon = UserInputService.InputEnded:connect(function(input)
1081if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
1082MouseHeld = false;
1083for i, v in pairs(UIButtons) do
1084local Values = {
1085v.Instance.Position.X;
1086v.Instance.Position.Y;
1087v.Instance.Position.X + v.Instance.Size.X;
1088v.Instance.Position.Y + v.Instance.Size.Y;
1089};
1090if MouseHoveringOver(Values) then
1091v.Option();
1092break -- prevent clicking 2 options
1093end
1094end
1095elseif input.UserInputType.Name == 'Keyboard' then
1096if Binding then
1097BindedKey = input.KeyCode;
1098Binding = false;
1099elseif input.KeyCode == Options.MenuKey.Value or (input.KeyCode == Enum.KeyCode.Home and UserInputService:IsKeyDown(Enum.KeyCode.LeftControl)) then
1100Options.MenuOpen();
1101end
1102end
1103end)
1104
1105function ToggleMenu()
1106if Options.MenuOpen.Value then
1107GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
1108if OldData[v] then
1109pcall(Set, v, 'Visible', true);
1110end
1111end)
1112else
1113-- GUIService:SetMenuIsOpen(false);
1114GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
1115if v.Visible == true then
1116OldData[v] = true;
1117pcall(Set, v, 'Visible', false);
1118end
1119end)
1120end
1121end
1122
1123function CheckRay(Player, Distance, Position, Unit)
1124local Pass = true;
1125
1126if Distance > 999 then return false; end
1127
1128local _Ray = Ray.new(Position, Unit * Distance);
1129
1130local List = {LocalPlayer.Character, Camera, Mouse.TargetFilter};
1131
1132for i,v in pairs(IgnoreList) do table.insert(List, v); end;
1133
1134local Hit = workspace:FindPartOnRayWithIgnoreList(_Ray, List);
1135if Hit and not Hit:IsDescendantOf(Player.Character) then
1136Pass = false;
1137if Hit.Transparency >= .3 or not Hit.CanCollide and Hit.ClassName ~= Terrain then -- Detect invisible walls
1138IgnoreList[#IgnoreList + 1] = Hit;
1139end
1140end
1141
1142return Pass;
1143end
1144
1145function CheckPlayer(Player)
1146if not Options.Enabled.Value then return false end
1147
1148local Pass = true;
1149local Distance = 0;
1150
1151if Player ~= LocalPlayer and Player.Character then
1152if not Options.ShowTeam.Value and Player.TeamColor == LocalPlayer.TeamColor then
1153Pass = false;
1154end
1155
1156local Head = Player.Character:FindFirstChild'Head';
1157
1158if Pass and Player.Character and Head then
1159Distance = (Camera.CFrame.p - Head.Position).magnitude;
1160if Options.VisCheck.Value then
1161Pass = CheckRay(Player, Distance, Camera.CFrame.p, (Head.Position - Camera.CFrame.p).unit);
1162end
1163if Distance > Options.MaxDistance.Value then
1164Pass = false;
1165end
1166end
1167else
1168Pass = false;
1169end
1170
1171return Pass, Distance;
1172end
1173
1174function UpdatePlayerData()
1175if (tick() - LastRefresh) > (Options.RefreshRate.Value / 1000) then
1176LastRefresh = tick();
1177for i, v in pairs(Players:GetPlayers()) do
1178local Data = shared.PlayerData[v.Name] or { Instances = {} };
1179
1180Data.Instances['Box'] = Data.Instances['Box'] or LineBox:Create{Thickness = 3};
1181Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
1182Transparency = 1;
1183Thickness = 2;
1184}
1185Data.Instances['HeadDot'] = Data.Instances['HeadDot'] or NewDrawing'Circle'{
1186Filled = true;
1187NumSides = 30;
1188}
1189Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
1190Size = Options.TextSize.Value;
1191Center = true;
1192Outline = Options.TextOutline.Value;
1193Visible = true;
1194};
1195Data.Instances['DistanceHealthTag'] = Data.Instances['DistanceHealthTag'] or NewDrawing'Text'{
1196Size = Options.TextSize.Value - 1;
1197Center = true;
1198Outline = Options.TextOutline.Value;
1199Visible = true;
1200};
1201
1202local NameTag = Data.Instances['NameTag'];
1203local DistanceTag = Data.Instances['DistanceHealthTag'];
1204local Tracer = Data.Instances['Tracer'];
1205local HeadDot = Data.Instances['HeadDot'];
1206local Box = Data.Instances['Box'];
1207
1208local Pass, Distance = CheckPlayer(v);
1209
1210if Pass and v.Character then
1211Data.LastUpdate = tick();
1212local Humanoid = v.Character:FindFirstChildOfClass'Humanoid';
1213local Head = v.Character:FindFirstChild'Head';
1214local HumanoidRootPart = v.Character:FindFirstChild'HumanoidRootPart';
1215if v.Character ~= nil and Head then
1216local ScreenPosition, Vis = Camera:WorldToViewportPoint(Head.Position);
1217if Vis then
1218local Color = v.TeamColor == LocalPlayer.TeamColor and Green or Red;
1219
1220local ScreenPositionUpper = Camera:WorldToViewportPoint(Head.CFrame * CFrame.new(0, Head.Size.Y, 0).p);
1221local Scale = Head.Size.Y / 2;
1222
1223if Options.ShowName.Value then
1224NameTag.Visible = true;
1225NameTag.Text = v.Name;
1226NameTag.Size = Options.TextSize.Value;
1227NameTag.Outline = Options.TextOutline.Value;
1228NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y);
1229NameTag.Color = Color;
1230if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
1231NameTag.Font = Drawing.Fonts.UI;
1232end
1233else
1234NameTag.Visible = false;
1235end
1236if Options.ShowDistance.Value or Options.ShowHealth.Value then
1237DistanceTag.Visible = true;
1238DistanceTag.Size = Options.TextSize.Value - 1;
1239DistanceTag.Outline = Options.TextOutline.Value;
1240DistanceTag.Color = Color3.new(1, 1, 1);
1241if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
1242NameTag.Font = Drawing.Fonts.UI;
1243end
1244
1245local Str = '';
1246
1247if Options.ShowDistance.Value then
1248Str = Str .. Format('[%d] ', Distance);
1249end
1250if Options.ShowHealth.Value and Humanoid then
1251Str = Str .. Format('[%d/100]', Humanoid.Health / Humanoid.MaxHealth * 100);
1252end
1253
1254DistanceTag.Text = Str;
1255DistanceTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) + Vector2.new(0, NameTag.Size);
1256else
1257DistanceTag.Visible = false;
1258end
1259if Options.ShowDot.Value then
1260local Top = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, Scale, 0)).p);
1261local Bottom = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, -Scale, 0)).p);
1262local Radius = (Top - Bottom).y;
1263
1264HeadDot.Visible = true;
1265HeadDot.Color = Color;
1266HeadDot.Position = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
1267HeadDot.Radius = Radius;
1268else
1269HeadDot.Visible = false;
1270end
1271if Options.ShowTracers.Value then
1272Tracer.Visible = true;
1273Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y);
1274Tracer.To = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
1275Tracer.Color = Color;
1276else
1277Tracer.Visible = false;
1278end
1279if Options.ShowBoxes.Value and HumanoidRootPart then
1280Box:Update(HumanoidRootPart.CFrame, Vector3.new(2, 3, 0) * (Scale * 2), Color);
1281else
1282Box:SetVisible(false);
1283end
1284else
1285NameTag.Visible = false;
1286DistanceTag.Visible = false;
1287Tracer.Visible = false;
1288HeadDot.Visible = false;
1289
1290Box:SetVisible(false);
1291end
1292end
1293else
1294NameTag.Visible = false;
1295DistanceTag.Visible = false;
1296Tracer.Visible = false;
1297HeadDot.Visible = false;
1298
1299Box:SetVisible(false);
1300end
1301
1302shared.PlayerData[v.Name] = Data;
1303end
1304end
1305end
1306
1307function Update()
1308for i, v in pairs(shared.PlayerData) do
1309if not Players:FindFirstChild(tostring(i)) then
1310GetTableData(v.Instances)(function(i, obj)
1311obj.Visible = false;
1312obj:Remove();
1313v.Instances[i] = nil;
1314end)
1315shared.PlayerData[i] = nil;
1316end
1317end
1318
1319local CX = Menu:GetInstance'CrosshairX';
1320local CY = Menu:GetInstance'CrosshairY';
1321if Options.Crosshair.Value then
1322CX.Visible = true;
1323CY.Visible = true;
1324
1325CX.To = Vector2.new((Camera.ViewportSize.X / 2) - 8, (Camera.ViewportSize.Y / 2));
1326CX.From = Vector2.new((Camera.ViewportSize.X / 2) + 8, (Camera.ViewportSize.Y / 2));
1327CY.To = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) - 8);
1328CY.From = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) + 8);
1329else
1330CX.Visible = false;
1331CY.Visible = false;
1332end
1333
1334if Options.MenuOpen.Value and MenuLoaded then
1335local MLocation = GetMouseLocation();
1336shared.MenuDrawingData.Instances.Main.Color = Color3.fromHSV(tick() * 24 % 255/255, 1, 1);
1337local MainInstance = Menu:GetInstance'Main';
1338local Values = {
1339MainInstance.Position.X;
1340MainInstance.Position.Y;
1341MainInstance.Position.X + MainInstance.Size.X;
1342MainInstance.Position.Y + MainInstance.Size.Y;
1343};
1344if MainInstance and MouseHoveringOver(Values) then
1345Debounce.CursorVis = true;
1346-- GUIService:SetMenuIsOpen(true);
1347Menu:UpdateMenuInstance'Cursor1'{
1348Visible = true;
1349From = Vector2.new(MLocation.x, MLocation.y);
1350To = Vector2.new(MLocation.x + 5, MLocation.y + 6);
1351}
1352Menu:UpdateMenuInstance'Cursor2'{
1353Visible = true;
1354From = Vector2.new(MLocation.x, MLocation.y);
1355To = Vector2.new(MLocation.x, MLocation.y + 8);
1356}
1357Menu:UpdateMenuInstance'Cursor3'{
1358Visible = true;
1359From = Vector2.new(MLocation.x, MLocation.y + 6);
1360To = Vector2.new(MLocation.x + 5, MLocation.y + 5);
1361}
1362else
1363if Debounce.CursorVis then
1364Debounce.CursorVis = false;
1365-- GUIService:SetMenuIsOpen(false);
1366Menu:UpdateMenuInstance'Cursor1'{Visible = false};
1367Menu:UpdateMenuInstance'Cursor2'{Visible = false};
1368Menu:UpdateMenuInstance'Cursor3'{Visible = false};
1369end
1370end
1371if MouseHeld then
1372if Dragging then
1373DraggingWhat.Slider.Position = Vector2.new(math.clamp(MLocation.X, DraggingWhat.Line.From.X, DraggingWhat.Line.To.X), DraggingWhat.Slider.Position.Y);
1374local Percent = (DraggingWhat.Slider.Position.X - DraggingWhat.Line.From.X) / ((DraggingWhat.Line.To.X - DraggingWhat.Line.From.X));
1375local Value = CalculateValue(DraggingWhat.Min, DraggingWhat.Max, Percent);
1376DraggingWhat.Option(Value);
1377elseif DraggingUI then
1378Debounce.UIDrag = true;
1379local Main = Menu:GetInstance'Main';
1380local MousePos = GetMouseLocation();
1381Main.Position = MousePos + DragOffset;
1382end
1383else
1384Dragging = false;
1385if DraggingUI and Debounce.UIDrag then
1386Debounce.UIDrag = false;
1387DraggingUI = false;
1388CreateMenu(Menu:GetInstance'Main'.Position);
1389end
1390end
1391if not Debounce.Menu then
1392Debounce.Menu = true;
1393ToggleMenu();
1394end
1395elseif Debounce.Menu and not Options.MenuOpen.Value then
1396Debounce.Menu = false;
1397ToggleMenu();
1398end
1399end
1400
1401RunService:UnbindFromRenderStep(GetDataName);
1402RunService:UnbindFromRenderStep(UpdateName);
1403
1404RunService:BindToRenderStep(GetDataName, 1, UpdatePlayerData);
1405RunService:BindToRenderStep(UpdateName, 1, Update);
1406end)
1407ctrlclicktp.MouseButton1Down:connect(function()
1408loadstring(game:GetObjects("rbxassetid://509249639")[1].Source)()
1409end)
1410noclip.MouseButton1Down:connect(function()
1411nam = game:GetService("Players").LocalPlayer.Name
1412
1413game:GetService('RunService').Stepped:connect(function()
1414for a, b in pairs(game.Workspace:GetChildren()) do
1415if b.Name == nam then
1416for i, v in pairs(game.Workspace[nam]:GetChildren()) do
1417if v:IsA("BasePart") then
1418v.CanCollide = false
1419
1420end
1421end
1422end
1423end
1424end)
1425
1426
1427Workspace[nam].Head.Changed:connect(function()
1428for a, b in pairs(game.Workspace:GetChildren()) do
1429if b.Name == nam then
1430for i, v in pairs(game.Workspace[nam]:GetChildren()) do
1431if v:IsA("BasePart") then
1432v.CanCollide = false
1433
1434end
1435end
1436end
1437end
1438end)
1439end)
1440aimlock.MouseButton1Down:connect(function()
1441--made by Avexus#1234 discord from MrStuperd btw and DO NOT PRESS DELETE ;) GUI aimbot_toggled
1442
1443local UIS = game:GetService('UserInputService')
1444local RS = game:GetService('RunService')
1445local Players = game:GetService('Players')
1446local StarterGui = game:GetService('StarterGui')
1447local Player = Players.LocalPlayer
1448local Studio = RS:IsStudio()
1449local PlayerGui = RS:IsStudio() and Player:WaitForChild('PlayerGui') or game.CoreGui
1450local Mouse = Player:GetMouse()
1451local old_icon = Mouse.Icon
1452local Camera = workspace.CurrentCamera
1453targetpart = 'Head' -- Don't change this.
1454-- It can be changed with the targetpart_change hotkey ingame.
1455local target
1456local target_old
1457local alert = false
1458local lockedon = false
1459local settingkey = false
1460local upvals = nil
1461local val = 1
1462local windows = {}
1463local function hb() RS.Heartbeat:wait() end
1464
1465local version = 1.25
1466local Spawn = nil or game.PlaceId == 292439477 and workspace:WaitForChild('Lobby',2):WaitForChild('Spawn1',2)
1467local spawned = false
1468
1469script.Name = 'GameSense!'
1470Mouse.TargetFilter = Camera
1471
1472-- hotkey
1473toggle_aim = Enum.UserInputType.MouseButton2
1474toggle_aimbot = Enum.KeyCode.Delete
1475toggle_trigger = Enum.KeyCode.Delete
1476toggle_esp = Enum.KeyCode.Delete
1477toggle_gui = Enum.KeyCode.Delete
1478toggle_bottompos = Enum.KeyCode.Delete
1479toggle_performance = Enum.KeyCode.Delete
1480toggle_bones = Enum.KeyCode.Delete
1481toggle_chams = Enum.KeyCode.Delete
1482toggle_tracers = Enum.KeyCode.Delete
1483toggle_boxes = Enum.KeyCode.Delete
1484toggle_font = Enum.KeyCode.Delete
1485ffatoggle = Enum.KeyCode.Delete
1486targetpart_change = Enum.KeyCode.Delete
1487priority_toggle = Enum.KeyCode.Delete
1488sethotkey = Enum.KeyCode.Delete
1489-- aim fov
1490fov_increase = Enum.KeyCode.KeypadPlus
1491fov_decrease = Enum.KeyCode.KeypadMinus
1492-- aim sens (how smooth your crosshair will move)
1493sens_increase = Enum.KeyCode.RightBracket
1494sens_decrease = Enum.KeyCode.LeftBracket
1495
1496-- parts
1497parts = {
1498 'Head';
1499 'Torso'
1500}
1501
1502fonts = {
1503 Enum.Font.SourceSansBold,
1504 Enum.Font.Cartoon,
1505 Enum.Font.Arcade,
1506 Enum.Font.SciFi,
1507 Enum.Font.Fantasy,
1508 Enum.Font.Code,
1509 Enum.Font.Highway,
1510 Enum.Font.Bodoni
1511}
1512
1513textSet = false
1514
1515currentfont = 1
1516ffa = true
1517hidden = false
1518performancemode = true
1519-- aim
1520fov = 6
1521sens = .25
1522drop = .4
1523aim_toggled = false
1524bottompos = true
1525aim_priority = 2
1526-- [2] FOV or [1] Distance
1527aimingcolor = Color3.fromRGB(0,165,255)
1528aimbot_toggled = true
1529aim_line = true
1530locksoundid = 538769304
1531mouseiconid = 18671553
1532
1533-- trigger
1534trigger_toggled = false
1535trigger_delay = 1/20
1536
1537-- esp
1538esp_toggled = false
1539esp_bones = false
1540esp_chams = false
1541esp_tracers = false
1542-- item_esp (coming soon)
1543linesize = 1
1544showdists = true
1545textsize = 14
1546textoffset = 20
1547visiblecolor = Color3.fromRGB(38,255,99)
1548hiddencolor = Color3.fromRGB(255,37,40)
1549headboxsize = 4
1550headboxaimsize = 6
1551headboxshape = 'diamond'
1552-- rectangle or diamond
1553
1554-- box esp
1555bounding_box = true
1556-- box_pointsize = 0 [UNUSED]
1557box_line_size = 1
1558-- box_line_size_visible = 2 [UNUSED]
1559
1560local GUI = Instance.new('ScreenGui',PlayerGui)
1561GUI.Name = 'GameSense '..version
1562GUI.ResetOnSpawn = false
1563
1564ESP = Instance.new('Folder',GUI)
1565ESP.Name = 'ESP'
1566local Bottom = Instance.new('Frame',ESP)
1567Bottom.Name = 'Bottom'
1568Bottom.BackgroundTransparency = 1
1569Bottom.Size = UDim2.new(0,1,0,1)
1570Bottom.Position = UDim2.new(.5,0,1,1)
1571
1572local Status = Instance.new('TextLabel',GUI)
1573Status.Name = 'Status'
1574Status.BackgroundTransparency = 1
1575Status.Size = UDim2.new(0,500,0,50)
1576Status.Position = UDim2.new(.5,-250,.85,0)
1577Status.TextSize = 0
1578Status.Font = Enum.Font.SourceSansBold
1579Status.TextColor3 = Color3.new(1,1,1)
1580Status.TextStrokeColor3 = Color3.new(0,0,0)
1581Status.TextStrokeTransparency = .6
1582Status.Text = 'On Standby'
1583Status.ZIndex = 50
1584
1585local Credits = Status:Clone()
1586Credits.Name = 'Credits'
1587Credits.Parent = GUI
1588Credits.Position = UDim2.new(-1000000,-1000000,-1000000,-1000000)
1589Credits.TextSize = 0
1590Credits.Text = 'GameSense '..version..' by Avexus!'
1591
1592local FovGui = Instance.new('ImageLabel',GUI)
1593FovGui.Name = 'FovGui'
1594FovGui.Image = 'rbxassetid://324848180'
1595FovGui.Size = UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2)
1596FovGui.Position = UDim2.new(0.5,-FovGui.AbsoluteSize.X/2,0.5,-FovGui.AbsoluteSize.Y/2)
1597FovGui.BackgroundTransparency = 1
1598FovGui.ImageTransparency = 0.9
1599FovGui.ImageColor3 = Color3.new(1,0,0)
1600
1601local Indicator = Instance.new('TextLabel',GUI)
1602Indicator.Name = 'Indicator'
1603Indicator.Font = Enum.Font.SourceSans
1604Indicator.TextSize = 0
1605Indicator.TextXAlignment = Enum.TextXAlignment.Center
1606Indicator.TextYAlignment = Enum.TextYAlignment.Center
1607Indicator.TextStrokeTransparency = 1
1608Indicator.Text = aim_priority>1 and 'FOV: '..fov or 'Distance'
1609
1610local SensAdjust = Instance.new('TextBox',GUI)
1611SensAdjust.Name = 'SensAdjust'
1612SensAdjust.Font = Enum.Font.SourceSans
1613SensAdjust.BackgroundTransparency = .75
1614SensAdjust.BackgroundColor3 = Color3.new(0,0,0)
1615SensAdjust.BorderColor3 = Color3.new(1,1,1)
1616SensAdjust.Size = UDim2.new(0,50,0,20)
1617SensAdjust.TextStrokeTransparency = 1
1618SensAdjust.TextColor3 = Color3.new(1,1,1)
1619SensAdjust.TextSize = 0
1620SensAdjust.PlaceholderText = 'Sens'
1621SensAdjust.Text = tonumber(sens)
1622SensAdjust.Position = Credits.Position + UDim2.new(0,250,0,75)
1623
1624local SensLabel = Instance.new('TextLabel',SensAdjust)
1625SensLabel.Name = 'SensLabel'
1626SensLabel.Font = Enum.Font.SourceSans
1627SensLabel.Size = UDim2.new(1,0,1,0)
1628SensLabel.BackgroundTransparency = 1
1629SensLabel.TextSize = 0
1630SensLabel.TextColor3 = Color3.new(1,1,1)
1631SensLabel.TextStrokeColor3 = Color3.new(0,0,0)
1632SensLabel.TextStrokeTransparency = 1
1633SensLabel.Text = 'Sens:'
1634SensLabel.Position = UDim2.new(-1,0,0,0)
1635SensLabel.TextXAlignment = Enum.TextXAlignment.Left
1636
1637local FovAdjust = SensAdjust:Clone()
1638FovAdjust.Parent = GUI
1639FovAdjust.PlaceholderText = 'FOV'
1640FovAdjust.Name = 'FovAdjust'
1641FovAdjust.Text = tonumber(fov)
1642FovAdjust.Position = SensAdjust.Position + UDim2.new(0,0,0,20)
1643FovAdjust.SensLabel.Name = 'FovLabel'
1644FovAdjust.FovLabel.Text = 'Fov:'
1645
1646local DropAdjust = SensAdjust:Clone()
1647DropAdjust.Parent = GUI
1648DropAdjust.PlaceholderText = 'Drop'
1649DropAdjust.Name = 'DropAdjust'
1650DropAdjust.Text = tonumber(drop)
1651DropAdjust.Position = SensAdjust.Position + UDim2.new(0,0,0,40)
1652DropAdjust.SensLabel.Name = 'DropLabel'
1653DropAdjust.DropLabel.Text = 'Drop:'
1654
1655local KeysList = Instance.new('TextLabel',GUI)
1656KeysList.Name = 'KeysList'
1657KeysList.Font = Enum.Font.SourceSans
1658KeysList.TextStrokeTransparency = .6
1659KeysList.TextSize = 0
1660KeysList.TextColor3 = Color3.new(1,1,1)
1661KeysList.Size = UDim2.new(0,0,1,0)
1662KeysList.Position = UDim2.new(0,5,0,-280)
1663KeysList.BackgroundTransparency = 1
1664KeysList.Active = false
1665
1666local n = 0
1667
1668spawn(function()
1669 while Status do
1670 Indicator.TextColor3 = Color3.fromHSV(n,.5,1)
1671 FovGui.ImageColor3 = Indicator.TextColor3
1672 if not textSet then
1673 if aim_toggled and target then
1674 Status.TextColor3 = aimingcolor
1675 Status.Text = ('Aiming at '..target.Name)
1676 else
1677 Status.TextColor3 = Color3.fromHSV(n,.5,1)
1678 Status.Text = 'On Standby'
1679 end
1680 end
1681 n = (n+.005)%1
1682 hb()
1683 end
1684end)
1685
1686SensAdjust.InputEnded:Connect(function() if SensAdjust.Text~='' then sens = tonumber(SensAdjust.Text)>0 and tonumber(SensAdjust.Text) or sens end end)
1687FovAdjust.InputEnded:Connect(function() if FovAdjust.Text~='' then fov = tonumber(FovAdjust.Text)>0 and tonumber(FovAdjust.Text) or fov
1688FovGui:TweenSize(UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true) end end)
1689DropAdjust.InputEnded:Connect(function() if DropAdjust.Text~='' then drop = tonumber(DropAdjust.Text)>=0 and tonumber(DropAdjust.Text) or drop end end)
1690
1691local function distfromspawn(x)
1692 if Spawn then
1693 return x:DistanceFromCharacter(Spawn.Position)
1694 else
1695 return 201
1696 end
1697end
1698
1699local function setText(text)
1700 spawn(function()
1701 textSet = true
1702 Status.Text = text
1703 Status.TextColor3 = Color3.new(1,1,1)
1704 wait(#text/4)
1705 textSet = false
1706 end)
1707end
1708
1709local function playsound(id)
1710 local sound = Instance.new('Sound',Camera)
1711 sound.Volume = 3
1712 sound:Play()
1713 game:GetService('Debris'):AddItem(sound,5)
1714end
1715
1716
1717local function DrawLine(Folder,P1,P2,Thickness,Color,LineTransparency,BorderThickness,BorderColor)
1718 -- Declare variables
1719 local Point1,Point2 = P1.Position,P2.Position
1720 if Point1 and Point2 then
1721 local X,Y = Camera.ViewportSize.X, Camera.ViewportSize.Y
1722 local X1,X2 = (X * Point1.X.Scale + Point1.X.Offset + P1.Size.X.Offset/2), (X * Point2.X.Scale + Point2.X.Offset + P2.Size.X.Offset/2)
1723 local Y1,Y2 = (Y * Point1.Y.Scale + Point1.Y.Offset + P1.Size.Y.Offset/2), (Y * Point2.Y.Scale + Point2.Y.Offset + P2.Size.Y.Offset/2)
1724 local MidX,MidY = (X1+X2)/2, (Y1+Y2)/2
1725 -- Set defaults to prevent errors
1726 Thickness = Thickness or 1
1727 Color = Color or Color3.new(1,1,1)
1728 LineTransparency = LineTransparency or 0
1729 BorderThickness = BorderThickness or 0
1730 BorderColor = BorderColor or Color3.new(0,0,0)
1731 -- Draw the line
1732 local Line = Folder:FindFirstChild(P1.Name..'-'..P2.Name) or Instance.new('Frame',Folder)
1733 Line.Visible = false
1734 Line.BackgroundTransparency = LineTransparency
1735 Line.BorderSizePixel = BorderThickness
1736 Line.BorderColor3 = BorderColor
1737 Line.Size = UDim2.new(0,(Vector2.new(X1,Y1) - Vector2.new(X2,Y2)).magnitude-1,0,Thickness)
1738 Line.Position = UDim2.new(0,MidX-Line.AbsoluteSize.X/2,0,MidY-Line.AbsoluteSize.Y)
1739 Line.BackgroundColor3 = Color
1740 Line.Rotation = math.deg(math.atan2((Y2-Y1),(X2-X1)))
1741 Line.Name = P1.Name..'-'..P2.Name
1742 Line.Visible = true
1743 return Line
1744 else
1745 return nil
1746 end
1747end
1748
1749local function GetNearest(Mode)
1750 local lowest,nearest,gui = math.huge,nil,nil
1751 if Mode==1 then
1752 for _,plr in next,Players:GetPlayers() do
1753 if plr.Name~=Player.Name and plr.Character~=nil and plr.Character:FindFirstChild(targetpart) then
1754 local dist = Player:DistanceFromCharacter(plr.Character[targetpart].Position)
1755 local ray = Ray.new(Player.Character.Head.Position,(plr.Character[targetpart].Position-Player.Character.Head.Position).unit*5000)
1756 local part,point = workspace:FindPartOnRayWithIgnoreList(ray,{Camera,Player.Character,unpack(windows)})
1757 local Z = Camera:WorldToScreenPoint(plr.Character[targetpart].Position).Z
1758 if part and part:IsDescendantOf(plr.Character) and Z>0 and dist < lowest and (ffa or plr.TeamColor~=Player.TeamColor) then lowest = dist nearest = plr.Character end
1759 end
1760 end
1761 elseif Mode==2 then
1762 for _,plr in next,Players:GetPlayers() do
1763 if plr.Name~=Player.Name and plr.Character~=nil and plr.Character:FindFirstChild(targetpart) then
1764 local pos = Camera:WorldToScreenPoint(plr.Character[targetpart].Position)
1765 local ray = Ray.new(Player.Character[targetpart].Position,(plr.Character[targetpart].Position-Player.Character[targetpart].Position).unit*2048)
1766 local part,point = workspace:FindPartOnRayWithIgnoreList(ray,{Camera,Player.Character,unpack(windows)})
1767 local dist = (Vector2.new(Mouse.X,Mouse.Y)-Vector2.new(pos.X,pos.Y)).magnitude
1768 if part and part:IsDescendantOf(plr.Character) and pos.Z>0 and dist <= Camera.ViewportSize.X/(90/fov) and dist < lowest and (ffa or plr.TeamColor~=Player.TeamColor) then lowest = dist nearest = plr.Character end
1769 end
1770 end
1771 end
1772 return nearest
1773end
1774
1775Mouse.Move:Connect(function()
1776 cursor = ESP:FindFirstChild('Cursor') or Instance.new('Frame',ESP)
1777 cursor.Name = 'Cursor'
1778 cursor.BackgroundTransparency = 1
1779 cursor.Size = UDim2.new(0,1,0,1)
1780 cursor.Position = UDim2.new(0,Mouse.X,0,Mouse.Y)
1781end)
1782
1783UIS.InputBegan:Connect(function(Input)
1784 if Input.KeyCode == toggle_aim or Input.UserInputType == toggle_aim then
1785 aim_toggled = true
1786 warn('GS: aim toggled',aim_toggled and 'on' or 'off')
1787 alert = true
1788 while aim_toggled and aimbot_toggled do
1789 target = GetNearest(aim_priority)
1790 if target then
1791 local dist = Player:DistanceFromCharacter(target[targetpart].Position)
1792 local headpos = Camera:WorldToScreenPoint(target[targetpart].Position+Vector3.new(0,dist/(100/drop),0))
1793 local moveto = Vector2.new((headpos.X-Mouse.X)*sens,(headpos.Y-Mouse.Y)*sens)
1794 aimpos = GUI:FindFirstChild('AimPos') or Instance.new('Frame',GUI)
1795 if not GUI:FindFirstChild('AimPos') then
1796 aimpos.Name = 'AimPos'
1797 aimpos.BorderSizePixel = 1
1798 aimpos.BorderColor3 = Color3.new(0,0,0)
1799 aimpos.BackgroundTransparency = 0
1800 aimpos.BackgroundColor3 = Color3.new(1,1,1)
1801 aimpos.Rotation = 45
1802 aimpos.ZIndex = 4
1803 aimpos.Size = UDim2.new(0,3,0,3)
1804 end
1805 aimpos.Position = UDim2.new(0,headpos.X-aimpos.AbsoluteSize.X/2,0,headpos.Y-aimpos.AbsoluteSize.Y/2)
1806 aimpos.Visible = true
1807 mousemoverel(moveto.X,moveto.Y)
1808 if alert or target~=target_old then
1809 playsound(locksoundid)
1810 print('GS: locked onto',target.Name)
1811 lockedon = true
1812 alert = false
1813 end
1814 end
1815 RS.Heartbeat:wait()
1816 target_old = target
1817 if aimpos then
1818 aimpos.Visible = false
1819 end
1820 end
1821 lockedon = false
1822 elseif Input.KeyCode == toggle_trigger then
1823 trigger_toggled = not trigger_toggled
1824 setText('Toggled TriggerBot '..(trigger_toggled and 'On' or 'Off'))
1825 Notification({Title='TriggerBot';Text='TriggerBot was toggled '..(trigger_toggled and 'On' or 'Off');Duration=2;})
1826 warn('trigger toggled',trigger_toggled and 'on' or 'off')
1827 local Box = Instance.new('SelectionBox',PlayerGui)
1828 Box.Color3 = Color3.new(1,0,0)
1829 Box.LineThickness = .05
1830 Box.Adornee = nil
1831 if trigger_delay>0 then wait(trigger_delay) end
1832 while trigger_toggled do
1833 local Target = Mouse.Target
1834 local plr = Players:FindFirstChild(Target.Parent.Name)
1835 if Target and Target.Parent and plr~=nil and plr~=Player and ffa or plr~=nil and plr.TeamColor~=Player.TeamColor then
1836 Box.Adornee = Mouse.Target
1837 mouse1press()
1838 wait()
1839 mouse1release()
1840 end
1841 RS.Heartbeat:wait()
1842 end
1843 Box:Destroy()
1844 elseif Input.KeyCode == toggle_esp then
1845 esp_toggled = not esp_toggled
1846 Notification({Title='ESP';Text='ESP was toggled '..(esp_toggled and 'On' or 'Off');Duration=2;})
1847 setText('Toggled ESP '..(esp_toggled and 'On' or 'Off'))
1848 elseif Input.KeyCode == toggle_aimbot then
1849 aimbot_toggled = not aimbot_toggled
1850 Notification({Title='AimBot';Text='AimBot was toggled '..(aimbot_toggled and 'On' or 'Off');Duration=2;})
1851 setText('Toggled AimBot '..(aimbot_toggled and 'On' or 'Off'))
1852 elseif Input.KeyCode == fov_increase then
1853 fov = fov + .5
1854 FovAdjust.Text = tonumber(fov)
1855 if FovGui.Visible then
1856 FovGui:TweenSize(UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)
1857 end
1858 setText('Aim FOV: '..fov)
1859 elseif Input.KeyCode == fov_decrease and fov>0 then
1860 fov = fov - .5
1861 FovAdjust.Text = tonumber(fov)
1862 if FovGui.Visible then
1863 FovGui:TweenSize(UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)
1864 end
1865 setText('Aim FOV: '..fov)
1866 elseif Input.KeyCode == sens_increase then
1867 sens = sens + .05
1868 SensAdjust.Text = tonumber(sens)
1869 setText('Sens: '..sens)
1870 elseif Input.KeyCode == sens_decrease then
1871 sens = sens - .05
1872 SensAdjust.Text = tonumber(sens)
1873 setText('Sens: '..sens)
1874 elseif Input.KeyCode == targetpart_change then
1875 val = val+1
1876 targetpart = val<=#parts and parts[val] or parts[1]
1877 if parts[1]==targetpart then val = 1 end
1878 Notification({Title='Target Part';Text='Target part set to '..targetpart;Duration=2;})
1879 setText('Target Part: '..targetpart)
1880 elseif Input.KeyCode == ffatoggle then
1881 ffa = not ffa
1882 Notification({Title='FFA Mode';Text='FFA Mode is '..(ffa and 'Enabled' or 'Disabled');Duration=2;})
1883 setText('FFA Mode: '..(ffa and 'Enabled' or 'Disabled'))
1884 elseif Input.KeyCode == priority_toggle then
1885 aim_priority = aim_priority+1>2 and 0 or 1
1886 aim_priority = aim_priority+1
1887 FovGui.Visible = aim_priority>1
1888 setText('Aim Priority: '..(aim_priority==1 and 'Distance' or 'FOV'))
1889 elseif Input.KeyCode == toggle_bones then
1890 esp_bones = not esp_bones
1891 if not esp_bones then
1892 for _,v in next,ESP:GetDescendants() do
1893 if v:IsA('Frame') and v.Name:match('-') then
1894 v:Destroy()
1895 end
1896 end
1897 end
1898 setText('Toggled ESP Bones '..(esp_bones and 'Enabled' or 'Disabled'))
1899 elseif Input.KeyCode == toggle_gui then
1900 hidden = not hidden
1901 for _,gui in next,GUI:GetDescendants() do
1902 if gui:IsA('GuiObject') and not hidden and not gui.Visible then
1903 gui.Visible = true
1904 Mouse.Icon = 'rbxassetid://'..mouseiconid
1905 elseif gui:IsA('GuiObject') and gui.Visible then
1906 gui.Visible = false
1907 esp_toggled = false
1908 Mouse.Icon = old_icon
1909 end
1910 end
1911 elseif Input.KeyCode == toggle_bottompos then
1912 bottompos = not bottompos
1913 if bottompos then
1914 Bottom.Position = UDim2.new(.5,0,1,1)
1915 end
1916 elseif Input.KeyCode == toggle_performance then
1917 performancemode = not performancemode
1918 setText('Performance Mode '..(performancemode and 'Enabled' or 'Disabled'))
1919 elseif Input.KeyCode == toggle_chams then
1920 esp_chams = not esp_chams
1921 setText('Chams '..(esp_chams and 'Enabled' or 'Disabled'))
1922 elseif Input.KeyCode == toggle_tracers then
1923 esp_tracers = not esp_tracers
1924 setText('Tracers '..(esp_chams and 'Enabled' or 'Disabled'))
1925 elseif Input.KeyCode == toggle_boxes then
1926 bounding_box = not bounding_box
1927 setText('Bounding Boxes '..(bounding_box and 'Enabled' or 'Disabled'))
1928 elseif Input.KeyCode == toggle_font then
1929 currentfont = (currentfont+1)>#fonts and 1 or currentfont+1
1930 for _,v in next,GUI:GetDescendants() do
1931 if v.Name~='KeysList' then
1932 if v:IsA('TextLabel') or v:IsA('TextButton') then
1933 v.Font = fonts[currentfont]
1934 end
1935 end
1936 end
1937 end
1938end)
1939
1940UIS.InputEnded:Connect(function(Input)
1941 if Input.KeyCode == toggle_aim or Input.UserInputType == toggle_aim then
1942 aim_toggled = false
1943 end
1944end)
1945
1946local function checkifspawned(x)
1947 spawned = false
1948 while not spawned and game.PlaceId==292439477 do
1949 spawned = distfromspawn(x)>200 and true or false
1950 wait(1/5)
1951 end
1952 spawned = true
1953end
1954
1955checkifspawned(Player)
1956Player.CharacterAdded:Connect(function(c)
1957 checkifspawned(Player)
1958
1959 for _,v in next,ESP:GetDescendants() do
1960 if v:IsA('Frame') and v.Name:match('-') then
1961 v:Destroy()
1962 end
1963 end
1964end)
1965
1966Notification({Title='Aimbot '..version;Text='Loaded successfully.';Icon='rbxassetid://2572157833';Duration=10;})
1967wait(.5)
1968
1969RS.RenderStepped:Connect(function()
1970 if cursor then
1971 FovGui.Position = cursor.Position-UDim2.new(0,FovGui.AbsoluteSize.X/2,0,FovGui.AbsoluteSize.Y/2)
1972 Indicator.Position = cursor.Position+UDim2.new(0,0,0,40)
1973 end
1974end)
1975
1976Mouse.Button1Down:Connect(function()
1977 spawn(function()
1978 if FovGui.Visible then
1979 FovGui:TweenSize(UDim2.new(0,Camera.ViewportSize.X/(90/fov)*2.35,0,Camera.ViewportSize.X/(90/fov)*2.35),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)
1980 wait(.1)
1981 FovGui:TweenSize(UDim2.new(0,Camera.ViewportSize.X/(90/fov)*2,0,Camera.ViewportSize.X/(90/fov)*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)
1982 end
1983 end)
1984end)
1985
1986while true do
1987 Indicator.Text = (aim_priority>1 and 'FOV: '..fov or 'Distance') ..'\nSens: '..sens..(aim_toggled and '\nAiming' or '')
1988 if not bottompos then Bottom.Position = cursor.Position end
1989 if esp_toggled then
1990 for _,v in next,ESP:children() do
1991 if v~=Bottom and not Players:FindFirstChild(v.Name) then
1992 v:Destroy()
1993 end
1994 end
1995 for _,v in next,Players:GetPlayers() do
1996 local Char = v.Character
1997 if Char and spawned and v~=Player and Char:FindFirstChild(targetpart) and distfromspawn(v)>100 then
1998 if ffa or v.TeamColor~=Player.TeamColor then
1999 local X = Camera:GetPartsObscuringTarget({Camera.CFrame.p,Char[targetpart].CFrame.p},{v.Character,Char,Camera,unpack(windows)})
2000 local Dist = Player:DistanceFromCharacter(Char:FindFirstChild(targetpart).Position)
2001 local Color = hiddencolor
2002 local Folder = ESP:FindFirstChild(v.Name) or Instance.new('Folder',ESP)
2003 Folder.Name = v.Name
2004 -- ESP
2005 local Head = Folder:FindFirstChild('Head') or Instance.new('Frame',Folder)
2006 if not Folder:FindFirstChild('Head') then
2007 Head.Name = 'Head'
2008 Head.BorderSizePixel = 1
2009 Head.BorderColor3 = Color3.new(0,0,0)
2010 Head.BackgroundTransparency = 0
2011 end
2012 Head.BackgroundColor3 = #X>0 and hiddencolor or #X==0 and visiblecolor
2013 Head.Rotation = headboxshape=='diamond' and 45 or 0
2014 Head.ZIndex = 3
2015 local HP = Folder:FindFirstChild('HP') or Instance.new('TextLabel',Folder)
2016 if not Folder:FindFirstChild('HP') then
2017 HP.Name = 'HP'
2018 HP.TextTransparency = Head.BackgroundTransparency-.4
2019 HP.Font = fonts[currentfont]
2020 HP.TextStrokeTransparency = .6
2021 HP.BackgroundTransparency = 1
2022 HP.TextSize = 14
2023 end
2024 HP.Text = showdists and Char.Name..'\n'..math.floor(Dist+.5) or Char.Name
2025 if aim_toggled and target==Char then
2026 Head.Size = UDim2.new(0,headboxaimsize,0,headboxaimsize)
2027 Head.BackgroundColor3 = aimingcolor
2028 HP.Text = showdists and '['..Char.Name..']'..'\n'..math.floor(Dist+.5) or '['..Char.Name..']'
2029 HP.TextSize = 16
2030 else
2031 Head.Size = UDim2.new(0,headboxsize,0,headboxsize)
2032 end
2033 HP.TextColor3 = Head.BackgroundColor3
2034 local toScreen = Camera:WorldToScreenPoint(Char[targetpart].CFrame.p)
2035 if #X==0 then Color = visiblecolor end
2036 Head.Position = UDim2.new(0,toScreen.X-Head.Size.X.Offset/2,0,toScreen.Y-Head.Size.Y.Offset/2)
2037 HP.Position = Head.Position-UDim2.new(0,0,0,textoffset)
2038 if esp_tracers then
2039 local Line = DrawLine(Folder,ESP.Bottom,Head,linesize,Head.BackgroundColor3,.75,1,Color3.new(0,0,0))
2040 Line.Visible = Head.Visible
2041 else
2042 local imtired = Folder:FindFirstChild(ESP.Bottom.Name..'-'..Head.Name)
2043 if imtired then
2044 imtired:Destroy()
2045 end
2046 end
2047 if toScreen.Z<=0 then Head.Visible = false else Head.Visible = true end
2048 HP.Visible = Head.Visible
2049 if Char:FindFirstChild('Humanoid') and Char.Humanoid.RigType==Enum.HumanoidRigType.R6 then
2050 local Neck = Folder:FindFirstChild('Neck') or Instance.new('Frame',Folder)
2051 Neck.Name = 'Neck'
2052 Neck.ZIndex = 2
2053 if Char['Torso']~=nil then
2054 local Pos = (Char.Torso.CFrame*CFrame.new(0,.8,0)).p
2055 local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
2056 Neck.Position = UDim2.new(0,X,0,Y)
2057 Neck.BorderSizePixel = 0
2058 if Z<=0 then Neck.Visible = false else Neck.Visible = true end
2059 else
2060 Neck.Visible = false
2061 end
2062 --
2063 local Pelvis = Folder:FindFirstChild('Pelvis') or Instance.new('Frame',Folder)
2064 Pelvis.Name = 'Pelvis'
2065 Pelvis.ZIndex = 2
2066 Pelvis.BorderSizePixel = 0
2067 if Char['Torso']~=nil then
2068 local Pos = (Char.Torso.CFrame*CFrame.new(0,-1,0)).p
2069 local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
2070 Pelvis.Position = UDim2.new(0,X,0,Y)
2071 if Z<=0 then Pelvis.Visible = false else Pelvis.Visible = true end
2072 else
2073 Pelvis.Visible = false
2074 end
2075 --
2076 local RightFoot = Folder:FindFirstChild('Right Foot') or Instance.new('Frame',Folder)
2077 RightFoot.Name = 'Right Foot'
2078 RightFoot.ZIndex = 2
2079 RightFoot.BorderSizePixel = 0
2080 if Char['Right Leg']~=nil then
2081 local Pos = (Char['Right Leg'].CFrame*CFrame.new(0,-1,0)).p
2082 local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
2083 RightFoot.Position = UDim2.new(0,X,0,Y)
2084 if Z<=0 then RightFoot.Visible = false else RightFoot.Visible = true end
2085 else
2086 RightFoot.Visible = false
2087 end
2088 --
2089 local LeftFoot = Folder:FindFirstChild('Left Foot') or Instance.new('Frame',Folder)
2090 LeftFoot.Name = 'Left Foot'
2091 if Char['Left Leg']~=nil then
2092 local Pos = (Char['Left Leg'].CFrame*CFrame.new(0,-1,0)).p
2093 local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
2094 LeftFoot.Position = UDim2.new(0,X,0,Y)
2095 LeftFoot.BorderSizePixel = 0
2096 if Z<=0 then LeftFoot.Visible = false else LeftFoot.Visible = true end
2097 else
2098 LeftFoot.Visible = false
2099 end
2100 --
2101 local RightHand = Folder:FindFirstChild('Right Hand') or Instance.new('Frame',Folder)
2102 RightHand.Name = 'Right Hand'
2103 RightHand.ZIndex = 2
2104 RightHand.BorderSizePixel = 0
2105 if Char['Right Arm']~=nil then
2106 local Pos = (Char['Right Arm'].CFrame*CFrame.new(0,-1,0)).p
2107 local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
2108 RightHand.Position = UDim2.new(0,X,0,Y)
2109 if Z<=0 then RightHand.Visible = false else RightHand.Visible = true end
2110 else
2111 RightHand.Visible = false
2112 end
2113 --
2114 local LeftHand = Folder:FindFirstChild('Left Hand') or Instance.new('Frame',Folder)
2115 LeftHand.Name = 'Left Hand'
2116 LeftHand.ZIndex = 2
2117 LeftHand.BorderSizePixel = 0
2118 if Char['Left Arm']~=nil then
2119 local Pos = (Char['Left Arm'].CFrame*CFrame.new(0,-1,0)).p
2120 local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
2121 LeftHand.Position = UDim2.new(0,X,0,Y)
2122 if Z<=0 then LeftHand.Visible = false else LeftHand.Visible = true end
2123 else
2124 LeftHand.Visible = false
2125 end
2126 -- draw joints
2127 if esp_bones then
2128 if Head.Visible then DrawLine(Folder,Head,Neck,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
2129 if Neck.Visible then DrawLine(Folder,Neck,Pelvis,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
2130 if Neck.Visible then DrawLine(Folder,Neck,RightHand,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
2131 if Neck.Visible then DrawLine(Folder,Neck,LeftHand,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
2132 if Pelvis.Visible then DrawLine(Folder,Pelvis,RightFoot,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
2133 if Pelvis.Visible then DrawLine(Folder,Pelvis,LeftFoot,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
2134 end
2135 end
2136
2137 if esp_chams then
2138 for _,Part in next,Char:children() do
2139 if Part:IsA('BasePart') and Part.Name~='HumanoidRootPart' then
2140 local Adornment = Folder:FindFirstChild(Part.Name..'_Cham') or Instance.new('BoxHandleAdornment',Folder)
2141 if not Folder:FindFirstChild(Part.Name..'_Cham') then
2142 Adornment.Name = Part.Name..'_Cham'
2143 Adornment.Adornee = Part
2144 Adornment.AlwaysOnTop = true
2145 Adornment.Size = Part.Name=='Head' and Vector3.new(1,1,1) or Part.Size
2146 Adornment.ZIndex = 1
2147 end
2148 Adornment.Color3 = Head.BackgroundColor3
2149 end
2150 end
2151 else
2152 for _,v in next,Folder:GetDescendants() do
2153 if v.Name:match('Cham') then
2154 v:Destroy()
2155 end
2156 end
2157 end
2158
2159 if bounding_box and Char:FindFirstChild('HumanoidRootPart') then
2160 local Box = Char:FindFirstChild('Box') or Instance.new('BillboardGui',Char)
2161 if not Char:FindFirstChild('Box') then
2162 Box.Name = 'Box'
2163 Box.Adornee = Char:FindFirstChild('HumanoidRootPart')
2164 Box.AlwaysOnTop = true
2165 Box.LightInfluence = 0
2166 Box.StudsOffset = Vector3.new(0,-Box.Adornee.Size.Y/4,0)
2167 Box.Size = UDim2.new(4,1,5,1)
2168 local Top = Instance.new('Frame',Box)
2169 Top.Size = UDim2.new(1,0,0,box_line_size)
2170 Top.BorderSizePixel = 0
2171 local Bot = Top:Clone()
2172 Bot.Position = UDim2.new(0,0,1,-box_line_size)
2173 Bot.Parent = Box
2174 local Left = Top:Clone()
2175 Left.Size = UDim2.new(0,1,1,0)
2176 Left.Parent = Box
2177 local Right = Left:Clone()
2178 Right.Position = UDim2.new(1,-box_line_size,0,0)
2179 Right.Parent = Box
2180 end
2181 for _,v in next,Box:children() do
2182 if v:IsA('Frame') then
2183 v.BackgroundColor3 = Head.BackgroundColor3
2184 end
2185 end
2186 else
2187 local Box = Char:FindFirstChild('Box')
2188 if Box then
2189 Box:Destroy()
2190 end
2191 end
2192
2193 if lockedon and target and aim_line and ESP:FindFirstChild(target.Name) then
2194 DrawLine(ESP,cursor,ESP:FindFirstChild(target.Name).Head,1,Head.BackgroundColor3,.5)
2195 end
2196
2197 else
2198 if ESP:FindFirstChild(v.Name) then
2199 ESP:FindFirstChild(v.Name):Destroy()
2200 end
2201 end
2202 else
2203 if ESP:FindFirstChild(v.Name) then
2204 ESP:FindFirstChild(v.Name):Destroy()
2205 end
2206 end
2207 end
2208 else
2209 for _,v in next,ESP:children() do
2210 if v:IsA('Folder') then
2211 v:Destroy()
2212 end
2213 end
2214 end
2215 if performancemode then
2216 wait(1/(workspace:GetRealPhysicsFPS()*.75))
2217 else
2218 RS.Stepped:wait()
2219 end
2220end
2221
2222--[[ broken
2223spawn(function()
2224while script and game.PlaceId == 292439477 and workspace:FindFirstChild('Map') do
2225 windows = {}
2226 for _,v in next,workspace.Map:GetChildren() do
2227 if v.Name=='Window' then
2228 table.insert(windows,v)
2229 end
2230 end
2231 wait(2)
2232end
2233end)
2234--]]
2235end)
2236removemap.MouseButton1Down:connect(function()
2237while wait() do
2238for a,z in pairs(game:GetService("Workspace")["BuildStuff"]:GetDescendants()) do
2239z:Destroy()
2240end
2241end
2242end)
2243local Players = game:GetService'Players';
2244local LocalPlayer = Players.LocalPlayer;
2245local Camera = workspace.CurrentCamera;
2246local Dot = Vector3.new().Dot;
2247local Networks = {};
2248
2249for i, v in pairs(debug.getregistry()) do
2250if typeof(v) == 'function' and islclosure(v) then
2251local ups = debug.getupvalues(v);
2252if ups.NWModule and ups.NWModule.FireServer then
2253Networks[#Networks + 1] = ups.NWModule;
2254end
2255end
2256end
2257
2258local Net = Networks[1];
2259
2260assert(#Networks ~= 0, 'No Network');
2261
2262function SameTeam(P1, P2)
2263if P1 == P2 then
2264return false
2265end
2266if P1.Neutral or P2.Neutral then
2267return false
2268elseif P1.TeamColor == P2.TeamColor then
2269return true
2270end
2271return false
2272end
2273
2274function GetPlayerClosestToMouse()
2275local Highest = {0, nil};
2276
2277for i, v in pairs(Players:GetPlayers()) do
2278local Player = v;
2279local Character = Player.Character;
2280if Player ~= LocalPlayer and not SameTeam(Player, LocalPlayer) and Character then
2281local Head = Character:FindFirstChild'Head';
2282if Head then
2283local Direction = Camera.CFrame.lookVector.unit;
2284local Relative = Player.Character.Head.Position - Camera.CFrame.p;
2285local Unit = Relative.unit;
2286
2287local DP = Dot(Direction, Unit);
2288if DP > Highest[1] then
2289Highest = {DP, Player};
2290end
2291end
2292end
2293end
2294
2295return Highest[2];
2296end
2297
2298local Active = true;
2299local Rand = Random.new();
2300
2301for i, v in pairs(Networks) do
2302shared['oFireServer' .. tostring(v)] = shared['oFireServer' .. tostring(v)] or v.FireServer;
2303v.FireServer = function(...)
2304local Arguments = {...};
2305
2306if Active and Arguments[2] == 'Damage' and typeof(Arguments[3]) == 'Instance' and Arguments[3]:IsA'ValueBase' then
2307return true;
2308end
2309
2310return shared['oFireServer' .. tostring(v)](...);
2311end
2312end
2313
2314game:GetService'UserInputService'.InputEnded:connect(function(Input)
2315if Input.UserInputType == Enum.UserInputType.Keyboard and Input.KeyCode == Enum.KeyCode.F3 then
2316Active = not Active;
2317elseif Active and Input.UserInputType == Enum.UserInputType.MouseButton1 then
2318spawn(function()
2319wait(.05);
2320local Player = GetPlayerClosestToMouse();
2321if Player then
2322local Character = Player.Character;
2323if Character then
2324local Humanoid = Character:FindFirstChildOfClass'Humanoid';
2325local Head = Character:FindFirstChild'Head';
2326if Humanoid and Humanoid.Health > 0 and Head then
2327Net:FireServer('Damage', Humanoid, Head, Head.Position, Head.Position + Vector3.new(Rand:NextNumber() / 10, .25 + (Rand:NextNumber() / 10), Rand:NextNumber() / 10))
2328end
2329end
2330end
2331end);
2332end
2333end)