From venuslock, 3 Months ago, written in Plain Text.
Embed
  1. if not LPH_OBFUSCATED then
  2.     LPH_JIT_MAX = function(...) return(...) end;
  3.     LPH_NO_VIRTUALIZE = function(...) return(...) end;
  4. end
  5. LPH_NO_VIRTUALIZE(function()
  6.     repeat task.wait(); until game:IsLoaded();
  7.     repeat task.wait(); until game.Players
  8.     repeat task.wait(); until game.Players.LocalPlayer
  9.     repeat task.wait(); until game.Players.LocalPlayer.Character
  10.     repeat task.wait(); until game.Players.LocalPlayer:FindFirstChild('Loaded')
  11. end)()--game:GetService("ReplicatedStorage").CursedSky
  12. loadstring(game:HttpGet("https://raw.githubusercontent.com/Pixeluted/adoniscries/main/Source.lua",true))()
  13. local repo = 'https://raw.githubusercontent.com/laderite/zen/main/'
  14.  
  15. local camera = workspace.CurrentCamera
  16. local cf = camera.CFrame
  17. -- Library
  18. local repo = 'https://raw.githubusercontent.com/laderite/zen/main/'
  19. local Library = loadstring(game:HttpGet(repo .. 'modules/Linoria.lua'))()
  20. local httpService = game:GetService('HttpService')
  21. local ThemeManager = {} do
  22.         ThemeManager.Folder = 'LinoriaLibSettings'
  23.         -- if not isfolder(ThemeManager.Folder) then makefolder(ThemeManager.Folder) end
  24.  
  25.         ThemeManager.Library = nil
  26.     ThemeManager.BuiltInThemes = {
  27.         ['Lunar'] = {
  28.             1,
  29.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"0f1a23","AccentColor":"ffc62e","BackgroundColor":"0c1720","OutlineColor":"20303e"}')
  30.         },
  31.         ['Neverlose'] = {
  32.             2,
  33.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"000f1e","AccentColor":"00b4f0","BackgroundColor":"050514","OutlineColor":"0a1e28"}')
  34.         },
  35.         ['Oceanic'] = {
  36.             4,
  37.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"2c2a4a","AccentColor":"0099cc","BackgroundColor":"20203b","OutlineColor":"3a385e"}')
  38.         },
  39.         ['Cool Breeze'] = {
  40.             5,
  41.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"3a3f44","AccentColor":"1eb980","BackgroundColor":"2c3034","OutlineColor":"465358"}')
  42.         },
  43.         ['Vibrant Neon'] = {
  44.             6,
  45.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"333333","AccentColor":"ff69b4","BackgroundColor":"1a1a1a","OutlineColor":"2c2c2c"}')
  46.         },
  47.         ['Electric Sky'] = {
  48.             7,
  49.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"1f2430","AccentColor":"66ccff","BackgroundColor":"141a25","OutlineColor":"292f3f"}')
  50.         },
  51.         ['Pastel Prism'] = {
  52.             8,
  53.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"303030","AccentColor":"ffcc00","BackgroundColor":"1f1f1f","OutlineColor":"343434"}')
  54.         },
  55.         ['Frosty Mint'] = {
  56.             9,
  57.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"384c58","AccentColor":"00ffcc","BackgroundColor":"293940","OutlineColor":"394e5d"}')
  58.         },
  59.         ['Rainbow Haze'] = {
  60.             10,
  61.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"444c56","AccentColor":"ffaa00","BackgroundColor":"343a44","OutlineColor":"4e545e"}')
  62.         },
  63.         ['Mystic Galaxy'] = {
  64.             11,
  65.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"2e2d3a","AccentColor":"b366ff","BackgroundColor":"1f1e28","OutlineColor":"383f4d"}')
  66.         },
  67.         ['Crimson Sunrise'] = {
  68.             12,
  69.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"5d0f0f","AccentColor":"ff5454","BackgroundColor":"3e0a0a","OutlineColor":"5c2c2c"}')
  70.         },
  71.         ['Enchanted Forest'] = {
  72.             13,
  73.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"2a3b30","AccentColor":"00ffaa","BackgroundColor":"1d2923","OutlineColor":"394c5b"}')
  74.         },
  75.         ['Dark Citrus'] = {
  76.             14,
  77.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"363636","AccentColor":"ffa500","BackgroundColor":"262626","OutlineColor":"3f3f3f"}')
  78.         },
  79.         ['Moonlit Lavender'] = {
  80.             15,
  81.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"302b3f","AccentColor":"cc99ff","BackgroundColor":"221f2f","OutlineColor":"3c3a4e"}')
  82.         },
  83.         ['Azure Dreams'] = {
  84.             16,
  85.             httpService:JSONDecode('{"FontColor":"ffffff","MainColor":"252c33","AccentColor":"00ffff","BackgroundColor":"181f25","OutlineColor":"313b42"}')
  86.         },
  87.     }
  88.  
  89.         function ThemeManager:ApplyTheme(theme)
  90.                 local customThemeData = self:GetCustomTheme(theme)
  91.                 local data = customThemeData or self.BuiltInThemes[theme]
  92.  
  93.                 if not data then return end
  94.  
  95.                 -- custom themes are just regular dictionaries instead of an array with { index, dictionary }
  96.  
  97.                 local scheme = data[2]
  98.                 for idx, col in next, customThemeData or scheme do
  99.                         self.Library[idx] = Color3.fromHex(col)
  100.                        
  101.                         if Options[idx] then
  102.                                 Options[idx]:SetValueRGB(Color3.fromHex(col))
  103.                         end
  104.                 end
  105.  
  106.                 self:ThemeUpdate()
  107.         end
  108.  
  109.         function ThemeManager:ThemeUpdate()
  110.                 -- This allows us to force apply themes without loading the themes tab :)
  111.                 local options = { "FontColor", "MainColor", "AccentColor", "BackgroundColor", "OutlineColor" }
  112.                 for i, field in next, options do
  113.                         if Options and Options[field] then
  114.                                 self.Library[field] = Options[field].Value
  115.                         end
  116.                 end
  117.  
  118.                 self.Library.AccentColorDark = self.Library:GetDarkerColor(self.Library.AccentColor);
  119.                 self.Library:UpdateColorsUsingRegistry()
  120.         end
  121.  
  122.         function ThemeManager:LoadDefault()            
  123.                 local theme = 'Default'
  124.                 local content = isfile(self.Folder .. '/themes/default.txt') and readfile(self.Folder .. '/themes/default.txt')
  125.  
  126.                 local isDefault = true
  127.                 if content then
  128.                         if self.BuiltInThemes[content] then
  129.                                 theme = content
  130.                         elseif self:GetCustomTheme(content) then
  131.                                 theme = content
  132.                                 isDefault = false;
  133.                         end
  134.                 elseif self.BuiltInThemes[self.DefaultTheme] then
  135.                         theme = self.DefaultTheme
  136.                 end
  137.  
  138.                 if isDefault then
  139.                         Options.ThemeManager_ThemeList:SetValue(theme)
  140.                 else
  141.                         self:ApplyTheme(theme)
  142.                 end
  143.         end
  144.  
  145.         function ThemeManager:SaveDefault(theme)
  146.                 writefile(self.Folder .. '/themes/default.txt', theme)
  147.         end
  148.  
  149.         function ThemeManager:CreateThemeManager(groupbox)
  150.                 groupbox:AddLabel('Background color'):AddColorPicker('BackgroundColor', { Default = self.Library.BackgroundColor });
  151.                 groupbox:AddLabel('Main color') :AddColorPicker('MainColor', { Default = self.Library.MainColor });
  152.                 groupbox:AddLabel('Accent color'):AddColorPicker('AccentColor', { Default = self.Library.AccentColor });
  153.                 groupbox:AddLabel('Outline color'):AddColorPicker('OutlineColor', { Default = self.Library.OutlineColor });
  154.                 groupbox:AddLabel('Font color') :AddColorPicker('FontColor', { Default = self.Library.FontColor });
  155.  
  156.                 local ThemesArray = {}
  157.                 for Name, Theme in next, self.BuiltInThemes do
  158.                         table.insert(ThemesArray, Name)
  159.                 end
  160.  
  161.                 table.sort(ThemesArray, function(a, b) return self.BuiltInThemes[a][1] < self.BuiltInThemes[b][1] end)
  162.  
  163.                 groupbox:AddDivider()
  164.                 groupbox:AddDropdown('ThemeManager_ThemeList', { Text = 'Theme list', Values = ThemesArray, Default = 1 })
  165.  
  166.                 groupbox:AddButton('Set as default', function()
  167.                         self:SaveDefault(Options.ThemeManager_ThemeList.Value)
  168.                         self.Library:Notify(string.format('Set default theme to %q', Options.ThemeManager_ThemeList.Value))
  169.                 end)
  170.  
  171.                 Options.ThemeManager_ThemeList:OnChanged(function()
  172.                         self:ApplyTheme(Options.ThemeManager_ThemeList.Value)
  173.                 end)
  174.  
  175.                 groupbox:AddDivider()
  176.                 groupbox:AddInput('ThemeManager_CustomThemeName', { Text = 'Custom theme name' })
  177.                 groupbox:AddDropdown('ThemeManager_CustomThemeList', { Text = 'Custom themes', Values = self:ReloadCustomThemes(), AllowNull = true, Default = 1 })
  178.                 groupbox:AddDivider()
  179.                
  180.                 groupbox:AddButton('Save theme', function()
  181.                         self:SaveCustomTheme(Options.ThemeManager_CustomThemeName.Value)
  182.  
  183.                         Options.ThemeManager_CustomThemeList:SetValues(self:ReloadCustomThemes())
  184.                         Options.ThemeManager_CustomThemeList:SetValue(nil)
  185.                 end):AddButton('Load theme', function()
  186.                         self:ApplyTheme(Options.ThemeManager_CustomThemeList.Value)
  187.                 end)
  188.  
  189.                 groupbox:AddButton('Refresh list', function()
  190.                         Options.ThemeManager_CustomThemeList:SetValues(self:ReloadCustomThemes())
  191.                         Options.ThemeManager_CustomThemeList:SetValue(nil)
  192.                 end)
  193.  
  194.                 groupbox:AddButton('Set as default', function()
  195.                         if Options.ThemeManager_CustomThemeList.Value ~= nil and Options.ThemeManager_CustomThemeList.Value ~= '' then
  196.                                 self:SaveDefault(Options.ThemeManager_CustomThemeList.Value)
  197.                                 self.Library:Notify(string.format('Set default theme to %q', Options.ThemeManager_CustomThemeList.Value))
  198.                         end
  199.                 end)
  200.  
  201.                 ThemeManager:LoadDefault()
  202.  
  203.                 local function UpdateTheme()
  204.                         self:ThemeUpdate()
  205.                 end
  206.  
  207.                 Options.BackgroundColor:OnChanged(UpdateTheme)
  208.                 Options.MainColor:OnChanged(UpdateTheme)
  209.                 Options.AccentColor:OnChanged(UpdateTheme)
  210.                 Options.OutlineColor:OnChanged(UpdateTheme)
  211.                 Options.FontColor:OnChanged(UpdateTheme)
  212.         end
  213.  
  214.         function ThemeManager:GetCustomTheme(file)
  215.                 local path = self.Folder .. '/themes/' .. file
  216.                 if not isfile(path) then
  217.                         return nil
  218.                 end
  219.  
  220.                 local data = readfile(path)
  221.                 local success, decoded = pcall(httpService.JSONDecode, httpService, data)
  222.                
  223.                 if not success then
  224.                         return nil
  225.                 end
  226.  
  227.                 return decoded
  228.         end
  229.  
  230.         function ThemeManager:SaveCustomTheme(file)
  231.                 if file:gsub(' ', '') == '' then
  232.                         return self.Library:Notify('Invalid file name for theme (empty)', 3)
  233.                 end
  234.  
  235.                 local theme = {}
  236.                 local fields = { "FontColor", "MainColor", "AccentColor", "BackgroundColor", "OutlineColor" }
  237.  
  238.                 for _, field in next, fields do
  239.                         theme[field] = Options[field].Value:ToHex()
  240.                 end
  241.  
  242.                 writefile(self.Folder .. '/themes/' .. file .. '.json', httpService:JSONEncode(theme))
  243.         end
  244.  
  245.         function ThemeManager:ReloadCustomThemes()
  246.                 local list = listfiles(self.Folder .. '/themes')
  247.  
  248.                 local out = {}
  249.                 for i = 1, #list do
  250.                         local file = list[i]
  251.                         if file:sub(-5) == '.json' then
  252.                                 -- i hate this but it has to be done ...
  253.  
  254.                                 local pos = file:find('.json', 1, true)
  255.                                 local char = file:sub(pos, pos)
  256.  
  257.                                 while char ~= '/' and char ~= '\\' and char ~= '' do
  258.                                         pos = pos - 1
  259.                                         char = file:sub(pos, pos)
  260.                                 end
  261.  
  262.                                 if char == '/' or char == '\\' then
  263.                                         table.insert(out, file:sub(pos + 1))
  264.                                 end
  265.                         end
  266.                 end
  267.  
  268.                 return out
  269.         end
  270.  
  271.         function ThemeManager:SetLibrary(lib)
  272.                 self.Library = lib
  273.         end
  274.  
  275.         function ThemeManager:BuildFolderTree()
  276.                 local paths = {}
  277.  
  278.                 -- build the entire tree if a path is like some-hub/phantom-forces
  279.                 -- makefolder builds the entire tree on Synapse X but not other exploits
  280.  
  281.                 local parts = self.Folder:split('/')
  282.                 for idx = 1, #parts do
  283.                         paths[#paths + 1] = table.concat(parts, '/', 1, idx)
  284.                 end
  285.  
  286.                 table.insert(paths, self.Folder .. '/themes')
  287.                 table.insert(paths, self.Folder .. '/settings')
  288.  
  289.                 for i = 1, #paths do
  290.                         local str = paths[i]
  291.                         if not isfolder(str) then
  292.                                 makefolder(str)
  293.                         end
  294.                 end
  295.         end
  296.  
  297.         function ThemeManager:SetFolder(folder)
  298.                 self.Folder = folder
  299.                 self:BuildFolderTree()
  300.         end
  301.  
  302.         function ThemeManager:CreateGroupBox(tab)
  303.                 assert(self.Library, 'Must set ThemeManager.Library first!')
  304.                 return tab:AddLeftGroupbox('Themes')
  305.         end
  306.  
  307.         function ThemeManager:ApplyToTab(tab)
  308.                 assert(self.Library, 'Must set ThemeManager.Library first!')
  309.                 local groupbox = self:CreateGroupBox(tab)
  310.                 self:CreateThemeManager(groupbox)
  311.         end
  312.  
  313.         function ThemeManager:ApplyToGroupbox(groupbox)
  314.                 assert(self.Library, 'Must set ThemeManager.Library first!')
  315.                 self:CreateThemeManager(groupbox)
  316.         end
  317.  
  318.         ThemeManager:BuildFolderTree()
  319. end
  320.  
  321. local SaveManager = loadstring(game:HttpGet(repo .. 'modules/SaveManager.lua'))()
  322. local UniversalBuilder = loadstring(game:HttpGet(repo .. 'modules/UniversalBuilder.lua'))()
  323.  
  324. -- Services
  325. local PathfindingService = game:GetService("PathfindingService");
  326. local Players = game:GetService("Players");
  327. local ReplicatedStorage = game:GetService("ReplicatedStorage");
  328. local RunService = game:GetService("RunService");
  329. local TweenService = game:GetService('TweenService');
  330. local VIM = game:GetService("VirtualInputManager");
  331. local UserInputService = game:GetService("UserInputService");
  332. local ProximityPromptService = game:GetService("ProximityPromptService");
  333. local VirtualInputManager = game:GetService("VirtualInputManager");
  334. local logsLabel
  335. player = Players.LocalPlayer
  336. -- Local Player
  337. local vu = game:GetService("VirtualUser")
  338. player.Idled:connect(function()
  339.    vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  340.    wait(1)
  341.    vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  342. end)
  343. local logsTable = {}
  344. local function debug(txt)
  345.     table.insert(logsTable, txt)
  346.     logsLabel:SetText(table.concat(logsTable, "\n"), true)
  347. end
  348. local PlaceID = game.PlaceId
  349. local AllIDs = {}
  350. local foundAnything = ""
  351. local actualHour = os.date("!*t").hour
  352. local Deleted = false
  353. local File = pcall(function()
  354.     AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  355. end)
  356. if not File then
  357.     table.insert(AllIDs, actualHour)
  358.     writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  359. end
  360. function TPReturner()
  361.     local Site;
  362.     if foundAnything == "" then
  363.         Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  364.     else
  365.         Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  366.     end
  367.     local ID = ""
  368.     if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  369.         foundAnything = Site.nextPageCursor
  370.     end
  371.     local num = 0;
  372.     for i,v in pairs(Site.data) do
  373.         local Possible = true
  374.         ID = tostring(v.id)
  375.         if tonumber(v.maxPlayers) > tonumber(v.playing) then
  376.             for _,Existing in pairs(AllIDs) do
  377.                 if num ~= 0 then
  378.                     if ID == tostring(Existing) then
  379.                         Possible = false
  380.                     end
  381.                 else
  382.                     if tonumber(actualHour) ~= tonumber(Existing) then
  383.                         local delFile = pcall(function()
  384.                             delfile("NotSameServers.json")
  385.                             AllIDs = {}
  386.                             table.insert(AllIDs, actualHour)
  387.                         end)
  388.                     end
  389.                 end
  390.                 num = num + 1
  391.             end
  392.             if Possible == true then
  393.                 table.insert(AllIDs, ID)
  394.                 wait()
  395.                 pcall(function()
  396.                     writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  397.                     wait()
  398.                     game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, player)
  399.                 end)
  400.                 wait(4)
  401.             end
  402.         end
  403.     end
  404. end
  405.  
  406. function Teleport()
  407.     while wait() do
  408.         pcall(function()
  409.             TPReturner()
  410.             if foundAnything ~= "" then
  411.                 TPReturner()
  412.             end
  413.         end)
  414.     end
  415. end
  416. -- Custom class to handle attack selection and priority
  417. local AttackSelector = {}
  418. AttackSelector.__index = AttackSelector
  419.  
  420. function AttackSelector.new(attacks)
  421.     local self = setmetatable({}, AttackSelector)
  422.     self.attacks = attacks
  423.     self.selectedAttacks = {} -- Store selected attack indices
  424.     return self
  425. end
  426. function AttackSelector:AddAttack(attackIndex)
  427.     -- Add an attack to the selection and assign priority
  428.     table.insert(self.selectedAttacks, attackIndex)
  429. end
  430.  
  431. function AttackSelector:RemoveAttack(attackIndex)
  432.     -- Remove an attack from the selection and adjust priorities
  433.     for i = #self.selectedAttacks, 1, -1 do
  434.         if self.selectedAttacks[i] == attackIndex then
  435.             table.remove(self.selectedAttacks, i)
  436.             break
  437.         end
  438.     end
  439. end
  440.  
  441. function AttackSelector:GetSelectedAttacks()
  442.     return self.selectedAttacks
  443. end
  444.  
  445. local AttackSelectorInstance = AttackSelector.new(Attacks)
  446.  
  447. task.spawn(LPH_JIT_MAX(function()
  448.     while task.wait() do
  449.         if Toggles.AutoDodge and Toggles.AutoDodge.Value then
  450.             local args = {[1] = {[1] = true,[2] = true},[2] = "DodgeMinigame"}
  451.             pcall(function()
  452.                 ReplicatedStorage.Remotes.Information.RemoteFunction:FireServer(unpack(args))
  453.             end)
  454.         end
  455.     end
  456. end))
  457. task.spawn(LPH_JIT_MAX(function()
  458.     while task.wait(2.5) do
  459.         if Toggles.AutoHeal and Toggles.AutoHeal.Value then
  460.             if not player.Character:FindFirstChild('FightInProgress') then
  461.                 if player.Character.Humanoid.Health ~= player.Character.Humanoid.MaxHealth then
  462.                     doctorHeal()
  463.                 end
  464.             end
  465.         end
  466.     end
  467. end))
  468.  
  469. player.PlayerGui.Combat.Block:GetPropertyChangedSignal('Visible'):Connect(LPH_JIT_MAX(function()
  470.     if Toggles.AutoDodgeLegit and Toggles.AutoDodgeLegit.Value then
  471.         local waitTime = math.random(Options.DodgeLegitMin.Value, Options.DodgeLegitMax.Value)
  472.         task.wait(waitTime)
  473.         for i = 1, 5 do
  474.             local args = {[1] = {[1] = true,[2] = true},[2] = "DodgeMinigame"}
  475.             pcall(function()
  476.                 ReplicatedStorage.Remotes.Information.RemoteFunction:FireServer(unpack(args))
  477.             end)
  478.         end
  479.     end
  480. end))
  481.  
  482. for _,qwxqrf in pairs({ "Fist", "Spear", "Magic", "Dagger", "Sword", "Thorian"}) do
  483.     if player.PlayerGui.Combat:FindFirstChild(qwxqrf .. 'QTE') then
  484.         player.PlayerGui.Combat:FindFirstChild(qwxqrf .. 'QTE'):GetPropertyChangedSignal('Visible'):Connect(LPH_JIT_MAX(function()
  485.             if Toggles.AutoQTELegit.Value then
  486.                 local waitTime = math.random(Options.LegitMin.Value, Options.LegitMax.Value)
  487.                 Library:Notify('Auto QTE Legit: Waiting ' .. tostring(waitTime) .. " seconds..")
  488.                 task.wait(waitTime)
  489.                 local args = {[1] = true,[2] = qwxqrf .. "QTE"}
  490.                 for i = 1, 5 do
  491.                     pcall(function()
  492.                         ReplicatedStorage.Remotes.Information.RemoteFunction:FireServer(unpack(args))
  493.                     end)
  494.                     task.wait()
  495.                 end
  496.             end
  497.         end))
  498.     end
  499. end
  500.  
  501. function doQTE()
  502.     if Toggles.AutoQTE.Value then
  503.         local weapons = { "Fist", "Spear", "Magic", "Dagger", "Sword", "Thorian"}
  504.         for _,v in pairs(weapons) do
  505.             local args = {[1] = true,[2] = v .. "QTE"}
  506.             pcall(function()
  507.                 player.PlayerGui.Combat:FindFirstChild(v .. "QTE").Visible = false
  508.                 ReplicatedStorage.Remotes.Information.RemoteFunction:FireServer(unpack(args))
  509.             end)
  510.         end
  511.     end
  512. end
  513.  
  514. task.spawn(LPH_JIT_MAX(function()
  515.     while task.wait() do
  516.         doQTE()
  517.     end
  518. end))
  519.  
  520. function findTarget(fightID, targetOption)
  521.     local targetList = {}
  522.  
  523.     -- Collect valid targets in targetList
  524.     for _, entity in pairs(workspace.Living:GetChildren()) do
  525.         if (entity:FindFirstChild('FightInProgress') and tostring(entity.FightInProgress.Value) == tostring(fightID)) then
  526.             local isPlayer = false
  527.             if entity:FindFirstChild('NoTrip') then
  528.                 isPlayer = true
  529.             end
  530.             for _,v in pairs(ReplicatedStorage.Fights:FindFirstChild(fightID):WaitForChild('Team2'):GetChildren()) do
  531.                 if v.Value == entity.Name then
  532.                     isPlayer = true
  533.                 end
  534.             end
  535.             if entity.Name ~= player.Name and not isPlayer then
  536.                 table.insert(targetList, entity)
  537.             end  
  538.         end    
  539.     end
  540.  
  541.     -- Target weakest (lowest health)
  542.     if targetOption == "weakest" then
  543.         local target = nil
  544.         local lowestHealth = math.huge
  545.         for _, entity in ipairs(targetList) do
  546.             local currentHealth = entity.Humanoid.Health or 0
  547.             if currentHealth < lowestHealth then
  548.                 lowestHealth = currentHealth
  549.                 target = entity
  550.             end
  551.         end
  552.         return target
  553.     end
  554.  
  555.     -- Target strongest (highest health)
  556.     if targetOption == "strongest" then
  557.         local target = nil
  558.         local highestHealth = 0
  559.         for _, entity in ipairs(targetList) do
  560.             local currentHealth = entity.Humanoid.MaxHealth or 0
  561.             if currentHealth > highestHealth then
  562.                 highestHealth = currentHealth
  563.                 target = entity
  564.             end
  565.         end
  566.         return target
  567.     end
  568.  
  569.     -- Target random target
  570.     if targetOption == "random" then
  571.         local numTargets = #targetList
  572.         if numTargets > 0 then
  573.             local randomIndex = math.random(1, numTargets)
  574.             return targetList[randomIndex]
  575.         end
  576.     end
  577.  
  578.     -- Target one target at a time until they are dead
  579.     if targetOption == "one_at_a_time" then
  580.         for _, entity in ipairs(targetList) do
  581.             if entity.Humanoid.Health and entity.Humanoid.Health > 0 then
  582.                 return entity
  583.             end
  584.         end
  585.     end
  586.  
  587.     -- If no valid target is found or invalid targetOption is provided, return nil
  588.     return nil
  589. end
  590. local function getAttacks()
  591.     local Attacks = {}
  592.     for _,v in pairs(player.PlayerGui.Combat.ActionBG.AttacksPage.ScrollingFrame:GetChildren()) do
  593.         if v:IsA('TextButton') then
  594.             table.insert(Attacks, v.Name)
  595.         end
  596.     end
  597.     return Attacks
  598. end
  599. task.spawn(LPH_JIT_MAX(function()
  600.     while task.wait() do
  601.         if Toggles.InfEnergy.Value then
  602.             if tonumber(player.Character.Status.Energy.Value) ~= 6 then
  603.                 player.PlayerGui.Combat.CombatHandle.Meditate:FireServer()
  604.             end
  605.         end
  606.     end
  607. end))
  608.  
  609. local skillConstants = require(ReplicatedStorage.Constants)
  610. function IsSelfTargetSkill(skillName)
  611.     local skillData = skillConstants.Skills[skillName]
  612.     if (skillData and skillData.SelfTarget) then
  613.         return true
  614.     end
  615.  
  616.     return false
  617. end
  618.  
  619. local Attacks = getAttacks()
  620. local function attackEntity(initTarget)
  621.     pcall(function()
  622.         local selectedAttacks = AttackSelectorInstance:GetSelectedAttacks()
  623.         local selectedAttacksTable = {}
  624.  
  625.         for _, attackIndex in ipairs(selectedAttacks) do
  626.             local attackName = Attacks[attackIndex]
  627.             table.insert(selectedAttacksTable, { Name = attackName, Index = attackIndex })
  628.         end
  629.         --[[local concatenatedAttacks = table.concat(selectedAttacksTable, ", ")
  630.         Library:Notify("Selected Attacks: " .. concatenatedAttacks)]]
  631.         task.wait(1)
  632.  
  633.         for _, attackInfo in ipairs(selectedAttacksTable) do
  634.  
  635.             local attackTarget = initTarget
  636.             if player.PlayerGui.Combat.ActionBG.AttacksPage.ScrollingFrame:FindFirstChild(attackInfo.Name) then
  637.                 if (player.PlayerGui.Combat.ActionBG.AttacksPage.ScrollingFrame[attackInfo.Name]:FindFirstChild('CD')
  638.                 and not player.PlayerGui.Combat.ActionBG.AttacksPage.ScrollingFrame[attackInfo.Name]:FindFirstChild('CD').Visible) then
  639.                     debug(attackInfo.Name .. " is not on cooldown")
  640.                     if IsSelfTargetSkill(attackInfo.Name) then
  641.                         attackTarget = player.Character
  642.                         debug(attackInfo.Name .. " is a self-target attack")
  643.                     else
  644.                         debug(attackInfo.Name .. " isn't a self-target attack")
  645.                     end
  646.                     pcall(function()
  647.                         player.PlayerGui.Combat.CombatHandle.RemoteFunction:InvokeServer(
  648.                             "Attack", attackInfo.Name, { ["Attacking"] = attackTarget }
  649.                         )
  650.                     end)
  651.                 else
  652.                     debug(attackInfo.Name .. " CD not found")
  653.                 end
  654.             end
  655.         end
  656.     end)
  657. end
  658. function attack()
  659.     pcall(function()
  660.         local fightID = (player.Character:FindFirstChild('FightInProgress') and tostring(player.Character:FindFirstChild('FightInProgress').Value))
  661.         if fightID then
  662.             local fightFolder = ReplicatedStorage.Fights:FindFirstChild(fightID)
  663.             if fightFolder then
  664.                 local currentTurn = fightFolder:FindFirstChild('CurrentTurn')
  665.                 if (currentTurn and tostring(currentTurn.Value) == player.Name) then
  666.                     local target = findTarget(fightID, Options.AttackMethod.Value)
  667.                     if target then
  668.                         debug("Attacking " .. target.Name)
  669.                         attackEntity(target)
  670.                     else
  671.                         debug('No target found!')
  672.                     end
  673.                 end
  674.             end
  675.         end
  676.     end)
  677. end
  678.  
  679. task.spawn(LPH_JIT_MAX(function()
  680.     while task.wait(0.05) do
  681.         if Toggles.AutoEscape.Value then
  682.             pcall(function()
  683.                 player.PlayerGui.Combat.CombatHandle.Escape:FireServer()
  684.             end)
  685.         end
  686.         if Toggles.AutoAttack.Value then
  687.             attack()
  688.         end
  689.     end
  690. end))
  691.  
  692. task.spawn(LPH_JIT_MAX(function()
  693.     while task.wait() do
  694.         if Toggles.Alluring.Value then
  695.             if not player.Character.Effects:FindFirstChild('AttractOn') then
  696.                 if player.Backpack.Tools:FindFirstChild('Alluring Elixir') and not player.Character:FindFirstChild('FightInProgress') then
  697.                     debug'Using alluring elixir..'
  698.                     local args = {
  699.                         [1] = "Use",
  700.                         [2] = "Alluring Elixir"
  701.                     }
  702.                    
  703.                     ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("Information"):WaitForChild("InventoryManage"):FireServer(unpack(args))
  704.                     debug'Waiting for alluring elixir to pop.. (5s timeout)'
  705.                     local timeout = 5
  706.                     local startTime = tick()
  707.  
  708.                     repeat
  709.                         task.wait()
  710.                     until player.Character.Effects:FindFirstChild('AttractOn') or tick() - startTime >= timeout
  711.                     if player.Character.Effects:FindFirstChild('AttractOn') then
  712.                         debug'Alluring effect applied!'
  713.                     else
  714.                         debug'Timeout reached. Alluring effect not applied within 5 seconds.'
  715.                     end
  716.                 end
  717.             end
  718.         end
  719.     end
  720. end))
  721.  
  722. task.spawn(LPH_JIT_MAX(function()
  723.     while task.wait() do
  724.         if Toggles.lcdi.Value then
  725.             collectDroppedItems()
  726.         end
  727.     end
  728. end))
  729.  
  730. task.spawn(LPH_JIT_MAX(function()
  731.     while task.wait() do
  732.         if Toggles.lcdinear.Value then
  733.             collectDroppedItemsNear()
  734.         end
  735.     end
  736. end))
  737.  
  738. task.spawn(LPH_JIT_MAX(function()
  739.     while task.wait() do
  740.         if Toggles.AutoMineOre.Value then
  741.             local ore
  742.             local selectedMines = Options.SelectMine:GetActiveValues()
  743.             for _, selectedMine in ipairs(selectedMines) do
  744.                 if selectedMine == "Aestic" then
  745.                     for _,v in pairs(workspace.Ores:GetChildren()) do
  746.                         if tostring(v:GetAttributes()['Durability']) ~= "0" and v.Name == "Aestic" then
  747.                             ore = v
  748.                             break
  749.                         end
  750.                     end
  751.                 elseif selectedMine == "Ferrus" then
  752.                     for _,v in pairs(workspace.Ores:GetChildren()) do
  753.                         if tostring(v:GetAttributes()['Durability']) ~= "0" and v.Name == "Ferrus" then
  754.                             ore = v
  755.                             break
  756.                         end
  757.                     end
  758.                 elseif selectedMine == "Laneus" then
  759.                     for _,v in pairs(workspace.Ores:GetChildren()) do
  760.                         if tostring(v:GetAttributes()['Durability']) ~= "0" and v.Name == "Laneus" then
  761.                             ore = v
  762.                             break
  763.                         end
  764.                     end
  765.                 end
  766.             end
  767.             if ore then
  768.                 repeat task.wait()
  769.                     player.Character.HumanoidRootPart.CFrame = ore.Ore.CFrame + Vector3.new(0,-5,0)
  770.                     local args = {
  771.                         [1] = "Use",
  772.                         [2] = "Pickaxe"
  773.                     }
  774.  
  775.                     ReplicatedStorage.Remotes.Information.InventoryManage:FireServer(unpack(args))
  776.                 until tostring(ore:GetAttributes()['Durability']) == "0" or not Toggles.AutoMineOre.Value
  777.             end
  778.         end
  779.     end
  780. end))
  781.  
  782. function collectDroppedItems()
  783.     for _,v in pairs(workspace.Dropped:GetDescendants()) do
  784.         pickingUpFlowers = true
  785.         if v.ClassName == "TouchTransmitter" then
  786.             local startTime = os.clock()
  787.             local initPos = player.Character.HumanoidRootPart.CFrame
  788.             repeat task.wait()
  789.                 pcall(function()
  790.                     player.Character.HumanoidRootPart.CFrame = v.Parent.CFrame + Vector3.new(0,-10,0)
  791.                     firetouchinterest(player.Character.HumanoidRootPart, v.Parent, 0)
  792.                     firetouchinterest(player.Character.HumanoidRootPart, v.Parent, 1)
  793.                 end)
  794.             until not v:IsDescendantOf(workspace) or os.clock() - startTime >= 1 or not Toggles.lcdi.Value
  795.             player.Character.HumanoidRootPart.CFrame = initPos
  796.         end
  797.     end
  798.     pickingUpFlowers = false
  799. end
  800.  
  801. function collectDroppedItemsNear()
  802.     for _,v in pairs(workspace.Dropped:GetDescendants()) do
  803.         if v.ClassName == "TouchTransmitter" then
  804.             firetouchinterest(player.Character.HumanoidRootPart, v.Parent, 0)
  805.             firetouchinterest(player.Character.HumanoidRootPart, v.Parent, 1)
  806.         end
  807.     end
  808. end
  809.  
  810. local function getAttackPriority(attackIndex)
  811.     local selectedAttacks = AttackSelectorInstance:GetSelectedAttacks()
  812.     for priority, index in ipairs(selectedAttacks) do
  813.         if index == attackIndex then
  814.             return priority
  815.         end
  816.     end
  817.     return nil
  818. end
  819.  
  820. local doctorNPC = workspace.NPCs:FindFirstChild('Doctor')
  821.  
  822. local function getOptionFromDialogue(text)
  823.     local button
  824.     for _,v in pairs(player.PlayerGui.NPCDialogue.BG.Options:GetChildren()) do
  825.         if v:IsA('TextButton') and (v.Text == text or v.Text:match(text)) then
  826.             button = v
  827.             break
  828.         end
  829.     end
  830.     return button
  831. end
  832.  
  833. local function selectOptionFromDialogue(text)
  834.     local button
  835.     for _,v in pairs(player.PlayerGui.NPCDialogue.BG.Options:GetChildren()) do
  836.         if v:IsA('TextButton') and (v.Text == text or v.Text:match(text)) then
  837.             button = v
  838.             break
  839.         end
  840.     end
  841.     player.PlayerGui.NPCDialogue.RemoteEvent:FireServer(button)
  842. end
  843. local function isOptionFromDialogue(text)
  844.     local button
  845.     for _, v in pairs(player.PlayerGui.NPCDialogue.BG.Options:GetChildren()) do
  846.         if v:IsA('TextButton') and (v.Text == text or v.Text:match(text)) then
  847.             button = v
  848.             break
  849.         end
  850.     end
  851.  
  852.     if button then
  853.         return true
  854.     end
  855.     return false
  856. end
  857. doctorHealing  = false
  858. startingStats = false
  859. function doctorHeal()
  860.     if not doctorHealing and not startingStats then
  861.         doctorHealing = true
  862.         local savedCFrame = player.Character.HumanoidRootPart.CFrame
  863.         repeat task.wait()
  864.             camera.CFrame = CFrame.new(cf.Position, cf.Position + Vector3.new(0, 1, 0))
  865.             player.Character.HumanoidRootPart.CFrame = doctorNPC.HumanoidRootPart.CFrame + Vector3.new(0,-9,0)
  866.             fireproximityprompt(doctorNPC.Head.ProximityPrompt)
  867.         until player.PlayerGui:FindFirstChild('NPCDialogue')
  868.  
  869.         selectOptionFromDialogue('Yes please!')
  870.  
  871.         task.wait()
  872.         player.Character.HumanoidRootPart.CFrame = savedCFrame
  873.         doctorHealing = false
  874.     end
  875. end
  876.  
  877.  
  878. workspace.DescendantAdded:Connect(function(v)
  879.     if v.Name == "TouchInterest" then
  880.         if Toggles.KillBrick.Value then
  881.             local parent = v.Parent
  882.             if parent.Name == "Void" or parent.Name == "Fireball"
  883.             or parent.Name == "Faller" or parent.Name == "Geyser" then
  884.             game:GetService("Debris"):AddItem(v,0)
  885.             end
  886.         end
  887.     end
  888. end)
  889.  
  890. function extractEssenceAmountFromText(text)
  891.     local essenceAmount = text:match("%((%d+)%)")
  892.     return tonumber(essenceAmount)
  893. end
  894.  
  895. function hasEnoughEssence(requiredEssenceText)
  896.     local essenceValueText = player.PlayerGui.HUD.Holder.Essence.Text
  897.     local requiredEssence = extractEssenceAmountFromText(requiredEssenceText)
  898.     local currentEssence = tonumber(essenceValueText)
  899.  
  900.     if requiredEssence and currentEssence then
  901.         return currentEssence >= requiredEssence
  902.     end
  903.     return false
  904. end
  905.  
  906. local function checkAttributeTotal()
  907.     local total = 0
  908.     -- Physical
  909.     local physicalValue = Options.physicalSelector.Value
  910.     total = total + physicalValue
  911.     -- Arcane
  912.     local arcaneValue = Options.arcaneSelector.Value
  913.     total = total + arcaneValue
  914.     -- Endurance
  915.     local enduranceValue = Options.enduranceSelector.Value
  916.     total = total + enduranceValue
  917.     -- Speed
  918.     local speedValue = Options.speedSelector.Value
  919.     total = total + speedValue
  920.     -- Luck
  921.     local luckValue = Options.luckSelector.Value
  922.     total = total + luckValue
  923.  
  924.     return total
  925. end
  926.  
  927. function allocateStats()
  928.     local totalValue = checkAttributeTotal()
  929.  
  930.     if totalValue > 4 then
  931.         Library:Notify("Total Stat Allocation is above 4. Readjust your stat allocation values.\nMake sure you have the race that gives +4 stat points. Make sure u are allocating 3 points if you don't",3)
  932.         task.wait(3)
  933.     elseif totalValue < 3 then
  934.         Library:Notify('Total Stat Allocation is below 3. Readjust your stat allocation values.',3)
  935.         task.wait(3)
  936.     elseif not startingStats then
  937.         debug("Starting stat allocation process.")
  938.         if totalValue >= 4 then
  939.             Library:Notify("Make sure you have the race that gives +4 stat points. Make sure u are allocating 3 points if you don't")
  940.         end
  941.         startingStats = true
  942.  
  943.         local savedCFrame = player.Character.HumanoidRootPart.CFrame
  944.         local Success = false
  945.         local Aborted = false
  946.         local selectedDialogue = false
  947.         task.spawn(LPH_JIT_MAX(function()
  948.             while not Success and task.wait() do
  949.                 if Aborted or Success then
  950.                     break
  951.                 end
  952.                 player.Character.HumanoidRootPart.CFrame = workspace.NPCs.Aretim.CFrame + Vector3.new(0,0,0)
  953.             end
  954.         end))
  955.         local timeout = 10 -- Timeout in seconds
  956.         local startTime = os.time()
  957.         repeat
  958.             task.wait(1)
  959.             if selectedDialogue then
  960.                 Library:Notify('Waiting for Stat Allocation GUI to pop up..')
  961.                 repeat task.wait() until player.PlayerGui.HUD.StatAllocate.Visible
  962.                 Library:Notify("Stat GUI popped up")
  963.                 Success = true
  964.             elseif player.PlayerGui:FindFirstChild('NPCDialogue') and not selectedDialogue then
  965.                 if isOptionFromDialogue('Show me his light') then
  966.                     if hasEnoughEssence(getOptionFromDialogue('Show me his light').Text) then
  967.                         selectOptionFromDialogue('Show me his light')
  968.                         selectedDialogue = true
  969.                     else
  970.                         Library:Notify('We do not have the required essence to level up.\n(Auto level up loop is on a 60s timer. If you clicked the button version, dw abt this.)')
  971.                         if isOptionFromDialogue('Not yet') then
  972.                             selectOptionFromDialogue('Not yet')
  973.                         end
  974.                         Aborted = true
  975.                     end
  976.                 end
  977.             elseif not player.PlayerGui:FindFirstChild('NPCDialogue') and not selectedDialogue then
  978.                 Library:Notify("Dialogue has popped up, selecting dialogue options")
  979.                 camera.CFrame = CFrame.new(cf.Position, cf.Position + Vector3.new(0, 1, 0))
  980.                 fireproximityprompt(workspace.NPCs.Aretim.ProximityPrompt)
  981.             end
  982.  
  983.             if os.time() - startTime >= timeout then
  984.                 Library:Notify('Timeout reached, exiting the loop.')
  985.                 Aborted = true
  986.             end
  987.         until Success or Aborted
  988.  
  989.         if Success then
  990.             local args = {
  991.                 [1] = Options.physicalSelector.Value,
  992.                 [2] = Options.arcaneSelector.Value,
  993.                 [3] = Options.enduranceSelector.Value,
  994.                 [4] = Options.speedSelector.Value,
  995.                 [5] = Options.luckSelector.Value
  996.             }
  997.              
  998.             ReplicatedStorage.Remotes.Information.StatAllocation:FireServer(unpack(args))
  999.              
  1000.             local notifyText = "Allocated: "
  1001.             for i, value in ipairs(args) do
  1002.                 notifyText = notifyText.."["..tostring(i).."] "..tostring(value).." "
  1003.             end
  1004.              
  1005.             Library:Notify(notifyText)
  1006.         end
  1007.         startingStats = false
  1008.         player.PlayerGui.HUD.StatAllocate.Visible = false
  1009.         player.Character.HumanoidRootPart.CFrame = savedCFrame
  1010.     end
  1011.  
  1012. end
  1013.  
  1014. local essenceCache = player.PlayerGui.HUD.Holder.Essence.Text
  1015. task.spawn(LPH_JIT_MAX(function()
  1016.     while task.wait(0.25) do
  1017.         if Toggles.AutoStatAllocate.Value then
  1018.             if essenceCache ~= player.PlayerGui.HUD.Holder.Essence.Text and tonumber(player.PlayerGui.HUD.Holder.Essence.Text) > tonumber(essenceCache) then
  1019.                 if not doctorHealing then
  1020.                     if player.Character:FindFirstChild('FightInProgress') then
  1021.                         Library:Notify('Fight in progress, waiting to auto allocate stats...')
  1022.                         repeat task.wait() until not player.Character:FindFirstChild('FightInProgress')
  1023.                     end
  1024.                     Library:Notify('Allocating stats automatically...')
  1025.                     allocateStats()
  1026.                     essenceCache = player.PlayerGui.HUD.Holder.Essence.Text
  1027.                 end
  1028.             end
  1029.         end
  1030.     end
  1031. end))
  1032.  
  1033.  
  1034.  
  1035. local potionRecipes = {
  1036.     ["Small Health Potion"] = {"Everthistle", "Slime Chunk"},
  1037.     ["Abhorrent Elixir"] = {"Everthistle", "Everthistle", "Cryastem"},
  1038.     ["Minor Empowering Elixir"] = {"Sand Core", "Cryastem", "Carnastool"},
  1039.     ["Minor Energy Elixir"] = {"Carnastool", "Everthistle"},
  1040.     ["Alluring Elixir"] = {"Everthistle", "Everthistle", "Carnastool"},
  1041.     ["Heartsoothing Remedy"] = {"Cryastem", "Everthistle", "Everthistle", "Everthistle"},
  1042.     ["Minor Absorbing Potion"] = {"Hightail", "Mushroom Cap"},
  1043.     ["Heartbreaking Elixir"] = {"Everthistle", "Everthistle", "Everthistle", "Carnastool"},
  1044.     ["Invisibility Potion"] = {"Driproot", "Driproot", "Hightail", "Haze Chunk"},
  1045.     ["Ferrus Skin Potion"] = {"Carnastool", "Carnastool", "Sand Core", "Mushroom Cap"}
  1046. }
  1047.  
  1048. -- Function to count the items in the player's backpack
  1049. local function countItems()
  1050.     local backpack = player.Backpack
  1051.     local tools = backpack.Tools:GetChildren()
  1052.  
  1053.     local itemTable = {}
  1054.  
  1055.     for _, tool in ipairs(tools) do
  1056.         local itemName = tool.Name
  1057.         local quantity = 1  -- Assume each item counts as one by default
  1058.  
  1059.         -- Update the table or add a new entry for the item
  1060.         if itemTable[itemName] then
  1061.             itemTable[itemName] = itemTable[itemName] + quantity
  1062.         else
  1063.             itemTable[itemName] = quantity
  1064.         end
  1065.     end
  1066.  
  1067.     return itemTable
  1068. end
  1069.  
  1070. -- Function to check if the player has enough ingredients for a specific potion
  1071. local function canCraftPotion(potionName)
  1072.     local playerItems = countItems()
  1073.  
  1074.     local ingredients = potionRecipes[potionName]
  1075.     if not ingredients then
  1076.         return false -- Potion name not found in the potionRecipes table
  1077.     end
  1078.  
  1079.     for _, item in ipairs(ingredients) do
  1080.         local requiredQuantity = 1 -- Assume each ingredient in the recipe counts as one by default
  1081.  
  1082.         -- Check if the item exists in the player's backpack
  1083.         if playerItems[item] then
  1084.             if playerItems[item] < requiredQuantity then
  1085.                 return false -- Player doesn't have enough of this ingredient
  1086.             end
  1087.         else
  1088.             return false -- Player doesn't have this ingredient at all
  1089.         end
  1090.     end
  1091.  
  1092.     return true -- Player has all the required ingredients for the potion
  1093. end
  1094.  
  1095. local function getAllPotionNames()
  1096.     local potionNames = {}
  1097.  
  1098.     for potionName, _ in pairs(potionRecipes) do
  1099.         table.insert(potionNames, potionName)
  1100.     end
  1101.  
  1102.     return potionNames
  1103. end
  1104.  
  1105. local function getToolByName(toolName)
  1106.     local backpack = player.Backpack
  1107.     local tools = backpack.Tools:GetChildren()
  1108.  
  1109.     for _, tool in ipairs(tools) do
  1110.         if tool.Name == toolName then
  1111.             return tool
  1112.         end
  1113.     end
  1114.  
  1115.     return nil
  1116. end
  1117. local function fireproximityprompt(Obj, Amount, Skip)
  1118.     if Obj.ClassName == "ProximityPrompt" then
  1119.         Amount = Amount or 1
  1120.         local PromptTime = Obj.HoldDuration
  1121.         if Skip then
  1122.             Obj.HoldDuration = 0
  1123.         end
  1124.         for i = 1, Amount do
  1125.             Obj:InputHoldBegin()
  1126.             if not Skip then
  1127.                 wait(Obj.HoldDuration)
  1128.             end
  1129.             Obj:InputHoldEnd()
  1130.         end
  1131.         Obj.HoldDuration = PromptTime
  1132.     else
  1133.         error("userdata<ProximityPrompt> expected")
  1134.     end
  1135. end
  1136. local function findNearestCauldron(player)
  1137.     local targetPosition = player.Character and player.Character.HumanoidRootPart.Position
  1138.  
  1139.     if targetPosition then
  1140.         local closestCauldron = nil
  1141.         local closestDistanceSquared = math.huge
  1142.  
  1143.         local cauldrons = workspace.Cauldrons:GetChildren()
  1144.         for _, cauldron in ipairs(cauldrons) do
  1145.             if cauldron:IsA('Model') then
  1146.                 local cauldronPosition = cauldron.Water.Position
  1147.                 local distanceSquared = (cauldronPosition - targetPosition).Magnitude
  1148.  
  1149.                 if distanceSquared < closestDistanceSquared then
  1150.                     closestCauldron = cauldron
  1151.                     closestDistanceSquared = distanceSquared
  1152.                 end
  1153.             end
  1154.         end
  1155.  
  1156.         return closestCauldron
  1157.     end
  1158. end
  1159. local function craftPotion(selectedPotion)
  1160.     task.wait(0.1)
  1161.     local cauldron = findNearestCauldron(player)
  1162.     local ingredients = potionRecipes[selectedPotion]
  1163.     local abortttt = false
  1164.     local save = player.Character.HumanoidRootPart.CFrame
  1165.     task.spawn(LPH_JIT_MAX(function()
  1166.         while not abortttt and task.wait() do
  1167.             player.Character.HumanoidRootPart.CFrame = cauldron.Water.CFrame
  1168.             local camera = workspace.CurrentCamera
  1169.             local cf = camera.CFrame
  1170.             camera.CFrame = CFrame.new(cf.Position, cf.Position - Vector3.new(0, 1, 0))
  1171.         end
  1172.     end))
  1173.     for _, ingredient in ipairs(ingredients) do
  1174.         local tool = player.Backpack.Tools:FindFirstChild(ingredient)
  1175.         workspace.Camera.CameraSubject = cauldron.Water.ProximityPrompt
  1176.         if tool then
  1177.             repeat task.wait()
  1178.                 local args = {
  1179.                     [1] = "Equip",
  1180.                     [2] = ingredient
  1181.                 }
  1182.                
  1183.                 ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("Information"):WaitForChild("InventoryManage"):FireServer(unpack(args))  
  1184.             until player.Character:FindFirstChild(ingredient)                  
  1185.             repeat task.wait()
  1186.                 fireproximityprompt(cauldron.Water.ProximityPrompt, 1,true)
  1187.             until not player.Character:FindFirstChild(tool)
  1188.         end
  1189.     end
  1190.     for _,v in pairs(cauldron:GetDescendants()) do
  1191.         if v.ClassName == "ClickDetector" then
  1192.             fireclickdetector(v, 1)
  1193.         end
  1194.     end
  1195.     Library:Notify('Successfully brewed ' .. selectedPotion .. '!')
  1196.     abortttt = true
  1197. end
  1198. task.spawn(LPH_JIT_MAX(function()
  1199.     while task.wait() do
  1200.         if Toggles.AutoBrewPotion.Value then
  1201.             if canCraftPotion(Options.SelectPotion.Value) then
  1202.                 craftPotion(Options.SelectPotion.Value)
  1203.             end
  1204.         end
  1205.     end
  1206. end))
  1207. function useAbhorrent(brew)
  1208.     if not player.Character.Effects:FindFirstChild('RepelOn') then
  1209.         if player.Backpack.Tools:FindFirstChild('Abhorrent Elixir') then
  1210.             repeat
  1211.                 player.Character.HumanoidRootPart.CFrame = CFrame.new(-345, 30, -3500)
  1212.                 local args = {
  1213.                     [1] = "Use",
  1214.                     [2] = "Abhorrent Elixir"
  1215.                 }
  1216.                
  1217.                 ReplicatedStorage.Remotes.Information.InventoryManage:FireServer(unpack(args))
  1218.                 task.wait(5)
  1219.             until player.Character.Effects:FindFirstChild('RepelOn')
  1220.         else
  1221.             if brew then
  1222.                 if canCraftPotion('Abhorrent Elixir') then
  1223.                     craftPotion('Abhorrent Elixir')
  1224.                     task.wait(2)
  1225.                     useAbhorrent(true)
  1226.                 end
  1227.             end
  1228.         end
  1229.     end
  1230. end
  1231. local Noclipping = nil
  1232. Clip = true
  1233. function noclip()
  1234.         Clip = false
  1235.         wait(0.1)
  1236.         local function NoclipLoop()
  1237.                 if Clip == false and player.Character ~= nil then
  1238.                         for _, child in pairs(player.Character:GetDescendants()) do
  1239.                                 if child:IsA("BasePart") and child.CanCollide == true and child.Name ~= floatName then
  1240.                                         child.CanCollide = false
  1241.                                 end
  1242.                         end
  1243.                 end
  1244.         end
  1245.         Noclipping = RunService.Stepped:Connect(NoclipLoop)
  1246. end
  1247.  
  1248. function clip()
  1249.         if Noclipping then
  1250.                 Noclipping:Disconnect()
  1251.         end
  1252.         Clip = true
  1253. end
  1254. task.spawn(LPH_JIT_MAX(function()
  1255.     while task.wait() and Toggles do
  1256.         local savePos = player.Character.HumanoidRootPart.CFrame
  1257.         if Toggles.lcsi2.Value then
  1258.             pickingUpFlowers = true
  1259.             debug'ITS ON'
  1260.             if Toggles.lcsiUseElixir.Value then
  1261.                 useAbhorrent(true)
  1262.             end
  1263.             player.Character.HumanoidRootPart.CFrame = savePos
  1264.             for _,v in pairs(workspace.SpawnedItems:GetDescendants()) do
  1265.                 if not Toggles.lcsi2.Value then player.Character.HumanoidRootPart.CFrame = savePos break end
  1266.                 if Toggles.lcsiUseElixir.Value then
  1267.                     useAbhorrent(true)
  1268.                 end
  1269.                 if v.ClassName == "ClickDetector" then
  1270.                     local clickPart = v.Parent
  1271.                     if clickPart then
  1272.                         repeat task.wait()
  1273.                             player.Character.HumanoidRootPart.CFrame = clickPart.CFrame + Vector3.new(0,-14,0)
  1274.                             fireclickdetector(v, 1)
  1275.                         until not v:IsDescendantOf(workspace) or not Toggles.lcsi2.Value
  1276.                     end
  1277.                 end
  1278.             end
  1279.             player.Character.HumanoidRootPart.CFrame = savePos
  1280.             pickingUpFlowers = false
  1281.             if Toggles.lcsiServerHop.Value then
  1282.                 task.wait()
  1283.                 player.Character.HumanoidRootPart.CFrame = savePos
  1284.                 Teleport()
  1285.             end
  1286.         else
  1287.             if not workspace.SpawnedItems:FindFirstChildWhichIsA('Model') and Toggles.lcsiServerHop.Value then
  1288.                 player.Character.HumanoidRootPart.CFrame = savePos
  1289.                 task.wait(.25)
  1290.                 player.Character.HumanoidRootPart.CFrame = savePos
  1291.                 Teleport()
  1292.             end
  1293.         end
  1294.     end
  1295. end))
  1296. local enviroEffects = ReplicatedStorage.Remotes.Information.EnviroEffects
  1297. local old
  1298. old = hookmetamethod(game, "__namecall", LPH_NO_VIRTUALIZE(function(self, ...)
  1299.     local method = getnamecallmethod()
  1300.     local args = {...}
  1301.  
  1302.     local noFallToggle = (Toggles and Toggles.NoFall and Toggles.NoFall.Value) or (pickingUpFlowers) or (startingStats) or (doctorHealing)
  1303.     if not checkcaller() and self == enviroEffects and method == "FireServer" and args[2] and type(args[2]) == "number" and args[2] > 0 and (noFallToggle or Toggles.lcsi2.Value) then
  1304.         return task.wait(9e9)
  1305.     end
  1306.  
  1307.     return old(self, ...)
  1308. end))
  1309.  
  1310. -- Helper function to teleport the player to the selected teleport
  1311. local function TeleportToSelectedTeleport(teleportCFrame)
  1312.     if teleportCFrame then
  1313.         player.Character.HumanoidRootPart.CFrame = teleportCFrame
  1314.     end
  1315. end
  1316. player.Character:WaitForChild('HumanoidRootPart').ChildAdded:Connect(function(v)
  1317.     if v.Name == "Charge" then
  1318.         v:Destroy()
  1319.     end
  1320.     if v:IsA('ParticleEmitter') then
  1321.         v:Destroy()
  1322.     end
  1323. end)
  1324. player.CharacterAdded:Connect(function()
  1325.     player.Character:WaitForChild('HumanoidRootPart').ChildAdded:Connect(function(v)
  1326.         if v.Name == "Charge" then
  1327.             v.Parent = nil
  1328.             v:Destroy()
  1329.         end
  1330.         if v:IsA('ParticleEmitter') then
  1331.             v.Parent = nil
  1332.             v:Destroy()
  1333.         end
  1334.     end)
  1335. end)
  1336. task.spawn(LPH_JIT_MAX(function()
  1337.     while task.wait() do
  1338.         if Toggles.DupeRollback.Value then
  1339.             ReplicatedStorage.Remotes.Data.UpdateHotbar:FireServer({[1] = "\255"})
  1340.         end
  1341.     end
  1342. end))
  1343. -- Define the teleports for each category in separate tables
  1344. local spawnsTeleports = {}
  1345. local buyablesTeleports = {}
  1346. local npcTeleports = {}
  1347. local questNPCTeleports = {}
  1348.  
  1349. for _, v in pairs(workspace.Spawns:GetChildren()) do
  1350.     table.insert(spawnsTeleports, v.Name)
  1351. end
  1352.  
  1353. for _, v in pairs(workspace.Buyables:GetChildren()) do
  1354.     table.insert(buyablesTeleports, v.Name)
  1355. end
  1356.  
  1357. for _, v in pairs(workspace.NPCs:GetChildren()) do
  1358.     if v:IsA('Model') or v:IsA('Part') then
  1359.         table.insert(npcTeleports, v.Name)
  1360.     end
  1361. end
  1362.  
  1363. for _,v in pairs(workspace.NPCs.Quest:GetChildren()) do
  1364.     table.insert(questNPCTeleports, v.Name)
  1365. end
  1366.  
  1367. -- Setting up UI
  1368. local Window = Library:CreateWindow({
  1369.     Title = 'ZEN X | ARCANE LINEAGE',
  1370.     Center = true,
  1371.     AutoShow = true,
  1372. })
  1373.  
  1374. local Tabs = {
  1375.     Main = Window:AddTab('Main'),
  1376.     Teleports = Window:AddTab('Teleports'),
  1377.     Dupe = Window:AddTab('Dupe/Rollback'),
  1378.     Logs = Window:AddTab('Logs'),
  1379.     Universal = Window:AddTab('Universal'),
  1380.     ['UI Settings'] = Window:AddTab('UI Settings'),
  1381. }
  1382.  
  1383. local LogsBox = Tabs.Logs:AddLeftGroupbox('Logs')
  1384. local LogsBoxC = Tabs.Logs:AddRightGroupbox('Logs Control')
  1385. logsLabel = LogsBox:AddLabel('', true)
  1386. LogsBoxC:AddButton('Reset Logs', function()
  1387.     logsTable = {}
  1388.     debug('Reset logs!')
  1389. end)
  1390.  
  1391. local Dupees = Tabs.Dupe:AddLeftGroupbox('Rollback')
  1392. local Rejoins = Tabs.Dupe:AddRightGroupbox('Rejoin')
  1393. Rejoins:AddButton('Rejoin Server', function()
  1394.     game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId)
  1395. end)
  1396.  
  1397. Dupees:AddToggle('DupeRollback', {Text = 'Stop Saving Data',Default = false, Tooltip = "Stop saving data (meaning your data wont be saved when this is toggled)" })
  1398. Dupees:AddLabel('Guide on how to dupe:\n\n1.) Turn on "Stop Saving Data"\n\n2.) Drop your items to someone\n(you have a short time window to do this or else the rollback may not work..)\n\n3.) Have the account pick it up\n\n4.) Click rejoin server\n\nWait a bit after toggling off to save data.', true)
  1399.  
  1400. -- Create the dropdowns for each category
  1401. Tabs.Teleports:AddLeftGroupbox('Spawns'):AddDropdown('SpawnsDropdown', {
  1402.     Text = 'Select a spawn teleport',
  1403.     Tooltip = 'Choose a spawn teleport destination',
  1404.     Values = spawnsTeleports,
  1405.     AllowNull = true,
  1406.     Callback = function(Value)
  1407.         local teleportName = Value
  1408.         if teleportName then
  1409.             -- Retrieve the CFrame for the selected spawn teleport based on its name
  1410.             local selectedTeleportCFrame = workspace.Spawns:FindFirstChild(teleportName)
  1411.             TeleportToSelectedTeleport(selectedTeleportCFrame and selectedTeleportCFrame.CFrame)
  1412.         end
  1413.     end
  1414. })
  1415.  
  1416. Tabs.Teleports:AddRightGroupbox('Buyables'):AddDropdown('BuyablesDropdown', {
  1417.     Text = 'Select a buyable teleport',
  1418.     Tooltip = 'Choose a buyable teleport destination',
  1419.     Values = buyablesTeleports,
  1420.     AllowNull = true,
  1421.     Callback = function(Value)
  1422.         local teleportName = Value
  1423.         if teleportName then
  1424.             -- Retrieve the CFrame for the selected buyable teleport based on its name
  1425.             local selectedTeleportCFrame = workspace.Buyables:FindFirstChild(teleportName)
  1426.             TeleportToSelectedTeleport(selectedTeleportCFrame and selectedTeleportCFrame:GetPivot())
  1427.         end
  1428.     end
  1429. })
  1430.  
  1431. Tabs.Teleports:AddRightGroupbox('NPCs'):AddDropdown('NPCDropdown', {
  1432.     Text = 'Select an npc teleport',
  1433.     Tooltip = 'Choose an npc teleport destination',
  1434.     Values = npcTeleports,
  1435.     AllowNull = true,
  1436.     Callback = function(Value)
  1437.         local teleportName = Value
  1438.         if teleportName then
  1439.         -- Retrieve the CFrame for the selected encounter teleport based on its name
  1440.         local selectedTeleportCFrame = workspace.NPCs:FindFirstChild(teleportName)
  1441.         TeleportToSelectedTeleport(selectedTeleportCFrame and selectedTeleportCFrame:GetPivot())
  1442.         end
  1443.     end
  1444. })
  1445.  
  1446. Tabs.Teleports:AddLeftGroupbox('Quest NPCs'):AddDropdown('QuestNPCDropdown', {
  1447.     Text = 'Select an quest npc teleport',
  1448.     Tooltip = 'Choose an quest npc teleport destination',
  1449.     Values = questNPCTeleports,
  1450.     AllowNull = true,
  1451.     Callback = function(Value)
  1452.         local teleportName = Value
  1453.         -- Retrieve the CFrame for the selected encounter teleport based on its name
  1454.         if teleportName then
  1455.         local selectedTeleportCFrame = workspace.NPCs.Quest:FindFirstChild(teleportName)
  1456.         TeleportToSelectedTeleport(selectedTeleportCFrame and selectedTeleportCFrame:GetPivot())
  1457.         end
  1458.     end
  1459. })
  1460.  
  1461. local OtherTP = Tabs.Teleports:AddLeftGroupbox('Other Teleports')
  1462. OtherTP:AddButton('Momma Darkbeast', function()
  1463.     player.Character.HumanoidRootPart.CFrame = workspace.NPCs["Momma Darkbeast"].HumanoidRootPart.CFrame
  1464. end)
  1465. OtherTP:AddButton('Cursed Gate/Puzzle', function()
  1466.     player.Character.HumanoidRootPart.CFrame = CFrame.new(2343.709228515625, 24.33362579345703, -435.2521667480469)
  1467. end)
  1468. OtherTP:AddButton('Yarthul Gate', function()
  1469.     player.Character.HumanoidRootPart.CFrame = CFrame.new(-5043.93310546875, 51.526851654052734, -3129.505859375)
  1470. end)
  1471.  
  1472. OtherTP:AddButton('Arena (end of parkour)', function()
  1473.     player.Character.HumanoidRootPart.CFrame = CFrame.new(2331.618896484375, 7.460083484649658, 533.8240356445312)
  1474. end)
  1475.  
  1476. local AutoAttack = Tabs.Main:AddLeftTabbox('Encounters')
  1477. local EFeatures = AutoAttack:AddTab('Encounters')
  1478. local SelectSkills = AutoAttack:AddTab('Select Skills')
  1479. EFeatures:AddToggle('AutoAttack', {Text = 'Auto Attack',Default = false, Tooltip = "Automatically attack (using skills) in encounters.\nSelect skills in the 'Select Skills' tab." })
  1480. EFeatures:AddDropdown('AttackMethod', {Values = {"weakest", "strongest", "random", "one_at_a_time"}, Multi = false, AllowNull = false, Default = 1, Text = 'Select attack target priority'})
  1481. EFeatures:AddToggle('AutoEscape', {Text = 'Auto Escape',Default = false, Tooltip = "Automatically tries to escape in encounters."})
  1482. --EFeatures:AddToggle('InfMeditate', {Text = 'Infinite Energy',Default = false, Tooltip = "Get 6 full energy bars almost instantly before attacking.\nTHIS DOES LOWER YOUR GUARD BY ALOT AND MAY GET U 1 SHOTTED!"})
  1483. local attackLabels = {} -- Store labels for each attack
  1484.  
  1485. for i, attack in ipairs(Attacks) do
  1486.     local label
  1487.     local is_self_target = IsSelfTargetSkill(attack)
  1488.     local toggle = SelectSkills:AddToggle('AutoAttack' .. i, {
  1489.         Text = (is_self_target and (attack .. " [self]") or attack),
  1490.         Default = false,
  1491.         Tooltip = (is_self_target and "This will be casted on yourself." or "This will be casted on enemies."),
  1492.         Callback = function(value)
  1493.             -- Update the AttackSelectorInstance when a toggle is clicked
  1494.             if value then
  1495.                 AttackSelectorInstance:AddAttack(i)
  1496.             else
  1497.                 AttackSelectorInstance:RemoveAttack(i)
  1498.             end
  1499.  
  1500.             -- Update the label display to show or hide the priority number
  1501.             local priority = getAttackPriority(i)
  1502.             label:SetText(value and ('[Priority %d] %s'):format(priority, attack) or "no priority..")
  1503.         end
  1504.     })
  1505.     label = SelectSkills:AddLabel('')
  1506.     -- Set initial label text
  1507.     local priority = getAttackPriority(i)
  1508.     label:SetText(toggle.Value and ('[Priority %d] %s'):format(priority, attack) or "no priority..")
  1509.  
  1510.     table.insert(attackLabels, label)
  1511. end
  1512.  
  1513. local Level = Tabs.Main:AddLeftGroupbox('Auto Level')
  1514. Level:AddToggle('AutoStatAllocate', {Text = 'Auto Level Up after Fight', Default = false, Tooltip = "Attempt to auto lvl up and allocate stats after you finish a fight\nand collect the essence."})
  1515. Level:AddButton('Level Up', function()
  1516.     allocateStats()
  1517. end)
  1518. Level:AddSlider('physicalSelector', {Text = 'Stat Allocation: Physical', Default = 0, Min = 0, Max = 3, Rounding = 0, Compact = true})
  1519. Level:AddSlider('arcaneSelector', {Text = 'Stat Allocation: Arcane', Default = 0, Min = 0, Max = 3, Rounding = 0, Compact = true})
  1520. Level:AddSlider('enduranceSelector', {Text = 'Stat Allocation: Endurance', Default = 0, Min = 0, Max = 3, Rounding = 0, Compact = true})
  1521. Level:AddSlider('speedSelector', {Text = 'Stat Allocation: Speed', Default = 0, Min = 0, Max = 3, Rounding = 0, Compact = true})
  1522. Level:AddSlider('luckSelector', {Text = 'Stat Allocation: Luck', Default = 0, Min = 0, Max = 3, Rounding = 0, Compact = true})
  1523.  
  1524. local QTE = Tabs.Main:AddLeftTabbox('Auto Dodge')
  1525. local QTE1 = QTE:AddTab('Auto Dodge')
  1526. QTE1:AddToggle('AutoDodge', {Text = 'Auto Instant Dodge', Default = false, Tooltip = "Automatically and instantly perform Dodges."})
  1527. QTE1:AddToggle('AutoDodgeLegit', {Text = 'Auto Legit Dodge', Default = false, Tooltip = "Automatically perform delayed Dodges."})
  1528. QTE1:AddSlider('DodgeLegitMin', {Text = 'Legit Dodge: Min Delay', Default = 0.4, Min = 0.1, Max = 1, Rounding = 1, Compact = false})
  1529. QTE1:AddSlider('DodgeLegitMax', {Text = 'Legit Dodge: Max Delay', Default = 0.7, Min = 0.1, Max = 1, Rounding = 1, Compact = false})
  1530.  
  1531. local QTE2 = QTE:AddTab('Auto QTE')
  1532. QTE2:AddToggle('AutoQTE', {Text = 'Auto Instant QTE (minigame)', Default = false, Tooltip = "Automatically and instantly perform Quick Time Events (QTEs)."})
  1533. QTE2:AddToggle('AutoQTELegit', {Text = 'Auto Legit QTE (minigame)', Default = false, Tooltip = "Automatically perform delayed Quick Time Events (QTEs)."})
  1534. QTE2:AddSlider('LegitMin', {Text = 'Legit QTE: Min Delay (seconds)', Default = 4, Min = 1, Max = 10, Rounding = 0, Compact = false})
  1535. QTE2:AddSlider('LegitMax', {Text = 'Legit QTE: Max Delay (seconds)', Default = 6, Min = 1, Max = 10, Rounding = 0, Compact = false})
  1536.  
  1537. local Misc = Tabs.Main:AddLeftGroupbox('Misc Features')
  1538. Misc:AddToggle('NoFall', {Text = 'No Fall', Default = false, Tooltip = "Prevent falling damage."})
  1539. Misc:AddToggle('InfEnergy', {Text = 'Spam Meditate', Default = false, Tooltip = "THIS DOES LOWER UR GUARD AND MAY GET U 1 SHOTTED!\nTHIS DOES LOWER UR GUARD AND MAY GET U 1 SHOTTED!\nTHIS DOES LOWER UR GUARD AND MAY GET U 1 SHOTTED!\nTHIS DOES LOWER UR GUARD AND MAY GET U 1 SHOTTED!\nTHIS DOES LOWER UR GUARD AND MAY GET U 1 SHOTTED!\nTHIS DOES LOWER UR GUARD AND MAY GET U 1 SHOTTED!\n"})
  1540. --Misc:AddToggle('InfGuard', {Text = 'Infinite Guard', Default = false})
  1541. Misc:AddToggle('AutoHeal', {Text = 'Auto Heal (doctor)', Default = false, Tooltip = "Auto Heal using the doctor."})
  1542. Misc:AddToggle('KillBrick', {Text = 'No Kill Bricks', Default = false, Tooltip = "You won't die to void, geysers, fireballs, fallers\nYou can still die to fires in the blacksmithes", Callback = function(v)
  1543.     if v then
  1544.         for _,obj in pairs(workspace:GetDescendants()) do
  1545.             if obj:IsA("TouchTransmitter") then
  1546.                 local parentName = obj.Parent.Name
  1547.                 if parentName == "Void" or parentName == "Fireball"
  1548.                 or parentName == "Faller" or parentName == "Geyser" then
  1549.  
  1550.                     obj:Destroy()
  1551.                 elseif (obj.Parent and obj.Parent.BrickColor and (obj.Parent.BrickColor == BrickColor.new("Really black") or obj.Parent.BrickColor == BrickColor.new("Bright red"))) then
  1552.                     obj:Destroy()
  1553.                 end
  1554.             end
  1555.         end
  1556.     end
  1557. end})
  1558. Misc:AddButton('Doctor Heal', function()
  1559. doctorHeal()
  1560. end)
  1561.  
  1562. local Collect = Tabs.Main:AddRightTabbox('Auto Collect')
  1563. local AutoCollectSpawn = Collect:AddTab('Spawned Items')
  1564. local AutoCollectDrop = Collect:AddTab('Dropped Items')
  1565. AutoCollectSpawn:AddToggle('lcsi2', {Text = 'Loop Collect Spawned Items', Default = false, Tooltip = "Automatically gather spawnable items like flowers."})
  1566. AutoCollectSpawn:AddToggle('lcsiUseElixir', {Text = 'Auto Abhorrent Elixir', Default = false, Tooltip = "Automatically use Abhorrent Elixir.\n(it will also craft an Abhorrent Elixir if you don't have one)"})
  1567. AutoCollectSpawn:AddToggle('lcsiServerHop', {Text = 'Server Hop after Collecting', Default = false, Tooltip = "Automatically server hop after doing a loop of collecting all spawned items."})
  1568. AutoCollectDrop:AddToggle('lcdi', {Text = 'Loop Collect Dropped Items', Default = false, Tooltip = "Automatically pick up dropped loot like bags.\nez scams"})
  1569. AutoCollectDrop:AddToggle('lcdinear', {Text = 'Loop Collect Near Dropped Items', Default = false, Tooltip = "Automatically pick up dropped loot like bags near your player.\nThis does not use teleporting.\nez scams"})
  1570. AutoCollectSpawn:AddButton('Collect Spawned Items', function()
  1571.     local save = player.Character.HumanoidRootPart.CFrame
  1572.     pickingUpFlowers = true
  1573.     for _,v in pairs(workspace.SpawnedItems:GetDescendants()) do
  1574.         if v.ClassName == "ClickDetector" then
  1575.             local clickPart = v.Parent
  1576.             if clickPart then
  1577.                 repeat task.wait()
  1578.                     player.Character.HumanoidRootPart.CFrame = clickPart.CFrame + Vector3.new(0,-14,0)
  1579.                     fireclickdetector(v, 1)
  1580.                 until not v:IsDescendantOf(workspace)
  1581.             end
  1582.         end
  1583.     end
  1584.     player.Character.HumanoidRootPart.CFrame = save
  1585.     task.spawn(function()
  1586.         task.wait(2)
  1587.         pickingUpFlowers = false
  1588.     end)
  1589. end, {Tooltip = "One-time collect of current spawnable items."})
  1590. AutoCollectDrop:AddButton('Collect Dropped Items', collectDroppedItems, {Tooltip = "One-time collect of current dropped items."})
  1591.  
  1592.  
  1593.  
  1594. local Potion = Tabs.Main:AddRightTabbox('Auto Potion')
  1595. local Craft = Potion:AddTab('Auto Craft')
  1596. local Use = Potion:AddTab('Auto Use')
  1597. Craft:AddToggle('AutoBrewPotion', {Text = 'Auto Brew Potions', Default = false, Tooltip = "Automatically brew potions."})
  1598. Craft:AddDropdown('SelectPotion', {Values = getAllPotionNames(), Multi = false, AllowNull = false, Default = 1, Text = 'Select Potion to Brew'})
  1599.  
  1600. Use:AddToggle('Alluring', {Text = 'Auto Use Alluring', Default = false})
  1601. Use:AddLabel("more coming soon..")
  1602.  
  1603. local Merchant = Tabs.Main:AddRightGroupbox('Auto Merchant')
  1604. Merchant:AddToggle('MerchantNotifier', {Text = 'Mysterious Merchant Notifier', Default = false, Tooltip = "Get notified when the mysterious merchant spawns."})
  1605. Merchant:AddToggle('MerchantHopper', {Text = 'Server Hop Until Merchant', Default = false, Tooltip = "Server Hops until there is a merchant in your lobby."})
  1606. Merchant:AddButton('Teleport to Merchant', function()
  1607.     local merchant = workspace.NPCs:FindFirstChild('Mysterious Merchant')
  1608.    
  1609.     if merchant then
  1610.       local lookVec = merchant.HumanoidRootPart.CFrame.LookVector
  1611.       local newPos = merchant.HumanoidRootPart.Position + (lookVec * 5)
  1612.       newPos = Vector3.new(newPos.X, merchant.HumanoidRootPart.Position.Y, newPos.Z)
  1613.      
  1614.       player.Character.HumanoidRootPart.CFrame = CFrame.new(newPos)
  1615.     end
  1616. end)
  1617. local merchantLabel = Merchant:AddLabel("Merchant Status: Not Spawned")
  1618. task.spawn(LPH_JIT_MAX(function()
  1619.     while task.wait(2.5) do
  1620.         if workspace.NPCs:FindFirstChild('Mysterious Merchant') then
  1621.             merchantLabel:SetText('Merchant Status: Spawned')
  1622.             if Toggles.MerchantNotifier.Value then
  1623.                 Library:Notify('The Mysterious Merchant is currently spawned!')
  1624.             end
  1625.         else
  1626.             merchantLabel:SetText('Merchant Status: Not Spawned')
  1627.         end
  1628.     end
  1629. end))
  1630. task.spawn(LPH_JIT_MAX(function()
  1631.     task.wait(3)
  1632.     if not workspace.NPCs:FindFirstChild('Mysterious Merchant') then
  1633.         if Toggles.MerchantHopper.Value then
  1634.             Teleport()
  1635.         end
  1636.     end
  1637. end))
  1638. local function GetUniqueToolNames()
  1639.     local uniqueToolNames = {}
  1640.     local toolsFolder = player.Backpack:FindFirstChild("Tools")
  1641.  
  1642.     for _, tool in ipairs(toolsFolder:GetChildren()) do
  1643.         if not table.find(uniqueToolNames, tool.Name) then
  1644.             table.insert(uniqueToolNames, tool.Name)
  1645.         end
  1646.     end
  1647.  
  1648.     return uniqueToolNames
  1649. end
  1650. local Drop = Tabs.Main:AddRightGroupbox('Auto Drop')
  1651. Drop:AddToggle('AutoDrop', {Text = 'Auto Drop Item', Default = false, Tooltip = "Automatically drops selected item from your inventory."})
  1652. local dropdd = Drop:AddDropdown('DropItem', {Values = GetUniqueToolNames(), Multi = false, AllowNull = true, Text = 'Select Item to Drop'})
  1653. Drop:AddButton('Refresh Item List', function()
  1654.     dropdd:SetValues(GetUniqueToolNames())
  1655. end)
  1656. task.spawn(LPH_JIT_MAX(function()
  1657.     while task.wait() do
  1658.         if Toggles.AutoDrop.Value then
  1659.             ReplicatedStorage.Remotes.Information.InventoryManage:FireServer("Drop", Options.DropItem.Value)
  1660.         end
  1661.     end
  1662. end))
  1663. local Mine = Tabs.Main:AddRightGroupbox('Mines')
  1664. Mine:AddToggle('AutoMineOre', {Text = 'Auto Mine Ore', Default = false, Tooltip = "Automatically mine ores in the game.\nYou must have a pickaxe in your inventory!"})
  1665. Mine:AddDropdown('SelectMine', {Values = {"Aestic", "Ferrus", "Laneus"}, Multi = true, AllowNull = false, Default = 1, Text = 'Select Ore to Mine'})
  1666. local MenuGroup = Tabs['UI Settings']:AddLeftGroupbox('Menu')
  1667. MenuGroup:AddButton('Unload', function() Library:Unload() end)
  1668. MenuGroup:AddLabel('Menu bind'):AddKeyPicker('MenuKeybind', { Default = 'End', NoUI = true, Text = 'Menu keybind' })
  1669. MenuGroup:AddToggle('KeybindUI', {Text = 'Show Keybind UI', Default = false, Callback = function(v) Library.KeybindFrame.Visible = v end})
  1670. Library.ToggleKeybind = Options.MenuKeybind
  1671. Library.KeybindFrame.Visible = false
  1672.  
  1673. ThemeManager:SetLibrary(Library)
  1674. SaveManager:SetLibrary(Library)
  1675. UniversalBuilder:SetLibrary(Library)
  1676.  
  1677. SaveManager:IgnoreThemeSettings()
  1678. SaveManager:SetIgnoreIndexes({ 'MenuKeybind' })
  1679.  
  1680. ThemeManager:SetFolder('Zen X')
  1681. SaveManager:SetFolder('Zen X/arcane-lineage')
  1682.  
  1683. SaveManager:BuildConfigSection(Tabs['UI Settings'])
  1684. ThemeManager:ApplyToTab(Tabs['UI Settings'])
  1685. UniversalBuilder:Build(Tabs.Universal)
  1686.  
  1687. SaveManager:LoadAutoloadConfig()