Advertisement
iiFlamez

Untitled

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