Advertisement
RedoGaming

unnamed esp

Aug 31st, 2020
2,688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 75.04 KB | None | 0 0
  1. assert(Drawing, 'exploit not supported')
  2.  
  3. if not syn and not PROTOSMASHER_LOADED then print'Unnamed ESP only officially supports Synapse and Protosmasher! If you\'re an exploit developer and have added drawing API to your exploit, try setting syn as true then checking if that works, otherwise, DM me on discord @ cppbook.org#1968 or add an issue to the Unnamed ESP Github Repository and I\'ll see it through email!' end
  4.  
  5. local UserInputService = game:GetService'UserInputService';
  6. local HttpService = game:GetService'HttpService';
  7. local GUIService = game:GetService'GuiService';
  8. local TweenService = game:GetService'TweenService';
  9. local RunService = game:GetService'RunService';
  10. local Players = game:GetService'Players';
  11. local LocalPlayer = Players.LocalPlayer;
  12. local Camera = workspace.CurrentCamera;
  13. local Mouse = LocalPlayer:GetMouse();
  14. local V2New = Vector2.new;
  15. local V3New = Vector3.new;
  16. local WTVP = Camera.WorldToViewportPoint;
  17. local WorldToViewport = function(...) return WTVP(Camera, ...) end;
  18. local Menu = {};
  19. local MouseHeld = false;
  20. local LastRefresh = 0;
  21. local OptionsFile = 'IC3_ESP_SETTINGS.dat';
  22. local Binding = false;
  23. local BindedKey = nil;
  24. local OIndex = 0;
  25. local LineBox = {};
  26. local UIButtons = {};
  27. local Sliders = {};
  28. local ColorPicker = { Loading = false; LastGenerated = 0 };
  29. local Dragging = false;
  30. local DraggingUI = false;
  31. local Rainbow = false;
  32. local DragOffset = V2New();
  33. local DraggingWhat = nil;
  34. local OldData = {};
  35. local IgnoreList = {};
  36. local EnemyColor = Color3.new(1, 0, 0);
  37. local TeamColor = Color3.new(0, 1, 0);
  38. local MenuLoaded = false;
  39. local ErrorLogging = false;
  40. local TracerPosition = V2New(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y - 135);
  41. local DragTracerPosition = false;
  42. local SubMenu = {};
  43. local IsSynapse = syn and not PROTOSMASHER_LOADED;
  44. local Connections = { Active = {} };
  45. local Signal = {}; Signal.__index = Signal;
  46. local GetCharacter;
  47. local CurrentColorPicker;
  48. local Spectating;
  49.  
  50. -- if not PROTOSMASHER_LOADED then Drawing.UseCompatTransparency = true; end -- For Elysian
  51.  
  52. shared.MenuDrawingData = shared.MenuDrawingData or { Instances = {} };
  53. shared.InstanceData = shared.InstanceData or {};
  54. shared.RSName = shared.RSName or ('UnnamedESP_by_ic3-' .. HttpService:GenerateGUID(false));
  55.  
  56. local GetDataName = shared.RSName .. '-GetData';
  57. local UpdateName = shared.RSName .. '-Update';
  58.  
  59. local Debounce = setmetatable({}, {
  60. __index = function(t, i)
  61. return rawget(t, i) or false
  62. end;
  63. });
  64.  
  65. if shared.UESP_InputChangedCon then pcall(function() shared.UESP_InputChangedCon:disconnect() end); end
  66. if shared.UESP_InputBeganCon then pcall(function() shared.UESP_InputBeganCon:disconnect() end); end
  67. if shared.UESP_InputEndedCon then pcall(function() shared.UESP_InputEndedCon:disconnect() end); end
  68. if shared.CurrentColorPicker then shared.CurrentColorPicker:Dispose(); end
  69.  
  70. local RealPrint, LastPrintTick = print, 0;
  71. local LatestPrints = setmetatable({}, {
  72. __index = function(t, i)
  73. return rawget(t, i) or 0;
  74. end
  75. });
  76.  
  77. local function print(...)
  78. local Content = unpack{...};
  79. local print = RealPrint;
  80.  
  81. if tick() - LatestPrints[Content] > 5 then
  82. LatestPrints[Content] = tick();
  83. print(Content);
  84. end
  85. end
  86.  
  87. local function FromHex(HEX)
  88. HEX = HEX:gsub('#', '');
  89. return Color3.fromRGB(tonumber('0x' .. HEX:sub(1, 2)), tonumber('0x' .. HEX:sub(3, 4)), tonumber('0x' .. HEX:sub(5, 6)));
  90. end
  91.  
  92. local function IsStringEmpty(String)
  93. if type(String) == 'string' then
  94. return String:match'^%s+$' ~= nil or #String == 0 or String == '' or false;
  95. end
  96. return false
  97. end
  98.  
  99. local function Set(t, i, v)
  100. t[i] = v;
  101. end
  102.  
  103. local Teams = {};
  104. local CustomTeams = { -- Games that don't use roblox's team system
  105. [2563455047] = {
  106. Initialize = function()
  107. Teams.Sheriffs = {}; -- prevent big error
  108. Teams.Bandits = {}; -- prevent big error
  109. local Func = game:GetService'ReplicatedStorage':WaitForChild('RogueFunc', 1);
  110. local Event = game:GetService'ReplicatedStorage':WaitForChild('RogueEvent', 1);
  111. local S, B = Func:InvokeServer'AllTeamData';
  112.  
  113. Teams.Sheriffs = S;
  114. Teams.Bandits = B;
  115.  
  116. Event.OnClientEvent:connect(function(id, PlayerName, Team, Remove) -- stolen straight from decompiled src lul
  117. if id == 'UpdateTeam' then
  118. local TeamTable, NotTeamTable
  119. if Team == 'Bandits' then
  120. TeamTable = TDM.Bandits
  121. NotTeamTable = TDM.Sheriffs
  122. else
  123. TeamTable = TDM.Sheriffs
  124. NotTeamTable = TDM.Bandits
  125. end
  126. if Remove then
  127. TeamTable[PlayerName] = nil
  128. else
  129. TeamTable[PlayerName] = true
  130. NotTeamTable[PlayerName] = nil
  131. end
  132. if PlayerName == LocalPlayer.Name then
  133. TDM.Friendlys = TeamTable
  134. TDM.Enemies = NotTeamTable
  135. end
  136. end
  137. end)
  138. end;
  139. CheckTeam = function(Player)
  140. local LocalTeam = Teams.Sheriffs[LocalPlayer.Name] and Teams.Sheriffs or Teams.Bandits;
  141.  
  142. return LocalTeam[Player.Name] and true or false;
  143. end;
  144. };
  145. [3016661674] = {
  146. CheckTeam = function(Player)
  147. local LocalStats = LocalPlayer:FindFirstChild'leaderstats';
  148. local LocalLastName = LocalStats and LocalStats:FindFirstChild'LastName'; if not LocalLastName or IsStringEmpty(LocalLastName.Value) then return true; end
  149. local PlayerStats = Player:FindFirstChild'leaderstats';
  150. local PlayerLastName = PlayerStats and PlayerStats:FindFirstChild'LastName'; if not PlayerLastName then return false; end
  151.  
  152. return PlayerLastName.Value == LocalLastName.Value;
  153. end;
  154. };
  155. };
  156.  
  157. CustomTeams[5208655184] = CustomTeams[3016661674]; -- rogue gaia
  158. CustomTeams[3541987450] = CustomTeams[3016661674]; -- rogue khei
  159.  
  160. local RenderList = {Instances = {}};
  161.  
  162. function RenderList:AddOrUpdateInstance(Instance, Obj2Draw, Text, Color)
  163. RenderList.Instances[Instance] = { ParentInstance = Instance; Instance = Obj2Draw; Text = Text; Color = Color };
  164. return RenderList.Instances[Instance];
  165. end
  166.  
  167. local CustomPlayerTag;
  168. local CustomESP;
  169. local CustomCharacter;
  170.  
  171. local Modules = {
  172. [292439477] = {
  173. CustomESP = function()
  174. if not shared.PF_Replication then
  175. for i, v in pairs(getgc(true)) do
  176. if typeof(v) == 'table' and rawget(v, 'getbodyparts') then
  177. shared.PF_Replication = v;
  178. break;
  179. end
  180. end
  181. else
  182. for Index, Player in pairs(Players:GetPlayers()) do
  183. if Player == LocalPlayer then continue end
  184.  
  185. local Body = shared.PF_Replication.getbodyparts(Player);
  186.  
  187. if Body and typeof(Body) == 'table' and rawget(Body, 'rootpart') then
  188. Player.Character = Body.rootpart.Parent;
  189. else
  190. Player.Character = nil;
  191. end
  192. end
  193. end
  194. end
  195. };
  196. [2950983942] = {
  197. CustomCharacter = function(Player)
  198. if workspace:FindFirstChild'Players' then
  199. return workspace.Players:FindFirstChild(Player.Name);
  200. end
  201. end
  202. };
  203. [2262441883] = {
  204. CustomPlayerTag = function(Player)
  205. return Player:FindFirstChild'Job' and (' [' .. Player.Job.Value .. ']') or '';
  206. end;
  207. CustomESP = function()
  208. if workspace:FindFirstChild'MoneyPrinters' then
  209. for i, v in pairs(workspace.MoneyPrinters:GetChildren()) do
  210. local Main = v:FindFirstChild'Main';
  211. local Owner = v:FindFirstChild'TrueOwner';
  212. local Money = v:FindFirstChild'Int' and v.Int:FindFirstChild'Money' or nil;
  213. if Main and Owner and Money then
  214. local O = tostring(Owner.Value);
  215. local M = tostring(Money.Value);
  216.  
  217. pcall(RenderList.AddOrUpdateInstance, RenderList, v, Main, string.format('Money Printer\nOwned by %s\n[%s]', O, M), Color3.fromRGB(13, 255, 227));
  218. end
  219. end
  220. end
  221. end;
  222. };
  223. [4801598506] = {
  224. CustomESP = function()
  225. if workspace:FindFirstChild'Mobs' and workspace.Mobs:FindFirstChild'Forest1' then
  226. for i, v in pairs(workspace.Mobs.Forest1:GetChildren()) do
  227. local Main = v:FindFirstChild'Head';
  228. local Hum = v:FindFirstChild'Mob';
  229.  
  230. if Main and Hum then
  231. pcall(RenderList.AddOrUpdateInstance, RenderList, v, Main, string.format('[%s] [%s/%s]', v.Name, Hum.Health, Hum.MaxHealth), Color3.fromRGB(13, 255, 227));
  232. end
  233. end
  234. end
  235. end;
  236. };
  237. [3016661674] = {
  238. CustomPlayerTag = function(Player)
  239. local Name = '';
  240.  
  241. if Player:FindFirstChild'leaderstats' then
  242. local Prefix = '';
  243. local Extra = {};
  244. Name = Name .. '\n[';
  245.  
  246. if Player.leaderstats:FindFirstChild'Prestige' and Player.leaderstats.Prestige.ClassName == 'IntValue' and Player.leaderstats.Prestige.Value > 0 then
  247. Name = Name .. '#' .. tostring(Player.leaderstats.Prestige.Value) .. ' ';
  248. end
  249. if Player.leaderstats:FindFirstChild'HouseRank' and Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.HouseRank.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.HouseRank.Value) then
  250. Prefix = Player.leaderstats.HouseRank.Value == 'Owner' and (Player.leaderstats.Gender.Value == 'Female' and 'Lady ' or 'Lord ') or '';
  251. end
  252. if Player.leaderstats:FindFirstChild'FirstName' and Player.leaderstats.FirstName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.FirstName.Value) then
  253. Name = Name .. '' .. Prefix .. Player.leaderstats.FirstName.Value;
  254. end
  255. if Player.leaderstats:FindFirstChild'LastName' and Player.leaderstats.LastName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.LastName.Value) then
  256. Name = Name .. ' ' .. Player.leaderstats.LastName.Value;
  257. end
  258.  
  259. if not IsStringEmpty(Name) then Name = Name .. ']'; end
  260.  
  261. local Character = GetCharacter(Player);
  262.  
  263. if Character then
  264. if Character and Character:FindFirstChild'Danger' then table.insert(Extra, 'D'); end
  265. if Character:FindFirstChild'ManaAbilities' and Character.ManaAbilities:FindFirstChild'ManaSprint' then table.insert(Extra, 'D1'); end
  266.  
  267. if Character:FindFirstChild'Mana' then table.insert(Extra, 'M' .. math.floor(Character.Mana.Value)); end
  268. if Character:FindFirstChild'Vampirism' then table.insert(Extra, 'V'); end
  269. if Character:FindFirstChild'Observe' then table.insert(Extra, 'ILL'); end
  270. if Character:FindFirstChild'Inferi' then table.insert(Extra, 'NEC'); end
  271. if Character:FindFirstChild'World\'s Pulse' then table.insert(Extra, 'DZIN'); end
  272. if Character:FindFirstChild'Shift' then table.insert(Extra, 'MAD'); end
  273. if Character:FindFirstChild'Head' and Character.Head:FindFirstChild'FacialMarking' then
  274. local FM = Character.Head:FindFirstChild'FacialMarking';
  275. if FM.Texture == 'http://www.roblox.com/asset/?id=4072968006' then
  276. table.insert(Extra, 'HEALER');
  277. elseif FM.Texture == 'http://www.roblox.com/asset/?id=4072914434' then
  278. table.insert(Extra, 'SEER');
  279. elseif FM.Texture == 'http://www.roblox.com/asset/?id=4094417635' then
  280. table.insert(Extra, 'JESTER');
  281. end
  282. end
  283. end
  284. if Player:FindFirstChild'Backpack' then
  285. if Player.Backpack:FindFirstChild'Observe' then table.insert(Extra, 'ILL'); end
  286. if Player.Backpack:FindFirstChild'Inferi' then table.insert(Extra, 'NEC'); end
  287. if Player.Backpack:FindFirstChild'World\'s Pulse' then table.insert(Extra, 'DZIN'); end
  288. if Player.Backpack:FindFirstChild'Shift' then table.insert(Extra, 'MAD'); end
  289. end
  290.  
  291. if #Extra > 0 then Name = Name .. ' [' .. table.concat(Extra, '-') .. ']'; end
  292. end
  293.  
  294. return Name;
  295. end;
  296. };
  297. [3541987450] = {
  298. CustomPlayerTag = function(Player)
  299. local Name = '';
  300.  
  301. if Player:FindFirstChild'leaderstats' then
  302. Name = Name .. '\n[';
  303. local Prefix = '';
  304. local Extra = {};
  305. if Player.leaderstats:FindFirstChild'Prestige' and Player.leaderstats.Prestige.ClassName == 'IntValue' and Player.leaderstats.Prestige.Value > 0 then
  306. Name = Name .. '#' .. tostring(Player.leaderstats.Prestige.Value) .. ' ';
  307. end
  308. if Player.leaderstats:FindFirstChild'HouseRank' and Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.HouseRank.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.HouseRank.Value) then
  309. Prefix = Player.leaderstats.HouseRank.Value == 'Owner' and (Player.leaderstats.Gender.Value == 'Female' and 'Lady ' or 'Lord ') or '';
  310. end
  311. if Player.leaderstats:FindFirstChild'FirstName' and Player.leaderstats.FirstName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.FirstName.Value) then
  312. Name = Name .. '' .. Prefix .. Player.leaderstats.FirstName.Value;
  313. end
  314. if Player.leaderstats:FindFirstChild'LastName' and Player.leaderstats.LastName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.LastName.Value) then
  315. Name = Name .. ' ' .. Player.leaderstats.LastName.Value;
  316. end
  317. if Player.leaderstats:FindFirstChild'UberTitle' and Player.leaderstats.UberTitle.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.UberTitle.Value) then
  318. Name = Name .. ', ' .. Player.leaderstats.UberTitle.Value;
  319. end
  320.  
  321. if not IsStringEmpty(Name) then Name = Name .. ']'; end
  322.  
  323. local Character = GetCharacter(Player);
  324.  
  325. if Character then
  326. if Character and Character:FindFirstChild'Danger' then table.insert(Extra, 'D'); end
  327. if Character:FindFirstChild'ManaAbilities' and Character.ManaAbilities:FindFirstChild'ManaSprint' then table.insert(Extra, 'D1'); end
  328.  
  329. if Character:FindFirstChild'Mana' then table.insert(Extra, 'M' .. math.floor(Character.Mana.Value)); end
  330. if Character:FindFirstChild'Vampirism' then table.insert(Extra, 'V'); end
  331. if Character:FindFirstChild'Observe' then table.insert(Extra, 'ILL'); end
  332. if Character:FindFirstChild'Inferi' then table.insert(Extra, 'NEC'); end
  333.  
  334. if Character:FindFirstChild'World\'s Pulse' then table.insert(Extra, 'DZIN'); end
  335. if Character:FindFirstChild'Head' and Character.Head:FindFirstChild'FacialMarking' then
  336. local FM = Character.Head:FindFirstChild'FacialMarking';
  337. if FM.Texture == 'http://www.roblox.com/asset/?id=4072968006' then
  338. table.insert(Extra, 'HEALER');
  339. elseif FM.Texture == 'http://www.roblox.com/asset/?id=4072914434' then
  340. table.insert(Extra, 'SEER');
  341. elseif FM.Texture == 'http://www.roblox.com/asset/?id=4094417635' then
  342. table.insert(Extra, 'JESTER');
  343. end
  344. end
  345. end
  346. if Player:FindFirstChild'Backpack' then
  347. if Player.Backpack:FindFirstChild'Observe' then table.insert(Extra, 'ILL'); end
  348. if Player.Backpack:FindFirstChild'Inferi' then table.insert(Extra, 'NEC'); end
  349. if Player.Backpack:FindFirstChild'World\'s Pulse' then table.insert(Extra, 'DZIN'); end
  350. end
  351.  
  352. if #Extra > 0 then Name = Name .. ' [' .. table.concat(Extra, '-') .. ']'; end
  353. end
  354.  
  355. return Name;
  356. end;
  357. };
  358. };
  359.  
  360. Modules[5208655184] = Modules[3016661674]; -- rogue gaia
  361. Modules[3541987450] = Modules[3016661674]; -- rogue khei
  362.  
  363. if Modules[game.PlaceId] ~= nil then
  364. local Module = Modules[game.PlaceId];
  365. CustomPlayerTag = Module.CustomPlayerTag or nil;
  366. CustomESP = Module.CustomESP or nil;
  367. CustomCharacter = Module.CustomCharacter or nil;
  368. end
  369.  
  370. function GetCharacter(Player)
  371. return Player.Character or (CustomCharacter and CustomCharacter(Player));
  372. end
  373.  
  374. function GetMouseLocation()
  375. return UserInputService:GetMouseLocation();
  376. end
  377.  
  378. function MouseHoveringOver(Values)
  379. local X1, Y1, X2, Y2 = Values[1], Values[2], Values[3], Values[4]
  380. local MLocation = GetMouseLocation();
  381. return (MLocation.x >= X1 and MLocation.x <= (X1 + (X2 - X1))) and (MLocation.y >= Y1 and MLocation.y <= (Y1 + (Y2 - Y1)));
  382. end
  383.  
  384. function GetTableData(t) -- basically table.foreach i dont even know why i made this
  385. if typeof(t) ~= 'table' then return end
  386.  
  387. return setmetatable(t, {
  388. __call = function(t, func)
  389. if typeof(func) ~= 'function' then return end;
  390. for i, v in pairs(t) do
  391. pcall(func, i, v);
  392. end
  393. end;
  394. });
  395. end
  396. local function Format(format, ...)
  397. return string.format(format, ...);
  398. end
  399. function CalculateValue(Min, Max, Percent)
  400. return Min + math.floor(((Max - Min) * Percent) + .5);
  401. end
  402.  
  403. function NewDrawing(InstanceName)
  404. local Instance = Drawing.new(InstanceName);
  405. return (function(Properties)
  406. for i, v in pairs(Properties) do
  407. pcall(Set, Instance, i, v);
  408. end
  409. return Instance;
  410. end)
  411. end
  412.  
  413. function Menu:AddMenuInstance(Name, DrawingType, Properties)
  414. local Instance;
  415.  
  416. if shared.MenuDrawingData.Instances[Name] ~= nil then
  417. Instance = shared.MenuDrawingData.Instances[Name];
  418. for i, v in pairs(Properties) do
  419. pcall(Set, Instance, i, v);
  420. end
  421. else
  422. Instance = NewDrawing(DrawingType)(Properties);
  423. end
  424.  
  425. shared.MenuDrawingData.Instances[Name] = Instance;
  426.  
  427. return Instance;
  428. end
  429. function Menu:UpdateMenuInstance(Name)
  430. local Instance = shared.MenuDrawingData.Instances[Name];
  431. if Instance ~= nil then
  432. return (function(Properties)
  433. for i, v in pairs(Properties) do
  434. pcall(Set, Instance, i, v);
  435. end
  436. return Instance;
  437. end)
  438. end
  439. end
  440. function Menu:GetInstance(Name)
  441. return shared.MenuDrawingData.Instances[Name];
  442. end
  443.  
  444. local Options = setmetatable({}, {
  445. __call = function(t, ...)
  446. local Arguments = {...};
  447. local Name = Arguments[1];
  448. OIndex = OIndex + 1;
  449. rawset(t, Name, setmetatable({
  450. Name = Arguments[1];
  451. Text = Arguments[2];
  452. Value = Arguments[3];
  453. DefaultValue = Arguments[3];
  454. AllArgs = Arguments;
  455. Index = OIndex;
  456. }, {
  457. __call = function(t, v, force)
  458. local self = t;
  459.  
  460. if typeof(t.Value) == 'function' then
  461. t.Value();
  462. elseif typeof(t.Value) == 'EnumItem' then
  463. local BT = Menu:GetInstance(Format('%s_BindText', t.Name));
  464. if not force then
  465. Binding = true;
  466. local Val = 0
  467. while Binding do
  468. wait();
  469. Val = (Val + 1) % 17;
  470. BT.Text = Val <= 8 and '|' or '';
  471. end
  472. end
  473. t.Value = force and v or BindedKey;
  474. if BT and t.BasePosition and t.BaseSize then
  475. BT.Text = tostring(t.Value):match'%w+%.%w+%.(.+)';
  476. BT.Position = t.BasePosition + V2New(t.BaseSize.X - BT.TextBounds.X - 20, -10);
  477. end
  478. else
  479. local NewValue = v;
  480. if NewValue == nil then NewValue = not t.Value; end
  481. rawset(t, 'Value', NewValue);
  482.  
  483. if Arguments[2] ~= nil and Menu:GetInstance'TopBar'.Visible then
  484. if typeof(Arguments[3]) == 'number' then
  485. local AMT = Menu:GetInstance(Format('%s_AmountText', t.Name));
  486. if AMT then
  487. AMT.Text = tostring(t.Value);
  488. end
  489. else
  490. local Inner = Menu:GetInstance(Format('%s_InnerCircle', t.Name));
  491. if Inner then Inner.Visible = t.Value; end
  492. end
  493. end
  494. end
  495. end;
  496. }));
  497. end;
  498. })
  499.  
  500. function Load()
  501. local _, Result = pcall(readfile, OptionsFile);
  502.  
  503. if _ then -- extremely ugly code yea i know but i dont care p.s. i hate pcall
  504. local _, Table = pcall(HttpService.JSONDecode, HttpService, Result);
  505. if _ and typeof(Table) == 'table' then
  506. for i, v in pairs(Table) do
  507. if typeof(Options[i]) == 'table' and Options[i].Value ~= nil and (typeof(Options[i].Value) == 'boolean' or typeof(Options[i].Value) == 'number') then
  508. Options[i].Value = v.Value;
  509. pcall(Options[i], v.Value);
  510. end
  511. end
  512.  
  513. if Table.TeamColor then TeamColor = Color3.new(Table.TeamColor.R, Table.TeamColor.G, Table.TeamColor.B) end
  514. if Table.EnemyColor then EnemyColor = Color3.new(Table.EnemyColor.R, Table.EnemyColor.G, Table.EnemyColor.B) end
  515.  
  516. if typeof(Table.MenuKey) == 'string' then Options.MenuKey(Enum.KeyCode[Table.MenuKey], true) end
  517. if typeof(Table.ToggleKey) == 'string' then Options.ToggleKey(Enum.KeyCode[Table.ToggleKey], true) end
  518. end
  519. end
  520. end
  521.  
  522. Options('Enabled', 'ESP Enabled', true);
  523. Options('ShowTeam', 'Show Team', true);
  524. Options('ShowTeamColor', 'Show Team Color', false);
  525. Options('ShowName', 'Show Names', true);
  526. Options('ShowDistance', 'Show Distance', true);
  527. Options('ShowHealth', 'Show Health', true);
  528. Options('ShowBoxes', 'Show Boxes', true);
  529. Options('ShowTracers', 'Show Tracers', true);
  530. Options('ShowDot', 'Show Head Dot', false);
  531. Options('VisCheck', 'Visibility Check', false);
  532. Options('Crosshair', 'Crosshair', false);
  533. Options('TextOutline', 'Text Outline', true);
  534. -- Options('Rainbow', 'Rainbow Mode', false);
  535. Options('TextSize', 'Text Size', syn and 18 or 14, 10, 24); -- cuz synapse fonts look weird???
  536. Options('MaxDistance', 'Max Distance', 2500, 100, 25000);
  537. Options('RefreshRate', 'Refresh Rate (ms)', 5, 1, 200);
  538. Options('YOffset', 'Y Offset', 0, -200, 200);
  539. Options('MenuKey', 'Menu Key', Enum.KeyCode.F4, 1);
  540. Options('ToggleKey', 'Toggle Key', Enum.KeyCode.F3, 1);
  541. Options('ChangeColors', SENTINEL_LOADED and 'Sentinel Unsupported' or 'Change Colors', function()
  542. if SENTINEL_LOADED then return end
  543.  
  544. SubMenu:Show(GetMouseLocation(), 'Unnamed Colors', {
  545. {
  546. Type = 'Color'; Text = 'Team Color'; Color = TeamColor;
  547.  
  548. Function = function(Circ, Position)
  549. if tick() - ColorPicker.LastGenerated < 1 then return; end
  550.  
  551. if shared.CurrentColorPicker then shared.CurrentColorPicker:Dispose() end
  552. local ColorPicker = ColorPicker.new(Position - V2New(-10, 50));
  553. CurrentColorPicker = ColorPicker;
  554. shared.CurrentColorPicker = CurrentColorPicker;
  555. ColorPicker.ColorChanged:Connect(function(Color) Circ.Color = Color TeamColor = Color Options.TeamColor = Color end);
  556. end
  557. };
  558. {
  559. Type = 'Color'; Text = 'Enemy Color'; Color = EnemyColor;
  560.  
  561. Function = function(Circ, Position)
  562. if tick() - ColorPicker.LastGenerated < 1 then return; end
  563.  
  564. if shared.CurrentColorPicker then shared.CurrentColorPicker:Dispose() end
  565. local ColorPicker = ColorPicker.new(Position - V2New(-10, 50));
  566. CurrentColorPicker = ColorPicker;
  567. shared.CurrentColorPicker = CurrentColorPicker;
  568. ColorPicker.ColorChanged:Connect(function(Color) Circ.Color = Color EnemyColor = Color Options.EnemyColor = Color end);
  569. end
  570. };
  571. {
  572. Type = 'Button'; Text = 'Reset Colors';
  573.  
  574. Function = function()
  575. EnemyColor = Color3.new(1, 0, 0);
  576. TeamColor = Color3.new(0, 1, 0);
  577.  
  578. local C1 = Menu:GetInstance'Sub-ColorPreview.1'; if C1 then C1.Color = TeamColor end
  579. local C2 = Menu:GetInstance'Sub-ColorPreview.2'; if C2 then C2.Color = EnemyColor end
  580. end
  581. };
  582. {
  583. Type = 'Button'; Text = 'Rainbow Mode';
  584.  
  585. Function = function()
  586. Rainbow = not Rainbow;
  587. end
  588. };
  589. });
  590. end, 2);
  591. Options('ResetSettings', 'Reset Settings', function()
  592. for i, v in pairs(Options) do
  593. if Options[i] ~= nil and Options[i].Value ~= nil and Options[i].Text ~= nil and (typeof(Options[i].Value) == 'boolean' or typeof(Options[i].Value) == 'number' or typeof(Options[i].Value) == 'EnumItem') then
  594. Options[i](Options[i].DefaultValue, true);
  595. end
  596. end
  597. end, 5);
  598. Options('LoadSettings', 'Load Settings', Load, 4);
  599. Options('SaveSettings', 'Save Settings', function()
  600. local COptions = {};
  601.  
  602. for i, v in pairs(Options) do
  603. COptions[i] = v;
  604. end
  605.  
  606. if typeof(COptions.TeamColor) == 'Color3' then COptions.TeamColor = { R = COptions.TeamColor.R; G = COptions.TeamColor.G; B = COptions.TeamColor.B } end
  607. if typeof(COptions.EnemyColor) == 'Color3' then COptions.EnemyColor = { R = COptions.EnemyColor.R; G = COptions.EnemyColor.G; B = COptions.EnemyColor.B } end
  608.  
  609. if typeof(COptions.MenuKey.Value) == 'EnumItem' then COptions.MenuKey = COptions.MenuKey.Value.Name end
  610. if typeof(COptions.ToggleKey.Value) == 'EnumItem' then COptions.ToggleKey = COptions.ToggleKey.Value.Name end
  611.  
  612. writefile(OptionsFile, HttpService:JSONEncode(COptions));
  613. end, 3);
  614.  
  615. Load(1);
  616.  
  617. Options('MenuOpen', nil, true);
  618.  
  619. local function Combine(...)
  620. local Output = {};
  621. for i, v in pairs{...} do
  622. if typeof(v) == 'table' then
  623. table.foreach(v, function(i, v)
  624. Output[i] = v;
  625. end)
  626. end
  627. end
  628. return Output
  629. end
  630.  
  631. function LineBox:Create(Properties)
  632. local Box = { Visible = true }; -- prevent errors not really though dont worry bout the Visible = true thing
  633.  
  634. local Properties = Combine({
  635. Transparency = 1;
  636. Thickness = 3;
  637. Visible = true;
  638. }, Properties);
  639.  
  640. if syn then
  641. Box['Quad'] = NewDrawing'Quad'(Properties);
  642. else
  643. Box['TopLeft'] = NewDrawing'Line'(Properties);
  644. Box['TopRight'] = NewDrawing'Line'(Properties);
  645. Box['BottomLeft'] = NewDrawing'Line'(Properties);
  646. Box['BottomRight'] = NewDrawing'Line'(Properties);
  647. end
  648.  
  649. function Box:Update(CF, Size, Color, Properties)
  650. if not CF or not Size then return end
  651.  
  652. local TLPos, Visible1 = WorldToViewport((CF * CFrame.new( Size.X, Size.Y, 0)).p);
  653. local TRPos, Visible2 = WorldToViewport((CF * CFrame.new(-Size.X, Size.Y, 0)).p);
  654. local BLPos, Visible3 = WorldToViewport((CF * CFrame.new( Size.X, -Size.Y, 0)).p);
  655. local BRPos, Visible4 = WorldToViewport((CF * CFrame.new(-Size.X, -Size.Y, 0)).p);
  656.  
  657. local Quad = Box['Quad'];
  658.  
  659. if syn then
  660. if Visible1 and Visible2 and Visible3 and Visible4 then
  661. Quad.Visible = true;
  662. Quad.Color = Color;
  663. Quad.PointA = V2New(TLPos.X, TLPos.Y);
  664. Quad.PointB = V2New(TRPos.X, TRPos.Y);
  665. Quad.PointC = V2New(BRPos.X, BRPos.Y);
  666. Quad.PointD = V2New(BLPos.X, BLPos.Y);
  667. else
  668. Box['Quad'].Visible = false;
  669. end
  670. else
  671. Visible1 = TLPos.Z > 0 -- (commented | reason: random flashes);
  672. Visible2 = TRPos.Z > 0 -- (commented | reason: random flashes);
  673. Visible3 = BLPos.Z > 0 -- (commented | reason: random flashes);
  674. Visible4 = BRPos.Z > 0 -- (commented | reason: random flashes);
  675.  
  676. -- ## BEGIN UGLY CODE
  677. if Visible1 then
  678. Box['TopLeft'].Visible = true;
  679. Box['TopLeft'].Color = Color;
  680. Box['TopLeft'].From = V2New(TLPos.X, TLPos.Y);
  681. Box['TopLeft'].To = V2New(TRPos.X, TRPos.Y);
  682. else
  683. Box['TopLeft'].Visible = false;
  684. end
  685. if Visible2 then
  686. Box['TopRight'].Visible = true;
  687. Box['TopRight'].Color = Color;
  688. Box['TopRight'].From = V2New(TRPos.X, TRPos.Y);
  689. Box['TopRight'].To = V2New(BRPos.X, BRPos.Y);
  690. else
  691. Box['TopRight'].Visible = false;
  692. end
  693. if Visible3 then
  694. Box['BottomLeft'].Visible = true;
  695. Box['BottomLeft'].Color = Color;
  696. Box['BottomLeft'].From = V2New(BLPos.X, BLPos.Y);
  697. Box['BottomLeft'].To = V2New(TLPos.X, TLPos.Y);
  698. else
  699. Box['BottomLeft'].Visible = false;
  700. end
  701. if Visible4 then
  702. Box['BottomRight'].Visible = true;
  703. Box['BottomRight'].Color = Color;
  704. Box['BottomRight'].From = V2New(BRPos.X, BRPos.Y);
  705. Box['BottomRight'].To = V2New(BLPos.X, BLPos.Y);
  706. else
  707. Box['BottomRight'].Visible = false;
  708. end
  709. -- ## END UGLY CODE
  710. if Properties and typeof(Properties) == 'table' then
  711. GetTableData(Properties)(function(i, v)
  712. pcall(Set, Box['TopLeft'], i, v);
  713. pcall(Set, Box['TopRight'], i, v);
  714. pcall(Set, Box['BottomLeft'], i, v);
  715. pcall(Set, Box['BottomRight'], i, v);
  716. end)
  717. end
  718. end
  719. end
  720. function Box:SetVisible(bool)
  721. pcall(Set, Box['Quad'], 'Visible', bool);
  722. -- pcall(Set, Box['TopLeft'], 'Visible', bool);
  723. -- pcall(Set, Box['TopRight'], 'Visible', bool);
  724. -- pcall(Set, Box['BottomLeft'], 'Visible', bool);
  725. -- pcall(Set, Box['BottomRight'], 'Visible', bool);
  726. end
  727. function Box:Remove()
  728. self:SetVisible(false);
  729. Box['Quad']:Remove();
  730. -- Box['TopLeft']:Remove();
  731. -- Box['TopRight']:Remove();
  732. -- Box['BottomLeft']:Remove();
  733. -- Box['BottomRight']:Remove();
  734. end
  735.  
  736. return Box;
  737. end
  738.  
  739. local Colors = {
  740. White = FromHex'ffffff';
  741. Primary = {
  742. Main = FromHex'424242';
  743. Light = FromHex'6d6d6d';
  744. Dark = FromHex'1b1b1b';
  745. };
  746. Secondary = {
  747. Main = FromHex'e0e0e0';
  748. Light = FromHex'ffffff';
  749. Dark = FromHex'aeaeae';
  750. };
  751. };
  752.  
  753. function Connections:Listen(Connection, Function)
  754. local NewConnection = Connection:Connect(Function);
  755. table.insert(self.Active, NewConnection);
  756. return NewConnection;
  757. end
  758.  
  759. function Connections:DisconnectAll()
  760. for Index, Connection in pairs(self.Active) do
  761. if Connection.Connected then
  762. Connection:Disconnect();
  763. end
  764. end
  765.  
  766. self.Active = {};
  767. end
  768.  
  769. function Signal.new()
  770. local self = setmetatable({ _BindableEvent = Instance.new'BindableEvent' }, Signal);
  771.  
  772. return self;
  773. end
  774.  
  775. function Signal:Connect(Callback)
  776. assert(typeof(Callback) == 'function', 'function expected; got ' .. typeof(Callback));
  777.  
  778. return self._BindableEvent.Event:Connect(function(...) Callback(...) end);
  779. end
  780.  
  781. function Signal:Fire(...)
  782. self._BindableEvent:Fire(...);
  783. end
  784.  
  785. function Signal:Wait()
  786. local Arguments = self._BindableEvent:Wait();
  787.  
  788. return Arguments;
  789. end
  790.  
  791. function Signal:Disconnect()
  792. if self._BindableEvent then
  793. self._BindableEvent:Destroy();
  794. end
  795. end
  796.  
  797. local function GetMouseLocation()
  798. return UserInputService:GetMouseLocation();
  799. end
  800.  
  801. local function IsMouseOverDrawing(Drawing, MousePosition)
  802. local TopLeft = Drawing.Position;
  803. local BottomRight = Drawing.Position + Drawing.Size;
  804. local MousePosition = MousePosition or GetMouseLocation();
  805.  
  806. return MousePosition.X > TopLeft.X and MousePosition.Y > TopLeft.Y and MousePosition.X < BottomRight.X and MousePosition.Y < BottomRight.Y;
  807. end
  808.  
  809. local ImageCache = {};
  810.  
  811. local function SetImage(Drawing, Url)
  812. local Data = IsSynapse and game:HttpGet(Url) or Url;
  813.  
  814. Drawing[IsSynapse and 'Data' or 'Uri'] = ImageCache[Url] or Data;
  815. ImageCache[Url] = Data;
  816.  
  817. if not IsSynapse then repeat wait() until Drawing.Loaded; end
  818. end
  819.  
  820. -- oh god unnamed esp needs an entire rewrite, someone make a better one pls im too lazy
  821. -- btw the color picker was made seperately so it doesnt fit with the code of unnamed esp
  822.  
  823. local function CreateDrawingsTable()
  824. local Drawings = { __Objects = {} };
  825. local Metatable = {};
  826.  
  827. function Metatable.__index(self, Index)
  828. local Object = rawget(self.__Objects, Index);
  829.  
  830. if not Object or (IsSynapse and not Object.__SELF.__OBJECT_EXISTS) then
  831. local Type = Index:sub(1, Index:find'-' - 1);
  832.  
  833. Success, Object = pcall(Drawing.new, Type);
  834.  
  835. if not Object or not Success then return function() end; end
  836.  
  837. self.__Objects[Index] = setmetatable({ __SELF = Object; Type = Type }, {
  838. __call = function(self, Properties)
  839. local Object = rawget(self, '__SELF'); if IsSynapse and not Object.__OBJECT_EXISTS then return false, 'render object destroyed'; end
  840.  
  841. if Properties == false then
  842. Object.Visible = false;
  843. Object.Transparency = 0;
  844. Object:Remove();
  845.  
  846. return true;
  847. end
  848.  
  849. if typeof(Properties) == 'table' then
  850. for Property, Value in pairs(Properties) do
  851. local CanSet = true;
  852.  
  853. if self.Type == 'Image' and not IsSynapse and Property == 'Size' and typeof(Value) == 'Vector2' then
  854. CanSet = false;
  855.  
  856. spawn(function()
  857. repeat wait() until Object.Loaded;
  858. if not self.DefaultSize then rawset(self, 'DefaultSize', Object.Size) end
  859.  
  860. Property = 'ScaleFactor';
  861. Value = Value.X / self.DefaultSize.X;
  862.  
  863. Object[Property] = Value
  864. end)
  865. end
  866.  
  867. if CanSet then Object[Property] = Value end
  868. end
  869. end
  870.  
  871. return Object;
  872. end
  873. });
  874.  
  875. Object.Visible = true;
  876. Object.Transparency = 1; -- Transparency is really Opacity with drawing api (1 being visible, 0 being invisible)
  877.  
  878. if Type == 'Text' then
  879. if Drawing.Fonts then Object.Font = Drawing.Fonts.Monospace end
  880. Object.Size = 20;
  881. Object.Color = Color3.new(1, 1, 1);
  882. Object.Center = true;
  883. Object.Outline = true;
  884. elseif Type == 'Square' or Type == 'Rectangle' then
  885. Object.Thickness = 2;
  886. Object.Filled = false;
  887. end
  888.  
  889. return self.__Objects[Index];
  890. end
  891.  
  892. return Object;
  893. end
  894.  
  895. function Metatable.__call(self, Delete, ...)
  896. local Arguments = {Delete, ...};
  897.  
  898. if Delete == false then
  899. for Index, Drawing in pairs(rawget(self, '__Objects')) do
  900. Drawing(false);
  901. end
  902. end
  903. end
  904.  
  905. return setmetatable(Drawings, Metatable);
  906. end
  907.  
  908. local Images = {};
  909.  
  910. spawn(function()
  911. Images.Ring = 'https://i.imgur.com/q4qx26f.png';
  912. Images.Overlay = 'https://i.imgur.com/gOCxbsR.png';
  913. end)
  914.  
  915. function ColorPicker.new(Position, Size, Color)
  916. ColorPicker.LastGenerated = tick();
  917. ColorPicker.Loading = true;
  918.  
  919. local Picker = { Color = Color or Color3.new(1, 1, 1); HSV = { H = 0, S = 1, V = 1 } };
  920. local Drawings = CreateDrawingsTable();
  921. local Position = Position or V2New();
  922. local Size = Size or 150;
  923. local Padding = { 10, 10, 10, 10 };
  924.  
  925. Picker.ColorChanged = Signal.new();
  926.  
  927. local Background = Drawings['Square-Background'] {
  928. Color = Color3.fromRGB(33, 33, 33);
  929. Filled = false;
  930. Visible = false;
  931. Position = Position - V2New(Padding[4], Padding[1]);
  932. Size = V2New(Size, Size) + V2New(Padding[4] + Padding[2], Padding[1] + Padding[3]);
  933. };
  934. local ColorPreview = Drawings['Circle-Preview'] {
  935. Position = Position + (V2New(Size, Size) / 2);
  936. Radius = Size / 2 - 8;
  937. Filled = true;
  938. Thickness = 0;
  939. NumSides = 20;
  940. Color = Color3.new(1, 0, 0);
  941. };
  942. local Main = Drawings['Image-Main'] {
  943. Position = Position;
  944. Size = V2New(Size, Size);
  945. }; SetImage(Main, Images.Ring);
  946. local Preview = Drawings['Square-Preview'] {
  947. Position = Main.Position + (Main.Size / 4.5);
  948. Size = Main.Size / 1.75;
  949. Color = Color3.new(1, 0, 0);
  950. Filled = true;
  951. Thickness = 0;
  952. };
  953. local Overlay = Drawings['Image-Overlay'] {
  954. Position = Preview.Position;
  955. Size = Preview.Size;
  956. Transparency = 1;
  957. }; SetImage(Overlay, Images.Overlay);
  958. local CursorOutline = Drawings['Circle-CursorOutline'] {
  959. Radius = 4;
  960. Thickness = 2;
  961. Filled = false;
  962. Color = Color3.new(0.2, 0.2, 0.2);
  963. Position = V2New(Main.Position.X + Main.Size.X - 10, Main.Position.Y + (Main.Size.Y / 2));
  964. };
  965. local Cursor = Drawings['Circle-Cursor'] {
  966. Radius = 3;
  967. Transparency = 1;
  968. Filled = true;
  969. Color = Color3.new(1, 1, 1);
  970. Position = CursorOutline.Position;
  971. };
  972. local CursorOutline = Drawings['Circle-CursorOutlineSquare'] {
  973. Radius = 4;
  974. Thickness = 2;
  975. Filled = false;
  976. Color = Color3.new(0.2, 0.2, 0.2);
  977. Position = V2New(Preview.Position.X + Preview.Size.X - 2, Preview.Position.Y + 2);
  978. };
  979. Drawings['Circle-CursorSquare'] {
  980. Radius = 3;
  981. Transparency = 1;
  982. Filled = true;
  983. Color = Color3.new(1, 1, 1);
  984. Position = CursorOutline.Position;
  985. };
  986.  
  987. function Picker:UpdatePosition(Input)
  988. local MousePosition = V2New(Input.Position.X, Input.Position.Y + 33);
  989.  
  990. if self.MouseHeld then
  991. if self.Item == 'Ring' then
  992. local Main = self.Drawings['Image-Main'] ();
  993. local Preview = self.Drawings['Square-Preview'] ();
  994. local Bounds = Main.Size / 2;
  995. local Center = Main.Position + Bounds;
  996. local Relative = MousePosition - Center;
  997. local Direction = Relative.unit;
  998. local Position = Center + Direction * Main.Size.X / 2.15;
  999. local H = (math.atan2(Position.Y - Center.Y, Position.X - Center.X)) * 60;
  1000. if H < 0 then H = 360 + H; end
  1001. H = H / 360;
  1002. self.HSV.H = H;
  1003. local EndColor = Color3.fromHSV(H, self.HSV.S, self.HSV.V); if EndColor ~= self.Color then self.ColorChanged:Fire(self.Color); end
  1004. local Pointer = self.Drawings['Circle-Cursor'] { Position = Position };
  1005. self.Drawings['Circle-CursorOutline'] { Position = Pointer.Position };
  1006. Bounds = Bounds * 2;
  1007. Preview.Color = Color3.fromHSV(H, 1, 1);
  1008. self.Color = EndColor;
  1009. self.Drawings['Circle-Preview'] { Color = EndColor };
  1010. elseif self.Item == 'HL' then
  1011. local Preview = self.Drawings['Square-Preview'] ();
  1012. local HSV = self.HSV;
  1013. local Position = V2New(math.clamp(MousePosition.X, Preview.Position.X, Preview.Position.X + Preview.Size.X), math.clamp(MousePosition.Y, Preview.Position.Y, Preview.Position.Y + Preview.Size.Y));
  1014. HSV.S = (Position.X - Preview.Position.X) / Preview.Size.X;
  1015. HSV.V = 1 - (Position.Y - Preview.Position.Y) / Preview.Size.Y;
  1016. local EndColor = Color3.fromHSV(HSV.H, HSV.S, HSV.V); if EndColor ~= self.Color then self.ColorChanged:Fire(self.Color); end
  1017. self.Color = EndColor;
  1018. self.Drawings['Circle-Preview'] { Color = EndColor };
  1019. local Pointer = self.Drawings['Circle-CursorSquare'] { Position = Position };
  1020. self.Drawings['Circle-CursorOutlineSquare'] { Position = Pointer.Position };
  1021. end
  1022. end
  1023. end
  1024.  
  1025. function Picker:HandleInput(Input, P, Type)
  1026. if Type == 'Began' then
  1027. if Input.UserInputType.Name == 'MouseButton1' then
  1028. local Main = self.Drawings['Image-Main'] ();
  1029. local SquareSV = self.Drawings['Square-Preview'] ();
  1030. local MousePosition = V2New(Input.Position.X, Input.Position.Y + 33);
  1031. self.MouseHeld = true;
  1032. local Bounds = Main.Size / 2;
  1033. local Center = Main.Position + Bounds;
  1034. local R = (MousePosition - Center);
  1035.  
  1036. if R.magnitude < Bounds.X and R.Magnitude > Bounds.X - 20 then
  1037. self.Item = 'Ring';
  1038. end
  1039.  
  1040. if MousePosition.X > SquareSV.Position.X and MousePosition.Y > SquareSV.Position.Y and MousePosition.X < SquareSV.Position.X + SquareSV.Size.X and MousePosition.Y < SquareSV.Position.Y + SquareSV.Size.Y then
  1041. self.Item = 'HL';
  1042. end
  1043.  
  1044. self:UpdatePosition(Input, P);
  1045. end
  1046. elseif Type == 'Changed' then
  1047. if Input.UserInputType.Name == 'MouseMovement' then
  1048. self:UpdatePosition(Input, P);
  1049. end
  1050. elseif Type == 'Ended' and Input.UserInputType.Name == 'MouseButton1' then
  1051. self.Item = nil;
  1052. end
  1053. end
  1054.  
  1055. function Picker:Dispose()
  1056. self.Drawings(false);
  1057. self.UpdatePosition = nil;
  1058. self.HandleInput = nil;
  1059. Connections:DisconnectAll(); -- scuffed tbh
  1060. end
  1061.  
  1062. Connections:Listen(UserInputService.InputBegan, function(Input, Process)
  1063. Picker:HandleInput(Input, Process, 'Began');
  1064. end);
  1065. Connections:Listen(UserInputService.InputChanged, function(Input, Process)
  1066. if Input.UserInputType.Name == 'MouseMovement' then
  1067. local MousePosition = V2New(Input.Position.X, Input.Position.Y + 33);
  1068. local Cursor = Picker.Drawings['Triangle-Cursor'] {
  1069. Filled = true;
  1070. Color = Color3.new(0.9, 0.9, 0.9);
  1071. PointA = MousePosition + V2New(0, 0);
  1072. PointB = MousePosition + V2New(12, 14);
  1073. PointC = MousePosition + V2New(0, 18);
  1074. Thickness = 0;
  1075. };
  1076. end
  1077. Picker:HandleInput(Input, Process, 'Changed');
  1078. end);
  1079. Connections:Listen(UserInputService.InputEnded, function(Input, Process)
  1080. Picker:HandleInput(Input, Process, 'Ended');
  1081.  
  1082. if Input.UserInputType.Name == 'MouseButton1' then
  1083. Picker.MouseHeld = false;
  1084. end
  1085. end);
  1086.  
  1087. ColorPicker.Loading = false;
  1088.  
  1089. Picker.Drawings = Drawings;
  1090. return Picker;
  1091. end
  1092.  
  1093. function SubMenu:Show(Position, Title, Options)
  1094. self.Open = true;
  1095.  
  1096. local Visible = true;
  1097. local BasePosition = Position;
  1098. local BaseSize = V2New(200, 140);
  1099. local End = BasePosition + BaseSize;
  1100.  
  1101. self.Bounds = { BasePosition.X, BasePosition.Y, End.X, End.Y };
  1102.  
  1103. delay(.025, function()
  1104. if not self.Open then return; end
  1105.  
  1106. Menu:AddMenuInstance('Sub-Main', 'Square', {
  1107. Size = BaseSize;
  1108. Position = BasePosition;
  1109. Filled = false;
  1110. Color = Colors.Primary.Main;
  1111. Thickness = 3;
  1112. Visible = Visible;
  1113. });
  1114. end);
  1115. Menu:AddMenuInstance('Sub-TopBar', 'Square', {
  1116. Position = BasePosition;
  1117. Size = V2New(BaseSize.X, 10);
  1118. Color = Colors.Primary.Dark;
  1119. Filled = true;
  1120. Visible = Visible;
  1121. });
  1122. Menu:AddMenuInstance('Sub-TopBarTwo', 'Square', {
  1123. Position = BasePosition + V2New(0, 10);
  1124. Size = V2New(BaseSize.X, 20);
  1125. Color = Colors.Primary.Main;
  1126. Filled = true;
  1127. Visible = Visible;
  1128. });
  1129. Menu:AddMenuInstance('Sub-TopBarText', 'Text', {
  1130. Size = 20;
  1131. Position = shared.MenuDrawingData.Instances['Sub-TopBarTwo'].Position + V2New(15, -3);
  1132. Text = Title or '';
  1133. Color = Colors.Secondary.Light;
  1134. Visible = Visible;
  1135. });
  1136. Menu:AddMenuInstance('Sub-Filling', 'Square', {
  1137. Size = BaseSize - V2New(0, 30);
  1138. Position = BasePosition + V2New(0, 30);
  1139. Filled = true;
  1140. Color = Colors.Secondary.Main;
  1141. Transparency= .75;
  1142. Visible = Visible;
  1143. });
  1144.  
  1145. if Options then
  1146. for Index, Option in pairs(Options) do -- currently only supports color and button(but color is a button so), planning on fully rewriting or something
  1147. local function GetName(Name) return ('Sub-%s.%d'):format(Name, Index) end
  1148. local Position = shared.MenuDrawingData.Instances['Sub-Filling'].Position + V2New(20, Index * 25 - 10);
  1149. -- local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + V2New(30, v.Index * 25 - 10);
  1150.  
  1151. if Option.Type == 'Color' then
  1152. local ColorPreview = Menu:AddMenuInstance(GetName'ColorPreview', 'Circle', {
  1153. Position = Position;
  1154. Color = Option.Color;
  1155. Radius = IsSynapse and 10 or 10;
  1156. NumSides = 10;
  1157. Filled = true;
  1158. Visible = true;
  1159. });
  1160. local Text = Menu:AddMenuInstance(GetName'Text', 'Text', {
  1161. Text = Option.Text;
  1162. Position = ColorPreview.Position + V2New(15, -8);
  1163. Size = 16;
  1164. Color = Colors.Primary.Dark;
  1165. Visible = true;
  1166. });
  1167. UIButtons[#UIButtons + 1] = {
  1168. FromSubMenu = true;
  1169. Option = function() return Option.Function(ColorPreview, BasePosition + V2New(BaseSize.X, 0)) end;
  1170. Instance = Menu:AddMenuInstance(Format('%s_Hitbox', GetName'Button'), 'Square', {
  1171. Position = Position - V2New(20, 12);
  1172. Size = V2New(BaseSize.X, 25);
  1173. Visible = false;
  1174. });
  1175. };
  1176. elseif Option.Type == 'Button' then
  1177. UIButtons[#UIButtons + 1] = {
  1178. FromSubMenu = true;
  1179. Option = Option.Function;
  1180. Instance = Menu:AddMenuInstance(Format('%s_Hitbox', GetName'Button'), 'Square', {
  1181. Size = V2New(BaseSize.X, 20) - V2New(20, 0);
  1182. Visible = true;
  1183. Transparency= .5;
  1184. Position = Position - V2New(10, 10);
  1185. Color = Colors.Secondary.Light;
  1186. Filled = true;
  1187. });
  1188. };
  1189. local Text = Menu:AddMenuInstance(Format('%s_Text', GetName'Text'), 'Text', {
  1190. Text = Option.Text;
  1191. Size = 18;
  1192. Position = Position + V2New(5, -10);
  1193. Visible = true;
  1194. Color = Colors.Primary.Dark;
  1195. });
  1196. end
  1197. end
  1198. end
  1199. end
  1200.  
  1201. function SubMenu:Hide()
  1202. self.Open = false;
  1203.  
  1204. for i, v in pairs(shared.MenuDrawingData.Instances) do
  1205. if i:sub(1, 3) == 'Sub' then
  1206. v.Visible = false;
  1207.  
  1208. if i:sub(4, 4) == ':' then -- ';' = Temporary so remove
  1209. v:Remove();
  1210. shared.MenuDrawingData.Instance[i] = nil;
  1211. end
  1212. end
  1213. end
  1214.  
  1215. for i, Button in pairs(UIButtons) do
  1216. if Button.FromSubMenu then
  1217. UIButtons[i] = nil;
  1218. end
  1219. end
  1220.  
  1221. spawn(function() -- stupid bug happens if i dont use this
  1222. for i = 1, 10 do
  1223. if shared.CurrentColorPicker then -- dont know why 'CurrentColorPicker' isnt a variable in this
  1224. shared.CurrentColorPicker:Dispose();
  1225. end
  1226. wait(0.1);
  1227. end
  1228. end)
  1229.  
  1230. CurrentColorPicker = nil;
  1231. end
  1232.  
  1233. function CreateMenu(NewPosition) -- Create Menu
  1234. MenuLoaded = false;
  1235. UIButtons = {};
  1236. Sliders = {};
  1237.  
  1238. local BaseSize = V2New(300, 625);
  1239. local BasePosition = NewPosition or V2New(Camera.ViewportSize.X / 8 - (BaseSize.X / 2), Camera.ViewportSize.Y / 2 - (BaseSize.Y / 2));
  1240.  
  1241. BasePosition = V2New(math.clamp(BasePosition.X, 0, Camera.ViewportSize.X), math.clamp(BasePosition.Y, 0, Camera.ViewportSize.Y));
  1242.  
  1243. Menu:AddMenuInstance('CrosshairX', 'Line', {
  1244. Visible = false;
  1245. Color = Color3.new(0, 1, 0);
  1246. Transparency = 1;
  1247. Thickness = 1;
  1248. });
  1249. Menu:AddMenuInstance('CrosshairY', 'Line', {
  1250. Visible = false;
  1251. Color = Color3.new(0, 1, 0);
  1252. Transparency = 1;
  1253. Thickness = 1;
  1254. });
  1255.  
  1256. delay(.025, function() -- since zindex doesnt exist
  1257. Menu:AddMenuInstance('Main', 'Square', {
  1258. Size = BaseSize;
  1259. Position = BasePosition;
  1260. Filled = false;
  1261. Color = Colors.Primary.Main;
  1262. Thickness = 3;
  1263. Visible = true;
  1264. });
  1265. end);
  1266. Menu:AddMenuInstance('TopBar', 'Square', {
  1267. Position = BasePosition;
  1268. Size = V2New(BaseSize.X, 15);
  1269. Color = Colors.Primary.Dark;
  1270. Filled = true;
  1271. Visible = true;
  1272. });
  1273. Menu:AddMenuInstance('TopBarTwo', 'Square', {
  1274. Position = BasePosition + V2New(0, 15);
  1275. Size = V2New(BaseSize.X, 45);
  1276. Color = Colors.Primary.Main;
  1277. Filled = true;
  1278. Visible = true;
  1279. });
  1280. Menu:AddMenuInstance('TopBarText', 'Text', {
  1281. Size = 25;
  1282. Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + V2New(25, 10);
  1283. Text = 'Unnamed ESP';
  1284. Color = Colors.Secondary.Light;
  1285. Visible = true;
  1286. Transparency= 1; -- proto outline fix
  1287. Outline = true;
  1288. });
  1289. Menu:AddMenuInstance('TopBarTextBR', 'Text', {
  1290. Size = 18;
  1291. Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + V2New(BaseSize.X - 75, 25);
  1292. Text = 'by ic3w0lf';
  1293. Color = Colors.Secondary.Light;
  1294. Visible = true;
  1295. Transparency= 1;
  1296. Outline = true;
  1297. });
  1298. Menu:AddMenuInstance('Filling', 'Square', {
  1299. Size = BaseSize - V2New(0, 60);
  1300. Position = BasePosition + V2New(0, 60);
  1301. Filled = true;
  1302. Color = Colors.Secondary.Main;
  1303. Transparency= .5;
  1304. Visible = true;
  1305. });
  1306.  
  1307. local CPos = 0;
  1308.  
  1309. GetTableData(Options)(function(i, v)
  1310. if typeof(v.Value) == 'boolean' and not IsStringEmpty(v.Text) and v.Text ~= nil then
  1311. CPos = CPos + 25;
  1312. local BaseSize = V2New(BaseSize.X, 30);
  1313. local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + V2New(30, v.Index * 25 - 10);
  1314. UIButtons[#UIButtons + 1] = {
  1315. Option = v;
  1316. Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
  1317. Position = BasePosition - V2New(30, 15);
  1318. Size = BaseSize;
  1319. Visible = false;
  1320. });
  1321. };
  1322. Menu:AddMenuInstance(Format('%s_OuterCircle', v.Name), 'Circle', {
  1323. Radius = 10;
  1324. Position = BasePosition;
  1325. Color = Colors.Secondary.Light;
  1326. Filled = true;
  1327. Visible = true;
  1328. });
  1329. Menu:AddMenuInstance(Format('%s_InnerCircle', v.Name), 'Circle', {
  1330. Radius = 7;
  1331. Position = BasePosition;
  1332. Color = Colors.Secondary.Dark;
  1333. Filled = true;
  1334. Visible = v.Value;
  1335. });
  1336. Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
  1337. Text = v.Text;
  1338. Size = 20;
  1339. Position = BasePosition + V2New(20, -10);
  1340. Visible = true;
  1341. Color = Colors.Secondary.Light;
  1342. Transparency= 1;
  1343. Outline = true;
  1344. });
  1345. end
  1346. end)
  1347. GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
  1348. if typeof(v.Value) == 'number' then
  1349. CPos = CPos + 25;
  1350.  
  1351. local BaseSize = V2New(BaseSize.X, 30);
  1352. local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + V2New(0, CPos - 10);
  1353.  
  1354. local Line = Menu:AddMenuInstance(Format('%s_SliderLine', v.Name), 'Square', {
  1355. Transparency = 1;
  1356. Color = Colors.Secondary.Light;
  1357. -- Thickness = 3;
  1358. Filled = true;
  1359. Visible = true;
  1360. Position = BasePosition + V2New(15, -5);
  1361. Size = BaseSize - V2New(30, 10);
  1362. Transparency = 0.5;
  1363. });
  1364. local Slider = Menu:AddMenuInstance(Format('%s_Slider', v.Name), 'Square', {
  1365. Visible = true;
  1366. Filled = true;
  1367. Color = Colors.Primary.Dark;
  1368. Size = V2New(5, Line.Size.Y);
  1369. Transparency = 0.5;
  1370. });
  1371. local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
  1372. Text = v.Text;
  1373. Size = 20;
  1374. Center = true;
  1375. Transparency = 1;
  1376. Outline = true;
  1377. Visible = true;
  1378. Color = Colors.White;
  1379. }); Text.Position = Line.Position + (Line.Size / 2) - V2New(0, Text.TextBounds.Y / 1.75);
  1380. local AMT = Menu:AddMenuInstance(Format('%s_AmountText', v.Name), 'Text', {
  1381. Text = tostring(v.Value);
  1382. Size = 22;
  1383. Center = true;
  1384. Transparency = 1;
  1385. Outline = true;
  1386. Visible = true;
  1387. Color = Colors.White;
  1388. Position = Text.Position;
  1389. });
  1390.  
  1391. local CSlider = {Slider = Slider; Line = Line; Min = v.AllArgs[4]; Max = v.AllArgs[5]; Option = v};
  1392. local Dummy = Instance.new'NumberValue';
  1393.  
  1394. Dummy:GetPropertyChangedSignal'Value':Connect(function()
  1395. Text.Transparency = Dummy.Value;
  1396. AMT.Transparency = 1 - Dummy.Value;
  1397. end);
  1398.  
  1399. Dummy.Value = 1;
  1400.  
  1401. function CSlider:ShowValue(Bool)
  1402. self.ShowingValue = Bool;
  1403.  
  1404. TweenService:Create(Dummy, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), { Value = Bool and 0 or 1 }):Play();
  1405. end
  1406.  
  1407. Sliders[#Sliders + 1] = CSlider;
  1408.  
  1409. -- local Percent = (v.Value / CSlider.Max) * 100;
  1410. -- local Size = math.abs(Line.From.X - Line.To.X);
  1411. -- local Value = Size * (Percent / 100); -- this shit's inaccurate but fuck it i'm not even gonna bother fixing it
  1412.  
  1413. Slider.Position = Line.Position + V2New(35, 0);
  1414.  
  1415. v.BaseSize = BaseSize;
  1416. v.BasePosition = BasePosition;
  1417. -- AMT.Position = BasePosition + V2New(BaseSize.X - AMT.TextBounds.X - 10, -10)
  1418. end
  1419. end)
  1420. local FirstItem = false;
  1421. GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
  1422. if typeof(v.Value) == 'EnumItem' then
  1423. CPos = CPos + (not FirstItem and 30 or 25);
  1424. FirstItem = true;
  1425.  
  1426. local BaseSize = V2New(BaseSize.X, FirstItem and 30 or 25);
  1427. local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + V2New(0, CPos - 10);
  1428.  
  1429. UIButtons[#UIButtons + 1] = {
  1430. Option = v;
  1431. Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
  1432. Size = V2New(BaseSize.X, 20) - V2New(30, 0);
  1433. Visible = true;
  1434. Transparency= .5;
  1435. Position = BasePosition + V2New(15, -10);
  1436. Color = Colors.Secondary.Light;
  1437. Filled = true;
  1438. });
  1439. };
  1440. local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
  1441. Text = v.Text;
  1442. Size = 20;
  1443. Position = BasePosition + V2New(20, -10);
  1444. Visible = true;
  1445. Color = Colors.Secondary.Light;
  1446. Transparency= 1;
  1447. Outline = true;
  1448. });
  1449. local BindText = Menu:AddMenuInstance(Format('%s_BindText', v.Name), 'Text', {
  1450. Text = tostring(v.Value):match'%w+%.%w+%.(.+)';
  1451. Size = 20;
  1452. Position = BasePosition;
  1453. Visible = true;
  1454. Color = Colors.Secondary.Light;
  1455. Transparency= 1;
  1456. Outline = true;
  1457. });
  1458.  
  1459. Options[i].BaseSize = BaseSize;
  1460. Options[i].BasePosition = BasePosition;
  1461. BindText.Position = BasePosition + V2New(BaseSize.X - BindText.TextBounds.X - 20, -10);
  1462. end
  1463. end)
  1464. GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
  1465. if typeof(v.Value) == 'function' then
  1466. local BaseSize = V2New(BaseSize.X, 30);
  1467. local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + V2New(0, CPos + (25 * v.AllArgs[4]) - 35);
  1468.  
  1469. UIButtons[#UIButtons + 1] = {
  1470. Option = v;
  1471. Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
  1472. Size = V2New(BaseSize.X, 20) - V2New(30, 0);
  1473. Visible = true;
  1474. Transparency= .5;
  1475. Position = BasePosition + V2New(15, -10);
  1476. Color = Colors.Secondary.Light;
  1477. Filled = true;
  1478. });
  1479. };
  1480. local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
  1481. Text = v.Text;
  1482. Size = 20;
  1483. Position = BasePosition + V2New(20, -10);
  1484. Visible = true;
  1485. Color = Colors.Secondary.Light;
  1486. Transparency= 1;
  1487. Outline = true;
  1488. });
  1489.  
  1490. -- BindText.Position = BasePosition + V2New(BaseSize.X - BindText.TextBounds.X - 10, -10);
  1491. end
  1492. end)
  1493.  
  1494. delay(.1, function()
  1495. MenuLoaded = true;
  1496. end);
  1497.  
  1498. -- this has to be at the bottom cuz proto drawing api doesnt have zindex :triumph:
  1499. Menu:AddMenuInstance('Cursor1', 'Line', {
  1500. Visible = false;
  1501. Color = Color3.new(1, 0, 0);
  1502. Transparency = 1;
  1503. Thickness = 2;
  1504. });
  1505. Menu:AddMenuInstance('Cursor2', 'Line', {
  1506. Visible = false;
  1507. Color = Color3.new(1, 0, 0);
  1508. Transparency = 1;
  1509. Thickness = 2;
  1510. });
  1511. Menu:AddMenuInstance('Cursor3', 'Line', {
  1512. Visible = false;
  1513. Color = Color3.new(1, 0, 0);
  1514. Transparency = 1;
  1515. Thickness = 2;
  1516. });
  1517. end
  1518.  
  1519. CreateMenu();
  1520. delay(0.1, function()
  1521. SubMenu:Show(V2New()); -- Create the submenu
  1522. SubMenu:Hide();
  1523. end);
  1524.  
  1525. shared.UESP_InputChangedCon = UserInputService.InputChanged:connect(function(input)
  1526. if input.UserInputType.Name == 'MouseMovement' and Options.MenuOpen.Value then
  1527. for i, v in pairs(Sliders) do
  1528. local Values = {
  1529. v.Line.Position.X;
  1530. v.Line.Position.Y;
  1531. v.Line.Position.X + v.Line.Size.X;
  1532. v.Line.Position.Y + v.Line.Size.Y;
  1533. };
  1534. if MouseHoveringOver(Values) then
  1535. v:ShowValue(true);
  1536. else
  1537. if not MouseHeld then v:ShowValue(false); end
  1538. end
  1539. end
  1540. end
  1541. end)
  1542. shared.UESP_InputBeganCon = UserInputService.InputBegan:connect(function(input)
  1543. if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
  1544. MouseHeld = true;
  1545. local Bar = Menu:GetInstance'TopBar';
  1546. local Values = {
  1547. Bar.Position.X;
  1548. Bar.Position.Y;
  1549. Bar.Position.X + Bar.Size.X;
  1550. Bar.Position.Y + Bar.Size.Y;
  1551. }
  1552. if MouseHoveringOver(Values) then
  1553. DraggingUI = true;
  1554. DragOffset = Menu:GetInstance'Main'.Position - GetMouseLocation();
  1555. else
  1556. for i, v in pairs(Sliders) do
  1557. local Values = {
  1558. v.Line.Position.X;
  1559. v.Line.Position.Y;
  1560. v.Line.Position.X + v.Line.Size.X;
  1561. v.Line.Position.Y + v.Line.Size.Y;
  1562. -- v.Line.From.X - (v.Slider.Radius);
  1563. -- v.Line.From.Y - (v.Slider.Radius);
  1564. -- v.Line.To.X + (v.Slider.Radius);
  1565. -- v.Line.To.Y + (v.Slider.Radius);
  1566. };
  1567. if MouseHoveringOver(Values) then
  1568. DraggingWhat = v;
  1569. Dragging = true;
  1570. break
  1571. end
  1572. end
  1573.  
  1574. if not Dragging then
  1575. local Values = {
  1576. TracerPosition.X - 10;
  1577. TracerPosition.Y - 10;
  1578. TracerPosition.X + 10;
  1579. TracerPosition.Y + 10;
  1580. };
  1581. if MouseHoveringOver(Values) then
  1582. DragTracerPosition = true;
  1583. end
  1584. end
  1585. end
  1586. end
  1587. end)
  1588. shared.UESP_InputEndedCon = UserInputService.InputEnded:connect(function(input)
  1589. if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
  1590. MouseHeld = false;
  1591. DragTracerPosition = false;
  1592. local IgnoreOtherInput = false;
  1593.  
  1594. if SubMenu.Open and not MouseHoveringOver(SubMenu.Bounds) then
  1595. if CurrentColorPicker and IsMouseOverDrawing(CurrentColorPicker.Drawings['Square-Background']()) then IgnoreOtherInput = true; end
  1596. if not IgnoreOtherInput then SubMenu:Hide() end
  1597. end
  1598.  
  1599. if not IgnoreOtherInput then
  1600. for i, v in pairs(UIButtons) do
  1601. if SubMenu.Open and MouseHoveringOver(SubMenu.Bounds) and not v.FromSubMenu then continue end
  1602.  
  1603. local Values = {
  1604. v.Instance.Position.X;
  1605. v.Instance.Position.Y;
  1606. v.Instance.Position.X + v.Instance.Size.X;
  1607. v.Instance.Position.Y + v.Instance.Size.Y;
  1608. };
  1609. if MouseHoveringOver(Values) then
  1610. v.Option();
  1611. IgnoreOtherInput = true;
  1612. break -- prevent clicking 2 options
  1613. end
  1614. end
  1615. for i, v in pairs(Sliders) do
  1616. if IgnoreOtherInput then break end
  1617.  
  1618. local Values = {
  1619. v.Line.Position.X;
  1620. v.Line.Position.Y;
  1621. v.Line.Position.X + v.Line.Size.X;
  1622. v.Line.Position.Y + v.Line.Size.Y;
  1623. };
  1624. if not MouseHoveringOver(Values) then
  1625. v:ShowValue(false);
  1626. end
  1627. end
  1628. end
  1629. elseif input.UserInputType.Name == 'MouseButton2' and Options.MenuOpen.Value and not DragTracerPosition then
  1630. local Values = {
  1631. TracerPosition.X - 10;
  1632. TracerPosition.Y - 10;
  1633. TracerPosition.X + 10;
  1634. TracerPosition.Y + 10;
  1635. }
  1636. if MouseHoveringOver(Values) then
  1637. DragTracerPosition = false;
  1638. TracerPosition = V2New(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y - 135);
  1639. end
  1640. elseif input.UserInputType.Name == 'Keyboard' then
  1641. if Binding then
  1642. BindedKey = input.KeyCode;
  1643. Binding = false;
  1644. elseif input.KeyCode == Options.MenuKey.Value or (input.KeyCode == Enum.KeyCode.Home and UserInputService:IsKeyDown(Enum.KeyCode.LeftControl)) then
  1645. Options.MenuOpen();
  1646. elseif input.KeyCode == Options.ToggleKey.Value then
  1647. Options.Enabled();
  1648. elseif input.KeyCode.Name == 'F1' and UserInputService:IsMouseButtonPressed(1) and shared.am_ic3 then -- hehe hiden spectate feature cuz why not
  1649. local HD, LPlayer, LCharacter = 0.95;
  1650.  
  1651. for i, Player in pairs(Players:GetPlayers()) do
  1652. local Character = GetCharacter(Player);
  1653.  
  1654. if Player ~= LocalPlayer and Player ~= Spectating and Character and Character:FindFirstChild'HumanoidRootPart' then
  1655. local Head = Character:FindFirstChild'Head';
  1656. local Humanoid = Character:FindFirstChildOfClass'Humanoid';
  1657.  
  1658. if Head then
  1659. local Distance = (Camera.CFrame.p - Head.Position).magnitude;
  1660.  
  1661. if Distance > 2500 then continue; end
  1662.  
  1663. local Direction = -(Camera.CFrame.p - Mouse.Hit.p).unit;
  1664. local Relative = Character.Head.Position - Camera.CFrame.p;
  1665. local Unit = Relative.unit;
  1666.  
  1667. local DP = Direction:Dot(Unit);
  1668.  
  1669. if DP > HD then
  1670. HD = DP;
  1671. LPlayer = Player;
  1672. LCharacter = Character;
  1673. end
  1674. end
  1675. end
  1676. end
  1677.  
  1678. if LPlayer and LPlayer ~= Spectating and LCharacter then
  1679. Camera.CameraSubject = LCharacter.Head;
  1680. Spectating = LPlayer;
  1681. else
  1682. if LocalPlayer.Character and LocalPlayer.Character:FindFirstChildOfClass'Humanoid' then
  1683. Camera.CameraSubject = LocalPlayer.Character:FindFirstChildOfClass'Humanoid';
  1684. Spectating = nil;
  1685. end
  1686. end
  1687. end
  1688. end
  1689. end)
  1690.  
  1691. function ToggleMenu()
  1692. if Options.MenuOpen.Value then
  1693. GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
  1694. if OldData[v] then
  1695. pcall(Set, v, 'Visible', true);
  1696. end
  1697. end)
  1698. else
  1699. -- GUIService:SetMenuIsOpen(false);
  1700. GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
  1701. OldData[v] = v.Visible;
  1702. if v.Visible then
  1703. pcall(Set, v, 'Visible', false);
  1704. end
  1705. end)
  1706. end
  1707. end
  1708.  
  1709. function CheckRay(Instance, Distance, Position, Unit)
  1710. local Pass = true;
  1711. local Model = Instance;
  1712.  
  1713. if Distance > 999 then return false; end
  1714.  
  1715. if Instance.ClassName == 'Player' then
  1716. Model = GetCharacter(Instance);
  1717. end
  1718.  
  1719. if not Model then
  1720. Model = Instance.Parent;
  1721.  
  1722. if Model.Parent == workspace then
  1723. Model = Instance;
  1724. end
  1725. end
  1726.  
  1727. if not Model then return false end
  1728.  
  1729. local _Ray = Ray.new(Position, Unit * Distance);
  1730.  
  1731. local List = {LocalPlayer.Character, Camera, Mouse.TargetFilter};
  1732.  
  1733. for i,v in pairs(IgnoreList) do table.insert(List, v); end;
  1734.  
  1735. local Hit = workspace:FindPartOnRayWithIgnoreList(_Ray, List);
  1736.  
  1737. if Hit and not Hit:IsDescendantOf(Model) then
  1738. Pass = false;
  1739. if Hit.Transparency >= .3 or not Hit.CanCollide and Hit.ClassName ~= Terrain then -- Detect invisible walls
  1740. IgnoreList[#IgnoreList + 1] = Hit;
  1741. end
  1742. end
  1743.  
  1744. return Pass;
  1745. end
  1746.  
  1747. function CheckTeam(Player)
  1748. if Player.Neutral and LocalPlayer.Neutral then return true; end
  1749. return Player.TeamColor == LocalPlayer.TeamColor;
  1750. end
  1751.  
  1752. local CustomTeam = CustomTeams[game.PlaceId];
  1753.  
  1754. if CustomTeam ~= nil then
  1755. if CustomTeam.Initialize then ypcall(CustomTeam.Initialize) end
  1756.  
  1757. CheckTeam = CustomTeam.CheckTeam;
  1758. end
  1759.  
  1760. function CheckPlayer(Player, Character)
  1761. if not Options.Enabled.Value then return false end
  1762.  
  1763. local Pass = true;
  1764. local Distance = 0;
  1765.  
  1766. if Player ~= LocalPlayer and Character then
  1767. if not Options.ShowTeam.Value and CheckTeam(Player) then
  1768. Pass = false;
  1769. end
  1770.  
  1771. local Head = Character:FindFirstChild'Head';
  1772.  
  1773. if Pass and Character and Head then
  1774. Distance = (Camera.CFrame.p - Head.Position).magnitude;
  1775. if Options.VisCheck.Value then
  1776. Pass = CheckRay(Player, Distance, Camera.CFrame.p, (Head.Position - Camera.CFrame.p).unit);
  1777. end
  1778. if Distance > Options.MaxDistance.Value then
  1779. Pass = false;
  1780. end
  1781. end
  1782. else
  1783. Pass = false;
  1784. end
  1785.  
  1786. return Pass, Distance;
  1787. end
  1788.  
  1789. function CheckDistance(Instance)
  1790. if not Options.Enabled.Value then return false end
  1791.  
  1792. local Pass = true;
  1793. local Distance = 0;
  1794.  
  1795. if Instance ~= nil then
  1796. Distance = (Camera.CFrame.p - Instance.Position).magnitude;
  1797. if Options.VisCheck.Value then
  1798. Pass = CheckRay(Instance, Distance, Camera.CFrame.p, (Instance.Position - Camera.CFrame.p).unit);
  1799. end
  1800. if Distance > Options.MaxDistance.Value then
  1801. Pass = false;
  1802. end
  1803. else
  1804. Pass = false;
  1805. end
  1806.  
  1807. return Pass, Distance;
  1808. end
  1809.  
  1810. function UpdatePlayerData()
  1811. if (tick() - LastRefresh) > (Options.RefreshRate.Value / 1000) then
  1812. LastRefresh = tick();
  1813. if CustomESP and Options.Enabled.Value then
  1814. local a, b = pcall(CustomESP);
  1815. end
  1816. for i, v in pairs(RenderList.Instances) do
  1817. if v.Instance ~= nil and v.Instance.Parent ~= nil and v.Instance:IsA'BasePart' then
  1818. local Data = shared.InstanceData[v.Instance:GetDebugId()] or { Instances = {}; DontDelete = true };
  1819.  
  1820. Data.Instance = v.Instance;
  1821.  
  1822. Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
  1823. Transparency = 1;
  1824. Thickness = 2;
  1825. }
  1826. Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
  1827. Size = Options.TextSize.Value;
  1828. Center = true;
  1829. Outline = Options.TextOutline.Value;
  1830. Visible = true;
  1831. };
  1832. Data.Instances['DistanceTag'] = Data.Instances['DistanceTag'] or NewDrawing'Text'{
  1833. Size = Options.TextSize.Value - 1;
  1834. Center = true;
  1835. Outline = Options.TextOutline.Value;
  1836. Visible = true;
  1837. };
  1838.  
  1839. local NameTag = Data.Instances['NameTag'];
  1840. local DistanceTag = Data.Instances['DistanceTag'];
  1841. local Tracer = Data.Instances['Tracer'];
  1842.  
  1843. local Pass, Distance = CheckDistance(v.Instance);
  1844.  
  1845. if Pass then
  1846. local ScreenPosition, Vis = WorldToViewport(v.Instance.Position);
  1847. local Color = v.Color;
  1848. local OPos = Camera.CFrame:pointToObjectSpace(v.Instance.Position);
  1849.  
  1850. if ScreenPosition.Z < 0 then
  1851. local AT = math.atan2(OPos.Y, OPos.X) + math.pi;
  1852. OPos = CFrame.Angles(0, 0, AT):vectorToWorldSpace((CFrame.Angles(0, math.rad(89.9), 0):vectorToWorldSpace(V3New(0, 0, -1))));
  1853. end
  1854.  
  1855. local Position = WorldToViewport(Camera.CFrame:pointToWorldSpace(OPos));
  1856.  
  1857. if Options.ShowTracers.Value then
  1858. Tracer.Transparency = math.clamp(Distance / 200, 0.45, 0.8);
  1859. Tracer.Visible = true;
  1860. Tracer.From = TracerPosition;
  1861. Tracer.To = V2New(Position.X, Position.Y);
  1862. Tracer.Color = Color;
  1863. else
  1864. Tracer.Visible = false;
  1865. end
  1866.  
  1867. if ScreenPosition.Z > 0 then
  1868. local ScreenPositionUpper = ScreenPosition;
  1869.  
  1870. if Options.ShowName.Value then
  1871. LocalPlayer.NameDisplayDistance = 0;
  1872. NameTag.Visible = true;
  1873. NameTag.Text = v.Text;
  1874. NameTag.Size = Options.TextSize.Value;
  1875. NameTag.Outline = Options.TextOutline.Value;
  1876. NameTag.Position = V2New(ScreenPositionUpper.X, ScreenPositionUpper.Y);
  1877. NameTag.Color = Color;
  1878. if Drawing.Fonts and shared.am_ic3 then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
  1879. NameTag.Font = Drawing.Fonts.Monospace;
  1880. end
  1881. else
  1882. LocalPlayer.NameDisplayDistance = 100;
  1883. NameTag.Visible = false;
  1884. end
  1885. if Options.ShowDistance.Value or Options.ShowHealth.Value then
  1886. DistanceTag.Visible = true;
  1887. DistanceTag.Size = Options.TextSize.Value - 1;
  1888. DistanceTag.Outline = Options.TextOutline.Value;
  1889. DistanceTag.Color = Color3.new(1, 1, 1);
  1890. if Drawing.Fonts and shared.am_ic3 then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
  1891. NameTag.Font = Drawing.Fonts.Monospace;
  1892. end
  1893.  
  1894. local Str = '';
  1895.  
  1896. if Options.ShowDistance.Value then
  1897. Str = Str .. Format('[%d] ', Distance);
  1898. end
  1899.  
  1900. DistanceTag.Text = Str;
  1901. DistanceTag.Position = V2New(ScreenPositionUpper.X, ScreenPositionUpper.Y) + V2New(0, NameTag.TextBounds.Y);
  1902. else
  1903. DistanceTag.Visible = false;
  1904. end
  1905. else
  1906. NameTag.Visible = false;
  1907. DistanceTag.Visible = false;
  1908. end
  1909. else
  1910. NameTag.Visible = false;
  1911. DistanceTag.Visible = false;
  1912. Tracer.Visible = false;
  1913. end
  1914.  
  1915. Data.Instances['NameTag'] = NameTag;
  1916. Data.Instances['DistanceTag'] = DistanceTag;
  1917. Data.Instances['Tracer'] = Tracer;
  1918.  
  1919. shared.InstanceData[v.Instance:GetDebugId()] = Data;
  1920. end
  1921. end
  1922. for i, v in pairs(Players:GetPlayers()) do
  1923. local Data = shared.InstanceData[v.Name] or { Instances = {}; };
  1924.  
  1925. Data.Instances['Box'] = Data.Instances['Box'] or LineBox:Create{Thickness = 3};
  1926. Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
  1927. Transparency = 1;
  1928. Thickness = 2;
  1929. }
  1930. Data.Instances['HeadDot'] = Data.Instances['HeadDot'] or NewDrawing'Circle'{
  1931. Filled = true;
  1932. NumSides = 30;
  1933. }
  1934. Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
  1935. Size = Options.TextSize.Value;
  1936. Center = true;
  1937. Outline = Options.TextOutline.Value;
  1938. Visible = true;
  1939. };
  1940. Data.Instances['DistanceHealthTag'] = Data.Instances['DistanceHealthTag'] or NewDrawing'Text'{
  1941. Size = Options.TextSize.Value - 1;
  1942. Center = true;
  1943. Outline = Options.TextOutline.Value;
  1944. Visible = true;
  1945. };
  1946.  
  1947. local NameTag = Data.Instances['NameTag'];
  1948. local DistanceTag = Data.Instances['DistanceHealthTag'];
  1949. local Tracer = Data.Instances['Tracer'];
  1950. local HeadDot = Data.Instances['HeadDot'];
  1951. local Box = Data.Instances['Box'];
  1952.  
  1953. local Character = GetCharacter(v);
  1954. local Pass, Distance = CheckPlayer(v, Character);
  1955.  
  1956. if Pass and Character then
  1957. local Humanoid = Character:FindFirstChildOfClass'Humanoid';
  1958. local Head = Character:FindFirstChild'Head';
  1959. local HumanoidRootPart = Character:FindFirstChild'HumanoidRootPart';
  1960. local Dead = Humanoid and Humanoid:GetState().Name == 'Dead';
  1961.  
  1962. if Character ~= nil and Head and HumanoidRootPart and not Dead then
  1963. local ScreenPosition, Vis = WorldToViewport(Head.Position);
  1964. local Color = Rainbow and Color3.fromHSV(tick() * 128 % 255/255, 1, 1) or (CheckTeam(v) and TeamColor or EnemyColor); Color = Options.ShowTeamColor.Value and v.TeamColor.Color or Color;
  1965. local OPos = Camera.CFrame:pointToObjectSpace(Head.Position);
  1966.  
  1967. if ScreenPosition.Z < 0 then
  1968. local AT = math.atan2(OPos.Y, OPos.X) + math.pi;
  1969. OPos = CFrame.Angles(0, 0, AT):vectorToWorldSpace((CFrame.Angles(0, math.rad(89.9), 0):vectorToWorldSpace(V3New(0, 0, -1))));
  1970. end
  1971.  
  1972. local Position = WorldToViewport(Camera.CFrame:pointToWorldSpace(OPos));
  1973.  
  1974. if Options.ShowTracers.Value then
  1975. if TracerPosition.X >= Camera.ViewportSize.X or TracerPosition.Y >= Camera.ViewportSize.Y or TracerPosition.X < 0 or TracerPosition.Y < 0 then
  1976. TracerPosition = V2New(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y - 135);
  1977. end
  1978.  
  1979. Tracer.Visible = true;
  1980. Tracer.Transparency = math.clamp(1 - (Distance / 200), 0.25, 0.75);
  1981. Tracer.From = TracerPosition;
  1982. Tracer.To = V2New(Position.X, Position.Y);
  1983. Tracer.Color = Color;
  1984. else
  1985. Tracer.Visible = false;
  1986. end
  1987.  
  1988. if ScreenPosition.Z > 0 then
  1989. local ScreenPositionUpper = WorldToViewport((HumanoidRootPart:GetRenderCFrame() * CFrame.new(0, Head.Size.Y + HumanoidRootPart.Size.Y + (Options.YOffset.Value / 25), 0)).p);
  1990. local Scale = Head.Size.Y / 2;
  1991.  
  1992. if Options.ShowName.Value then
  1993. NameTag.Visible = true;
  1994. NameTag.Text = v.Name .. (CustomPlayerTag and CustomPlayerTag(v) or '');
  1995. NameTag.Size = Options.TextSize.Value;
  1996. NameTag.Outline = Options.TextOutline.Value;
  1997. NameTag.Position = V2New(ScreenPositionUpper.X, ScreenPositionUpper.Y) - V2New(0, NameTag.TextBounds.Y);
  1998. NameTag.Color = Color;
  1999. NameTag.Transparency= 0.85;
  2000. if Drawing.Fonts and shared.am_ic3 then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
  2001. NameTag.Font = Drawing.Fonts.Monospace;
  2002. end
  2003. else
  2004. NameTag.Visible = false;
  2005. end
  2006. if Options.ShowDistance.Value or Options.ShowHealth.Value then
  2007. DistanceTag.Visible = true;
  2008. DistanceTag.Size = Options.TextSize.Value - 1;
  2009. DistanceTag.Outline = Options.TextOutline.Value;
  2010. DistanceTag.Color = Color3.new(1, 1, 1);
  2011. DistanceTag.Transparency= 0.85;
  2012. if Drawing.Fonts and shared.am_ic3 then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
  2013. NameTag.Font = Drawing.Fonts.Monospace;
  2014. end
  2015.  
  2016. local Str = '';
  2017.  
  2018. if Options.ShowDistance.Value then
  2019. Str = Str .. Format('[%d] ', Distance);
  2020. end
  2021. if Options.ShowHealth.Value and Humanoid then
  2022. Str = Str .. Format('[%d/%d] [%s%%]', Humanoid.Health, Humanoid.MaxHealth, math.floor(Humanoid.Health / Humanoid.MaxHealth * 100));
  2023. end
  2024.  
  2025. DistanceTag.Text = Str;
  2026. DistanceTag.Position = (NameTag.Visible and NameTag.Position + V2New(0, NameTag.TextBounds.Y) or V2New(ScreenPositionUpper.X, ScreenPositionUpper.Y));
  2027. else
  2028. DistanceTag.Visible = false;
  2029. end
  2030. if Options.ShowDot.Value and Vis then
  2031. local Top = WorldToViewport((Head.CFrame * CFrame.new(0, Scale, 0)).p);
  2032. local Bottom = WorldToViewport((Head.CFrame * CFrame.new(0, -Scale, 0)).p);
  2033. local Radius = (Top - Bottom).y;
  2034.  
  2035. HeadDot.Visible = true;
  2036. HeadDot.Color = Color;
  2037. HeadDot.Position = V2New(ScreenPosition.X, ScreenPosition.Y);
  2038. HeadDot.Radius = Radius;
  2039. else
  2040. HeadDot.Visible = false;
  2041. end
  2042. if Options.ShowBoxes.Value and Vis and HumanoidRootPart then
  2043. Box:Update(HumanoidRootPart.CFrame, V3New(2, 3, 0) * (Scale * 2), Color);
  2044. else
  2045. Box:SetVisible(false);
  2046. end
  2047. else
  2048. NameTag.Visible = false;
  2049. DistanceTag.Visible = false;
  2050. HeadDot.Visible = false;
  2051.  
  2052. Box:SetVisible(false);
  2053. end
  2054. else
  2055. NameTag.Visible = false;
  2056. DistanceTag.Visible = false;
  2057. HeadDot.Visible = false;
  2058. Tracer.Visible = false;
  2059.  
  2060. Box:SetVisible(false);
  2061. end
  2062. else
  2063. NameTag.Visible = false;
  2064. DistanceTag.Visible = false;
  2065. HeadDot.Visible = false;
  2066. Tracer.Visible = false;
  2067.  
  2068. Box:SetVisible(false);
  2069. end
  2070.  
  2071. shared.InstanceData[v.Name] = Data;
  2072. end
  2073. end
  2074. end
  2075.  
  2076. local LastInvalidCheck = 0;
  2077.  
  2078. function Update()
  2079. if tick() - LastInvalidCheck > 0.3 then
  2080. LastInvalidCheck = tick();
  2081.  
  2082. if Camera.Parent ~= workspace then
  2083. Camera = workspace.CurrentCamera;
  2084. WTVP = Camera.WorldToViewportPoint;
  2085. end
  2086.  
  2087. for i, v in pairs(shared.InstanceData) do
  2088. if not Players:FindFirstChild(tostring(i)) then
  2089. if not shared.InstanceData[i].DontDelete then
  2090. GetTableData(v.Instances)(function(i, obj)
  2091. obj.Visible = false;
  2092. obj:Remove();
  2093. v.Instances[i] = nil;
  2094. end)
  2095. shared.InstanceData[i] = nil;
  2096. else
  2097. if shared.InstanceData[i].Instance == nil or shared.InstanceData[i].Instance.Parent == nil then
  2098. GetTableData(v.Instances)(function(i, obj)
  2099. obj.Visible = false;
  2100. obj:Remove();
  2101. v.Instances[i] = nil;
  2102. end)
  2103. shared.InstanceData[i] = nil;
  2104. end
  2105. end
  2106. end
  2107. end
  2108. end
  2109.  
  2110. local CX = Menu:GetInstance'CrosshairX';
  2111. local CY = Menu:GetInstance'CrosshairY';
  2112.  
  2113. if Options.Crosshair.Value then
  2114. CX.Visible = true;
  2115. CY.Visible = true;
  2116.  
  2117. CX.To = V2New((Camera.ViewportSize.X / 2) - 8, (Camera.ViewportSize.Y / 2));
  2118. CX.From = V2New((Camera.ViewportSize.X / 2) + 8, (Camera.ViewportSize.Y / 2));
  2119. CY.To = V2New((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) - 8);
  2120. CY.From = V2New((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) + 8);
  2121. else
  2122. CX.Visible = false;
  2123. CY.Visible = false;
  2124. end
  2125.  
  2126. if Options.MenuOpen.Value and MenuLoaded then
  2127. local MLocation = GetMouseLocation();
  2128. shared.MenuDrawingData.Instances.Main.Color = Color3.fromHSV(tick() * 24 % 255/255, 1, 1);
  2129. local MainInstance = Menu:GetInstance'Main';
  2130.  
  2131. local Values = {
  2132. MainInstance.Position.X;
  2133. MainInstance.Position.Y;
  2134. MainInstance.Position.X + MainInstance.Size.X;
  2135. MainInstance.Position.Y + MainInstance.Size.Y;
  2136. };
  2137.  
  2138. if MainInstance and (MouseHoveringOver(Values) or (SubMenu.Open and MouseHoveringOver(SubMenu.Bounds))) then
  2139. Debounce.CursorVis = true;
  2140.  
  2141. Menu:UpdateMenuInstance'Cursor1'{
  2142. Visible = true;
  2143. From = V2New(MLocation.x, MLocation.y);
  2144. To = V2New(MLocation.x + 5, MLocation.y + 6);
  2145. }
  2146. Menu:UpdateMenuInstance'Cursor2'{
  2147. Visible = true;
  2148. From = V2New(MLocation.x, MLocation.y);
  2149. To = V2New(MLocation.x, MLocation.y + 8);
  2150. }
  2151. Menu:UpdateMenuInstance'Cursor3'{
  2152. Visible = true;
  2153. From = V2New(MLocation.x, MLocation.y + 6);
  2154. To = V2New(MLocation.x + 5, MLocation.y + 5);
  2155. }
  2156. else
  2157. if Debounce.CursorVis then
  2158. Debounce.CursorVis = false;
  2159.  
  2160. Menu:UpdateMenuInstance'Cursor1'{Visible = false};
  2161. Menu:UpdateMenuInstance'Cursor2'{Visible = false};
  2162. Menu:UpdateMenuInstance'Cursor3'{Visible = false};
  2163. end
  2164. end
  2165. if MouseHeld then
  2166. local MousePos = GetMouseLocation();
  2167.  
  2168. if Dragging then
  2169. DraggingWhat.Slider.Position = V2New(math.clamp(MLocation.X - DraggingWhat.Slider.Size.X / 2, DraggingWhat.Line.Position.X, DraggingWhat.Line.Position.X + DraggingWhat.Line.Size.X - DraggingWhat.Slider.Size.X), DraggingWhat.Slider.Position.Y);
  2170. local Percent = (DraggingWhat.Slider.Position.X - DraggingWhat.Line.Position.X) / ((DraggingWhat.Line.Position.X + DraggingWhat.Line.Size.X - DraggingWhat.Line.Position.X) - DraggingWhat.Slider.Size.X);
  2171. local Value = CalculateValue(DraggingWhat.Min, DraggingWhat.Max, Percent);
  2172. DraggingWhat.Option(Value);
  2173. elseif DraggingUI then
  2174. Debounce.UIDrag = true;
  2175. local Main = Menu:GetInstance'Main';
  2176. Main.Position = MousePos + DragOffset;
  2177. elseif DragTracerPosition then
  2178. TracerPosition = MousePos;
  2179. end
  2180. else
  2181. Dragging = false;
  2182. DragTracerPosition = false;
  2183. if DraggingUI and Debounce.UIDrag then
  2184. Debounce.UIDrag = false;
  2185. DraggingUI = false;
  2186. CreateMenu(Menu:GetInstance'Main'.Position);
  2187. end
  2188. end
  2189. if not Debounce.Menu then
  2190. Debounce.Menu = true;
  2191. ToggleMenu();
  2192. end
  2193. elseif Debounce.Menu and not Options.MenuOpen.Value then
  2194. Debounce.Menu = false;
  2195. ToggleMenu();
  2196. end
  2197. end
  2198.  
  2199. RunService:UnbindFromRenderStep(GetDataName);
  2200. RunService:UnbindFromRenderStep(UpdateName);
  2201.  
  2202. RunService:BindToRenderStep(GetDataName, 300, UpdatePlayerData);
  2203. RunService:BindToRenderStep(UpdateName, 199, Update);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement