Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- assert(Drawing, 'exploit not supported')
- local UserInputService = game:GetService'UserInputService';
- local HttpService = game:GetService'HttpService';
- local GUIService = game:GetService'GuiService';
- local RunService = game:GetService'RunService';
- local Players = game:GetService'Players';
- local LocalPlayer = Players.LocalPlayer;
- local Camera = workspace.CurrentCamera
- local Mouse = LocalPlayer:GetMouse();
- local Menu = {};
- local MouseHeld = false;
- local LastRefresh = 0;
- local OptionsFile = 'IC3_ESP_SETTINGS.dat';
- local Binding = false;
- local BindedKey = nil;
- local OIndex = 0;
- local LineBox = {};
- local UIButtons = {};
- local Sliders = {};
- local Dragging = false;
- local DraggingUI = false;
- local DragOffset = Vector2.new();
- local DraggingWhat = nil;
- local OldData = {};
- local IgnoreList = {};
- local Red = Color3.new(1, 0, 0);
- local Green = Color3.new(0, 1, 0);
- local MenuLoaded = false;
- local ErrorLogging = false;
- -- local _pc = pcall;
- -- local pcall = ErrorLogging and function(f, ...)
- -- local ret, err = _pc(f, ...);
- -- if not ret then
- -- warn(ret, err);
- -- warn(debug.traceback());
- -- end
- -- return ret, err;
- -- end or _pc;
- shared.MenuDrawingData = shared.MenuDrawingData or { Instances = {} };
- shared.InstanceData = shared.InstanceData or {};
- shared.RSName = shared.RSName or ('UnnamedESP_by_ic3-' .. HttpService:GenerateGUID(false));
- local GetDataName = shared.RSName .. '-GetData';
- local UpdateName = shared.RSName .. '-Update';
- local Debounce = setmetatable({}, {
- __index = function(t, i)
- return rawget(t, i) or false
- end;
- });
- if shared.UESP_InputBeganCon then pcall(function() shared.UESP_InputBeganCon:disconnect() end); end
- if shared.UESP_InputEndedCon then pcall(function() shared.UESP_InputEndedCon:disconnect() end); end
- local RealPrint, LastPrintTick = print, 0;
- local LatestPrints = setmetatable({}, {
- __index = function(t, i)
- return rawget(t, i) or 0;
- end
- });
- local function print(...)
- local Content = unpack{...};
- local print = RealPrint;
- if tick() - LatestPrints[Content] > 5 then
- LatestPrints[Content] = tick();
- print(Content);
- end
- end
- local function Set(t, i, v)
- t[i] = v;
- end
- local Teams = {};
- local CustomTeams = { -- Games that don't use roblox's team system
- [2563455047] = {
- Initialize = function()
- Teams.Sheriffs = {}; -- prevent big error
- Teams.Bandits = {}; -- prevent big error
- local Func = game:GetService'ReplicatedStorage':WaitForChild('RogueFunc', 1);
- local Event = game:GetService'ReplicatedStorage':WaitForChild('RogueEvent', 1);
- local S, B = Func:InvokeServer'AllTeamData';
- Teams.Sheriffs = S;
- Teams.Bandits = B;
- Event.OnClientEvent:connect(function(id, PlayerName, Team, Remove) -- stolen straight from decompiled src lul
- if id == 'UpdateTeam' then
- local TeamTable, NotTeamTable
- if Team == 'Bandits' then
- TeamTable = TDM.Bandits
- NotTeamTable = TDM.Sheriffs
- else
- TeamTable = TDM.Sheriffs
- NotTeamTable = TDM.Bandits
- end
- if Remove then
- TeamTable[PlayerName] = nil
- else
- TeamTable[PlayerName] = true
- NotTeamTable[PlayerName] = nil
- end
- if PlayerName == LocalPlayer.Name then
- TDM.Friendlys = TeamTable
- TDM.Enemies = NotTeamTable
- end
- end
- end)
- end;
- CheckTeam = function(Player)
- local LocalTeam = Teams.Sheriffs[LocalPlayer.Name] and Teams.Sheriffs or Teams.Bandits;
- return LocalTeam[Player.Name] and true or false;
- end;
- };
- }
- local RenderList = {Instances = {}};
- function RenderList:AddOrUpdateInstance(Instance, Obj2Draw, Text, Color)
- -- print(Instance, Obj2Draw, Text, Color);
- RenderList.Instances[Instance] = { ParentInstance = Instance; Instance = Obj2Draw; Text = Text; Color = Color };
- return RenderList.Instances[Instance];
- end
- if bind then
- -- bind('f2', function()
- -- print(RenderList:AddOrUpdateInstance(LocalPlayer.Character, LocalPlayer.Character.Head, 'nigger', Color3.fromRGB(255, 255, 0)));
- -- end)
- -- bind('f3', function()
- -- if tableToString then print(tableToString(RenderList)); end
- -- end)
- end
- local CustomPlayerTag;
- local CustomESP;
- local Modules = {
- [2262441883] = {
- CustomPlayerTag = function(Player)
- return Player:FindFirstChild'Job' and (' [' .. Player.Job.Value .. ']') or '';
- end;
- CustomESP = function()
- if workspace:FindFirstChild'MoneyPrinters' then
- for i, v in pairs(workspace.MoneyPrinters:GetChildren()) do
- local Main = v:FindFirstChild'Main';
- local Owner = v:FindFirstChild'TrueOwner';
- local Money = v:FindFirstChild'Int' and v.Int:FindFirstChild'Money' or nil;
- if Main and Owner and Money then
- local O = tostring(Owner.Value);
- local M = tostring(Money.Value);
- pcall(RenderList.AddOrUpdateInstance, RenderList, v, Main, string.format('Money Printer\nOwned by %s\n[%s]', O, M), Color3.fromRGB(13, 255, 227));
- end
- end
- end
- end;
- };
- [3016661674] = {
- CustomPlayerTag = function(Player)
- local Name = '';
- if Player:FindFirstChild'leaderstats' then
- local Prefix = '';
- local Extra = {};
- Name = Name .. '\n[';
- if Player.leaderstats:FindFirstChild'Prestige' and Player.leaderstats.Prestige.ClassName == 'IntValue' and Player.leaderstats.Prestige.Value > 0 then
- Name = Name .. '#' .. tostring(Player.leaderstats.Prestige.Value) .. ' ';
- end
- if Player.leaderstats:FindFirstChild'HouseRank' and Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.HouseRank.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.HouseRank.Value) then
- Prefix = Player.leaderstats.HouseRank.Value == 'Owner' and (Player.leaderstats.Gender.Value == 'Female' and 'Lady ' or 'Lord ') or '';
- end
- if Player.leaderstats:FindFirstChild'FirstName' and Player.leaderstats.FirstName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.FirstName.Value) then
- Name = Name .. '' .. Prefix .. Player.leaderstats.FirstName.Value;
- end
- if Player.leaderstats:FindFirstChild'LastName' and Player.leaderstats.LastName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.LastName.Value) then
- Name = Name .. ' ' .. Player.leaderstats.LastName.Value;
- end
- if not IsStringEmpty(Name) then Name = Name .. ']'; end
- if Player.Character then
- if Player.Character and Player.Character:FindFirstChild'Danger' then table.insert(Extra, 'D'); end
- if Player.Character:FindFirstChild'ManaAbilities' and Player.Character.ManaAbilities:FindFirstChild'ManaSprint' then table.insert(Extra, 'D1'); end
- if Player.Character:FindFirstChild'Vampirism' then table.insert(Extra, 'V'); end
- if Player.Character:FindFirstChild'Observe' then table.insert(Extra, 'ILL'); end
- if Player.Character:FindFirstChild'Inferi' then table.insert(Extra, 'NEC'); end
- -- if Player.Character:FindFirstChild'Inferi' then table.insert(Extra, ''); end
- if Player.Character:FindFirstChild'World\'s Pulse' then table.insert(Extra, 'DZIN'); end
- -- if Player.Character:FindFirstChild'Fimbulvetr' then table.insert(Extra, 'FIMB'); end
- -- if Player.Character:FindFirstChild'Gate' then table.insert(Extra, 'GATE'); end
- end
- if Player:FindFirstChild'Backpack' then
- if Player.Backpack:FindFirstChild'Observe' then table.insert(Extra, 'ILL'); end
- if Player.Backpack:FindFirstChild'Inferi' then table.insert(Extra, 'NEC'); end
- if Player.Backpack:FindFirstChild'World\'s Pulse' then table.insert(Extra, 'DZIN'); end
- -- if Player.Backpack:FindFirstChild'ObserveBlock' then table.insert(Extra, 'OB'); end
- -- if Player.Backpack:FindFirstChild'Fimbulvetr' then table.insert(Extra, 'FIMB'); end
- -- if Player.Backpack:FindFirstChild'Gate' then table.insert(Extra, 'GATE'); end
- -- if Player.Backpack:FindFirstChild'Gate' then table.insert(Extra, ''); end
- end
- if #Extra > 0 then Name = Name .. ' [' .. table.concat(Extra, '-') .. ']'; end
- -- if Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.Gender.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.Gender.Value) then
- -- Name = Name .. string.format(' [%s]', Player.leaderstats.Gender.Value:sub(1, 1));
- -- end
- end
- return Name;
- end;
- };
- [3541987450] = {
- CustomPlayerTag = function(Player)
- local Name = '';
- if Player:FindFirstChild'leaderstats' then
- Name = Name .. '\n[';
- local Prefix = '';
- if Player.leaderstats:FindFirstChild'Prestige' and Player.leaderstats.Prestige.ClassName == 'IntValue' and Player.leaderstats.Prestige.Value > 0 then
- Name = Name .. '#' .. tostring(Player.leaderstats.Prestige.Value) .. ' ';
- end
- if Player.leaderstats:FindFirstChild'HouseRank' and Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.HouseRank.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.HouseRank.Value) then
- Prefix = Player.leaderstats.HouseRank.Value == 'Owner' and (Player.leaderstats.Gender.Value == 'Female' and 'Lady ' or 'Lord ') or '';
- end
- if Player.leaderstats:FindFirstChild'FirstName' and Player.leaderstats.FirstName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.FirstName.Value) then
- Name = Name .. '' .. Prefix .. Player.leaderstats.FirstName.Value;
- end
- if Player.leaderstats:FindFirstChild'LastName' and Player.leaderstats.LastName.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.LastName.Value) then
- Name = Name .. ' ' .. Player.leaderstats.LastName.Value;
- end
- if Player.leaderstats:FindFirstChild'UberTitle' and Player.leaderstats.UberTitle.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.UberTitle.Value) then
- Name = Name .. ', ' .. Player.leaderstats.UberTitle.Value;
- end
- if not IsStringEmpty(Name) then Name = Name .. ']'; end
- -- if Player.leaderstats:FindFirstChild'Gender' and Player.leaderstats.Gender.ClassName == 'StringValue' and not IsStringEmpty(Player.leaderstats.Gender.Value) then
- -- Name = Name .. string.format(' [%s]', Player.leaderstats.Gender.Value:sub(1, 1));
- -- end
- end
- return Name;
- end;
- };
- }
- if Modules[game.PlaceId] ~= nil then
- local Module = Modules[game.PlaceId];
- CustomPlayerTag = Module.CustomPlayerTag or nil;
- CustomESP = Module.CustomESP or nil;
- end
- function GetMouseLocation()
- return UserInputService:GetMouseLocation();
- end
- function MouseHoveringOver(Values)
- local X1, Y1, X2, Y2 = Values[1], Values[2], Values[3], Values[4]
- local MLocation = GetMouseLocation();
- return (MLocation.x >= X1 and MLocation.x <= (X1 + (X2 - X1))) and (MLocation.y >= Y1 and MLocation.y <= (Y1 + (Y2 - Y1)));
- end
- function GetTableData(t) -- basically table.foreach i dont even know why i made this
- if typeof(t) ~= 'table' then return end
- return setmetatable(t, {
- __call = function(t, func)
- if typeof(func) ~= 'function' then return end;
- for i, v in pairs(t) do
- pcall(func, i, v);
- end
- end;
- });
- end
- local function Format(format, ...)
- return string.format(format, ...);
- end
- function CalculateValue(Min, Max, Percent)
- return Min + math.floor(((Max - Min) * Percent) + .5);
- end
- function NewDrawing(InstanceName)
- local Instance = Drawing.new(InstanceName);
- return (function(Properties)
- for i, v in pairs(Properties) do
- pcall(Set, Instance, i, v);
- end
- return Instance;
- end)
- end
- function Menu:AddMenuInstance(Name, DrawingType, Properties)
- -- if shared.MenuDrawingData.Instances[Name] ~= nil then
- -- shared.MenuDrawingData.Instances[Name]:Remove();
- -- end
- local Instance;
- if shared.MenuDrawingData.Instances[Name] ~= nil then
- Instance = shared.MenuDrawingData.Instances[Name];
- for i, v in pairs(Properties) do
- pcall(Set, Instance, i, v);
- end
- else
- Instance = NewDrawing(DrawingType)(Properties);
- end
- shared.MenuDrawingData.Instances[Name] = Instance;
- return Instance;
- end
- function Menu:UpdateMenuInstance(Name)
- local Instance = shared.MenuDrawingData.Instances[Name];
- if Instance ~= nil then
- return (function(Properties)
- for i, v in pairs(Properties) do
- -- print(Format('%s %s -> %s', Name, tostring(i), tostring(v)));
- pcall(Set, Instance, i, v);
- end
- return Instance;
- end)
- end
- end
- function Menu:GetInstance(Name)
- return shared.MenuDrawingData.Instances[Name];
- end
- local Options = setmetatable({}, {
- __call = function(t, ...)
- local Arguments = {...};
- local Name = Arguments[1];
- OIndex = OIndex + 1; -- (typeof(Arguments[3]) == 'boolean' and 1 or 0);
- rawset(t, Name, setmetatable({
- Name = Arguments[1];
- Text = Arguments[2];
- Value = Arguments[3];
- DefaultValue = Arguments[3];
- AllArgs = Arguments;
- Index = OIndex;
- }, {
- __call = function(t, v)
- local self = t;
- if typeof(t.Value) == 'function' then
- t.Value();
- elseif typeof(t.Value) == 'EnumItem' then
- local BT = Menu:GetInstance(Format('%s_BindText', t.Name));
- Binding = true;
- local Val = 0
- while Binding do
- wait();
- Val = (Val + 1) % 17;
- BT.Text = Val <= 8 and '|' or '';
- end
- t.Value = BindedKey;
- BT.Text = tostring(t.Value):match'%w+%.%w+%.(.+)';
- BT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - BT.TextBounds.X - 20, -10);
- else
- local NewValue = v;
- if NewValue == nil then NewValue = not t.Value; end
- rawset(t, 'Value', NewValue);
- if Arguments[2] ~= nil and Menu:GetInstance'TopBar'.Visible then
- if typeof(Arguments[3]) == 'number' then
- local AMT = Menu:GetInstance(Format('%s_AmountText', t.Name));
- if AMT then
- AMT.Text = tostring(t.Value);
- AMT.Position = t.BasePosition + Vector2.new(t.BaseSize.X - AMT.TextBounds.X - 10, -10);
- end
- else
- local Inner = Menu:GetInstance(Format('%s_InnerCircle', t.Name));
- if Inner then Inner.Visible = t.Value; end
- end
- end
- end
- end;
- }));
- end;
- })
- function Load()
- local _, Result = pcall(readfile, OptionsFile);
- if _ then -- extremely ugly code yea i know but i dont care p.s. i hate pcall
- local _, Table = pcall(HttpService.JSONDecode, HttpService, Result);
- if _ then
- for i, v in pairs(Table) do
- if Options[i] ~= nil and Options[i].Value ~= nil and (typeof(Options[i].Value) == 'boolean' or typeof(Options[i].Value) == 'number') then
- Options[i].Value = v.Value;
- pcall(Options[i], v.Value);
- end
- end
- end
- end
- end
- Options('Enabled', 'ESP Enabled', true);
- Options('ShowTeam', 'Show Team', false);
- Options('ShowTeamColor', 'Show Team Color', false);
- Options('ShowName', 'Show Names', true);
- Options('ShowDistance', 'Show Distance', true);
- Options('ShowHealth', 'Show Health', true);
- Options('ShowBoxes', 'Show Boxes', true);
- Options('ShowTracers', 'Show Tracers', true);
- Options('ShowDot', 'Show Head Dot', false);
- Options('VisCheck', 'Visibility Check', false);
- Options('Crosshair', 'Crosshair', false);
- Options('TextOutline', 'Text Outline', true);
- Options('Rainbow', 'Rainbow Mode', false);
- Options('TextSize', 'Text Size', syn and 18 or 14, 10, 24); -- cuz synapse fonts look weird???
- Options('MaxDistance', 'Max Distance', 2500, 100, 25000);
- Options('RefreshRate', 'Refresh Rate (ms)', 5, 1, 200);
- Options('MenuKey', 'Menu Key', Enum.KeyCode.F4, 1);
- Options('ToggleKey', 'Toggle Key', Enum.KeyCode.F3, 1);
- Options('ResetSettings', 'Reset Settings', function()
- for i, v in pairs(Options) do
- 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
- Options[i](Options[i].DefaultValue);
- end
- end
- end, 4);
- Options('LoadSettings', 'Load Settings', Load, 3);
- Options('SaveSettings', 'Save Settings', function()
- writefile(OptionsFile, HttpService:JSONEncode(Options));
- end, 2)
- -- Options.SaveSettings.Value();
- Load();
- Options('MenuOpen', nil, true);
- local function Combine(...)
- local Output = {};
- for i, v in pairs{...} do
- if typeof(v) == 'table' then
- table.foreach(v, function(i, v)
- Output[i] = v;
- end)
- end
- end
- return Output
- end
- function IsStringEmpty(String)
- if type(String) == 'string' then
- return String:match'^%s+$' ~= nil or #String == 0 or String == '' or false;
- end
- return false
- end
- function LineBox:Create(Properties)
- local Box = { Visible = true }; -- prevent errors not really though dont worry bout the Visible = true thing
- local Properties = Combine({
- Transparency = 1;
- Thickness = 1;
- Visible = true;
- }, Properties);
- Box['TopLeft'] = NewDrawing'Line'(Properties);
- Box['TopRight'] = NewDrawing'Line'(Properties);
- Box['BottomLeft'] = NewDrawing'Line'(Properties);
- Box['BottomRight'] = NewDrawing'Line'(Properties);
- function Box:Update(CF, Size, Color, Properties)
- if not CF or not Size then return end
- local TLPos, Visible1 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, Size.Y, 0)).p);
- local TRPos, Visible2 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, Size.Y, 0)).p);
- local BLPos, Visible3 = Camera:WorldToViewportPoint((CF * CFrame.new( Size.X, -Size.Y, 0)).p);
- local BRPos, Visible4 = Camera:WorldToViewportPoint((CF * CFrame.new(-Size.X, -Size.Y, 0)).p);
- Visible1 = TLPos.Z > 0 -- (commented | reason: random flashes);
- Visible2 = TRPos.Z > 0 -- (commented | reason: random flashes);
- Visible3 = BLPos.Z > 0 -- (commented | reason: random flashes);
- Visible4 = BRPos.Z > 0 -- (commented | reason: random flashes);
- -- ## BEGIN UGLY CODE
- if Visible1 then
- Box['TopLeft'].Visible = true;
- Box['TopLeft'].Color = Color;
- Box['TopLeft'].From = Vector2.new(TLPos.X, TLPos.Y);
- Box['TopLeft'].To = Vector2.new(TRPos.X, TRPos.Y);
- else
- Box['TopLeft'].Visible = false;
- end
- if Visible2 then
- Box['TopRight'].Visible = true;
- Box['TopRight'].Color = Color;
- Box['TopRight'].From = Vector2.new(TRPos.X, TRPos.Y);
- Box['TopRight'].To = Vector2.new(BRPos.X, BRPos.Y);
- else
- Box['TopRight'].Visible = false;
- end
- if Visible3 then
- Box['BottomLeft'].Visible = true;
- Box['BottomLeft'].Color = Color;
- Box['BottomLeft'].From = Vector2.new(BLPos.X, BLPos.Y);
- Box['BottomLeft'].To = Vector2.new(TLPos.X, TLPos.Y);
- else
- Box['BottomLeft'].Visible = false;
- end
- if Visible4 then
- Box['BottomRight'].Visible = true;
- Box['BottomRight'].Color = Color;
- Box['BottomRight'].From = Vector2.new(BRPos.X, BRPos.Y);
- Box['BottomRight'].To = Vector2.new(BLPos.X, BLPos.Y);
- else
- Box['BottomRight'].Visible = false;
- end
- -- ## END UGLY CODE
- if Properties then
- GetTableData(Properties)(function(i, v)
- pcall(Set, Box['TopLeft'], i, v);
- pcall(Set, Box['TopRight'], i, v);
- pcall(Set, Box['BottomLeft'], i, v);
- pcall(Set, Box['BottomRight'], i, v);
- end)
- end
- end
- function Box:SetVisible(bool)
- pcall(Set, Box['TopLeft'], 'Visible', bool);
- pcall(Set, Box['TopRight'], 'Visible', bool);
- pcall(Set, Box['BottomLeft'], 'Visible', bool);
- pcall(Set, Box['BottomRight'], 'Visible', bool);
- end
- function Box:Remove()
- self:SetVisible(false);
- Box['TopLeft']:Remove();
- Box['TopRight']:Remove();
- Box['BottomLeft']:Remove();
- Box['BottomRight']:Remove();
- end
- return Box;
- end
- function CreateMenu(NewPosition) -- Create Menu
- local function FromHex(HEX)
- HEX = HEX:gsub('#', '');
- return Color3.fromRGB(tonumber('0x' .. HEX:sub(1, 2)), tonumber('0x' .. HEX:sub(3, 4)), tonumber('0x' .. HEX:sub(5, 6)));
- end
- local Colors = {
- Primary = {
- Main = FromHex'424242';
- Light = FromHex'6d6d6d';
- Dark = FromHex'1b1b1b';
- };
- Secondary = {
- Main = FromHex'e0e0e0';
- Light = FromHex'ffffff';
- Dark = FromHex'aeaeae';
- };
- };
- MenuLoaded = false;
- -- GetTableData(UIButtons)(function(i, v)
- -- v.Instance.Visible = false;
- -- v.Instance:Remove();
- -- end)
- -- GetTableData(Sliders)(function(i, v)
- -- v.Instance.Visible = false;
- -- v.Instance:Remove();
- -- end)
- UIButtons = {};
- Sliders = {};
- local BaseSize = Vector2.new(300, 630);
- local BasePosition = NewPosition or Vector2.new(Camera.ViewportSize.X / 8 - (BaseSize.X / 2), Camera.ViewportSize.Y / 2 - (BaseSize.Y / 2));
- BasePosition = Vector2.new(math.clamp(BasePosition.X, 0, Camera.ViewportSize.X), math.clamp(BasePosition.Y, 0, Camera.ViewportSize.Y));
- Menu:AddMenuInstance('CrosshairX', 'Line', {
- Visible = false;
- Color = Color3.new(0, 1, 0);
- Transparency = 1;
- Thickness = 1;
- });
- Menu:AddMenuInstance('CrosshairY', 'Line', {
- Visible = false;
- Color = Color3.new(0, 1, 0);
- Transparency = 1;
- Thickness = 1;
- });
- delay(.025, function() -- since zindex doesnt exist
- Menu:AddMenuInstance('Main', 'Square', {
- Size = BaseSize;
- Position = BasePosition;
- Filled = false;
- Color = Colors.Primary.Main;
- Thickness = 3;
- Visible = true;
- });
- end);
- Menu:AddMenuInstance('TopBar', 'Square', {
- Position = BasePosition;
- Size = Vector2.new(BaseSize.X, 15);
- Color = Colors.Primary.Dark;
- Filled = true;
- Visible = true;
- });
- Menu:AddMenuInstance('TopBarTwo', 'Square', {
- Position = BasePosition + Vector2.new(0, 15);
- Size = Vector2.new(BaseSize.X, 45);
- Color = Colors.Primary.Main;
- Filled = true;
- Visible = true;
- });
- Menu:AddMenuInstance('TopBarText', 'Text', {
- Size = 25;
- Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(25, 10);
- Text = 'Unnamed ESP';
- Color = Colors.Secondary.Light;
- Visible = true;
- });
- Menu:AddMenuInstance('TopBarTextBR', 'Text', {
- Size = 15;
- Position = shared.MenuDrawingData.Instances.TopBarTwo.Position + Vector2.new(BaseSize.X - 65, 25);
- Text = 'by ic3w0lf';
- Color = Colors.Secondary.Dark;
- Visible = true;
- });
- Menu:AddMenuInstance('Filling', 'Square', {
- Size = BaseSize - Vector2.new(0, 60);
- Position = BasePosition + Vector2.new(0, 60);
- Filled = true;
- Color = Colors.Secondary.Main;
- Transparency= .5;
- Visible = true;
- });
- local CPos = 0;
- GetTableData(Options)(function(i, v)
- if typeof(v.Value) == 'boolean' and not IsStringEmpty(v.Text) and v.Text ~= nil then
- CPos = CPos + 25;
- local BaseSize = Vector2.new(BaseSize.X, 30);
- local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(30, v.Index * 25 - 10);
- UIButtons[#UIButtons + 1] = {
- Option = v;
- Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
- Position = BasePosition - Vector2.new(30, 15);
- Size = BaseSize;
- Visible = false;
- });
- };
- Menu:AddMenuInstance(Format('%s_OuterCircle', v.Name), 'Circle', {
- Radius = 10;
- Position = BasePosition;
- Color = Colors.Secondary.Light;
- Filled = true;
- Visible = true;
- });
- Menu:AddMenuInstance(Format('%s_InnerCircle', v.Name), 'Circle', {
- Radius = 7;
- Position = BasePosition;
- Color = Colors.Secondary.Dark;
- Filled = true;
- Visible = v.Value;
- });
- Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
- Text = v.Text;
- Size = 20;
- Position = BasePosition + Vector2.new(20, -10);
- Visible = true;
- Color = Colors.Primary.Dark;
- });
- end
- end)
- GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
- if typeof(v.Value) == 'number' then
- CPos = CPos + 25;
- local BaseSize = Vector2.new(BaseSize.X, 30);
- local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
- local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
- Text = v.Text;
- Size = 20;
- Position = BasePosition + Vector2.new(20, -10);
- Visible = true;
- Color = Colors.Primary.Dark;
- });
- local AMT = Menu:AddMenuInstance(Format('%s_AmountText', v.Name), 'Text', {
- Text = tostring(v.Value);
- Size = 20;
- Position = BasePosition;
- Visible = true;
- Color = Colors.Primary.Dark;
- });
- local Line = Menu:AddMenuInstance(Format('%s_SliderLine', v.Name), 'Line', {
- Transparency = 1;
- Color = Colors.Primary.Dark;
- Thickness = 3;
- Visible = true;
- From = BasePosition + Vector2.new(20, 20);
- To = BasePosition + Vector2.new(BaseSize.X - 10, 20);
- });
- CPos = CPos + 10;
- local Slider = Menu:AddMenuInstance(Format('%s_Slider', v.Name), 'Circle', {
- Visible = true;
- Filled = true;
- Radius = 6;
- Color = Colors.Secondary.Dark;
- Position = BasePosition + Vector2.new(35, 20);
- })
- local CSlider = {Slider = Slider; Line = Line; Min = v.AllArgs[4]; Max = v.AllArgs[5]; Option = v};
- Sliders[#Sliders + 1] = CSlider;
- -- local Percent = (v.Value / CSlider.Max) * 100;
- -- local Size = math.abs(Line.From.X - Line.To.X);
- -- local Value = Size * (Percent / 100); -- this shit's inaccurate but fuck it i'm not even gonna bother fixing it
- Slider.Position = BasePosition + Vector2.new(40, 20);
- v.BaseSize = BaseSize;
- v.BasePosition = BasePosition;
- AMT.Position = BasePosition + Vector2.new(BaseSize.X - AMT.TextBounds.X - 10, -10)
- end
- end)
- local FirstItem = false;
- GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
- if typeof(v.Value) == 'EnumItem' then
- CPos = CPos + (not FirstItem and 30 or 25);
- FirstItem = true;
- local BaseSize = Vector2.new(BaseSize.X, FirstItem and 30 or 25);
- local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos - 10);
- UIButtons[#UIButtons + 1] = {
- Option = v;
- Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
- Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
- Visible = true;
- Transparency= .5;
- Position = BasePosition + Vector2.new(15, -10);
- Color = Colors.Secondary.Light;
- Filled = true;
- });
- };
- local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
- Text = v.Text;
- Size = 20;
- Position = BasePosition + Vector2.new(20, -10);
- Visible = true;
- Color = Colors.Primary.Dark;
- });
- local BindText = Menu:AddMenuInstance(Format('%s_BindText', v.Name), 'Text', {
- Text = tostring(v.Value):match'%w+%.%w+%.(.+)';
- Size = 20;
- Position = BasePosition;
- Visible = true;
- Color = Colors.Primary.Dark;
- });
- Options[i].BaseSize = BaseSize;
- Options[i].BasePosition = BasePosition;
- BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 20, -10);
- end
- end)
- GetTableData(Options)(function(i, v) -- just to make sure certain things are drawn before or after others, too lazy to actually sort table
- if typeof(v.Value) == 'function' then
- local BaseSize = Vector2.new(BaseSize.X, 30);
- local BasePosition = shared.MenuDrawingData.Instances.Filling.Position + Vector2.new(0, CPos + (25 * v.AllArgs[4]) - 35);
- UIButtons[#UIButtons + 1] = {
- Option = v;
- Instance = Menu:AddMenuInstance(Format('%s_Hitbox', v.Name), 'Square', {
- Size = Vector2.new(BaseSize.X, 20) - Vector2.new(30, 0);
- Visible = true;
- Transparency= .5;
- Position = BasePosition + Vector2.new(15, -10);
- Color = Colors.Secondary.Light;
- Filled = true;
- });
- };
- local Text = Menu:AddMenuInstance(Format('%s_Text', v.Name), 'Text', {
- Text = v.Text;
- Size = 20;
- Position = BasePosition + Vector2.new(20, -10);
- Visible = true;
- Color = Colors.Primary.Dark;
- });
- -- BindText.Position = BasePosition + Vector2.new(BaseSize.X - BindText.TextBounds.X - 10, -10);
- end
- end)
- delay(.1, function()
- MenuLoaded = true;
- end);
- -- this has to be at the bottom cuz proto drawing api doesnt have zindex :triumph:
- Menu:AddMenuInstance('Cursor1', 'Line', {
- Visible = false;
- Color = Color3.new(1, 0, 0);
- Transparency = 1;
- Thickness = 2;
- });
- Menu:AddMenuInstance('Cursor2', 'Line', {
- Visible = false;
- Color = Color3.new(1, 0, 0);
- Transparency = 1;
- Thickness = 2;
- });
- Menu:AddMenuInstance('Cursor3', 'Line', {
- Visible = false;
- Color = Color3.new(1, 0, 0);
- Transparency = 1;
- Thickness = 2;
- });
- end
- CreateMenu();
- shared.UESP_InputBeganCon = UserInputService.InputBegan:connect(function(input)
- if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
- MouseHeld = true;
- local Bar = Menu:GetInstance'TopBar';
- local Values = {
- Bar.Position.X;
- Bar.Position.Y;
- Bar.Position.X + Bar.Size.X;
- Bar.Position.Y + Bar.Size.Y;
- }
- if MouseHoveringOver(Values) then -- and not syn then -- disable dragging for synapse cuz idk why it breaks
- DraggingUI = true;
- DragOffset = Menu:GetInstance'Main'.Position - GetMouseLocation();
- else
- for i, v in pairs(Sliders) do
- local Values = {
- v.Line.From.X - (v.Slider.Radius);
- v.Line.From.Y - (v.Slider.Radius);
- v.Line.To.X + (v.Slider.Radius);
- v.Line.To.Y + (v.Slider.Radius);
- };
- if MouseHoveringOver(Values) then
- DraggingWhat = v;
- Dragging = true;
- break
- end
- end
- end
- end
- end)
- shared.UESP_InputEndedCon = UserInputService.InputEnded:connect(function(input)
- if input.UserInputType.Name == 'MouseButton1' and Options.MenuOpen.Value then
- MouseHeld = false;
- for i, v in pairs(UIButtons) do
- local Values = {
- v.Instance.Position.X;
- v.Instance.Position.Y;
- v.Instance.Position.X + v.Instance.Size.X;
- v.Instance.Position.Y + v.Instance.Size.Y;
- };
- if MouseHoveringOver(Values) then
- v.Option();
- break -- prevent clicking 2 options
- end
- end
- elseif input.UserInputType.Name == 'Keyboard' then
- if Binding then
- BindedKey = input.KeyCode;
- Binding = false;
- elseif input.KeyCode == Options.MenuKey.Value or (input.KeyCode == Enum.KeyCode.Home and UserInputService:IsKeyDown(Enum.KeyCode.LeftControl)) then
- Options.MenuOpen();
- elseif input.KeyCode == Options.ToggleKey.Value then
- Options.Enabled();
- end
- end
- end)
- function ToggleMenu()
- if Options.MenuOpen.Value then
- GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
- if OldData[v] then
- pcall(Set, v, 'Visible', true);
- end
- end)
- else
- -- GUIService:SetMenuIsOpen(false);
- GetTableData(shared.MenuDrawingData.Instances)(function(i, v)
- OldData[v] = v.Visible;
- if v.Visible then
- pcall(Set, v, 'Visible', false);
- end
- end)
- end
- end
- function CheckRay(Instance, Distance, Position, Unit)
- local Pass = true;
- local Model = Instance;
- if Distance > 999 then return false; end
- if Instance:IsA'Player' and not Instance.Character then
- return false;
- elseif Instance:IsA'Player' and Instance.Character then
- Model = Instance.Character
- else
- Model = Instance.Parent;
- if Model.Parent == workspace then
- Model = Instance;
- end
- end
- local _Ray = Ray.new(Position, Unit * Distance);
- local List = {LocalPlayer.Character, Camera, Mouse.TargetFilter};
- for i,v in pairs(IgnoreList) do table.insert(List, v); end;
- local Hit = workspace:FindPartOnRayWithIgnoreList(_Ray, List);
- if Hit and not Hit:IsDescendantOf(Model) then
- Pass = false;
- if Hit.Transparency >= .3 or not Hit.CanCollide and Hit.ClassName ~= Terrain then -- Detect invisible walls
- IgnoreList[#IgnoreList + 1] = Hit;
- end
- end
- return Pass;
- end
- function CheckTeam(Player)
- if Player.Neutral and LocalPlayer.Neutral then return true; end
- return Player.TeamColor == LocalPlayer.TeamColor;
- end
- local CustomTeam = CustomTeams[game.PlaceId];
- if CustomTeam ~= nil then
- warn(ypcall(CustomTeam.Initialize));
- CheckTeam = CustomTeam.CheckTeam;
- end
- function CheckPlayer(Player)
- if not Options.Enabled.Value then return false end
- local Pass = true;
- local Distance = 0;
- if Player ~= LocalPlayer and Player.Character then
- if not Options.ShowTeam.Value and CheckTeam(Player) then
- Pass = false;
- end
- local Head = Player.Character:FindFirstChild'Head';
- if Pass and Player.Character and Head then
- Distance = (Camera.CFrame.p - Head.Position).magnitude;
- if Options.VisCheck.Value then
- Pass = CheckRay(Player, Distance, Camera.CFrame.p, (Head.Position - Camera.CFrame.p).unit);
- end
- if Distance > Options.MaxDistance.Value then
- Pass = false;
- end
- end
- else
- Pass = false;
- end
- return Pass, Distance;
- end
- function CheckDistance(Instance)
- if not Options.Enabled.Value then return false end
- local Pass = true;
- local Distance = 0;
- if Instance ~= nil then
- Distance = (Camera.CFrame.p - Instance.Position).magnitude;
- if Options.VisCheck.Value then
- Pass = CheckRay(Instance, Distance, Camera.CFrame.p, (Instance.Position - Camera.CFrame.p).unit);
- end
- if Distance > Options.MaxDistance.Value then
- Pass = false;
- end
- else
- Pass = false;
- end
- return Pass, Distance;
- end
- function UpdatePlayerData()
- if (tick() - LastRefresh) > (Options.RefreshRate.Value / 1000) then
- LastRefresh = tick();
- if CustomESP and Options.Enabled.Value then
- pcall(CustomESP);
- end
- for i, v in pairs(RenderList.Instances) do
- if v.Instance ~= nil and v.Instance.Parent ~= nil and v.Instance:IsA'BasePart' then
- local Data = shared.InstanceData[v.Instance:GetDebugId()] or { Instances = {}; DontDelete = true };
- Data.Instance = v.Instance;
- Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
- Transparency = 1;
- Thickness = 2;
- }
- Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
- Size = Options.TextSize.Value;
- Center = true;
- Outline = Options.TextOutline.Value;
- Visible = true;
- };
- Data.Instances['DistanceTag'] = Data.Instances['DistanceTag'] or NewDrawing'Text'{
- Size = Options.TextSize.Value - 1;
- Center = true;
- Outline = Options.TextOutline.Value;
- Visible = true;
- };
- local NameTag = Data.Instances['NameTag'];
- local DistanceTag = Data.Instances['DistanceTag'];
- local Tracer = Data.Instances['Tracer'];
- local Pass, Distance = CheckDistance(v.Instance);
- if Pass then
- local ScreenPosition, Vis = Camera:WorldToViewportPoint(v.Instance.Position);
- local Color = v.Color;
- local OPos = Camera.CFrame:pointToObjectSpace(v.Instance.Position);
- if ScreenPosition.Z < 0 then
- local AT = math.atan2(OPos.Y, OPos.X) + math.pi;
- OPos = CFrame.Angles(0, 0, AT):vectorToWorldSpace((CFrame.Angles(0, math.rad(89.9), 0):vectorToWorldSpace(Vector3.new(0, 0, -1))));
- end
- local Position = Camera:WorldToViewportPoint(Camera.CFrame:pointToWorldSpace(OPos));
- if Options.ShowTracers.Value then
- Tracer.Visible = true;
- Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2);
- Tracer.To = Vector2.new(Position.X, Position.Y);
- Tracer.Color = Color;
- else
- Tracer.Visible = false;
- end
- if ScreenPosition.Z > 0 then
- local ScreenPositionUpper = ScreenPosition;
- -- Camera:WorldToViewportPoint((v.Instance.CFrame * CFrame.new(0, v.Instance.Size.Y, 0)).p);
- if Options.ShowName.Value then
- LocalPlayer.NameDisplayDistance = 0;
- NameTag.Visible = true;
- NameTag.Text = v.Text;
- NameTag.Size = Options.TextSize.Value;
- NameTag.Outline = Options.TextOutline.Value;
- NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y);
- NameTag.Color = Color;
- if Drawing.Fonts and shared.am_ic3 then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
- NameTag.Font = Drawing.Fonts.Monospace;
- end
- else
- LocalPlayer.NameDisplayDistance = 100;
- NameTag.Visible = false;
- end
- if Options.ShowDistance.Value or Options.ShowHealth.Value then
- DistanceTag.Visible = true;
- DistanceTag.Size = Options.TextSize.Value - 1;
- DistanceTag.Outline = Options.TextOutline.Value;
- DistanceTag.Color = Color3.new(1, 1, 1);
- if Drawing.Fonts and shared.am_ic3 then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
- NameTag.Font = Drawing.Fonts.Monospace;
- end
- local Str = '';
- if Options.ShowDistance.Value then
- Str = Str .. Format('[%d] ', Distance);
- end
- DistanceTag.Text = Str;
- DistanceTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) + Vector2.new(0, NameTag.TextBounds.Y);
- else
- DistanceTag.Visible = false;
- end
- else
- NameTag.Visible = false;
- DistanceTag.Visible = false;
- end
- else
- NameTag.Visible = false;
- DistanceTag.Visible = false;
- Tracer.Visible = false;
- end
- Data.Instances['NameTag'] = NameTag;
- Data.Instances['DistanceTag'] = DistanceTag;
- Data.Instances['Tracer'] = Tracer;
- shared.InstanceData[v.Instance:GetDebugId()] = Data;
- end
- end
- for i, v in pairs(Players:GetPlayers()) do
- local Data = shared.InstanceData[v.Name] or { Instances = {}; };
- Data.Instances['Box'] = Data.Instances['Box'] or LineBox:Create{Thickness = 3};
- Data.Instances['Tracer'] = Data.Instances['Tracer'] or NewDrawing'Line'{
- Transparency = 1;
- Thickness = 2;
- }
- Data.Instances['HeadDot'] = Data.Instances['HeadDot'] or NewDrawing'Circle'{
- Filled = true;
- NumSides = 30;
- }
- Data.Instances['NameTag'] = Data.Instances['NameTag'] or NewDrawing'Text'{
- Size = Options.TextSize.Value;
- Center = true;
- Outline = Options.TextOutline.Value;
- Visible = true;
- };
- Data.Instances['DistanceHealthTag'] = Data.Instances['DistanceHealthTag'] or NewDrawing'Text'{
- Size = Options.TextSize.Value - 1;
- Center = true;
- Outline = Options.TextOutline.Value;
- Visible = true;
- };
- local NameTag = Data.Instances['NameTag'];
- local DistanceTag = Data.Instances['DistanceHealthTag'];
- local Tracer = Data.Instances['Tracer'];
- local HeadDot = Data.Instances['HeadDot'];
- local Box = Data.Instances['Box'];
- local Pass, Distance = CheckPlayer(v);
- if Pass and v.Character then
- local Humanoid = v.Character:FindFirstChildOfClass'Humanoid';
- local Head = v.Character:FindFirstChild'Head';
- local HumanoidRootPart = v.Character:FindFirstChild'HumanoidRootPart';
- if v.Character ~= nil and Head and HumanoidRootPart then
- local ScreenPosition, Vis = Camera:WorldToViewportPoint(Head.Position);
- 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;
- local OPos = Camera.CFrame:pointToObjectSpace(Head.Position);
- if ScreenPosition.Z < 0 then
- local AT = math.atan2(OPos.Y, OPos.X) + math.pi;
- OPos = CFrame.Angles(0, 0, AT):vectorToWorldSpace((CFrame.Angles(0, math.rad(89.9), 0):vectorToWorldSpace(Vector3.new(0, 0, -1))));
- end
- local Position = Camera:WorldToViewportPoint(Camera.CFrame:pointToWorldSpace(OPos));
- if Options.ShowTracers.Value then
- Tracer.Visible = true;
- Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2);
- Tracer.To = Vector2.new(Position.X, Position.Y);
- Tracer.Color = Color;
- else
- Tracer.Visible = false;
- end
- if ScreenPosition.Z > 0 then
- local ScreenPositionUpper = Camera:WorldToViewportPoint((HumanoidRootPart:GetRenderCFrame() * CFrame.new(0, Head.Size.Y + HumanoidRootPart.Size.Y, 0)).p);
- local Scale = Head.Size.Y / 2;
- if Options.ShowName.Value then
- NameTag.Visible = true;
- NameTag.Text = v.Name .. (CustomPlayerTag and CustomPlayerTag(v) or '');
- NameTag.Size = Options.TextSize.Value;
- NameTag.Outline = Options.TextOutline.Value;
- NameTag.Position = Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y) - Vector2.new(0, NameTag.TextBounds.Y);
- NameTag.Color = Color;
- NameTag.Transparency= 0.85;
- if Drawing.Fonts and shared.am_ic3 then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
- NameTag.Font = Drawing.Fonts.Monospace;
- end
- else
- NameTag.Visible = false;
- end
- if Options.ShowDistance.Value or Options.ShowHealth.Value then
- DistanceTag.Visible = true;
- DistanceTag.Size = Options.TextSize.Value - 1;
- DistanceTag.Outline = Options.TextOutline.Value;
- DistanceTag.Color = Color3.new(1, 1, 1);
- DistanceTag.Transparency= 0.85;
- if Drawing.Fonts and shared.am_ic3 then -- CURRENTLY SYNAPSE ONLY :MEGAHOLY:
- NameTag.Font = Drawing.Fonts.Monospace;
- end
- local Str = '';
- if Options.ShowDistance.Value then
- Str = Str .. Format('[%d] ', Distance);
- end
- if Options.ShowHealth.Value and Humanoid then
- Str = Str .. Format('[%d/%d] [%s%%]', Humanoid.Health, Humanoid.MaxHealth, math.floor(Humanoid.Health / Humanoid.MaxHealth * 100));
- -- Str = Str .. Format('[%d/%d] [%s%%]', Humanoid.Health, Humanoid.MaxHealth, math.floor(Humanoid.Health / Humanoid.MaxHealth * 100));
- end
- DistanceTag.Text = Str;
- DistanceTag.Position = (NameTag.Visible and NameTag.Position + Vector2.new(0, NameTag.TextBounds.Y) or Vector2.new(ScreenPositionUpper.X, ScreenPositionUpper.Y));
- else
- DistanceTag.Visible = false;
- end
- if Options.ShowDot.Value and Vis then
- local Top = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, Scale, 0)).p);
- local Bottom = Camera:WorldToViewportPoint((Head.CFrame * CFrame.new(0, -Scale, 0)).p);
- local Radius = (Top - Bottom).y;
- HeadDot.Visible = true;
- HeadDot.Color = Color;
- HeadDot.Position = Vector2.new(ScreenPosition.X, ScreenPosition.Y);
- HeadDot.Radius = Radius;
- else
- HeadDot.Visible = false;
- end
- if Options.ShowBoxes.Value and Vis and HumanoidRootPart then
- Box:Update(HumanoidRootPart.CFrame, Vector3.new(2, 3, 0) * (Scale * 2), Color);
- else
- Box:SetVisible(false);
- end
- else
- NameTag.Visible = false;
- DistanceTag.Visible = false;
- -- Tracer.Visible = false;
- HeadDot.Visible = false;
- Box:SetVisible(false);
- end
- end
- else
- NameTag.Visible = false;
- DistanceTag.Visible = false;
- Tracer.Visible = false;
- HeadDot.Visible = false;
- Box:SetVisible(false);
- end
- shared.InstanceData[v.Name] = Data;
- end
- end
- end
- local LastInvalidCheck = 0;
- function Update()
- if tick() - LastInvalidCheck > 1 then
- LastInvalidCheck = tick();
- if Camera.Parent ~= workspace then
- Camera = workspace.CurrentCamera;
- end
- for i, v in pairs(shared.InstanceData) do
- if not Players:FindFirstChild(tostring(i)) then
- if not shared.InstanceData[i].DontDelete then
- GetTableData(v.Instances)(function(i, obj)
- obj.Visible = false;
- obj:Remove();
- v.Instances[i] = nil;
- end)
- shared.InstanceData[i] = nil;
- else
- if shared.InstanceData[i].Instance == nil or shared.InstanceData[i].Instance.Parent == nil then
- GetTableData(v.Instances)(function(i, obj)
- obj.Visible = false;
- obj:Remove();
- v.Instances[i] = nil;
- end)
- shared.InstanceData[i] = nil;
- end
- end
- end
- end
- end
- local CX = Menu:GetInstance'CrosshairX';
- local CY = Menu:GetInstance'CrosshairY';
- if Options.Crosshair.Value then
- CX.Visible = true;
- CY.Visible = true;
- CX.To = Vector2.new((Camera.ViewportSize.X / 2) - 8, (Camera.ViewportSize.Y / 2));
- CX.From = Vector2.new((Camera.ViewportSize.X / 2) + 8, (Camera.ViewportSize.Y / 2));
- CY.To = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) - 8);
- CY.From = Vector2.new((Camera.ViewportSize.X / 2), (Camera.ViewportSize.Y / 2) + 8);
- else
- CX.Visible = false;
- CY.Visible = false;
- end
- if Options.MenuOpen.Value and MenuLoaded then
- local MLocation = GetMouseLocation();
- shared.MenuDrawingData.Instances.Main.Color = Color3.fromHSV(tick() * 24 % 255/255, 1, 1);
- local MainInstance = Menu:GetInstance'Main';
- local Values = {
- MainInstance.Position.X;
- MainInstance.Position.Y;
- MainInstance.Position.X + MainInstance.Size.X;
- MainInstance.Position.Y + MainInstance.Size.Y;
- };
- if MainInstance and MouseHoveringOver(Values) then
- Debounce.CursorVis = true;
- -- GUIService:SetMenuIsOpen(true);
- Menu:UpdateMenuInstance'Cursor1'{
- Visible = true;
- From = Vector2.new(MLocation.x, MLocation.y);
- To = Vector2.new(MLocation.x + 5, MLocation.y + 6);
- }
- Menu:UpdateMenuInstance'Cursor2'{
- Visible = true;
- From = Vector2.new(MLocation.x, MLocation.y);
- To = Vector2.new(MLocation.x, MLocation.y + 8);
- }
- Menu:UpdateMenuInstance'Cursor3'{
- Visible = true;
- From = Vector2.new(MLocation.x, MLocation.y + 6);
- To = Vector2.new(MLocation.x + 5, MLocation.y + 5);
- }
- else
- if Debounce.CursorVis then
- Debounce.CursorVis = false;
- -- GUIService:SetMenuIsOpen(false);
- Menu:UpdateMenuInstance'Cursor1'{Visible = false};
- Menu:UpdateMenuInstance'Cursor2'{Visible = false};
- Menu:UpdateMenuInstance'Cursor3'{Visible = false};
- end
- end
- if MouseHeld then
- if Dragging then
- DraggingWhat.Slider.Position = Vector2.new(math.clamp(MLocation.X, DraggingWhat.Line.From.X, DraggingWhat.Line.To.X), DraggingWhat.Slider.Position.Y);
- local Percent = (DraggingWhat.Slider.Position.X - DraggingWhat.Line.From.X) / ((DraggingWhat.Line.To.X - DraggingWhat.Line.From.X));
- local Value = CalculateValue(DraggingWhat.Min, DraggingWhat.Max, Percent);
- DraggingWhat.Option(Value);
- elseif DraggingUI then
- Debounce.UIDrag = true;
- local Main = Menu:GetInstance'Main';
- local MousePos = GetMouseLocation();
- Main.Position = MousePos + DragOffset;
- end
- else
- Dragging = false;
- if DraggingUI and Debounce.UIDrag then
- Debounce.UIDrag = false;
- DraggingUI = false;
- CreateMenu(Menu:GetInstance'Main'.Position);
- end
- end
- if not Debounce.Menu then
- Debounce.Menu = true;
- ToggleMenu();
- end
- elseif Debounce.Menu and not Options.MenuOpen.Value then
- Debounce.Menu = false;
- ToggleMenu();
- end
- end
- RunService:UnbindFromRenderStep(GetDataName);
- RunService:UnbindFromRenderStep(UpdateName);
- RunService:BindToRenderStep(GetDataName, 300, UpdatePlayerData);
- RunService:BindToRenderStep(UpdateName, 199, Update);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement