Advertisement
BigDaddy1978

Unnamed esp

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