Advertisement
AALTTz

unnamed esp

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