Advertisement
Vzurxy

Untitled

Apr 26th, 2019
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.53 KB | None | 0 0
  1. assert(Drawing, 'exploit not supported')
  2.  
  3. local UserInputService = game:GetService'UserInputService';
  4. local HttpService = game:GetService'HttpService';
  5. local GUIService = game:GetService'GuiService';
  6. local RunService = game:GetService'RunService';
  7. local Players = game:GetService'Players';
  8. local LocalPlayer = Players.LocalPlayer;
  9. local Camera = workspace.CurrentCamera
  10. local Mouse = LocalPlayer:GetMouse();
  11. local Menu = {};
  12. local MouseHeld = false;
  13. local LastRefresh = 0;
  14. local OptionsFile = 'IC3_ESP_SETTINGS.dat';
  15. local Binding = false;
  16. local BindedKey = nil;
  17. local OIndex = 0;
  18. local LineBox = {};
  19. local UIButtons = {};
  20. local Sliders = {};
  21. local Dragging = false;
  22. local DraggingUI = false;
  23. local DragOffset = Vector2.new();
  24. local DraggingWhat = nil;
  25. local OldData = {};
  26. local IgnoreList = {};
  27. local Red = Color3.new(1, 0, 0);
  28. local Green = Color3.new(0, 1, 0);
  29. local MenuLoaded = false;
  30.  
  31. shared.MenuDrawingData = shared.MenuDrawingData or { Instances = {} };
  32. shared.InstanceData = shared.InstanceData or {};
  33. shared.RSName = shared.RSName or ('UnnamedESP_by_ic3-' .. HttpService:GenerateGUID(false));
  34.  
  35. local GetDataName = shared.RSName .. '-GetData';
  36. local UpdateName = shared.RSName .. '-Update';
  37.  
  38. local Debounce = setmetatable({}, {
  39. __index = function(t, i)
  40. return rawget(t, i) or false
  41. end;
  42. });
  43.  
  44. pcall(function() shared.InputBeganCon:disconnect() end);
  45. pcall(function() shared.InputEndedCon:disconnect() end);
  46.  
  47. local RealPrint, LastPrintTick = print, 0;
  48. local LatestPrints = setmetatable({}, {
  49. __index = function(t, i)
  50. return rawget(t, i) or 0;
  51. end
  52. });
  53.  
  54. local function print(...)
  55. local Content = unpack{...};
  56. local print = RealPrint;
  57.  
  58. if tick() - LatestPrints[Content] > 5 then
  59. LatestPrints[Content] = tick();
  60. print(Content);
  61. end
  62. end
  63.  
  64. local Teams = {};
  65. local CustomTeams = { -- Games that don't use roblox's team system
  66. [2563455047] = {
  67. Initialize = function()
  68. Teams.Sheriffs = {}; -- prevent big error
  69. Teams.Bandits = {}; -- prevent big error
  70. local Func = game:GetService'ReplicatedStorage':WaitForChild('RogueFunc', 1);
  71. local Event = game:GetService'ReplicatedStorage':WaitForChild('RogueEvent', 1);
  72. local S, B = Func:InvokeServer'AllTeamData';
  73.  
  74. Teams.Sheriffs = S;
  75. Teams.Bandits = B;
  76.  
  77. Event.OnClientEvent:connect(function(id, PlayerName, Team, Remove) -- stolen straight from decompiled src lul
  78. if id == 'UpdateTeam' then
  79. local TeamTable, NotTeamTable
  80. if Team == 'Bandits' then
  81. TeamTable = TDM.Bandits
  82. NotTeamTable = TDM.Sheriffs
  83. else
  84. TeamTable = TDM.Sheriffs
  85. NotTeamTable = TDM.Bandits
  86. end
  87. if Remove then
  88. TeamTable[PlayerName] = nil
  89. else
  90. TeamTable[PlayerName] = true
  91. NotTeamTable[PlayerName] = nil
  92. end
  93. if PlayerName == LocalPlayer.Name then
  94. TDM.Friendlys = TeamTable
  95. TDM.Enemies = NotTeamTable
  96. end
  97. end
  98. end)
  99. end;
  100. CheckTeam = function(Player)
  101. local LocalTeam = Teams.Sheriffs[LocalPlayer.Name] and Teams.Sheriffs or Teams.Bandits;
  102.  
  103. return LocalTeam[Player.Name] and true or false;
  104. end;
  105. };
  106. }
  107.  
  108. local RenderList = {Instances = {}};
  109. function RenderList:AddOrUpdateInstance(Instance, Obj2Draw, Text, Color)
  110. -- print(Instance, Obj2Draw, Text, Color);
  111. RenderList.Instances[Instance] = { ParentInstance = Instance; Instance = Obj2Draw; Text = Text; Color = Color };
  112. return RenderList.Instances[Instance];
  113. end
  114.  
  115. if bind then
  116. bind('f2', function()
  117. --print(RenderList:AddOrUpdateInstance(LocalPlayer.Character, LocalPlayer.Character.Head, 'nigger', Color3.fromRGB(255, 255, 0)));
  118. end)
  119. bind('f3', function()
  120. --print(tableToString(RenderList));
  121. end)
  122. end
  123.  
  124. local CustomPlayerTag;
  125. local CustomESP;
  126.  
  127. local Modules = {
  128. [2262441883] = {
  129. CustomPlayerTag = function(Player)
  130. return Player:FindFirstChild'Job' and (' [' .. Player.Job.Value .. ']') or '';
  131. end;
  132. CustomESP = function()
  133. if workspace:FindFirstChild'MoneyPrinters' then
  134. for i, v in pairs(workspace.MoneyPrinters:GetChildren()) do
  135. local Main = v:FindFirstChild'Main';
  136. local Owner = v:FindFirstChild'TrueOwner';
  137. local Money = v:FindFirstChild'Int' and v.Int:FindFirstChild'Money' or nil;
  138. if Main and Owner and Money then
  139. local O = tostring(Owner.Value);
  140. local M = tostring(Money.Value);
  141. -- print(O, M);
  142. pcall(RenderList:AddOrUpdateInstance(v, Main, string.format('Money Printer\nOwned by %s\n[%s]', O, M), Color3.fromRGB(13, 255, 227)));
  143. end
  144. end
  145. end
  146. end;
  147. }
  148. }
  149.  
  150. if Modules[game.PlaceId] ~= nil then
  151. local Module = Modules[game.PlaceId];
  152. CustomPlayerTag = Module.CustomPlayerTag or nil;
  153. CustomESP = Module.CustomESP or nil;
  154. end
  155.  
  156. function GetMouseLocation()
  157. return UserInputService:GetMouseLocation();
  158. end
  159.  
  160. function MouseHoveringOver(Values)
  161. local X1, Y1, X2, Y2 = Values[1], Values[2], Values[3], Values[4]
  162. local MLocation = GetMouseLocation();
  163. return (MLocation.x >= X1 and MLocation.x <= (X1 + (X2 - X1))) and (MLocation.y >= Y1 and MLocation.y <= (Y1 + (Y2 - Y1)));
  164. end
  165.  
  166. function GetTableData(t) -- basically table.foreach i dont even know why i made this
  167. if typeof(t) ~= 'table' then return end
  168. return setmetatable(t, {
  169. __call = function(t, func)
  170. if typeof(func) ~= 'function' then return end;
  171. for i, v in pairs(t) do
  172. pcall(func, i, v);
  173. end
  174. end;
  175. });
  176. end
  177. local function Format(format, ...)
  178. return string.format(format, ...);
  179. end
  180. function CalculateValue(Min, Max, Percent)
  181. return Min + math.floor(((Max - Min) * Percent) + .5);
  182. end
  183.  
  184. local Options = setmetatable({}, {
  185. __call = function(t, ...)
  186. local Arguments = {...};
  187. local Name = Arguments[1];
  188. OIndex = OIndex + 1; -- (typeof(Arguments[3]) == 'boolean' and 1 or 0);
  189. rawset(t, Name, setmetatable({
  190. Name = Arguments[1];
  191. Text = Arguments[2];
  192. Value = Arguments[3];
  193. DefaultValue = Arguments[3];
  194. AllArgs = Arguments;
  195. Index = OIndex;
  196. }, {
  197. __call = function(t, v)
  198. if typeof(t.Value) == 'function' then
  199. t.Value();
  200. elseif typeof(t.Value) == 'EnumItem' then
  201. local BT = Menu:GetInstance(Format('%s_BindText', t.Name));
  202. Binding = true;
  203. local Val = 0
  204. while Binding do
  205. wait();
  206. Val = (Val + 1) % 17;
  207. BT.Text = Val <= 8 and '|' or '';
  208. end
  209. t.Value = BindedKey;
  210. BT.Text = tostring(t.Value):match'%w+%.%w+%.(.+)';
  211. BT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - BT.TextBounds.X - 20, -10);
  212. else
  213. local NewValue = v;
  214. if NewValue == nil then NewValue = not t.Value; end
  215. rawset(t, 'Value', NewValue);
  216. if Arguments[2] ~= nil then
  217. if typeof(Arguments[3]) == 'number' then
  218. local AMT = Menu:GetInstance(Format('%s_AmountText', t.Name));
  219. AMT.Text = tostring(t.Value);
  220. AMT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - AMT.TextBounds.X - 10, -10);
  221. else
  222. local Inner = Menu:GetInstance(Format('%s_InnerCircle', t.Name));
  223. Inner.Visible = t.Value;
  224. end
  225. end
  226. end
  227. end;
  228. }));
  229. end;
  230. })
  231.  
  232. function Load()
  233. local _, Result = pcall(readfile, OptionsFile);
  234. if _ then -- extremely ugly code yea i know but i dont care p.s. i hate pcall
  235. local _, Table = pcall(HttpService.JSONDecode, HttpService, Result);
  236. if _ then
  237. for i, v in pairs(Table) do
  238. if Options[i] ~= nil and Options[i].Value ~= nil and (typeof(Options[i].Value) == 'boolean' or typeof(Options[i].Value) == 'number') then
  239. Options[i].Value = v.Value;
  240. pcall(Options[i], v.Value);
  241. end
  242. end
  243. end
  244. end
  245. end
  246.  
  247. Options('Enabled', 'ESP Enabled', true);
  248. Options('ShowTeam', 'Show Team', false);
  249. Options('ShowTeamColor', 'Show Team Color', false);
  250. Options('ShowName', 'Show Names', true);
  251. Options('ShowDistance', 'Show Distance', true);
  252. Options('ShowHealth', 'Show Health', true);
  253. Options('ShowBoxes', 'Show Boxes', true);
  254. Options('ShowTracers', 'Show Tracers', true);
  255. Options('ShowDot', 'Show Head Dot', false);
  256. Options('VisCheck', 'Visibility Check', false);
  257. Options('Crosshair', 'Crosshair', false);
  258. Options('TextOutline', 'Text Outline', true);
  259. Options('TextSize', 'Text Size', syn and 18 or 14, 10, 24); -- cuz synapse fonts look weird???
  260. Options('MaxDistance', 'Max Distance', 2500, 100, 25000);
  261. Options('RefreshRate', 'Refresh Rate (ms)', 5, 1, 200);
  262. Options('MenuKey', 'Menu Key', Enum.KeyCode.F4, 1);
  263. Options('ResetSettings', 'Reset Settings', function()
  264. for i, v in pairs(Options) do
  265. 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') then
  266. Options[i](Options[i].DefaultValue);
  267. end
  268. end
  269. end, 4);
  270. Options('LoadSettings', 'Load Settings', Load, 3);
  271. Options('SaveSettings', 'Save Settings', function()
  272. writefile(OptionsFile, HttpService:JSONEncode(Options));
  273. end, 2)
  274. -- Options.SaveSettings.Value();
  275.  
  276. Load();
  277.  
  278. Options('MenuOpen', nil, true);
  279.  
  280. local function Set(t, i, v)
  281. t[i] = v;
  282. end
  283. local function Combine(...)
  284. local Output = {};
  285. for i, v in pairs{...} do
  286. if typeof(v) == 'table' then
  287. table.foreach(v, function(i, v)
  288. Output[i] = v;
  289. end)
  290. end
  291. end
  292. return Output
  293. end
  294. function IsStringEmpty(String)
  295. if type(String) == 'string' then
  296. return String:match'^%s+$' ~= nil or #String == 0 or String == '' or false;
  297. end
  298. return false
  299. end
  300.  
  301. function NewDrawing(InstanceName)
  302. local Instance = Drawing.new(InstanceName);
  303. return (function(Properties)
  304. for i, v in pairs(Properties) do
  305. pcall(Set, Instance, i, v);
  306. end
  307. return Instance;
  308. end)
  309. end
  310.  
  311. function Menu:AddMenuInstace(Name, Instance)
  312. if shared.MenuDrawingData.Instances[Name] ~= nil then
  313. shared.MenuDrawingData.Instances[Name]:Remove();
  314. end
  315. shared.MenuDrawingData.Instances[Name] = Instance;
  316. return Instance;
  317. end
  318. function Menu:UpdateMenuInstance(Name)
  319. local Instance = shared.MenuDrawingData.Instances[Name];
  320. if Instance ~= nil then
  321. return (function(Properties)
  322. for i, v in pairs(Properties) do
  323. -- print(Format('%s %s -> %s', Name, tostring(i), tostring(v)));
  324. pcall(Set, Instance, i, v);
  325. end
  326. return Instance;
  327. end)
  328. end
  329. end
  330. function Menu:GetInstance(Name)
  331. return shared.MenuDrawingData.Instances[Name];
  332. end
  333.  
  334. function LineBox:Create(Properties)
  335. local Box = { Visible = true }; -- prevent errors not really though dont worry bout the Visible = true thing
  336.  
  337. local Properties = Combine({
  338. Transparency = 1;
  339. Thickness = 1;
  340. Visible = true;
  341. }, Properties);
  342.  
  343. Box['TopLeft'] = NewDrawing'Line'(Properties);
  344. Box['TopRight'] = NewDrawing'Line'(Properties);
  345. Box['BottomLeft'] = NewDrawing'Line'(Properties);
  346. Box['BottomRight'] = NewDrawing'Line'(Properties);
  347.  
  348. function Box:Update(CF, Size, Color, Properties)
  349. if not CF or not Size then return end
  350.  
  351. local TLPos, Visible1 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, Size.Y, 0)).p);
  352. local TRPos, Visible2 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, Size.Y, 0)).p);
  353. local BLPos, Visible3 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, -Size.Y, 0)).p);
  354. local BRPos, Visible4 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, -Size.Y, 0)).p);
  355.  
  356. Visible1 = TLPos.Z > 0;
  357. Visible2 = TRPos.Z > 0;
  358. Visible3 = BLPos.Z > 0;
  359. Visible4 = BRPos.Z > 0;
  360.  
  361. -- ## BEGIN UGLY CODE
  362. if Visible1 then
  363. Box['TopLeft'].Visible = true;
  364. Box['TopLeft'].Color = Color;
  365. Box['TopLeft'].From = Vector2.new(TLPos.X, TLPos.Y);
  366. Box['TopLeft'].To = Vector2.new(TRPos.X, TRPos.Y);
  367. else
  368. Box['TopLeft'].Visible = false;
  369. end
  370. if Visible2 then
  371. Box['TopRight'].Visible = true;
  372. Box['TopRight'].Color = Color;
  373. Box['TopRight'].From = Vector2.new(TRPos.X, TRPos.Y);
  374. Box['TopRight'].To = Vector2.new(BRPos.X, BRPos.Y);
  375. else
  376. Box['TopRight'].Visible = false;
  377. end
  378. if Visible3 then
  379. Box['BottomLeft'].Visible = true;
  380. Box['BottomLeft'].Color = Color;
  381. Box['BottomLeft'].From = Vector2.new(BLPos.X, BLPos.Y);
  382. Box['BottomLeft'].To = Vector2.new(TLPos.X, TLPos.Y);
  383. else
  384. Box['BottomLeft'].Visible = false;
  385. end
  386. if Visible4 then
  387. Box['BottomRight'].Visible = true;
  388. Box['BottomRight'].Color = Color;
  389. Box['BottomRight'].From = Vector2.new(BRPos.X, BRPos.Y);
  390. Box['BottomRight'].To = Vector2.new(BLPos.X, BLPos.Y);
  391. else
  392. Box['BottomRight'].Visible = false;
  393. end
  394. -- ## END UGLY CODE
  395. if Properties then
  396. GetTableData(Properties)(function(i, v)
  397. pcall(Set, Box['TopLeft'], i, v);
  398. pcall(Set, Box['TopRight'], i, v);
  399. pcall(Set, Box['BottomLeft'], i, v);
  400. pcall(Set, Box['BottomRight'], i, v);
  401. end)
  402. end
  403. end
  404. function Box:SetVisible(bool)
  405. pcall(Set, Box['TopLeft'], 'Visible', bool);
  406. pcall(Set, Box['TopRight'], 'Visible', bool);
  407. pcall(Set, Box['BottomLeft'], 'Visible', bool);
  408. pcall(Set, Box['BottomRight'], 'Visible', bool);
  409. end
  410. function Box:Remove()
  411. self:SetVisible(false);
  412. Box['TopLeft']:Remove();
  413. Box['TopRight']:Remove();
  414. Box['BottomLeft']:Remove();
  415. Box['BottomRight']:Remove();
  416. end
  417.  
  418. return Box;
  419. end
  420.  
  421. function CreateMenu(NewPosition) -- Create Menu
  422. local function FromHex(HEX)
  423. HEX = HEX:gsub('#', '');
  424. return Color3.fromRGB(tonumber('0x' .. HEX:sub(1, 2)), tonumber('0x' .. HEX:sub(3, 4)), tonumber('0x' .. HEX:sub(5, 6)));
  425. end
  426.  
  427. local Colors = {
  428. Primary = {
  429. Main = FromHex'424242';
  430. Light = FromHex'6d6d6d';
  431. Dark = FromHex'1b1b1b';
  432. };
  433. Secondary = {
  434. Main = FromHex'e0e0e0';
  435. Light = FromHex'ffffff';
  436. Dark = FromHex'aeaeae';
  437. };
  438. };
  439.  
  440. MenuLoaded = false;
  441.  
  442. GetTableData(UIButtons)(function(i, v)
  443. v.Instance.Visible = false;
  444. v.Instance:Remove();
  445. end)
  446. GetTableData(Sliders)(function(i, v)
  447. v.Instance.Visible = false;
  448. v.Instance:Remove();
  449. end)
  450.  
  451. UIButtons = {};
  452. Sliders = {};
  453.  
  454. local BaseSize = Vector2.new(300, 605);
  455. local BasePosition = NewPosition or Vector2.new(Camera.ViewportSize.X / 8 - (BaseSize.X / 2), Camera.ViewportSize.Y / 2 - (BaseSize.Y / 2));
  456.  
  457. Menu:AddMenuInstace('CrosshairX', NewDrawing'Line'{
  458. Visible = false;
  459. Color = Color3.new(0, 1, 0);
  460. Transparency = 1;
  461. Thickness = 1;
  462. });
  463. Menu:AddMenuInstace('CrosshairY', NewDrawing'Line'{
  464. Visible = false;
  465. Color = Color3.new(0, 1, 0);
  466. Transparency = 1;
  467. Thickness = 1;
  468. });
  469.  
  470. delay(.025, function() -- since zindex doesnt exist
  471. Menu:AddMenuInstace('Main', NewDrawing'Square'{
  472. Size = BaseSize;
  473. Position = BasePosition;
  474. Filled = false;
  475. Color = Colors.Primary.Main;
  476. Thickness = 3;
  477. Visible = true;
  478. });
  479. end);
  480. Menu:AddMenuInstace('TopBar', NewDrawing'Square'{
  481. Position = BasePosition;
  482. Size = Vector2.new(BaseSize.X, 25);
  483. Color = Colors.Primary.Dark;
  484. Filled = true;
  485. Visible = true;
  486. });
  487. Menu:AddMenuInstace('TopBarTwo', NewDrawing'Square'{
  488. Position = BasePosition + Vector2.new(0, 25);
  489. Size = Vector2.new(BaseSize.X, 60);
  490. Color = Colors.Primary.Main;
  491. Filled = true;
  492. Visible = true;
  493. });
  494. Menu:AddMenuInstace('TopBarText', NewDrawing'Text'{
  495. Size = 25;
  496. Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(25, 15);
  497. Text = 'Unnamed ESP';
  498. Color = Colors.Secondary.Light;
  499. Visible = true;
  500. });
  501. Menu:AddMenuInstace('TopBarTextBR', NewDrawing'Text'{
  502. Size = 15;
  503. Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(BaseSize.X - 65, 40);
  504. Text = 'by ic3w0lf';
  505. Color = Colors.Secondary.Dark;
  506. Visible = true;
  507. });
  508. Menu:AddMenuInstace('Filling', NewDrawing'Square'{
  509. Size = BaseSize - Vector2.new(0, 85);
  510. Position = BasePosition + Vector2.new(0, 85);
  511. Filled = true;
  512. Color = Colors.Secondary.Main;
  513. Transparency= .5;
  514. Visible = true;
  515. });
  516.  
  517. local CPos = 0;
  518.  
  519. GetTableData(Options)(function(i, v)
  520. if typeof(v.Value) == 'boolean' and not IsStringEmpty(v.Text) and v.Text ~= nil then
  521. CPos = CPos + 25;
  522. local BaseSize = Vector2.new(BaseSize.X, 30);
  523. local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(30, v.Index * 25 - 10);
  524. UIButtons[#UIButtons + 1] = {
  525. Option = v;
  526. Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
  527. Position = BasePosition - Vector2.new(30, 15);
  528. Size = BaseSize;
  529. Visible = false;
  530. });
  531. };
  532. Menu:AddMenuInstace(Format('%s_OuterCircle', v.Name), NewDrawing'Circle'{
  533. Radius = 10;
  534. Position = BasePosition;
  535. Color = Colors.Secondary.Light;
  536. Filled = true;
  537. Visible = true;
  538. });
  539. Menu:AddMenuInstace(Format('%s_InnerCircle', v.Name), NewDrawing'Circle'{
  540. Radius = 7;
  541. Position = BasePosition;
  542. Color = Colors.Secondary.Dark;
  543. Filled = true;
  544. Visible = v.Value;
  545. });
  546. Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
  547. Text = v.Text;
  548. Size = 20;
  549. Position = BasePosition + Vector2.new(20, -10);
  550. Visible = true;
  551. Color = Colors.Primary.Dark;
  552. });
  553. end
  554. end)
  555. GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
  556. if typeof(v.Value) == 'number' then
  557. CPos = CPos + 25;
  558.  
  559. local BaseSize = Vector2.new(BaseSize.X, 30);
  560. local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
  561.  
  562. local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
  563. Text = v.Text;
  564. Size = 20;
  565. Position = BasePosition + Vector2.new(20, -10);
  566. Visible = true;
  567. Color = Colors.Primary.Dark;
  568. });
  569. local AMT = Menu:AddMenuInstace(Format('%s_AmountText', v.Name), NewDrawing'Text'{
  570. Text = tostring(v.Value);
  571. Size = 20;
  572. Position = BasePosition;
  573. Visible = true;
  574. Color = Colors.Primary.Dark;
  575. });
  576. local Line = Menu:AddMenuInstace(Format('%s_SliderLine', v.Name), NewDrawing'Line'{
  577. Transparency = 1;
  578. Color = Colors.Primary.Dark;
  579. Thickness = 3;
  580. Visible = true;
  581. From = BasePosition + Vector2.new(20, 20);
  582. To = BasePosition + Vector2.new(BaseSize.X - 10, 20);
  583. });
  584. CPos = CPos + 10;
  585. local Slider = Menu:AddMenuInstace(Format('%s_Slider', v.Name), NewDrawing'Circle'{
  586. Visible = true;
  587. Filled = true;
  588. Radius = 6;
  589. Color = Colors.Secondary.Dark;
  590. Position = BasePosition + Vector2.new(35, 20);
  591. })
  592.  
  593. local CSlider = {Slider = Slider; Line = Line; Min = v.AllArgs[4]; Max = v.AllArgs[5]; Option = v};
  594. Sliders[#Sliders + 1] = CSlider;
  595.  
  596. -- local Percent = (v.Value / CSlider.Max) * 100;
  597. -- local Size = math.abs(Line.From.X - Line.To.X);
  598. -- local Value = Size * (Percent / 100); -- this shit's inaccurate but fuck it i'm not even gonna bother fixing it
  599.  
  600. Slider.Position = BasePosition + Vector2.new(40, 20);
  601.  
  602. v.BaseSize = BaseSize;
  603. v.BasePosition = BasePosition;
  604. AMT.Position = BasePosition + Vector2.new(BaseSize.X - AMT.TextBounds.X - 10, -10)
  605. end
  606. end)
  607. GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
  608. if typeof(v.Value) == 'EnumItem' then
  609. CPos = CPos + 30;
  610.  
  611. local BaseSize = Vector2.new(BaseSize.X, 30);
  612. local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
  613.  
  614. UIButtons[#UIButtons + 1] = {
  615. Option = v;
  616. Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
  617. Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
  618. Visible = true;
  619. Transparency= .5;
  620. Position = BasePosition + Vector2.new(15, -10);
  621. Color = Colors.Secondary.Light;
  622. Filled = true;
  623. });
  624. };
  625. local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
  626. Text = v.Text;
  627. Size = 20;
  628. Position = BasePosition + Vector2.new(20, -10);
  629. Visible = true;
  630. Color = Colors.Primary.Dark;
  631. });
  632. local BindText = Menu:AddMenuInstace(Format('%s_BindText', v.Name), NewDrawing'Text'{
  633. Text = tostring(v.Value):match'%w+%.%w+%.(.+)';
  634. Size = 20;
  635. Position = BasePosition;
  636. Visible = true;
  637. Color = Colors.Primary.Dark;
  638. });
  639.  
  640. Options[i].BaseSize = BaseSize;
  641. Options[i].BasePosition = BasePosition;
  642. BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 20, -10);
  643. end
  644. end)
  645. GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
  646. if typeof(v.Value) == 'function' then
  647. local BaseSize = Vector2.new(BaseSize.X, 30);
  648. local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos + (25 * v.AllArgs[4]) - 35);
  649.  
  650. UIButtons[#UIButtons + 1] = {
  651. Option = v;
  652. Instance = Menu:AddMenuInstace(Format('%s_Hitbox', v.Name), NewDrawing'Square'{
  653. Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
  654. Visible = true;
  655. Transparency= .5;
  656. Position = BasePosition + Vector2.new(15, -10);
  657. Color = Colors.Secondary.Light;
  658. Filled = true;
  659. });
  660. };
  661. local Text = Menu:AddMenuInstace(Format('%s_Text', v.Name), NewDrawing'Text'{
  662. Text = v.Text;
  663. Size = 20;
  664. Position = BasePosition + Vector2.new(20, -10);
  665. Visible = true;
  666. Color = Colors.Primary.Dark;
  667. });
  668.  
  669. -- BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 10, -10);
  670. end
  671. end)
  672.  
  673. delay(.1, function()
  674. MenuLoaded = true;
  675. end);
  676.  
  677. -- this has to be at the bottom cuz proto drawing api doesnt have zindex :triumph:
  678. Menu:AddMenuInstace('Cursor1', NewDrawing'Line'{
  679. Visible = false;
  680. Color = Color3.new(1, 0, 0);
  681. Transparency = 1;
  682. Thickness = 2;
  683. });
  684. Menu:AddMenuInstace('Cursor2', NewDrawing'Line'{
  685. Visible = false;
  686. Color = Color3.new(1, 0, 0);
  687. Transparency = 1;
  688. Thickness = 2;
  689. });
  690. Menu:AddMenuInstace('Cursor3', NewDrawing'Line'{
  691. Visible = false;
  692. Color = Color3.new(1, 0, 0);
  693. Transparency = 1;
  694. Thickness = 2;
  695. });
  696. end
  697.  
  698. CreateMenu();
  699.  
  700. shared.InputBeganCon = UserInputService.InputBegan:connect(function(input)
  701. if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
  702. MouseHeld = true;
  703. local Bar = Menu:GetInstance'TopBar';
  704. local Values = {
  705. Bar.Position.X;
  706. Bar.Position.Y;
  707. Bar.Position.X + Bar.Size.X;
  708. Bar.Position.Y + Bar.Size.Y;
  709. }
  710. if MouseHoveringOver(Values) and not syn then -- disable dragging for synapse cuz idk why it breaks
  711. DraggingUI = true;
  712. DragOffset = Menu:GetInstance'Main'.Position - GetMouseLocation();
  713. else
  714. for i, v in pairs(Sliders) do
  715. local Values = {
  716. v.Line.From.X - (v.Slider.Radius);
  717. v.Line.From.Y - (v.Slider.Radius);
  718. v.Line.To.X + (v.Slider.Radius);
  719. v.Line.To.Y + (v.Slider.Radius);
  720. };
  721. if MouseHoveringOver(Values) then
  722. DraggingWhat = v;
  723. Dragging = true;
  724. break
  725. end
  726. end
  727. end
  728. end
  729. end)
  730. shared.InputEndedCon = UserInputService.InputEnded:connect(function(input)
  731. if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
  732. MouseHeld = false;
  733. for i, v in pairs(UIButtons) do
  734. local Values = {
  735. v.Instance.Position.X;
  736. v.Instance.Position.Y;
  737. v.Instance.Position.X + v.Instance.Size.X;
  738. v.Instance.Position.Y + v.Instance.Size.Y;
  739. };
  740. if MouseHoveringOver(Values) then
  741. v.Option();
  742. break -- prevent clicking 2 options
  743. end
  744. end
  745. elseif input.UserInputType.Name == 'Keyboard' then
  746. if Binding then
  747. BindedKey = input.KeyCode;
  748. Binding = false;
  749. elseif input.KeyCode == Options.MenuKey.Value or (input.KeyCode == Enum.KeyCode.Home and UserInputService:IsKeyDown(Enum.KeyCode.LeftControl)) then
  750. Options.MenuOpen();
  751. end
  752. end
  753. end)
  754.  
  755. function ToggleMenu()
  756. if Options.MenuOpen.Value then
  757. GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
  758. if OldData[v] then
  759. pcall(Set, v, 'Visible', true);
  760. end
  761. end)
  762. else
  763. -- GUIService:SetMenuIsOpen(false);
  764. GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
  765. if v.Visible == true then
  766. OldData[v] = true;
  767. pcall(Set, v, 'Visible', false);
  768. end
  769. end)
  770. end
  771. end
  772.  
  773. function CheckRay(Instance, Distance, Position, Unit)
  774. local Pass = true;
  775. local Model = Instance;
  776.  
  777. if Distance > 999 then return false; end
  778.  
  779. if Instance:IsA'Player' and not Instance.Character then
  780. return false;
  781. elseif Instance:IsA'Player' and Instance.Character then
  782. Model = Instance.Character
  783. else
  784. Model = Instance.Parent;
  785. if Model.Parent == workspace then
  786. Model = Instance;
  787. end
  788. end
  789.  
  790. local _Ray = Ray.new(Position, Unit * Distance);
  791.  
  792. local List = {LocalPlayer.Character, Camera, Mouse.TargetFilter};
  793.  
  794. for i,v in pairs(IgnoreList) do table.insert(List, v); end;
  795.  
  796. local Hit = workspace:FindPartOnRayWithIgnoreList(_Ray, List);
  797.  
  798. if Hit and not Hit:IsDescendantOf(Model) then
  799. Pass = false;
  800. if Hit.Transparency >= .3 or not Hit.CanCollide and Hit.ClassName ~= Terrain then -- Detect invisible walls
  801. IgnoreList[#IgnoreList + 1] = Hit;
  802. end
  803. end
  804.  
  805. return Pass;
  806. end
  807.  
  808. function CheckTeam(Player)
  809. if Player.Neutral and LocalPlayer.Neutral then return true; end
  810. return Player.TeamColor == LocalPlayer.TeamColor;
  811. end
  812.  
  813. local CustomTeam = CustomTeams[game.PlaceId];
  814.  
  815. if CustomTeam ~= nil then
  816. ypcall(CustomTeam.Initialize);
  817. CheckTeam = CustomTeam.CheckTeam;
  818. end
  819.  
  820. function CheckPlayer(Player)
  821. if not Options.Enabled.Value then return false end
  822.  
  823. local Pass = true;
  824. local Distance = 0;
  825.  
  826. if Player ~= LocalPlayer and Player.Character then
  827. if not Options.ShowTeam.Value and CheckTeam(Player) then
  828. Pass = false;
  829. end
  830.  
  831. local Head = Player.Character:FindFirstChild'Head';
  832.  
  833. if Pass and Player.Character and Head then
  834. Distance = (Camera.CFrame.p - Head.Position).magnitude;
  835. if Options.VisCheck.Value then
  836. Pass = CheckRay(Player, Distance, Camera.CFrame.p, (Head.Position - Camera.CFrame.p).unit);
  837. end
  838. if Distance > Options.MaxDistance.Value then
  839. Pass = false;
  840. end
  841. end
  842. else
  843. Pass = false;
  844. end
  845.  
  846. return Pass, Distance;
  847. end
  848.  
  849. function CheckDistance(Instance)
  850. if not Options.Enabled.Value then return false end
  851.  
  852. local Pass = true;
  853. local Distance = 0;
  854.  
  855. if Instance ~= nil then
  856. Distance = (Camera.CFrame.p - Instance.Position).magnitude;
  857. if Options.VisCheck.Value then
  858. Pass = CheckRay(Instance, Distance, Camera.CFrame.p, (Instance.Position - Camera.CFrame.p).unit);
  859. end
  860. if Distance > Options.MaxDistance.Value then
  861. Pass = false;
  862. end
  863. else
  864. Pass = false;
  865. end
  866.  
  867. return Pass, Distance;
  868. end
  869.  
  870. function UpdatePlayerData()
  871. if (tick() - LastRefresh) > (Options.RefreshRate.Value / 1000) then
  872. LastRefresh = tick();
  873. if CustomESP and Options.Enabled.Value then
  874. pcall(CustomESP);
  875. end
  876. for i, v in pairs(RenderList.Instances) do
  877. if v.Instance ~= nil and v.Instance.Parent ~= nil and v.Instance:IsA'BasePart' then
  878. local Data = shared.InstanceData[v.Instance:GetDebugId()] or { Instances = {}; DontDelete = true };
  879.  
  880. Data.Instance = v.Instance;
  881.  
  882. Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
  883. Transparency = 1;
  884. Thickness = 2;
  885. }
  886. Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
  887. Size = Options.TextSize.Value;
  888. Center = true;
  889. Outline = Options.TextOutline.Value;
  890. Visible = true;
  891. };
  892. Data.Instances['DistanceTag'] = Data.Instances['DistanceTag'] or NewDrawing'Text'{
  893. Size = Options.TextSize.Value - 1;
  894. Center = true;
  895. Outline = Options.TextOutline.Value;
  896. Visible = true;
  897. };
  898.  
  899. local NameTag = Data.Instances['NameTag'];
  900. local DistanceTag = Data.Instances['DistanceTag'];
  901. local Tracer = Data.Instances['Tracer'];
  902.  
  903. local Pass, Distance = CheckDistance(v.Instance);
  904.  
  905. if Pass then
  906. local ScreenPosition, Vis = Camera:WorldToViewportPoint(v.Instance.Position);
  907.  
  908. if ScreenPosition.Z > 0 then
  909. local Color = v.Color;
  910.  
  911. local ScreenPositionUpper = ScreenPosition
  912. -- Camera:WorldToViewportPoint((v.Instance.CFrame * CFrame.new(0, v.Instance.Size.Y, 0)).p);
  913.  
  914. if Options.ShowName.Value then
  915. LocalPlayer.NameDisplayDistance = 0;
  916. NameTag.Visible = true;
  917. NameTag.Text = v.Text;
  918. NameTag.Size = Options.TextSize.Value;
  919. NameTag.Outline = Options.TextOutline.Value;
  920. NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y);
  921. NameTag.Color = Color;
  922. if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
  923. NameTag.Font = Drawing.Fonts.UI;
  924. end
  925. else
  926. LocalPlayer.NameDisplayDistance = 100;
  927. NameTag.Visible = false;
  928. end
  929. if Options.ShowDistance.Value or Options.ShowHealth.Value then
  930. DistanceTag.Visible = true;
  931. DistanceTag.Size = Options.TextSize.Value - 1;
  932. DistanceTag.Outline = Options.TextOutline.Value;
  933. DistanceTag.Color = Color3.new(1, 1, 1);
  934. if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
  935. NameTag.Font = Drawing.Fonts.UI;
  936. end
  937.  
  938. local Str = '';
  939.  
  940. if Options.ShowDistance.Value then
  941. Str = Str .. Format('[%d] ', Distance);
  942. end
  943.  
  944. DistanceTag.Text = Str;
  945. DistanceTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) + Vector2.new(0, NameTag.TextBounds.Y);
  946. else
  947. DistanceTag.Visible = false;
  948. end
  949. if Options.ShowTracers.Value then
  950. Tracer.Visible = true;
  951. Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y);
  952. Tracer.To = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
  953. Tracer.Color = Color;
  954. else
  955. Tracer.Visible = false;
  956. end
  957. else
  958. NameTag.Visible = false;
  959. DistanceTag.Visible = false;
  960. Tracer.Visible = false;
  961. end
  962. else
  963. NameTag.Visible = false;
  964. DistanceTag.Visible = false;
  965. Tracer.Visible = false;
  966. end
  967.  
  968. Data.Instances['NameTag'] = NameTag;
  969. Data.Instances['DistanceTag'] = DistanceTag;
  970. Data.Instances['Tracer'] = Tracer;
  971.  
  972. shared.InstanceData[v.Instance:GetDebugId()] = Data;
  973. end
  974. end
  975. for i, v in pairs(Players:GetPlayers()) do
  976. local Data = shared.InstanceData[v.Name] or { Instances = {}; };
  977.  
  978. Data.Instances['Box'] = Data.Instances['Box'] or LineBox:Create{Thickness = 3};
  979. Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
  980. Transparency = 1;
  981. Thickness = 2;
  982. }
  983. Data.Instances['HeadDot'] = Data.Instances['HeadDot'] or NewDrawing'Circle'{
  984. Filled = true;
  985. NumSides = 30;
  986. }
  987. Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
  988. Size = Options.TextSize.Value;
  989. Center = true;
  990. Outline = Options.TextOutline.Value;
  991. Visible = true;
  992. };
  993. Data.Instances['DistanceHealthTag'] = Data.Instances['DistanceHealthTag'] or NewDrawing'Text'{
  994. Size = Options.TextSize.Value - 1;
  995. Center = true;
  996. Outline = Options.TextOutline.Value;
  997. Visible = true;
  998. };
  999.  
  1000. local NameTag = Data.Instances['NameTag'];
  1001. local DistanceTag = Data.Instances['DistanceHealthTag'];
  1002. local Tracer = Data.Instances['Tracer'];
  1003. local HeadDot = Data.Instances['HeadDot'];
  1004. local Box = Data.Instances['Box'];
  1005.  
  1006. local Pass, Distance = CheckPlayer(v);
  1007.  
  1008. if Pass and v.Character then
  1009. local Humanoid = v.Character:FindFirstChildOfClass'Humanoid';
  1010. local Head = v.Character:FindFirstChild'Head';
  1011. local HumanoidRootPart = v.Character:FindFirstChild'HumanoidRootPart';
  1012. if v.Character ~= nil and Head then
  1013. local ScreenPosition, Vis = Camera:WorldToViewportPoint(Head.Position);
  1014.  
  1015. if ScreenPosition.Z > 0 then
  1016. local Color = CheckTeam(v) and Green or Red;
  1017.  
  1018. if (Options.ShowTeamColor.Value) then Color = v.TeamColor.Color; end
  1019.  
  1020. local ScreenPositionUpper = Camera:WorldToViewportPoint(Head.CFrame * CFrame.new(0, Head.Size.Y, 0).p);
  1021. local Scale = Head.Size.Y / 2;
  1022.  
  1023. if Options.ShowName.Value then
  1024. NameTag.Visible = true;
  1025. NameTag.Text = v.Name .. (CustomPlayerTag and CustomPlayerTag(v) or '');
  1026. NameTag.Size = Options.TextSize.Value;
  1027. NameTag.Outline = Options.TextOutline.Value;
  1028. NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y);
  1029. NameTag.Color = Color;
  1030. if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
  1031. NameTag.Font = Drawing.Fonts.UI;
  1032. end
  1033. else
  1034. NameTag.Visible = false;
  1035. end
  1036. if Options.ShowDistance.Value or Options.ShowHealth.Value then
  1037. DistanceTag.Visible = true;
  1038. DistanceTag.Size = Options.TextSize.Value - 1;
  1039. DistanceTag.Outline = Options.TextOutline.Value;
  1040. DistanceTag.Color = Color3.new(1, 1, 1);
  1041. if Drawing.Fonts then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
  1042. NameTag.Font = Drawing.Fonts.UI;
  1043. end
  1044.  
  1045. local Str = '';
  1046.  
  1047. if Options.ShowDistance.Value then
  1048. Str = Str .. Format('[%d] ', Distance);
  1049. end
  1050. if Options.ShowHealth.Value and Humanoid then
  1051. Str = Str .. Format('[%d/100]', Humanoid.Health / Humanoid.MaxHealth * 100);
  1052. end
  1053.  
  1054. DistanceTag.Text = Str;
  1055. DistanceTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) + Vector2.new(0, NameTag.Size);
  1056. else
  1057. DistanceTag.Visible = false;
  1058. end
  1059. if Options.ShowDot.Value then
  1060. local Top = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, Scale, 0)).p);
  1061. local Bottom = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, -Scale, 0)).p);
  1062. local Radius = (Top - Bottom).y;
  1063.  
  1064. HeadDot.Visible = true;
  1065. HeadDot.Color = Color;
  1066. HeadDot.Position = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
  1067. HeadDot.Radius = Radius;
  1068. else
  1069. HeadDot.Visible = false;
  1070. end
  1071. if Options.ShowTracers.Value then
  1072. Tracer.Visible = true;
  1073. Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y);
  1074. Tracer.To = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
  1075. Tracer.Color = Color;
  1076. else
  1077. Tracer.Visible = false;
  1078. end
  1079. if Options.ShowBoxes.Value and HumanoidRootPart then
  1080. Box:Update(HumanoidRootPart.CFrame, Vector3.new(2, 3, 0) * (Scale * 2), Color);
  1081. else
  1082. Box:SetVisible(false);
  1083. end
  1084. else
  1085. NameTag.Visible = false;
  1086. DistanceTag.Visible = false;
  1087. Tracer.Visible = false;
  1088. HeadDot.Visible = false;
  1089.  
  1090. Box:SetVisible(false);
  1091. end
  1092. end
  1093. else
  1094. NameTag.Visible = false;
  1095. DistanceTag.Visible = false;
  1096. Tracer.Visible = false;
  1097. HeadDot.Visible = false;
  1098.  
  1099. Box:SetVisible(false);
  1100. end
  1101.  
  1102. shared.InstanceData[v.Name] = Data;
  1103. end
  1104. end
  1105. end
  1106.  
  1107. function Update()
  1108. if tick() % .5 < .01 then
  1109. for i, v in pairs(shared.InstanceData) do
  1110. if not Players:FindFirstChild(tostring(i)) then
  1111. if not shared.InstanceData[i].DontDelete then
  1112. GetTableData(v.Instances)(function(i, obj)
  1113. obj.Visible = false;
  1114. obj:Remove();
  1115. v.Instances[i] = nil;
  1116. end)
  1117. shared.InstanceData[i] = nil;
  1118. else
  1119. if shared.InstanceData[i].Instance == nil or shared.InstanceData[i].Instance.Parent == nil then
  1120. GetTableData(v.Instances)(function(i, obj)
  1121. obj.Visible = false;
  1122. obj:Remove();
  1123. v.Instances[i] = nil;
  1124. end)
  1125. shared.InstanceData[i] = nil;
  1126. end
  1127. end
  1128. end
  1129. end
  1130. end
  1131.  
  1132. local CX = Menu:GetInstance'CrosshairX';
  1133. local CY = Menu:GetInstance'CrosshairY';
  1134.  
  1135. if Options.Crosshair.Value then
  1136. CX.Visible = true;
  1137. CY.Visible = true;
  1138.  
  1139. CX.To = Vector2.new((Camera.ViewportSize.X / 2) - 8, (Camera.ViewportSize.Y / 2));
  1140. CX.From = Vector2.new((Camera.ViewportSize.X / 2) + 8, (Camera.ViewportSize.Y / 2));
  1141. CY.To = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) - 8);
  1142. CY.From = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) + 8);
  1143. else
  1144. CX.Visible = false;
  1145. CY.Visible = false;
  1146. end
  1147.  
  1148. if Options.MenuOpen.Value and MenuLoaded then
  1149. local MLocation = GetMouseLocation();
  1150. shared.MenuDrawingData.Instances.Main.Color = Color3.fromHSV(tick() * 24 % 255/255, 1, 1);
  1151. local MainInstance = Menu:GetInstance'Main';
  1152. local Values = {
  1153. MainInstance.Position.X;
  1154. MainInstance.Position.Y;
  1155. MainInstance.Position.X + MainInstance.Size.X;
  1156. MainInstance.Position.Y + MainInstance.Size.Y;
  1157. };
  1158. if MainInstance and MouseHoveringOver(Values) then
  1159. Debounce.CursorVis = true;
  1160. -- GUIService:SetMenuIsOpen(true);
  1161. Menu:UpdateMenuInstance'Cursor1'{
  1162. Visible = true;
  1163. From = Vector2.new(MLocation.x, MLocation.y);
  1164. To = Vector2.new(MLocation.x + 5, MLocation.y + 6);
  1165. }
  1166. Menu:UpdateMenuInstance'Cursor2'{
  1167. Visible = true;
  1168. From = Vector2.new(MLocation.x, MLocation.y);
  1169. To = Vector2.new(MLocation.x, MLocation.y + 8);
  1170. }
  1171. Menu:UpdateMenuInstance'Cursor3'{
  1172. Visible = true;
  1173. From = Vector2.new(MLocation.x, MLocation.y + 6);
  1174. To = Vector2.new(MLocation.x + 5, MLocation.y + 5);
  1175. }
  1176. else
  1177. if Debounce.CursorVis then
  1178. Debounce.CursorVis = false;
  1179. -- GUIService:SetMenuIsOpen(false);
  1180. Menu:UpdateMenuInstance'Cursor1'{Visible = false};
  1181. Menu:UpdateMenuInstance'Cursor2'{Visible = false};
  1182. Menu:UpdateMenuInstance'Cursor3'{Visible = false};
  1183. end
  1184. end
  1185. if MouseHeld then
  1186. if Dragging then
  1187. DraggingWhat.Slider.Position = Vector2.new(math.clamp(MLocation.X, DraggingWhat.Line.From.X, DraggingWhat.Line.To.X), DraggingWhat.Slider.Position.Y);
  1188. local Percent = (DraggingWhat.Slider.Position.X - DraggingWhat.Line.From.X) / ((DraggingWhat.Line.To.X - DraggingWhat.Line.From.X));
  1189. local Value = CalculateValue(DraggingWhat.Min, DraggingWhat.Max, Percent);
  1190. DraggingWhat.Option(Value);
  1191. elseif DraggingUI then
  1192. Debounce.UIDrag = true;
  1193. local Main = Menu:GetInstance'Main';
  1194. local MousePos = GetMouseLocation();
  1195. Main.Position = MousePos + DragOffset;
  1196. end
  1197. else
  1198. Dragging = false;
  1199. if DraggingUI and Debounce.UIDrag then
  1200. Debounce.UIDrag = false;
  1201. DraggingUI = false;
  1202. CreateMenu(Menu:GetInstance'Main'.Position);
  1203. end
  1204. end
  1205. if not Debounce.Menu then
  1206. Debounce.Menu = true;
  1207. ToggleMenu();
  1208. end
  1209. elseif Debounce.Menu and not Options.MenuOpen.Value then
  1210. Debounce.Menu = false;
  1211. ToggleMenu();
  1212. end
  1213. end
  1214.  
  1215. RunService:UnbindFromRenderStep(GetDataName);
  1216. RunService:UnbindFromRenderStep(UpdateName);
  1217.  
  1218. RunService:BindToRenderStep(GetDataName, 1, UpdatePlayerData);
  1219. RunService:BindToRenderStep(UpdateName, 1, Update);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement