Advertisement
griminz

maybe works?

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