Advertisement
1zxyuuki

Untitled

Feb 9th, 2024 (edited)
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 97.64 KB | None | 0 0
  1. if not game:IsLoaded() then game.Loaded:Wait() end
  2. repeat task.wait() until game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
  3.  
  4. --[[if game.PlaceId == 8304191830 then
  5. repeat task.wait() until game.Players.LocalPlayer.PlayerGui:FindFirstChild("collection"):FindFirstChild("grid"):FindFirstChild("List"):FindFirstChild("Outer"):FindFirstChild("UnitFrames")
  6. repeat task.wait() until game.ReplicatedStorage.packages:FindFirstChild("assets")
  7. repeat task.wait() until game.ReplicatedStorage.packages:FindFirstChild("StarterGui")
  8. end]]
  9. if getgenv().UltraHubExecuted then return end
  10. getgenv().UltraHubExecuted = true
  11.  
  12. -- SERVICES
  13. local HttpService = game:GetService('HttpService')
  14. local UIS = game:GetService('UserInputService')
  15. local RunS = game:GetService('RunService')
  16. local RS = game:GetService('ReplicatedStorage')
  17. local TS = game:GetService('TweenService')
  18. local PS = game:GetService('PhysicsService')
  19.  
  20. -- VARIABLES
  21.  
  22. local player = game.Players.LocalPlayer
  23. local mouse = player:GetMouse()
  24.  
  25.  
  26. --[[local Remotes = RS:WaitForChild('endpoints')
  27. local Event = game:GetService("ReplicatedStorage").endpoints["client_to_server"]]
  28.  
  29.  
  30.  
  31. -- SAVED STATS
  32.  
  33. local DifferentColorsPoints = {Color3.fromRGB(1, 81, 255), Color3.fromRGB(255,0,0), Color3.fromRGB(0,255,0), Color3.fromRGB(255,255,0), Color3.fromRGB(255,0,255), Color3.fromRGB(0,255,255)}
  34. MacroUnitsTextBlocks = {}
  35. local RecordingMacro = false
  36. local FPS = 0
  37. local StartTime = os.time()
  38. --local IsLobby = workspace:FindFirstChild('_MAP_CONFIG') if IsLobby and IsLobby:FindFirstChild('IsLobby') then IsLobby = IsLobby.IsLobby.Value end
  39. --local _DATA = workspace:FindFirstChild('_DATA')
  40. local GameFinished
  41. if _DATA then GameFinished = _DATA:FindFirstChild('GameFinished') end
  42. local ResultUI = player.PlayerGui['ResultsUI']
  43.  
  44.  
  45.  
  46. --------------- Files
  47. makefolder("MHUB")
  48. makefolder('MHUB\\Anime Adventures')
  49.  
  50.  
  51. local DefaultFiles = {
  52.  
  53. ['MHUB\\Settings_' .. player.Name] = {
  54.  
  55. --[[['Ignored Capsules'] = {};
  56. ['Delete Skins'] = {};
  57.  
  58. ['Selected Portal Difficulties Delete'] = {};
  59. ['Selected Tiers Delete'] = {};
  60. ['Selected Portals Delete'] = {};
  61. ['Ignore Worlds Delete'] = {};
  62. ['Ignore Bonus Delete'] = {};
  63.  
  64. ['PortalUSE Portals'] = {};
  65. ['PortalUSE Tiers'] = {};
  66. ['PortalUSE Difficulties Ignore'] = {};
  67. ['PortalUSE Worlds Ignore'] = {};
  68. ['PortalUSE Bonus Ignore'] = {};
  69. ['PortalUSE Start After Time'] = 1;
  70. ['PortalUSE Star After Players'] = 1;
  71.  
  72. ['Challenge_IgnoreWorlds'] = {};
  73. ['Challenge_IgnoreDifficulties'] = {};
  74. ['Challenge_IgnoreRewards'] = {};]]
  75.  
  76. ['AutoPlacePositions'] = {};
  77. ['AutoPlacesCap'] = {['1'] = 4, ['2'] = 4, ['3'] = 4, ['4'] = 4, ['5'] = 4, ['6'] = 4};
  78. ['AutoUpgradesCap'] = {['1'] = 10, ['2'] = 10, ['3'] = 10, ['4'] = 10, ['5'] = 10, ['6'] = 10};
  79.  
  80. ['Discord Url'] = '';
  81. ['Discord UserID'] = '';
  82.  
  83. --[[['StoryInf_World'] = '';
  84. ['StoryInf_Level'] = '';
  85.  
  86. ['AutoJoinCastleMaxRoom'] = 500;
  87. ['AutoLeaveOnWave'] = 1;
  88. ['AutoSkillWave'] = 1;
  89. ['AutoSkillUnits'] = {};
  90. ['AutoSellUnitsWave'] = 1;]]
  91. ['FPS_LIMIT'] = 60;
  92. --['AutoSellFarmsWave'] = 1;
  93. --['AutoPlaceUnitsWave'] = 1;
  94. --['AutoUpgradeWave'] = 1;
  95. ['Selected Macro'] = '';
  96. ['Step Delay'] = 0.4;
  97. ['Hide Key'] = 'U';
  98.  
  99. --['Selected Macro Map'] = {Tower = {}, Main = {}, Raid = {}, Portal = {}, Other = {}}
  100.  
  101. };
  102.  
  103.  
  104.  
  105.  
  106. }
  107.  
  108. --[[local PortalsList = {'Alien Portal', 'Summer Portal', 'Eclipse Portal', 'Puppet Portal', 'Port Agency', "Demon Leader's Portal"}
  109. local DifficultiesName = {
  110. double_cost = 'High Cost',
  111. fast_enemies = 'Fast Enemies',
  112. tank_enemies = 'Tank Enemies',
  113. shield_enemies = 'Shield Enemies',
  114. regen_enemies = 'Regen Enemies',
  115. short_range = 'Short Range'
  116. }
  117.  
  118. local portalWorlds = {
  119. dressrosa_infinite = 'Puppet Island (Summer)',
  120. aot_infinite = 'Shiganshinu District (Summer)',
  121. jjk_infinite = 'Cursed Academy (Summer)',
  122. namek_infinite = 'Planet Namak (Summer)',
  123. ['7ds_infinite'] = 'Fabled Kingdom (Summer)',
  124. hxhant_infinite = 'Ant Kingdom (Summer)',
  125. opm_infinite = 'Alien Spaceship (Underwater)',
  126. eclipse_portal = 'The Eclipse',
  127. port_agencgy = 'Sky Club',
  128. morioh_halloween = 'Bizzare Town (Haunted)',
  129. namek_halloween = 'Planet Namak (Haunted)',
  130. magnolia_halloween = 'Magic Town (Haunted)',
  131. hage_elf_halloween = 'Clover Kingdom (Demonic)',
  132. marineford_halloween = "Marine's Ford (Midnight)",
  133. aot_halloween = "Shiganshinu District (Midnight)"
  134.  
  135. }
  136.  
  137. local Bonuses = {
  138. physical = "Physical",
  139. magic = 'Magic',
  140. dark_damage = 'Dark',
  141. ice_damage = 'Storm',
  142. water_damage = 'Aqua',
  143. fire_damage = 'Fire',
  144. light_damage = 'Light',
  145. air_damage = 'Air',
  146. }
  147.  
  148. ]]
  149. function deepcopy(orig)
  150. local orig_type = type(orig)
  151. local copy
  152. if orig_type == 'table' then
  153. copy = {}
  154. for orig_key, orig_value in next, orig, nil do
  155. copy[deepcopy(orig_key)] = deepcopy(orig_value)
  156. end
  157. setmetatable(copy, deepcopy(getmetatable(orig)))
  158. else -- number, string, boolean, etc
  159. copy = orig
  160. end
  161. return copy
  162. end
  163.  
  164. RunS.RenderStepped:Connect(function()
  165. FPS += 1
  166. end)
  167.  
  168. for name, value in pairs(DefaultFiles) do -- SET DEFAULT VALUES
  169. if not pcall(function() readfile(name) end) then writefile(name, HttpService:JSONEncode(value)) end
  170. end
  171.  
  172. local Settings = HttpService:JSONDecode(readfile('MHUB\\Settings_' .. player.Name))
  173.  
  174. local function Save (valueName, newValue)
  175. Settings[valueName] = newValue
  176. writefile('MHUB\\Settings_' .. player.Name, HttpService:JSONEncode(Settings))
  177. end
  178.  
  179. local function GetSave (valueName)
  180. local value = Settings[valueName]
  181. if value == nil then
  182. if DefaultFiles['MHUB\\Settings_' .. player.Name][valueName] ~= nil then
  183. Save(valueName, DefaultFiles['MHUB\\Settings_' .. player.Name][valueName])
  184. else
  185. Save(valueName, false)
  186. end
  187.  
  188. value = Settings[valueName]
  189. end
  190.  
  191. if type(value) == 'table' then value = deepcopy(value) end
  192.  
  193. return value
  194. end
  195.  
  196.  
  197.  
  198. ---------------------------------------------------------
  199.  
  200. --[[local RefreshedUniqueItems = {}
  201. local RefreshedNormalItems = {}
  202. local Loader = require(RS.src.Loader)
  203. local ItemInventoryServiceClient = Loader.load_client_service(script, "ItemInventoryServiceClient")
  204. local battlePassID = ""
  205.  
  206. function get_inventory_items_unique_items()
  207. return ItemInventoryServiceClient["session"]['inventory']['inventory_profile_data']['unique_items']
  208. end
  209.  
  210. function get_inventory_items()
  211. return ItemInventoryServiceClient["session"]["inventory"]['inventory_profile_data']['normal_items']
  212. end
  213.  
  214. function get_Units_Owner()
  215. return ItemInventoryServiceClient["session"]["collection"]["collection_profile_data"]['owned_units']
  216. end
  217.  
  218. bpOpenTime = 0
  219. for _, BattlePassModule in ipairs(RS.src.Data.BattlePass:GetChildren()) do
  220. if not BattlePassModule:IsA('ModuleScript') then continue end
  221. local bpModule = require(BattlePassModule)
  222.  
  223. for bpID,aboutBP in pairs(bpModule) do
  224. if not aboutBP.tiers then continue end
  225.  
  226. if not aboutBP.tiers['26'] or not aboutBP.tiers['26']._unlock_time then continue end
  227. if aboutBP.tiers['26']._unlock_time < bpOpenTime then continue end
  228. battlePassID = bpID
  229. bpOpenTime = aboutBP.tiers['26']._unlock_time
  230. end
  231.  
  232. end
  233.  
  234. task.spawn(function()
  235.  
  236. while true do
  237. RefreshedUniqueItems = get_inventory_items_unique_items()
  238. RefreshedNormalItems = get_inventory_items()
  239. task.wait(0.1)
  240. end
  241.  
  242. end)
  243.  
  244. local function getEquippedUnits ()
  245. local newUnitsEquipped = {}
  246. for _, unitInfo in pairs(get_Units_Owner()) do
  247. if not unitInfo['equipped_slot'] then continue end
  248. newUnitsEquipped[unitInfo['uuid']] = {id = unitInfo['unit_id'], equipped_slot = unitInfo['equipped_slot'] }
  249. --[[end
  250.  
  251. return newUnitsEquipped
  252. end
  253. local EquippedUnits = getEquippedUnits()
  254. local EquippedUnitsAbout = {}
  255.  
  256.  
  257. for uuid, aboutSlot in pairs(EquippedUnits) do
  258.  
  259. for _, moduleScript in ipairs(RS.src.Data.Units:GetDescendants()) do
  260. if not moduleScript:IsA('ModuleScript') then continue end
  261.  
  262. for unitID, unitTable in pairs(require(moduleScript)) do
  263. if unitID ~= aboutSlot.id then continue end
  264.  
  265. EquippedUnitsAbout[ tostring(aboutSlot.equipped_slot) ] = {
  266.  
  267. id = unitID,
  268. uuid = uuid,
  269. upgrades = unitTable['upgrade'],
  270. cost = unitTable['cost'],
  271. hill = unitTable['hill_unit'],
  272. spawn_cap = unitTable['spawn_cap'] or 5,
  273. unsellable = unitTable['unsellable'],
  274. global_spawn_cap = unitTable['global_spawn_cap']
  275.  
  276.  
  277. }
  278.  
  279. end
  280.  
  281. end
  282.  
  283. end
  284.  
  285.  
  286.  
  287. function getLevelData()
  288.  
  289. return game.Workspace._MAP_CONFIG:WaitForChild("GetLevelData"):InvokeServer()
  290.  
  291. end
  292.  
  293. local LevelData = nil
  294. if not game.Workspace._MAP_CONFIG:WaitForChild('IsLobby').Value then LevelData = getLevelData() end
  295.  
  296. function StringToCFrame(String)
  297. local Split = string.split(String, ",")
  298. return CFrame.new(Split[1],Split[2],Split[3],Split[4],Split[5],Split[6],Split[7],Split[8],Split[9],Split[10],Split[11],Split[12])
  299. end
  300.  
  301. local function TPLobby ()
  302. game:GetService('TeleportService'):Teleport(8304191830, player)
  303. end
  304.  
  305. function makeComma(p1)
  306. local value = p1;
  307. while true do
  308. local value2, value3 = string.gsub(value, "^(-?%d+)(%d%d%d)", "%1,%2");
  309. value = value2;
  310. if value3 ~= 0 then else
  311. break;
  312. end;
  313. end;
  314. return value;
  315. end
  316.  
  317. local function math_round( roundIn , roundDig )
  318. local mul = math.pow( 10, roundDig )
  319. return ( math.floor( ( roundIn * mul ) + 0.5 )/mul )
  320. end
  321.  
  322. local vu = game:GetService("VirtualUser")
  323. player.Idled:connect(function()
  324. vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  325. wait(1)
  326. vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  327. end)
  328.  
  329. local function getItemsData ()
  330. local newItemsData = {}
  331. local DataModules = RS.src.Data.Items:GetDescendants()
  332. table.insert(DataModules, RS.src.Data.Units)
  333.  
  334. for _, itemDataModule in ipairs(DataModules) do
  335. if not itemDataModule:IsA('ModuleScript') then continue end
  336.  
  337. for itemID, ItemTable in pairs( require(itemDataModule) ) do
  338. newItemsData[itemID] = {
  339. Rarity = ItemTable.rarity,
  340. Name = ItemTable.name,
  341. Amount = 0
  342. }
  343. end
  344. end
  345.  
  346.  
  347. for itemId, amount in pairs(get_inventory_items()) do
  348. newItemsData[itemId]['Amount'] = amount
  349. end
  350.  
  351. for _, itemTable in pairs(get_inventory_items_unique_items()) do
  352. newItemsData[ itemTable.item_id ]['Amount'] = newItemsData[ itemTable.item_id ]['Amount'] + 1
  353. end
  354.  
  355. for _, unitTable in pairs(get_Units_Owner()) do
  356. newItemsData[ unitTable.unit_id ]['Amount'] = newItemsData[ unitTable.unit_id ]['Amount'] + 1
  357. end
  358.  
  359.  
  360. return newItemsData
  361. end
  362. local oldItemsData = getItemsData()
  363.  
  364. local _Maps_DATA = {}
  365.  
  366. for _, mapData in ipairs(RS.src.Data.Maps:GetDescendants()) do
  367. if not mapData:IsA('ModuleScript') then continue end
  368. for mapId, mapTable in pairs( require(mapData) ) do
  369. _Maps_DATA[mapTable.id] = mapTable.name
  370. end
  371. end
  372.  
  373.  
  374. local macroMapList = {
  375.  
  376. ['Main'] = {
  377. 'Fabled Kingdom',
  378. 'Planet Namak',
  379. 'Shiganshinu District',
  380. 'Windhym',
  381. 'Hollow World',
  382. 'Clover Kingdom',
  383. 'Magic Town',
  384. 'Ant Kingdom',
  385. 'Cursed Academy',
  386. 'Cape Canaveral',
  387. "Marine's Ford",
  388. 'Hero City',
  389. 'Hidden Sand Village',
  390. 'Alien Spaceship',
  391. 'Snowy Town',
  392. 'Virtual Dungeon',
  393. 'Ghoul City',
  394. 'Puppet Island',
  395. 'Undead Tomb'
  396.  
  397.  
  398. };
  399.  
  400. ['Tower'] = {'Thriller Park', 'Entertainment District', 'West City', 'Devil City', 'Karakora Town', 'Storm Hideout', 'Infinity Train',};
  401.  
  402. ['Raid'] = {
  403. 'Fabled Kingdom (Commandments)',
  404. 'Karakora Town',
  405. 'Entertainment District',
  406. 'Clover Kingdom (Elf Invasion)',
  407. 'Cape Canaveral',
  408. 'Hero City (Midnight)',
  409. 'Infinity Train',
  410. 'Virtual Dungeon (Bosses)',
  411. 'Storm Hideout',
  412. 'Storm Hideout (Final)',
  413. 'West City',
  414. 'Bizzare Town',
  415. 'Hidden Sand Village',
  416. 'Shiganshinu District',
  417. 'Undead Tomb'
  418.  
  419. };
  420.  
  421. ['Portal'] = {
  422. 'Puppet Island (Summer)',
  423. 'Shiganshinu District (Summer)',
  424. 'Fabled Kingdom (Summer)',
  425. 'Alien Spaceship (Underwater)',
  426. 'Planet Namak (Summer)',
  427. 'Ant Kingdom (Summer)',
  428. 'Cursed Academy (Summer)',
  429. 'Fabled Kingdom (Cube)',
  430. 'The Eclipse',
  431. 'Port Agency',
  432. 'Alien Spaceship (Final)',
  433. 'Puppet Island (Birdcage)'
  434.  
  435. };
  436.  
  437. ['Other'] = {
  438. 'Magic Town (Haunted)',
  439. 'Clover Kingdom (Demonic)',
  440. "Marine's Ford (Midnight)",
  441. 'Bizzare Town (Haunted)',
  442. 'Planet Namak (Haunted)',
  443. 'Shiganshinu District (Midnight)',
  444. 'Cursed Womb'
  445. }
  446. }
  447.  
  448. for _, mapName in ipairs(macroMapList.Main) do
  449. table.insert(macroMapList.Tower, mapName)
  450. end
  451. ]]
  452. ---------------------------------------------------------
  453. local function MakeUICorner (scale, newParent)
  454.  
  455. local newCorner = Instance.new('UICorner')
  456. newCorner.CornerRadius = UDim.new(scale, 0)
  457. newCorner.Parent = newParent
  458.  
  459. end
  460.  
  461. local function MakeUIPadding (bottom, left, right, top, newParent)
  462.  
  463. local newPadding = Instance.new('UIPadding')
  464. newPadding.PaddingBottom = UDim.new(bottom, 0)
  465. newPadding.PaddingLeft = UDim.new(left, 0)
  466. newPadding.PaddingRight = UDim.new(right, 0)
  467. newPadding.PaddingTop = UDim.new(top, 0)
  468. newPadding.Parent = newParent
  469.  
  470. end
  471.  
  472. local function makeUIList (padding, newParent, VA)
  473. local va = VA or Enum.VerticalAlignment.Top
  474.  
  475. local newUIList = Instance.new('UIListLayout')
  476. newUIList.Padding = UDim.new(padding, 0)
  477. newUIList.FillDirection = Enum.FillDirection.Vertical
  478. newUIList.HorizontalAlignment = Enum.HorizontalAlignment.Center
  479. newUIList.VerticalAlignment = va
  480. newUIList.SortOrder = Enum.SortOrder.LayoutOrder
  481. newUIList.Parent = newParent
  482.  
  483. end
  484.  
  485. ---------------------------------------------------------
  486.  
  487. PGUI = game.Players.LocalPlayer:WaitForChild('PlayerGui')
  488.  
  489. -- MAKING GUI
  490. ScreenGui = Instance.new('ScreenGui', game.CoreGui)
  491. ScreenGui.Name = 'Ultra Hub'
  492. ScreenGui.ResetOnSpawn = false
  493. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Global
  494. ScreenGui.Enabled = true
  495.  
  496.  
  497. MainFrame = Instance.new('Frame', ScreenGui)
  498. MainFrame.BackgroundTransparency = 1
  499. MainFrame.SizeConstraint = Enum.SizeConstraint.RelativeYY
  500. MainFrame.Size = UDim2.new(0.525, 0, 0.525, 0)
  501. MainFrame.Position = UDim2.new(0.614, 0, 0.284, 0)
  502. MainFrame.Name = 'MainFrame'
  503.  
  504. MainContent = Instance.new('Frame', MainFrame)
  505. MainContent.BackgroundColor3 = Color3.fromRGB(73, 73, 99)
  506. MainContent.Size = UDim2.new(1, 0, 1, 0)
  507. MakeUICorner(0.01, MainContent)
  508.  
  509. lowerTop = Instance.new('Frame', MainContent)
  510. lowerTop.AnchorPoint = Vector2.new(0.5, 1)
  511. lowerTop.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  512. lowerTop.Size = UDim2.new(1, 0, 0.019, 0)
  513. lowerTop.Position = UDim2.new(0.5, 0, 0.038, 0)
  514. lowerTop.BorderSizePixel = 0
  515.  
  516. ShadowMainContent = Instance.new('Frame', MainContent)
  517. ShadowMainContent.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  518. ShadowMainContent.AnchorPoint = Vector2.new(0.5, 0.5)
  519. ShadowMainContent.Size = UDim2.new(1.02, 0, 1.02, 0)
  520. ShadowMainContent.Position = UDim2.new(0.5, 0, 0.5, 0)
  521. ShadowMainContent.ZIndex = -1
  522. MakeUICorner(0.015, ShadowMainContent)
  523.  
  524. additionalFrame = Instance.new('Frame', ScreenGui) additionalFrame.Name = 'Additional'
  525. additionalFrame.BackgroundColor3 = Color3.fromRGB(73,73,99)
  526. additionalFrame.Position = UDim2.new(0.15, 0, 0.005, 0)
  527. additionalFrame.SizeConstraint = Enum.SizeConstraint.RelativeYY
  528. additionalFrame.Size = UDim2.new(0.195, 0, 0.062, 0)
  529. additionalFrame.ZIndex = 1000001
  530. MakeUICorner(0.07, additionalFrame)
  531.  
  532. additionalFrameShadow = Instance.new('Frame', additionalFrame)
  533. additionalFrameShadow.BackgroundColor3 = Color3.fromRGB(26,26,26)
  534. additionalFrameShadow.AnchorPoint = Vector2.new(0.5, 0.5)
  535. additionalFrameShadow.Size = UDim2.new(1.05, 0, 1.1, 0)
  536. additionalFrameShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
  537. additionalFrameShadow.ZIndex = 1000000
  538. MakeUICorner(0.07, additionalFrameShadow)
  539.  
  540. additionalFrameInner = Instance.new('Frame', additionalFrame)
  541. additionalFrameInner.BackgroundTransparency = 1
  542. additionalFrameInner.Size = UDim2.new(1,0,1,0)
  543. makeUIList(0.02, additionalFrameInner, Enum.VerticalAlignment.Center)
  544.  
  545. TimerLabel = Instance.new('TextLabel', additionalFrameInner)
  546. TimerLabel.BackgroundTransparency = 1
  547. TimerLabel.Size = UDim2.new(0.95, 0, 0.3, 0)
  548. TimerLabel.ZIndex = 1000002
  549. TimerLabel.Font = Enum.Font.GothamBlack
  550. TimerLabel.TextColor3 = Color3.fromRGB(255,255,255)
  551. TimerLabel.TextScaled = true
  552. TimerLabel.TextXAlignment = Enum.TextXAlignment.Left
  553. TimerLabel.Text = "Timer: 00:00:00"
  554.  
  555. FPSLabel = Instance.new('TextLabel', additionalFrameInner)
  556. FPSLabel.BackgroundTransparency = 1
  557. FPSLabel.Size = UDim2.new(0.95, 0, 0.3, 0)
  558. FPSLabel.ZIndex = 1000002
  559. FPSLabel.Font = Enum.Font.GothamBlack
  560. FPSLabel.TextColor3 = Color3.fromRGB(255,255,255)
  561. FPSLabel.TextScaled = true
  562. FPSLabel.TextXAlignment = Enum.TextXAlignment.Left
  563. FPSLabel.Text = "FPS: 0"
  564.  
  565. DiscordLabel = Instance.new('TextLabel', additionalFrameInner)
  566. DiscordLabel.BackgroundTransparency = 1
  567. DiscordLabel.Size = UDim2.new(0.95, 0, 0.3, 0)
  568. DiscordLabel.ZIndex = 1000002
  569. DiscordLabel.Font = Enum.Font.GothamBlack
  570. DiscordLabel.TextColor3 = Color3.fromRGB(255,255,255)
  571. DiscordLabel.TextScaled = true
  572. DiscordLabel.TextXAlignment = Enum.TextXAlignment.Left
  573. DiscordLabel.Text = "Discord: 32rvCfAmGC"
  574.  
  575. task.spawn(function()
  576. while true do
  577. TimerLabel.Text = string.format("Timer: %02s:%02s:%02s", math.floor((os.time() - StartTime) / 3600), math.floor((os.time() - StartTime)%3600/60), (os.time() - StartTime) % 60 )
  578. FPSLabel.Text = string.format("FPS: %s", FPS) FPS = 0
  579. task.wait(1)
  580. end
  581. end)
  582.  
  583. Top = Instance.new('Frame', MainFrame)
  584. Top.BackgroundColor3 = Color3.fromRGB(26, 26, 26)
  585. Top.AnchorPoint = Vector2.new(1, 0.5)
  586. Top.Size = UDim2.new(1, 0, 0.048, 0)
  587. Top.Position = UDim2.new(1, 0, 0.014, 0)
  588. Top.ZIndex = 10000
  589. MakeUICorner(0.2, Top)
  590.  
  591. CloseButton = Instance.new('TextButton', Top)
  592. CloseButton.AnchorPoint = Vector2.new(1, 0.5)
  593. CloseButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  594. CloseButton.Size = UDim2.new(0.065, 0, 0.694, 0)
  595. CloseButton.Position = UDim2.new(0.984, 0, 0.5, 0)
  596. CloseButton.ZIndex = 10001
  597. CloseButton.Font = Enum.Font.GothamBlack
  598. CloseButton.TextColor3 = Color3.fromRGB(255,255,255)
  599. CloseButton.TextScaled = true
  600. CloseButton.Text = '-'
  601. MakeUICorner(0.3, CloseButton)
  602.  
  603.  
  604. HubTitle = Instance.new('TextLabel', Top)
  605. HubTitle.BackgroundTransparency = 1
  606. HubTitle.AnchorPoint = Vector2.new(0.5, 0.5)
  607. HubTitle.Size = UDim2.new(0.85, 0, 0.8, 0)
  608. HubTitle.Position = UDim2.new(0.5, 0, 0.5, 0)
  609. HubTitle.ZIndex = 10001
  610. HubTitle.Font = Enum.Font.GothamBlack
  611. HubTitle.TextColor3 = Color3.fromRGB(255,255,255)
  612. HubTitle.TextScaled = true
  613. HubTitle.Text = 'MHUB - BETA'
  614.  
  615.  
  616. TopBarSizes = {
  617. [false] = UDim2.new(0.5, 0,0.048, 0),
  618. [true] = UDim2.new(1,0,0.048,0)
  619. }
  620. closeButtonSizes = {
  621. [false] = UDim2.new(0.13, 0, 0.694, 0),
  622. [true] = UDim2.new(0.065, 0, 0.694, 0)
  623. }
  624.  
  625. HubTitlePoses = {
  626. [false] = UDim2.new(0.45, 0, 0.5, 0),
  627. [true] = UDim2.new(0.5, 0, 0.5, 0)
  628. }
  629.  
  630.  
  631. CloseButton.MouseButton1Click:Connect(function()
  632. MainContent.Visible = not MainContent.Visible
  633.  
  634. HubTitle.Position = HubTitlePoses[MainContent.Visible]
  635. CloseButton.Size = closeButtonSizes[MainContent.Visible]
  636. Top.Size = TopBarSizes[MainContent.Visible]
  637.  
  638. end)
  639.  
  640.  
  641. local function MakeDraggable (dragGui, dragwith)
  642.  
  643. local dragging
  644. local dragInput
  645. local dragStart
  646. local startPos
  647. local function updateDrag(input)
  648. local delta = input.Position - dragStart
  649. local dragTime = 0.04
  650. local SmoothDrag = {}
  651. SmoothDrag.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  652. local dragSmoothFunction = TS:Create(dragwith, TweenInfo.new(dragTime, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), SmoothDrag)
  653. dragSmoothFunction:Play()
  654. end
  655.  
  656. dragGui.InputBegan:Connect(function(input)
  657. local usedMouse = input.UserInputType == Enum.UserInputType.MouseButton1
  658. local usedTouch = input.UserInputType == Enum.UserInputType.Touch
  659.  
  660. if usedMouse or usedTouch then
  661. dragging = true
  662. dragStart = input.Position
  663. startPos = dragwith.Position
  664. local release
  665.  
  666. release = UIS.InputEnded:Connect(function(input)
  667. if input.UserInputType ~= Enum.UserInputType.MouseButton1 and input.UserInputType ~= Enum.UserInputType.Touch then return end
  668. dragging = false
  669. release:Disconnect()
  670.  
  671. end)
  672.  
  673.  
  674.  
  675. end
  676. end)
  677. dragGui.InputChanged:Connect(function(input)
  678. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  679. dragInput = input
  680. end
  681. end)
  682. UIS.InputChanged:Connect(function(input)
  683. if input == dragInput and dragging then
  684. updateDrag(input)
  685. end
  686. end)
  687.  
  688. end
  689. MakeDraggable(additionalFrame, additionalFrame)
  690. MakeDraggable(Top, MainFrame)
  691.  
  692. Pages = Instance.new('ScrollingFrame', MainContent)
  693. Pages.BackgroundColor3 = Color3.fromRGB(94, 94, 127)
  694. Pages.Size = UDim2.new(1, 0, 0.047, 0)
  695. Pages.Position = UDim2.new(0, 0, 0.038, 0)
  696. Pages.AutomaticCanvasSize = 'Y'
  697. Pages.CanvasSize = UDim2.new(0, 0, 0, 0)
  698. Pages.ScrollBarThickness = 0
  699. Pages.ScrollingDirection = Enum.ScrollingDirection.X
  700. Pages.BorderSizePixel = 0
  701. Pages.ZIndex = 9500
  702.  
  703. ListPages = Instance.new('UIListLayout', Pages)
  704. ListPages.FillDirection = Enum.FillDirection.Horizontal
  705. ListPages.HorizontalAlignment = Enum.HorizontalAlignment.Left
  706. ListPages.VerticalAlignment = Enum.VerticalAlignment.Center
  707. ListPages.SortOrder = Enum.SortOrder.LayoutOrder
  708.  
  709. ScrollingContent = Instance.new('ScrollingFrame', MainContent)
  710. ScrollingContent.BackgroundTransparency = 1
  711. ScrollingContent.Size = UDim2.new(1, 0, 0.916, 0)
  712. ScrollingContent.Position = UDim2.new(0, 0, 0.084, 0)
  713. ScrollingContent.AutomaticCanvasSize = 'Y'
  714. ScrollingContent.CanvasSize = UDim2.new(0, 0, 0, 0)
  715. ScrollingContent.ScrollBarThickness = 4
  716. ScrollingContent.ScrollingDirection = Enum.ScrollingDirection.Y
  717. ScrollingContent.ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255)
  718. ScrollingContent.BorderSizePixel = 0
  719.  
  720. newPageButtonBCInfo = TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
  721.  
  722. pageOrder = 1
  723. pageShown = nil
  724. local function MakeNewPage (pageName, pageButtonX)
  725.  
  726. local newPageButton = Instance.new('TextButton', Pages)
  727. newPageButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  728. newPageButton.Name = pageName
  729. newPageButton.BackgroundTransparency = 1
  730. newPageButton.Size = UDim2.new(pageButtonX, 0, 1, 0)
  731. newPageButton.Text = ''
  732. newPageButton.LayoutOrder = pageOrder pageOrder+=1
  733. newPageButton.BorderSizePixel = 0
  734. newPageButton.ZIndex = 9850
  735.  
  736. local newPageButtonTitle = Instance.new('TextLabel', newPageButton)
  737. newPageButtonTitle.AnchorPoint = Vector2.new(0.5, 0.5)
  738. newPageButtonTitle.BackgroundTransparency = 1
  739. newPageButtonTitle.Size = UDim2.new(1, 0, 0.8, 0)
  740. newPageButtonTitle.Position = UDim2.new(0.5, 0, 0.5, 0)
  741. newPageButtonTitle.Font = Enum.Font.GothamBlack
  742. newPageButtonTitle.TextScaled = true
  743. newPageButtonTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  744. newPageButtonTitle.Text = string.upper(pageName)
  745. newPageButtonTitle.ZIndex = 9875
  746.  
  747. local newPageButtonBottomLine = Instance.new('Frame', newPageButton)
  748. newPageButtonBottomLine.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  749. newPageButtonBottomLine.Name = 'BottomLine'
  750. newPageButtonBottomLine.AnchorPoint = Vector2.new(0, 1)
  751. newPageButtonBottomLine.Size = UDim2.new(1, 0, 0.05, 0)
  752. newPageButtonBottomLine.Position = UDim2.new(0, 0, 1, 0)
  753. newPageButtonBottomLine.Visible = false
  754. newPageButtonBottomLine.BorderSizePixel = 0
  755. newPageButtonBottomLine.ZIndex = 9800
  756.  
  757. local newPage = Instance.new('Frame', ScrollingContent)
  758. newPage.Name = pageName
  759. newPage.BackgroundTransparency = 1
  760. newPage.Size = UDim2.new(1, 0, 1, 0)
  761. newPage.Visible = false
  762.  
  763. local LeftPage = Instance.new('Frame', newPage)
  764. LeftPage.Name = 'Left'
  765. LeftPage.BackgroundTransparency = 1
  766. LeftPage.Size = UDim2.new(0.5, 0, 1, 0)
  767. makeUIList(0.02, LeftPage)
  768. MakeUIPadding(0.01, 0, 0, 0.01, LeftPage)
  769.  
  770. local RightPage = Instance.new('Frame', newPage)
  771. RightPage.Name = 'Right'
  772. RightPage.BackgroundTransparency = 1
  773. RightPage.AnchorPoint = Vector2.new(1, 0)
  774. RightPage.Position = UDim2.new(1, 0, 0, 0)
  775. RightPage.Size = UDim2.new(0.5, 0, 1, 0)
  776. makeUIList(0.02, RightPage)
  777. MakeUIPadding(0.01, 0, 0, 0.01, RightPage)
  778.  
  779. local PlaceHolder = Instance.new('Frame', RightPage)
  780. PlaceHolder.BackgroundTransparency = 1
  781. PlaceHolder.Size = UDim2.new(0, 0, 0.4, 0)
  782. PlaceHolder.LayoutOrder = 999999
  783.  
  784. local PlaceHolder = Instance.new('Frame', LeftPage)
  785. PlaceHolder.BackgroundTransparency = 1
  786. PlaceHolder.Size = UDim2.new(0, 0, 0.4, 0)
  787. PlaceHolder.LayoutOrder = 999999
  788.  
  789. newPageButton.MouseEnter:Connect(function()
  790. local TweenButton = TS:Create(newPageButton, newPageButtonBCInfo, {BackgroundTransparency = 0.9})
  791. TweenButton:Play()
  792. end)
  793.  
  794. newPageButton.MouseLeave:Connect(function()
  795. local TweenButton = TS:Create(newPageButton, newPageButtonBCInfo, {BackgroundTransparency = 1})
  796. TweenButton:Play()
  797. end)
  798.  
  799. newPageButton.MouseButton1Click:Connect(function()
  800. if pageShown == newPage then return end
  801. pageShown.Visible = false
  802. Pages[pageShown.Name].BottomLine.Visible = false
  803.  
  804. pageShown = newPage
  805. newPageButtonBottomLine.Visible = true
  806. newPage.Visible = true
  807.  
  808.  
  809. end)
  810.  
  811. return newPage
  812. end
  813.  
  814. local Orders = {}
  815. local function MakeNewSubPage (pageName, side, scaleY, cornerScale, UIPaddingTop, UIListLayout)
  816.  
  817. local page = ScrollingContent[pageName][side]
  818.  
  819. local newSubPage = Instance.new('Frame', page)
  820. newSubPage.BackgroundColor3 = Color3.fromRGB(48, 48, 69)
  821. newSubPage.BorderSizePixel = 0
  822. newSubPage.Size = UDim2.new(0.95, 0, scaleY, 0)
  823. MakeUICorner(cornerScale, newSubPage)
  824. makeUIList(UIListLayout, newSubPage)
  825. MakeUIPadding(0, 0.03, 0.03, UIPaddingTop, newSubPage)
  826.  
  827. Orders[newSubPage] = 1
  828. return newSubPage
  829. end
  830.  
  831. local function MakeTitle (subPage, TitleTXT, scaleY)
  832.  
  833. local newTitle = Instance.new('TextLabel')
  834. newTitle.BackgroundTransparency = 1
  835. newTitle.Size = UDim2.new(1, 0, scaleY, 0)
  836. newTitle.Font = Enum.Font.GothamBlack
  837. newTitle.Text = TitleTXT
  838. newTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  839. newTitle.TextScaled = true
  840. newTitle.LayoutOrder = Orders[subPage]
  841. newTitle.Parent = subPage
  842.  
  843. Orders[subPage] += 1
  844.  
  845. return newTitle
  846. end
  847.  
  848. local checkBoxColors = {
  849. [true] = Color3.fromRGB(175, 175, 255);
  850. [false] = Color3.fromRGB(37, 37, 54)
  851. }
  852.  
  853. local function MakeCheckbox (subPage, checkBoxTXT, scaleY)
  854.  
  855. local newCheckBoxFrame = Instance.new('Frame', subPage)
  856. newCheckBoxFrame.BackgroundTransparency = 1
  857. newCheckBoxFrame.Size = UDim2.new(1, 0, scaleY, 0)
  858. newCheckBoxFrame.LayoutOrder = Orders[subPage]
  859. Orders[subPage] += 1
  860.  
  861. local newCheckBox = Instance.new('Frame', newCheckBoxFrame)
  862. newCheckBox.AnchorPoint = Vector2.new(0, 0.5)
  863. newCheckBox.BackgroundColor3 = Color3.fromRGB(37, 37, 54)
  864. newCheckBox.Size = UDim2.new(0.049, 0, 0.73, 0)
  865. newCheckBox.Position = UDim2.new(0, 0, 0.5, 0)
  866. newCheckBox.BorderSizePixel = 0
  867.  
  868. newCheckBox.BackgroundColor3 = checkBoxColors[GetSave(checkBoxTXT)]
  869.  
  870. local UIStroke = Instance.new('UIStroke', newCheckBox)
  871. UIStroke.Color = Color3.fromRGB(255, 255, 255)
  872. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Contextual
  873. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  874. UIStroke.Thickness = 1
  875.  
  876. local newCheckBoxButton = Instance.new('TextButton', newCheckBox)
  877. newCheckBoxButton.Name = checkBoxTXT
  878. newCheckBoxButton.BackgroundTransparency = 1
  879. newCheckBoxButton.Size = UDim2.new(1,0,1,0)
  880. newCheckBoxButton.ZIndex = 10
  881. newCheckBoxButton.Text = ''
  882.  
  883. local newCheckBoxTXT = Instance.new('TextLabel', newCheckBoxFrame)
  884. newCheckBoxTXT.BackgroundTransparency = 1
  885. newCheckBoxTXT.Size = UDim2.new(0.835, 0, 1, 0)
  886. newCheckBoxTXT.Position = UDim2.new(0.08, 0, 0, 0)
  887. newCheckBoxTXT.Font = Enum.Font.GothamBold
  888. newCheckBoxTXT.TextColor3 = Color3.fromRGB(255, 255, 255)
  889. newCheckBoxTXT.TextScaled = true
  890. newCheckBoxTXT.TextXAlignment = Enum.TextXAlignment.Left
  891. newCheckBoxTXT.Text = checkBoxTXT
  892.  
  893. return newCheckBoxButton
  894. end
  895.  
  896. local function MakeLargeButton (subPage, buttonTXT, scaleY)
  897.  
  898. local newLargeButtonFrame = Instance.new('Frame', subPage)
  899. newLargeButtonFrame.BackgroundTransparency = 1
  900. newLargeButtonFrame.Size = UDim2.new(1, 0, scaleY, 0)
  901. newLargeButtonFrame.LayoutOrder = Orders[subPage]
  902. Orders[subPage] += 1
  903.  
  904. local newLargeButton = Instance.new('TextButton', newLargeButtonFrame)
  905. newLargeButton.AnchorPoint = Vector2.new(0.5, 0.5)
  906. newLargeButton.BackgroundColor3 = Color3.fromRGB(75, 75, 108)
  907. newLargeButton.BorderSizePixel = 0
  908. newLargeButton.Size = UDim2.new(1, 0, 0.67, 0)
  909. newLargeButton.Position = UDim2.new(0.5, 0, 0.5, 0)
  910. newLargeButton.Text = ''
  911. newLargeButton.BorderSizePixel = 0
  912.  
  913.  
  914. local newLargeButtonLabel = Instance.new('TextLabel', newLargeButton)
  915. newLargeButtonLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  916. newLargeButtonLabel.BackgroundTransparency = 1
  917. newLargeButtonLabel.Size = UDim2.new(1, 0, 0.8, 0)
  918. newLargeButtonLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
  919. newLargeButtonLabel.Font = Enum.Font.GothamBlack
  920. newLargeButtonLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  921. newLargeButtonLabel.TextScaled = true
  922. newLargeButtonLabel.Text = buttonTXT
  923. MakeUICorner(0.15, newLargeButton)
  924.  
  925. local UIStroke = Instance.new('UIStroke', newLargeButton)
  926. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  927. UIStroke.Color = Color3.fromRGB(189, 189, 255)
  928. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  929. UIStroke.Thickness = 1
  930.  
  931.  
  932. return newLargeButton
  933. end
  934.  
  935. function getMacroUnits(macroName, textBlocks)
  936. local nameMacro = macroName
  937. local unitsFromMacro = {}
  938.  
  939. local macroExist = isfile('MHUB\\Anime Adventures\\' .. nameMacro)
  940. local macroExistjson = isfile('MHUB\\Anime Adventures\\' .. nameMacro .. '.json')
  941. if macroExistjson then nameMacro = nameMacro .. '.json' end
  942.  
  943.  
  944. if macroExist or macroExistjson then
  945.  
  946. local sucess, response = pcall(function()
  947. local MacroAbout = HttpService:JSONDecode( readfile( 'MHUB\\Anime Adventures\\' .. nameMacro) )
  948.  
  949. for _, macroTabl in pairs(MacroAbout) do
  950. if not macroTabl['type'] or macroTabl['type'] ~= 'PlaceTower' then continue end
  951. if table.find(unitsFromMacro, macroTabl.unit) then continue end
  952.  
  953. table.insert(unitsFromMacro, macroTabl.unit)
  954. end
  955. end)
  956.  
  957. if not sucess then
  958. for i=1,6 do
  959. unitsFromMacro[i] = "error"
  960. end
  961. end
  962.  
  963. end
  964.  
  965. for textBlockNumb, TextBlock in ipairs(textBlocks) do
  966. local unitName = unitsFromMacro[textBlockNumb] if oldItemsData[unitsFromMacro[textBlockNumb]] then unitName = oldItemsData[unitsFromMacro[textBlockNumb]].Name end
  967.  
  968. TextBlock.Text = string.format('Unit %s: %s', textBlockNumb, unitName or "")
  969. end
  970.  
  971. end
  972.  
  973. local function MakeDDL (subPage, DDLTXT, scaleY)
  974.  
  975. local newDDLFrame = Instance.new('Frame', subPage)
  976. newDDLFrame.BackgroundTransparency = 1
  977. newDDLFrame.Size = UDim2.new(1, 0, scaleY, 0)
  978. newDDLFrame.LayoutOrder = Orders[subPage]
  979. Orders[subPage] += 1
  980.  
  981. local newDDLLabel = Instance.new('TextLabel', newDDLFrame)
  982. newDDLLabel.BackgroundTransparency = 1
  983. newDDLLabel.Size = UDim2.new(1, 0, 0.3, 0)
  984. newDDLLabel.Position = UDim2.new(0, 0, 0.05, 0)
  985. newDDLLabel.Font = Enum.Font.GothamBlack
  986. newDDLLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  987. newDDLLabel.TextScaled = true
  988. newDDLLabel.TextXAlignment = Enum.TextXAlignment.Left
  989. newDDLLabel.Text = DDLTXT
  990.  
  991. local newDDLButton = Instance.new('TextButton', newDDLFrame)
  992. newDDLButton.BackgroundColor3 = Color3.fromRGB(75, 75, 108)
  993. newDDLButton.BorderSizePixel = 0
  994. newDDLButton.Size = UDim2.new(1, 0, 0.408, 0)
  995. newDDLButton.Position = UDim2.new(0, 0, 0.45, 0)
  996. newDDLButton.Text = ''
  997. MakeUICorner(0.15, newDDLButton)
  998.  
  999. local UIStroke = Instance.new('UIStroke', newDDLButton)
  1000. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1001. UIStroke.Color = Color3.fromRGB(189, 189, 255)
  1002. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  1003. UIStroke.Thickness = 1
  1004.  
  1005. local newDDLList = Instance.new('TextLabel', newDDLButton)
  1006. newDDLList.BackgroundTransparency = 1
  1007. newDDLList.AnchorPoint = Vector2.new(0.5, 0.5)
  1008. newDDLList.Size = UDim2.new(0.95, 0, 0.8, 0)
  1009. newDDLList.Position = UDim2.new(0.5, 0, 0.5, 0)
  1010. newDDLList.Font = Enum.Font.GothamBlack
  1011. newDDLList.TextScaled = true
  1012. newDDLList.TextXAlignment = Enum.TextXAlignment.Left
  1013. newDDLList.TextColor3 = Color3.fromRGB(255, 255, 255)
  1014. newDDLList.RichText = true
  1015. newDDLList.Text = 'None'
  1016.  
  1017.  
  1018. return newDDLButton
  1019. end
  1020.  
  1021. local function DDLlabel (ddlButton, newValue)
  1022.  
  1023. if type(newValue) == 'table' then
  1024. local newTXT = "None"
  1025.  
  1026. if #newValue >=1 then
  1027. newTXT = ""
  1028.  
  1029. for _, addItem in ipairs(newValue) do
  1030. newTXT = string.format(newTXT .. "%s, ", addItem)
  1031. end
  1032.  
  1033. end
  1034.  
  1035. ddlButton.TextLabel.Text = newTXT
  1036.  
  1037. else
  1038. local newTXT = "None" if newValue ~= "" and newValue ~= nil then newTXT = newValue end
  1039. ddlButton.TextLabel.Text = newTXT
  1040. end
  1041. end
  1042.  
  1043. local DDLColors = {
  1044. [true] = Color3.fromRGB(0, 176, 109);
  1045. [false] = Color3.fromRGB(138, 138, 199)
  1046. }
  1047.  
  1048. local function GetDDL (ddlButton, items, multiple, keyName, secondKeyName, tabName)
  1049.  
  1050. local DDL = ddlButton.Parent:FindFirstChild('List')
  1051.  
  1052. if not DDL then
  1053. DDL = Instance.new('Frame', MainContent) DDL.Name = 'List' DDL.Visible = false
  1054. DDL.BackgroundColor3 = Color3.fromRGB(75, 75, 108)
  1055. DDL.BorderSizePixel = 0
  1056. DDL.ZIndex = 555
  1057. --DDL.Size = UDim2.new(0.448, 0, 0.388, 0)
  1058. MakeUICorner(0.02, DDL)
  1059. MakeUIPadding(0, 0.02, 0.02, 0, DDL)
  1060.  
  1061. local UIStroke = Instance.new('UIStroke', DDL)
  1062. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Contextual
  1063. UIStroke.Color = Color3.fromRGB(189, 189, 255)
  1064. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  1065. UIStroke.Thickness = 1
  1066.  
  1067. local ScrollingItems = Instance.new('ScrollingFrame', DDL) ScrollingItems.Name = 'ScrollingItems'
  1068. ScrollingItems.BackgroundTransparency = 1
  1069. ScrollingItems.Size = UDim2.new(1, 0, 0.97, 0)
  1070. ScrollingItems.Position = UDim2.new(0, 0, 0.03, 0)
  1071. ScrollingItems.ZIndex = 556
  1072. ScrollingItems.AutomaticCanvasSize = 'Y'
  1073. ScrollingItems.CanvasSize = UDim2.new(0,0,0,0)
  1074. ScrollingItems.ScrollBarImageColor3 = Color3.fromRGB(255,255,255)
  1075. ScrollingItems.ScrollBarThickness = 3
  1076. ScrollingItems.BorderSizePixel = 0
  1077. ScrollingItems.ScrollingDirection = Enum.ScrollingDirection.Y
  1078. makeUIList(0.03, ScrollingItems)
  1079.  
  1080. local TemplateButton = Instance.new('TextButton', ScrollingItems) TemplateButton.Name = 'Template' TemplateButton.Visible = false
  1081. TemplateButton.BackgroundColor3 = Color3.fromRGB(138, 138, 199)
  1082. TemplateButton.BorderSizePixel = 0
  1083. TemplateButton.Size = UDim2.new(1, 0, 0.08, 0)
  1084. TemplateButton.ZIndex = 556
  1085. TemplateButton.RichText = true
  1086. TemplateButton.Font = Enum.Font.GothamBlack
  1087. TemplateButton.TextScaled = true
  1088. TemplateButton.TextStrokeTransparency = 0.65
  1089. TemplateButton.TextColor3 = Color3.fromRGB(255,255,255)
  1090.  
  1091. --DDL.Size = UDim2.new(1, 0, 0, DDL.AbsoluteSize.Y)
  1092. DDL.Position = UDim2.new(0, 0, 1, 0)
  1093. DDL.Parent = ddlButton.Parent
  1094. end
  1095.  
  1096. DDL.Size = UDim2.new(1, 0, 0, MainContent.AbsoluteSize.Y * 0.388)
  1097. DDL.Visible = not DDL.Visible
  1098.  
  1099. for _, button in ipairs(DDL.ScrollingItems:GetChildren()) do
  1100. if button.Name == 'item' then button:Destroy() end
  1101. end
  1102.  
  1103. if not DDL.Visible then return end
  1104.  
  1105. for _, item in ipairs(items) do
  1106. local newItem = DDL.ScrollingItems.Template:Clone() newItem.Name = 'item'
  1107. newItem.Parent = DDL.ScrollingItems
  1108. newItem.Text = item
  1109. newItem.Visible = true
  1110.  
  1111. local itemSelected = false
  1112.  
  1113. if type(GetSave(keyName)) == 'table' then
  1114.  
  1115. if secondKeyName then
  1116. itemSelected = GetSave(keyName)[tabName][secondKeyName] == item
  1117. else
  1118. itemSelected = table.find(GetSave(keyName), item)
  1119. end
  1120.  
  1121. else itemSelected = GetSave(keyName) == item
  1122. end
  1123.  
  1124. if itemSelected then newItem.BackgroundColor3 = DDLColors[true] end
  1125.  
  1126. newItem.MouseButton1Click:Connect(function()
  1127. local isSelected = false
  1128.  
  1129. if multiple then
  1130. local itemInTable = table.find(GetSave(keyName), item)
  1131. local newSave = table.clone(Settings[keyName])
  1132.  
  1133. if itemInTable then
  1134. table.remove(newSave, itemInTable)
  1135. else
  1136. table.insert(newSave, item)
  1137. isSelected = true
  1138. end
  1139.  
  1140. Save(keyName, newSave)
  1141.  
  1142. else
  1143.  
  1144. local oldKey = GetSave(keyName)
  1145.  
  1146. for _, button in ipairs(DDL.ScrollingItems:GetChildren()) do
  1147. if button.Name ~= 'item' then continue end
  1148. if (not secondKeyName and button.Text == oldKey) or (secondKeyName and button.Text == oldKey[tabName][secondKeyName]) then button.BackgroundColor3 = DDLColors[false] break end
  1149. end
  1150.  
  1151. local toSave = "" if secondKeyName then toSave = deepcopy(oldKey) toSave[tabName][secondKeyName] = "" end
  1152.  
  1153. if not secondKeyName and oldKey ~= item then toSave = item
  1154. elseif secondKeyName and oldKey[tabName][secondKeyName] ~= item then toSave[tabName][secondKeyName] = item
  1155. end
  1156.  
  1157.  
  1158.  
  1159. Save(keyName, toSave)
  1160. if keyName == "Selected Macro" then getMacroUnits(toSave, MacroUnitsTextBlocks) end
  1161.  
  1162. local oldKey = GetSave(keyName)
  1163.  
  1164.  
  1165. isSelected = (secondKeyName and toSave[tabName][secondKeyName] ~= "") or ( not secondKeyName and toSave ~= "")
  1166.  
  1167. end
  1168.  
  1169. local fillDDL = GetSave(keyName) if secondKeyName then fillDDL = fillDDL[tabName][secondKeyName] end
  1170.  
  1171.  
  1172.  
  1173. DDLlabel(ddlButton, fillDDL)
  1174.  
  1175. newItem.BackgroundColor3 = DDLColors[isSelected]
  1176.  
  1177. end)
  1178. end
  1179.  
  1180. end
  1181.  
  1182. local function MakeTextBox (subPage, PlacehodlerTXT, TitleTXT, scaleY)
  1183.  
  1184. local TextBoxFrame = Instance.new('Frame', subPage)
  1185. TextBoxFrame.BackgroundTransparency = 1
  1186. TextBoxFrame.Size = UDim2.new(1, 0, scaleY, 0)
  1187. TextBoxFrame.LayoutOrder = Orders[subPage]
  1188. Orders[subPage] += 1
  1189.  
  1190. local TextBoxTitle = Instance.new('TextLabel', TextBoxFrame)
  1191. TextBoxTitle.BackgroundTransparency = 1
  1192. TextBoxTitle.Size = UDim2.new(1, 0, 0.3, 0)
  1193. TextBoxTitle.Position = UDim2.new(0, 0, 0.05, 0)
  1194. TextBoxTitle.Font = Enum.Font.GothamBlack
  1195. TextBoxTitle.TextScaled = true
  1196. TextBoxTitle.TextColor3 = Color3.fromRGB(255,255,255)
  1197. TextBoxTitle.TextXAlignment = Enum.TextXAlignment.Left
  1198. TextBoxTitle.Text = TitleTXT
  1199.  
  1200. local TextBoxShadow = Instance.new('Frame', TextBoxFrame)
  1201. TextBoxShadow.BackgroundColor3 = Color3.fromRGB(75, 75, 108)
  1202. TextBoxShadow.BorderSizePixel = 0
  1203. TextBoxShadow.Size = UDim2.new(1, 0, 0.408, 0)
  1204. TextBoxShadow.Position = UDim2.new(0, 0, 0.45, 0)
  1205. MakeUICorner(0.15, TextBoxShadow)
  1206.  
  1207. local TextBox = Instance.new('TextBox', TextBoxFrame)
  1208. TextBox.BackgroundTransparency = 1
  1209. TextBox.TextXAlignment = Enum.TextXAlignment.Left
  1210. TextBox.Size = UDim2.new(0.985, 0, 0.408, 0)
  1211. TextBox.Position = UDim2.new(0.015, 0, 0.45, 0)
  1212. TextBox.Font = Enum.Font.GothamBold
  1213. TextBox.PlaceholderColor3 = Color3.fromRGB(178, 178, 178)
  1214. TextBox.PlaceholderText = PlacehodlerTXT
  1215. TextBox.TextScaled = true
  1216. TextBox.TextColor3 = Color3.fromRGB(255,255,255)
  1217. TextBox.Text = ""
  1218.  
  1219. local UIStroke = Instance.new('UIStroke', TextBoxShadow)
  1220. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1221. UIStroke.Color = Color3.fromRGB(189, 189, 255)
  1222. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  1223. UIStroke.Thickness = 1
  1224.  
  1225. return TextBox
  1226. end
  1227.  
  1228. local function MakeSlider (subPage, TitleTXT, scaleY)
  1229.  
  1230. local slideFrame = Instance.new('Frame', subPage)
  1231. slideFrame.BackgroundTransparency = 1
  1232. slideFrame.Size = UDim2.new(1, 0, scaleY, 0)
  1233. slideFrame.LayoutOrder = Orders[subPage]
  1234. Orders[subPage] += 1
  1235.  
  1236. local slideTitle = Instance.new('TextLabel', slideFrame)
  1237. slideTitle.BackgroundTransparency = 1
  1238. slideTitle.Size = UDim2.new(0.532, 0, 0.3, 0)
  1239. slideTitle.Position = UDim2.new(0, 0, 0.05, 0)
  1240. slideTitle.Font = Enum.Font.GothamBlack
  1241. slideTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  1242. slideTitle.TextScaled = true
  1243. slideTitle.TextXAlignment = Enum.TextXAlignment.Left
  1244. slideTitle.Text = TitleTXT
  1245.  
  1246. local slideBox = Instance.new('TextBox', slideFrame)
  1247. slideBox.BackgroundColor3 = Color3.fromRGB(75, 75, 108)
  1248. slideBox.BorderSizePixel = 0
  1249. slideBox.Size = UDim2.new(0.468, 0, 0.312, 0)
  1250. slideBox.Position = UDim2.new(0.532, 0, 0.038, 0)
  1251. slideBox.Font = Enum.Font.GothamBold
  1252. slideBox.TextScaled = true
  1253. slideBox.PlaceholderText = ""
  1254. slideBox.Text = ""
  1255. slideBox.TextColor3 = Color3.fromRGB(255,255,255)
  1256. MakeUICorner(0.15, slideBox)
  1257.  
  1258. local UIStroke = Instance.new('UIStroke', slideBox)
  1259. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1260. UIStroke.Color = Color3.fromRGB(189, 189, 255)
  1261. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  1262. UIStroke.Thickness = 1
  1263.  
  1264. local slider = Instance.new('Frame', slideFrame) slider.Name = "slider"
  1265. slider.BackgroundColor3 = Color3.fromRGB(27, 27, 39)
  1266. slider.BorderSizePixel = 0
  1267. slider.Size = UDim2.new(1, 0, 0.35, 0)
  1268. slider.Position = UDim2.new(0, 0, 0.508, 0)
  1269. MakeUICorner(0.2, slider)
  1270.  
  1271. local UIStroke = Instance.new('UIStroke', slider)
  1272. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1273. UIStroke.Color = Color3.fromRGB(189, 189, 255)
  1274. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  1275. UIStroke.Thickness = 1
  1276.  
  1277. local sliderBar = Instance.new('Frame', slider)
  1278. sliderBar.BackgroundColor3 = Color3.fromRGB(255,255,255)
  1279. sliderBar.BorderSizePixel = 0
  1280. sliderBar.Size = UDim2.new(1,0,1,0)
  1281. MakeUICorner(0.2, sliderBar)
  1282.  
  1283. local UIGradient = Instance.new('UIGradient', sliderBar)
  1284.  
  1285. UIGradient.Color = ColorSequence.new{
  1286. ColorSequenceKeypoint.new(0, Color3.fromRGB(176, 176, 239) ),
  1287. ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 255) ),
  1288. }
  1289.  
  1290. local sliderButton = Instance.new('TextButton', slider) sliderButton.Name = "SliderButton"
  1291. sliderButton.BackgroundTransparency = 1
  1292. sliderButton.ZIndex = 10
  1293. sliderButton.Size = UDim2.new(1,0,1,0)
  1294. sliderButton.Text = ""
  1295.  
  1296. return slideFrame
  1297. end
  1298.  
  1299. local function MakeSliderV2 (subPage, TitleTXT, scaleY)
  1300. local slideFrame = Instance.new('Frame', subPage)
  1301. slideFrame.BackgroundTransparency = 1
  1302. slideFrame.Size = UDim2.new(1, 0, scaleY, 0)
  1303. slideFrame.LayoutOrder = Orders[subPage]
  1304. Orders[subPage] += 1
  1305.  
  1306. local slideTitle = Instance.new('TextLabel', slideFrame)
  1307. slideTitle.BackgroundTransparency = 1
  1308. slideTitle.AnchorPoint = Vector2.new(0, 0.5)
  1309. slideTitle.Size = UDim2.new(0.49, 0, 0.9, 0)
  1310. slideTitle.Position = UDim2.new(0.02, 0, 0.5, 0)
  1311. slideTitle.Font = Enum.Font.GothamBlack
  1312. slideTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  1313. slideTitle.TextScaled = true
  1314. slideTitle.TextXAlignment = Enum.TextXAlignment.Left
  1315. slideTitle.Text = TitleTXT
  1316. slideTitle.TextStrokeTransparency = 0
  1317. slideTitle.TextStrokeColor3 = Color3.fromRGB(79,81,112)
  1318. slideTitle.ZIndex = 3
  1319.  
  1320. local slideAmount = Instance.new('TextLabel', slideFrame)
  1321. slideAmount.BackgroundTransparency = 1
  1322. slideAmount.AnchorPoint = Vector2.new(1, 0.5)
  1323. slideAmount.Size = UDim2.new(0.49, 0, 0.9, 0)
  1324. slideAmount.Position = UDim2.new(0.98, 0, 0.5, 0)
  1325. slideAmount.Font = Enum.Font.GothamBlack
  1326. slideAmount.TextColor3 = Color3.fromRGB(255, 255, 255)
  1327. slideAmount.TextScaled = true
  1328. slideAmount.TextXAlignment = Enum.TextXAlignment.Right
  1329. slideAmount.Text = "[0/0]"
  1330. slideAmount.Name = "AmountLabel"
  1331. slideAmount.TextStrokeTransparency = 0
  1332. slideAmount.TextStrokeColor3 = Color3.fromRGB(79,81,112)
  1333. slideAmount.ZIndex = 3
  1334.  
  1335. local slider = Instance.new('Frame', slideFrame) slider.Name = "slider"
  1336. slider.BackgroundColor3 = Color3.fromRGB(27, 27, 39)
  1337. slider.BorderSizePixel = 0
  1338. slider.Size = UDim2.new(1, 0, 1, 0)
  1339. MakeUICorner(0.2, slider)
  1340.  
  1341. local UIStroke = Instance.new('UIStroke', slider)
  1342. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1343. UIStroke.Color = Color3.fromRGB(189, 189, 255)
  1344. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  1345. UIStroke.Thickness = 1
  1346.  
  1347. local sliderBar = Instance.new('Frame', slider)
  1348. sliderBar.BackgroundColor3 = Color3.fromRGB(255,255,255)
  1349. sliderBar.BorderSizePixel = 0
  1350. sliderBar.Size = UDim2.new(1,0,1,0)
  1351. MakeUICorner(0.2, sliderBar)
  1352.  
  1353. local UIGradient = Instance.new('UIGradient', sliderBar)
  1354.  
  1355. UIGradient.Color = ColorSequence.new{
  1356. ColorSequenceKeypoint.new(0, Color3.fromRGB(176, 176, 239) ),
  1357. ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 255) ),
  1358. }
  1359.  
  1360. local sliderButton = Instance.new('TextButton', slider) sliderButton.Name = "SliderButton"
  1361. sliderButton.BackgroundTransparency = 1
  1362. sliderButton.ZIndex = 10
  1363. sliderButton.Size = UDim2.new(1,0,1,0)
  1364. sliderButton.Text = ""
  1365.  
  1366. return slideFrame
  1367. end
  1368.  
  1369. local function MakeTextBlock (subPage, DefaultTXT, ScaleY)
  1370.  
  1371. local TxtBlockFrame = Instance.new('Frame', subPage)
  1372. TxtBlockFrame.BackgroundColor3 = Color3.fromRGB(31, 31, 44)
  1373. TxtBlockFrame.BorderSizePixel = 0
  1374. TxtBlockFrame.Size = UDim2.new(1, 0, ScaleY, 0)
  1375. TxtBlockFrame.LayoutOrder = Orders[subPage]
  1376. Orders[subPage] += 1
  1377. MakeUICorner(0.2, TxtBlockFrame)
  1378.  
  1379. local TxtLabel = Instance.new('TextLabel', TxtBlockFrame)
  1380. TxtLabel.BackgroundTransparency = 1
  1381. TxtLabel.AnchorPoint = Vector2.new(0, 0.5)
  1382. TxtLabel.Size = UDim2.new(0.98, 0, 0.9, 0)
  1383. TxtLabel.Position = UDim2.new(0.02, 0, 0.5, 0)
  1384. TxtLabel.Font = Enum.Font.GothamBold
  1385. TxtLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  1386. TxtLabel.TextScaled = true
  1387. TxtLabel.TextXAlignment = Enum.TextXAlignment.Left
  1388. TxtLabel.Text = DefaultTXT
  1389.  
  1390. return TxtLabel
  1391. end
  1392.  
  1393. local function MakeDoubleButton (subPage, ButtonTXT, ScaleY)
  1394.  
  1395. local DoubleButtonFrame = Instance.new('Frame', subPage)
  1396. DoubleButtonFrame.BackgroundTransparency = 1
  1397. DoubleButtonFrame.BorderSizePixel = 0
  1398. DoubleButtonFrame.Size = UDim2.new(1, 0, ScaleY, 0)
  1399. DoubleButtonFrame.LayoutOrder = Orders[subPage] Orders[subPage] +=1
  1400.  
  1401. local BiggerButton = Instance.new('TextButton', DoubleButtonFrame) BiggerButton.Name = "_bigbutton"
  1402. BiggerButton.BackgroundColor3 = Color3.fromRGB(75,75, 108)
  1403. BiggerButton.Size = UDim2.new(0.69, 0, 1, 0)
  1404. BiggerButton.Text = ""
  1405. MakeUICorner(0.15, BiggerButton)
  1406.  
  1407. local UIStroke = Instance.new('UIStroke', BiggerButton)
  1408. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1409. UIStroke.Color = Color3.fromRGB(189,189,255)
  1410. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  1411. UIStroke.Thickness = 1
  1412.  
  1413. local BiggetButtonTXT = Instance.new('TextLabel', BiggerButton)
  1414. BiggetButtonTXT.BackgroundTransparency = 1
  1415. BiggetButtonTXT.AnchorPoint = Vector2.new(0, 0.5)
  1416. BiggetButtonTXT.Position = UDim2.new(0,0,0.5,0)
  1417. BiggetButtonTXT.Size = UDim2.new(1,0, 0.8, 0)
  1418. BiggetButtonTXT.Font = Enum.Font.GothamBlack
  1419. BiggetButtonTXT.TextColor3 = Color3.fromRGB(255,255,255)
  1420. BiggetButtonTXT.TextScaled = true
  1421. BiggetButtonTXT.Text = ButtonTXT
  1422.  
  1423. local ResetButton = Instance.new('TextButton', DoubleButtonFrame) ResetButton.Name = '_resetbutton'
  1424. ResetButton.AnchorPoint = Vector2.new(1, 0)
  1425. ResetButton.BackgroundColor3 = Color3.fromRGB(75,75,108)
  1426. ResetButton.Size = UDim2.new(0.279, 0, 1, 0)
  1427. ResetButton.Position = UDim2.new(1,0,0,0)
  1428.  
  1429. local UIStroke = Instance.new('UIStroke', ResetButton)
  1430. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1431. UIStroke.Color = Color3.fromRGB(189,189,255)
  1432. UIStroke.LineJoinMode = Enum.LineJoinMode.Round
  1433. UIStroke.Thickness = 1
  1434.  
  1435. local ResetButtonTXT = Instance.new('TextLabel', ResetButton)
  1436. ResetButtonTXT.BackgroundTransparency = 1
  1437. ResetButtonTXT.AnchorPoint = Vector2.new(0, 0.5)
  1438. ResetButtonTXT.Position = UDim2.new(0,0,0.5,0)
  1439. ResetButtonTXT.Size = UDim2.new(1,0, 0.8, 0)
  1440. ResetButtonTXT.Font = Enum.Font.GothamBlack
  1441. ResetButtonTXT.TextColor3 = Color3.fromRGB(255,255,255)
  1442. ResetButtonTXT.TextScaled = true
  1443. ResetButtonTXT.Text = "RESET"
  1444.  
  1445.  
  1446. return DoubleButtonFrame
  1447. end
  1448.  
  1449. MakeNewPage('Main', 0.117)
  1450. MakeNewPage('Farm', 0.117)
  1451. MakeNewPage('AutoPlay+', 0.225)
  1452. MakeNewPage('Macro', 0.14)
  1453. MakeNewPage('Misc', 0.1)
  1454.  
  1455. -----------------------
  1456. pageShown = ScrollingContent['Main']
  1457. pageShown.Visible = true
  1458. Pages['Main'].BottomLine.Visible = true
  1459.  
  1460. ---------------------------------------------------------------------
  1461.  
  1462. local Main_MainSubPage = MakeNewSubPage('Main', 'Right', 0.603, 0.03, 0.01, 0.02)
  1463. MakeTitle(Main_MainSubPage, 'Main', 0.07)
  1464. AutoLeaveLATE = MakeCheckbox(Main_MainSubPage, 'Auto Leave [LATE]', 0.056)
  1465. local AutoLeave = MakeCheckbox(Main_MainSubPage, 'Auto Leave', 0.056)
  1466. local AutoRetry = MakeCheckbox(Main_MainSubPage, 'Auto Retry', 0.056)
  1467. local AutoNextLevel = MakeCheckbox(Main_MainSubPage, 'Auto Next Level', 0.056)
  1468. local AutoNextPortal = MakeCheckbox(Main_MainSubPage, 'Auto Next Portal', 0.056)
  1469. local PlaceInRedZones = MakeCheckbox(Main_MainSubPage, 'Place In Red Zones', 0.056)
  1470. local HideMap = MakeCheckbox(Main_MainSubPage, 'Hide Map', 0.056)
  1471. local TPToLobby = MakeLargeButton(Main_MainSubPage, 'Teleport To Lobby', 0.103)
  1472.  
  1473. -----------------------
  1474.  
  1475. local Main_AutoOpenCapsules = MakeNewSubPage('Main', 'Right', 0.212, 0.05, 0.05, 0.02)
  1476. MakeTitle(Main_AutoOpenCapsules, 'Auto Open Capsules', 0.195)
  1477. local AutoOpenCapsules = MakeCheckbox(Main_AutoOpenCapsules, 'Auto Open Capsules', 0.162)
  1478. local selectedCapsulesDDL = MakeDDL(Main_AutoOpenCapsules, 'Select Ignore Capsules', 0.517)
  1479.  
  1480. -----------------------
  1481.  
  1482. local Main_SellSkinsSubPage = MakeNewSubPage('Main', 'Right', 0.212, 0.05, 0.05, 0.02)
  1483. MakeTitle(Main_SellSkinsSubPage, 'Auto Sell Skins', 0.195)
  1484. local AutoDeleteSkins = MakeCheckbox(Main_SellSkinsSubPage, 'Auto Delete Skins', 0.162)
  1485. local selectedSkinsDDL = MakeDDL(Main_SellSkinsSubPage, 'Select Skins', 0.517)
  1486.  
  1487. -----------------------
  1488.  
  1489. Main_HideYourself = MakeNewSubPage('Main', 'Left', 0.21, 0.05, 0.04, 0.07)
  1490. MakeTitle(Main_HideYourself, 'Hide Yourself', 0.21)
  1491. HideTab = MakeCheckbox(Main_HideYourself, 'Hide Tab', 0.17)
  1492. HideName = MakeCheckbox(Main_HideYourself, 'Hide Name', 0.17)
  1493. FakeOutfit = MakeCheckbox(Main_HideYourself, 'Fake Outfit', 0.17)
  1494.  
  1495. -----------------------
  1496.  
  1497. Main_DeletePortalsSubPage = MakeNewSubPage('Main', 'Left', 0.669, 0.03, 0.013, 0.025)
  1498. MakeTitle(Main_DeletePortalsSubPage, 'Auto Delete Portals', 0.063)
  1499. SelectedPortalsDelete = MakeDDL(Main_DeletePortalsSubPage, "Select Portals", 0.14)
  1500. SelectedDifficultiesDelete = MakeDDL(Main_DeletePortalsSubPage, "Select Difficulties", 0.14)
  1501. SelectedTiersDelete = MakeDDL(Main_DeletePortalsSubPage, "Select Tiers", 0.14)
  1502. SelectIgnoreBonusDelete = MakeDDL(Main_DeletePortalsSubPage, "Select Ignore DMG Bonus", 0.14)
  1503. SelectIgnoreWorldsDelete = MakeDDL(Main_DeletePortalsSubPage, "Select Ignore Worlds", 0.14)
  1504. AutoDeletePortals = MakeCheckbox(Main_DeletePortalsSubPage, "Auto Delete Portals", 0.05)
  1505.  
  1506. -----------------------
  1507.  
  1508. ---------------------------------------------------------------------
  1509.  
  1510. Farm_AutoJoinInfStory = MakeNewSubPage('Farm', 'Left', 0.347, 0.03, 0.02, 0.02)
  1511. MakeTitle(Farm_AutoJoinInfStory, 'Auto Join Story / Infinite', 0.115)
  1512. StoryInf_SelectWorld = MakeDDL(Farm_AutoJoinInfStory, 'Selected World', 0.28)
  1513. StoryInf_SelectLevel = MakeDDL(Farm_AutoJoinInfStory, 'Selected Level', 0.28)
  1514. StoryInf_Hard = MakeCheckbox(Farm_AutoJoinInfStory, 'Hard Difficulty', 0.105)
  1515. StoryInf_AutoJoin = MakeCheckbox(Farm_AutoJoinInfStory, 'Auto Join Story/INF', 0.105)
  1516.  
  1517. -----------------------
  1518.  
  1519. Farm_SelectPortalsSubPage = MakeNewSubPage('Farm', 'Left', 0.977, 0.03, 0.01, 0.013)
  1520. MakeTitle(Farm_SelectPortalsSubPage, 'Auto Select Portals', 0.043)
  1521. SelectPortalName = MakeDDL(Farm_SelectPortalsSubPage, 'Select Portals', 0.097)
  1522. SelectIgnoreDifficulties = MakeDDL(Farm_SelectPortalsSubPage, 'Select Ignore Difficulties', 0.097)
  1523. SelectTiers = MakeDDL(Farm_SelectPortalsSubPage, 'Select Tiers', 0.097)
  1524. SelectIgnoreDMGBonus = MakeDDL(Farm_SelectPortalsSubPage, 'Select Ignore DMG Bonus', 0.097)
  1525. SelectIgnoreWorlds = MakeDDL(Farm_SelectPortalsSubPage, 'Select Ignore Worlds', 0.097)
  1526. StartAfterTimePortal = MakeSlider(Farm_SelectPortalsSubPage, 'Start After Time', 0.108)
  1527. StartAfterPlayersPortal = MakeSlider(Farm_SelectPortalsSubPage, 'Waiting For Players', 0.108)
  1528. OnlyFriendsPortal = MakeCheckbox(Farm_SelectPortalsSubPage, 'Only Friends', 0.034)
  1529. AutoStartPortal = MakeCheckbox(Farm_SelectPortalsSubPage, 'Auto Start', 0.034)
  1530. AutoUsePortal = MakeCheckbox(Farm_SelectPortalsSubPage, 'Auto Use', 0.034)
  1531.  
  1532. -----------------------
  1533.  
  1534. Farm_TakedownWorthinessSubPage = MakeNewSubPage('Farm', 'Right', 0.157, 0.1, 0.05, 0.08)
  1535. MakeTitle(Farm_TakedownWorthinessSubPage, 'Takedowns & Worthiness', 0.27)
  1536. ShowTakedowns = MakeCheckbox(Farm_TakedownWorthinessSubPage, 'Show Takedowns', 0.23)
  1537. ColoredTakedowns = MakeCheckbox(Farm_TakedownWorthinessSubPage, 'Colored Takedowns', 0.23)
  1538.  
  1539. -----------------------
  1540.  
  1541. Farm_InfCastleSubPage = MakeNewSubPage('Farm', 'Right', 0.252, 0.04, 0.04, 0.03)
  1542. MakeTitle(Farm_InfCastleSubPage, 'Auto Join Inf Castle', 0.162)
  1543. InfCastleMaxRoom = MakeTextBox(Farm_InfCastleSubPage, 'Room Number', 'Auto Join Until Room:', 0.42)
  1544. InfCastleHardDifficulty = MakeCheckbox(Farm_InfCastleSubPage, 'Hard Difficulty', 0.137)
  1545. InfCastleAutoJoin = MakeCheckbox(Farm_InfCastleSubPage, 'Auto Infinity Castle', 0.137)
  1546.  
  1547. -----------------------
  1548.  
  1549. Farm_ChallengeSubPage = MakeNewSubPage('Farm', 'Right', 0.429, 0.03, 0.02, 0.02)
  1550. MakeTitle(Farm_ChallengeSubPage, 'Auto Join Challenge', 0.1)
  1551. Challenge_IgnoreWorlds = MakeDDL(Farm_ChallengeSubPage, 'Select Ignore Worlds', 0.235)
  1552. Challenge_IgnoreDifficulty = MakeDDL(Farm_ChallengeSubPage, 'Select Ignore Difficulties', 0.235)
  1553. Challenge_IgnoreRewards = MakeDDL(Farm_ChallengeSubPage, 'Select Ignore Rewards', 0.235)
  1554. AutoChallenge = MakeCheckbox(Farm_ChallengeSubPage, 'Auto Challenge', 0.085)
  1555.  
  1556. -----------------------
  1557.  
  1558. Farm_AutoSkillSubPage = MakeNewSubPage('Farm', 'Right', 0.561, 0.03, 0.02, 0.02)
  1559. MakeTitle(Farm_AutoSkillSubPage, 'Auto Use Skill', 0.073)
  1560. AutoErwin = MakeCheckbox(Farm_AutoSkillSubPage, 'Auto Buff Erwin 100%', 0.06)
  1561. AutoWenda = MakeCheckbox(Farm_AutoSkillSubPage, 'Auto Buff Wenda 100%', 0.06)
  1562. AutoLeafy = MakeCheckbox(Farm_AutoSkillSubPage, 'Auto Buff Leafy 100%', 0.06)
  1563. AutoGriffin = MakeCheckbox(Farm_AutoSkillSubPage, 'Auto Sacrifice Griffin', 0.06)
  1564. AutoSkillSelectedUnits = MakeDDL(Farm_AutoSkillSubPage, 'Selected Units', 0.178)
  1565. AutoSkillWave = MakeTextBox(Farm_AutoSkillSubPage, 'Wave', 'Start Auto Skill On Wave:', 0.19)
  1566. AutoSkillOnBoss = MakeCheckbox(Farm_AutoSkillSubPage, 'Only Skill On Boss', 0.06)
  1567. AutoUseSkill = MakeCheckbox(Farm_AutoSkillSubPage, 'Auto Use Skill', 0.06)
  1568.  
  1569.  
  1570. -----------------------
  1571.  
  1572.  
  1573. local Farm_QuestsSubPage = MakeNewSubPage('Farm', 'Right', 0.215, 0.08, 0.03, 0.07)
  1574. MakeTitle(Farm_QuestsSubPage, 'Quests', 0.195)
  1575. local AutoClaimQuests = MakeCheckbox(Farm_QuestsSubPage, 'Auto Claim Quests', 0.165)
  1576. local AutoTakeDailyQuests = MakeCheckbox(Farm_QuestsSubPage, 'Auto Take Daily Quests', 0.165)
  1577. local AutoTakeNamiQuests = MakeCheckbox(Farm_QuestsSubPage, 'Auto Take Nami Quests', 0.165)
  1578.  
  1579. -----------------------
  1580.  
  1581.  
  1582.  
  1583. ---------------------------------------------------------------------
  1584.  
  1585. AP_PositionSettings = MakeNewSubPage('AutoPlay+', 'Left', 0.489, 0.025, 0.02, 0.039)
  1586. MakeTitle(AP_PositionSettings, "AutoPlace Positions", 0.083)
  1587. AP_PositionButtons = {}
  1588. for unitOrder = 1, 6 do
  1589. AP_PositionButtons[unitOrder] = MakeDoubleButton(AP_PositionSettings, string.format("Select Unit %s Position", unitOrder), 0.083)
  1590. end
  1591. ShowPoints = MakeLargeButton(AP_PositionSettings, 'Show Positions', 0.125)
  1592.  
  1593. -----------------------
  1594.  
  1595. AP_SettingsSubPage = MakeNewSubPage('AutoPlay+', 'Left', 0.221, 0.06, 0.05, 0.045)
  1596. MakeTitle(AP_SettingsSubPage, 'Auto Place Units', 0.193)
  1597. AutoPlaceWave = MakeTextBox(AP_SettingsSubPage, 'Wave', 'Start On Wave:', 0.48)
  1598. AutoPlaceTurnOn = MakeCheckbox(AP_SettingsSubPage, 'Auto Place Units', 0.16)
  1599.  
  1600. -----------------------
  1601.  
  1602. AP_AutoSellUnitsSubPage = MakeNewSubPage('AutoPlay+', 'Left', 0.221, 0.06, 0.05, 0.045)
  1603. MakeTitle(AP_AutoSellUnitsSubPage, 'Auto Sell Units', 0.193)
  1604. AutoSellUnitsWave = MakeTextBox(AP_AutoSellUnitsSubPage, 'Wave', 'Sell On Wave:', 0.48)
  1605. AutoSellUnits = MakeCheckbox(AP_AutoSellUnitsSubPage, 'Auto Sell Units', 0.16)
  1606.  
  1607.  
  1608. -----------------------
  1609.  
  1610. AP_AutoSellFarmsSubPage = MakeNewSubPage('AutoPlay+', 'Left', 0.221, 0.06, 0.05, 0.045)
  1611. MakeTitle(AP_AutoSellFarmsSubPage, 'Auto Sell Farms', 0.193)
  1612. AutoSellFarmsWave = MakeTextBox(AP_AutoSellFarmsSubPage, 'Wave', 'Sell On Wave:', 0.48)
  1613. AutoSellFarms = MakeCheckbox(AP_AutoSellFarmsSubPage, 'Auto Sell Farms', 0.16)
  1614.  
  1615. -----------------------
  1616.  
  1617. AP_LeaveOnWaveSubPage = MakeNewSubPage('AutoPlay+', 'Left', 0.221, 0.06, 0.05, 0.045)
  1618. MakeTitle(AP_LeaveOnWaveSubPage, 'Auto Leave', 0.193)
  1619. AutoLeaveWaveON = MakeTextBox(AP_LeaveOnWaveSubPage, 'Wave', 'Leave On Wave:', 0.48)
  1620. AutoLeaveWave = MakeCheckbox(AP_LeaveOnWaveSubPage, 'Auto Leave', 0.16)
  1621.  
  1622. -----------------------
  1623.  
  1624.  
  1625. AP_AutoUpgradeSubPage = MakeNewSubPage('AutoPlay+', 'Right', 0.281, 0.06, 0.03, 0.045)
  1626. MakeTitle(AP_AutoUpgradeSubPage, 'Auto Upgrade Units', 0.155)
  1627. AutoUpgradeStartWave = MakeTextBox(AP_AutoUpgradeSubPage, 'Wave', 'Start On Wave:', 0.38)
  1628. FocusOnFarmAutoPlace = MakeCheckbox(AP_AutoUpgradeSubPage, 'Focus On Farms', 0.125)
  1629. AutoUpgradeCheckBox = MakeCheckbox(AP_AutoUpgradeSubPage, 'Auto Upgrade', 0.125)
  1630.  
  1631. -----------------------
  1632.  
  1633. AP_PlaceCapSubPage = MakeNewSubPage('AutoPlay+', 'Right', 0.418, 0.03, 0.025, 0.047)
  1634. MakeTitle(AP_PlaceCapSubPage, 'AutoPlace Cap', 0.096)
  1635. AP_PlaceCapSliders = {}
  1636. for sliderNum = 1,6 do
  1637. AP_PlaceCapSliders[sliderNum] = MakeSliderV2(AP_PlaceCapSubPage, 'Unit ' .. sliderNum, 0.095)
  1638. end
  1639.  
  1640. -----------------------
  1641.  
  1642. AP_UpgradeCapSubPage = MakeNewSubPage('AutoPlay+', 'Right', 0.418, 0.03, 0.03, 0.047)
  1643. MakeTitle(AP_UpgradeCapSubPage, 'AutoUpgrade Cap', 0.096)
  1644. AP_UpgradeCapSliders = {}
  1645. for sliderNum = 1,6 do
  1646. AP_UpgradeCapSliders[sliderNum] = MakeSliderV2(AP_UpgradeCapSubPage, 'Unit ' .. sliderNum, 0.095)
  1647. end
  1648.  
  1649. ---------------------------------------------------------------------
  1650.  
  1651. local Macro_ConfigSubPage = MakeNewSubPage('Macro', 'Left', 0.405, 0.03, 0.02, 0.01)
  1652. MakeTitle(Macro_ConfigSubPage, 'Config', 0.105)
  1653. local selectedMacroDDL = MakeDDL(Macro_ConfigSubPage, "Select Macro", 0.26)
  1654. local createMacroBox = MakeTextBox(Macro_ConfigSubPage, 'Macro Name', 'Create Macro', 0.26)
  1655. local deleteMacroButton = MakeLargeButton(Macro_ConfigSubPage, 'Delete Macro', 0.155)
  1656. local equipMacroUnitsButton = MakeLargeButton(Macro_ConfigSubPage, 'Equip Macro Units', 0.155)
  1657.  
  1658. -----------------------
  1659.  
  1660. Macro_MacroUnitsSubPage = MakeNewSubPage('Macro', 'Left', 0.361, 0.03, 0.02, 0.04)
  1661. MakeTitle(Macro_MacroUnitsSubPage, 'Macro Units', 0.115)
  1662. for unitOrder =1,6 do local macroUnitBlock = MakeTextBlock(Macro_MacroUnitsSubPage, string.format('Unit %s:', unitOrder), 0.1) MacroUnitsTextBlocks[unitOrder] = macroUnitBlock end
  1663. if not IsLobby then Macro_MacroUnitsSubPage.Visible = false end
  1664.  
  1665. -----------------------
  1666.  
  1667. local Macro_MacroSubPage = MakeNewSubPage('Macro', 'Left', 0.258, 0.06, 0.02, 0.05)
  1668. MakeTitle(Macro_MacroSubPage, 'Macro', 0.16)
  1669. local PlayMacro = MakeCheckbox(Macro_MacroSubPage, "Play Macro", 0.13)
  1670. local RecordMacro = MakeCheckbox(Macro_MacroSubPage, "Record Macro", 0.13)
  1671. local StepDelaySlider = MakeSlider(Macro_MacroSubPage, "Step Delay", 0.41)
  1672.  
  1673. -----------------------
  1674.  
  1675. local Macro_MacroStatusSubPage = MakeNewSubPage('Macro', 'Left', 0.258, 0.06, 0.02, 0.05)
  1676. local MacroStatusTitle = MakeTitle(Macro_MacroStatusSubPage, 'Macro Status: None', 0.16)
  1677. local Macro_ActionTXT = MakeTextBlock(Macro_MacroStatusSubPage, 'Action:', 0.14)
  1678. local Macro_TypeTXT = MakeTextBlock(Macro_MacroStatusSubPage, 'Type:', 0.14)
  1679. local Macro_UnitTXT = MakeTextBlock(Macro_MacroStatusSubPage, 'Unit:', 0.14)
  1680. local Macro_WaitTXT = MakeTextBlock(Macro_MacroStatusSubPage, 'Waiting for:', 0.14)
  1681.  
  1682.  
  1683. -----------------------
  1684.  
  1685. local Macro_MacroListSubPage = MakeNewSubPage('Macro', 'Right', 4.542, 0.03, 0, 0.002)
  1686.  
  1687. ---------------------------------------------------------------------
  1688.  
  1689. local Misc_WebhookSubPage = MakeNewSubPage('Misc', 'Right', 0.532, 0.03, 0.02, 0.02)
  1690. MakeTitle(Misc_WebhookSubPage, 'Discord Webhook', 0.082)
  1691. local webhookUrlBox = MakeTextBox(Misc_WebhookSubPage, 'discord url', 'Webhook', 0.2)
  1692. local webhookPingBox = MakeTextBox(Misc_WebhookSubPage, 'userID', 'Ping User', 0.2)
  1693. local ResultWebhook = MakeCheckbox(Misc_WebhookSubPage, "Result Webhook", 0.063)
  1694. local PingUserCHB = MakeCheckbox(Misc_WebhookSubPage, "Ping User", 0.063)
  1695. local PingRareCHB = MakeCheckbox(Misc_WebhookSubPage, "Ping On Secret Drop", 0.063)
  1696. local PingDefeatCHB = MakeCheckbox(Misc_WebhookSubPage, "Ping On Defeat", 0.063)
  1697.  
  1698. local TestWebhook = MakeLargeButton(Misc_WebhookSubPage, "Test Webhook", 0.12)
  1699.  
  1700. local Misc_MiscSubPage = MakeNewSubPage('Misc', 'Right', 0.344, 0.03, 0.02, 0.02)
  1701. MakeTitle(Misc_MiscSubPage, 'Misc', 0.13)
  1702. makeUHBigger = MakeCheckbox(Misc_MiscSubPage, 'Large Window', 0.095)
  1703. local hideAdditionalFrame = MakeCheckbox(Misc_MiscSubPage, "Hide Additional Frame", 0.095)
  1704.  
  1705. ---------------------------------------------------------------------
  1706.  
  1707.  
  1708.  
  1709. local lookingForANewPosition = false
  1710. for unitOrder, doubleButtonFrame in ipairs(AP_PositionButtons) do
  1711.  
  1712.  
  1713. local spawnCap = 6
  1714. local distanceBetweenUnits = 1.9
  1715.  
  1716. if EquippedUnitsAbout[ tostring(unitOrder) ] then
  1717. spawnCap = EquippedUnitsAbout[ tostring(unitOrder) ].spawn_cap
  1718.  
  1719. if EquippedUnitsAbout[ tostring(unitOrder) ].id == 'speedwagon' then distanceBetweenUnits = 4 end
  1720. end
  1721.  
  1722. doubleButtonFrame._resetbutton.MouseButton1Click:Connect(function()
  1723. if IsLobby then return end
  1724. local oldSave = GetSave('AutoPlacePositions')
  1725. if not oldSave[LevelData.map] then oldSave[LevelData.map] = {} end
  1726.  
  1727. oldSave[LevelData.map][ 'Unit' .. unitOrder ] = nil
  1728.  
  1729. Save("AutoPlacePositions", oldSave)
  1730. end)
  1731.  
  1732. if IsLobby then continue end
  1733.  
  1734. doubleButtonFrame._bigbutton.MouseButton1Click:Connect(function()
  1735. if IsLobby or lookingForANewPosition then return end lookingForANewPosition = true
  1736.  
  1737. local placeCapSaved = GetSave('AutoPlacesCap')[tostring(unitOrder)]
  1738.  
  1739. if EquippedUnitsAbout[ tostring(unitOrder) ] and EquippedUnitsAbout[ tostring(unitOrder) ].spawn_cap < placeCapSaved then
  1740. spawnCap = EquippedUnitsAbout[ tostring(unitOrder) ].spawn_cap
  1741. else
  1742. spawnCap = placeCapSaved
  1743. end
  1744.  
  1745. local objects = {}
  1746. for objectNumber = 0, spawnCap-1 do
  1747. local newObject = Instance.new('Part')
  1748. newObject.Anchored = true
  1749. newObject.CanCollide = false
  1750. newObject.Color = Color3.fromRGB(255,255,255)
  1751. newObject.Material = Enum.Material.Neon
  1752. newObject.Size = Vector3.new(1,1,1)
  1753. newObject.Transparency = 0.3
  1754. newObject.Parent = workspace
  1755.  
  1756. objects[tostring(objectNumber)] = newObject
  1757. end
  1758.  
  1759. local positionSaved
  1760. local mouseMoveConnection
  1761. local releasedConnection
  1762.  
  1763. mouseMoveConnection = RunS.RenderStepped:Connect(function(input)
  1764. local mouseRay = mouse.UnitRay
  1765. local RayParams = RaycastParams.new()
  1766. RayParams.FilterDescendantsInstances = {workspace._terrain}
  1767. RayParams.FilterType = Enum.RaycastFilterType.Include
  1768. RayParams.IgnoreWater = true
  1769.  
  1770. local result = workspace:Raycast(mouseRay.Origin, mouseRay.Direction * 100, RayParams)
  1771. if not result then return end
  1772. positionSaved = result.Position
  1773.  
  1774. for objectNumb, Object in pairs(objects) do
  1775. Object.Position = result.Position + Vector3.new( ( tonumber(objectNumb) % (spawnCap/2) ) * distanceBetweenUnits , 0, math.floor( tonumber(objectNumb) / spawnCap + 0.5) * distanceBetweenUnits )
  1776. end
  1777.  
  1778. end)
  1779.  
  1780. releasedConnection = UIS.InputBegan:Connect(function(input)
  1781. local usedMouse = input.UserInputType == Enum.UserInputType.MouseButton1
  1782. local usedTouch = input.UserInputType == Enum.UserInputType.Touch
  1783.  
  1784. if usedMouse or usedTouch then
  1785.  
  1786. releasedConnection:Disconnect()
  1787. mouseMoveConnection:Disconnect()
  1788.  
  1789. local mouseRay = mouse.UnitRay
  1790. local RayParams = RaycastParams.new()
  1791. RayParams.FilterDescendantsInstances = {workspace._terrain}
  1792. RayParams.FilterType = Enum.RaycastFilterType.Include
  1793. RayParams.IgnoreWater = true
  1794.  
  1795. local result = workspace:Raycast(mouseRay.Origin, mouseRay.Direction * 100, RayParams)
  1796. positionSaved = nil if result and result.Position then positionSaved = result.Position end
  1797.  
  1798. for objectNumb, object in pairs(objects) do
  1799. local Fading = TS:Create(object, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0), {Transparency = 1})
  1800. Fading:Play()
  1801. game.Debris:AddItem(object, 1.2)
  1802. if not result then continue end
  1803. object.Position = result.Position + Vector3.new( ( tonumber(objectNumb) % (spawnCap/2) ) * distanceBetweenUnits , 0, math.floor( tonumber(objectNumb) / spawnCap + 0.5) * distanceBetweenUnits )
  1804.  
  1805. end
  1806.  
  1807. lookingForANewPosition = false
  1808. if not positionSaved then return end
  1809.  
  1810. local oldSave = GetSave('AutoPlacePositions')
  1811. if not oldSave[LevelData.map] then oldSave[LevelData.map] = {} end
  1812.  
  1813. oldSave[LevelData.map][ 'Unit' .. unitOrder] = tostring(CFrame.new(positionSaved))
  1814.  
  1815. Save("AutoPlacePositions", oldSave)
  1816.  
  1817. end
  1818. end)
  1819.  
  1820. end)
  1821.  
  1822.  
  1823. end
  1824.  
  1825.  
  1826. local HideUHFrame = Instance.new('Frame', Misc_MiscSubPage)
  1827. HideUHFrame.BackgroundTransparency = 1
  1828. HideUHFrame.LayoutOrder = Orders[Misc_MiscSubPage]
  1829. HideUHFrame.Size = UDim2.new(1, 0, 0.144, 0)
  1830. Orders[Misc_MiscSubPage] += 1
  1831.  
  1832. FPSMax_Misc = MakeTextBox(Misc_MiscSubPage, 'Frames Per Second', 'FPS Limit', 0.31)
  1833.  
  1834. local HideUHLabel = Instance.new('TextLabel', HideUHFrame)
  1835. HideUHLabel.TextColor3 = Color3.fromRGB(255,255,255)
  1836. HideUHLabel.BackgroundTransparency = 1
  1837. HideUHLabel.Size = UDim2.new(0.796, 0, 0.8, 0)
  1838. HideUHLabel.Font = Enum.Font.GothamBold
  1839. HideUHLabel.TextScaled = true
  1840. HideUHLabel.Text = 'Hide MHUB'
  1841. HideUHLabel.Position = UDim2.new(0, 0, 0.5, 0)
  1842. HideUHLabel.AnchorPoint = Vector2.new(0, 0.5)
  1843. HideUHLabel.TextXAlignment = Enum.TextXAlignment.Left
  1844.  
  1845. local HideUHButton = Instance.new('TextButton', HideUHFrame)
  1846. HideUHButton.BackgroundColor3 = Color3.fromRGB(75, 75, 108)
  1847. HideUHButton.TextColor3 = Color3.fromRGB(255,255,255)
  1848. HideUHButton.BorderSizePixel = 0
  1849. HideUHButton.AnchorPoint = Vector2.new(0, 0.5)
  1850. HideUHButton.Size = UDim2.new(0.2, 0, 0.8, 0)
  1851. HideUHButton.Position = UDim2.new(0.8, 0, 0.5, 0)
  1852. HideUHButton.Font = Enum.Font.GothamBlack
  1853. HideUHButton.TextScaled = true
  1854. HideUHButton.Text = 'U'
  1855. MakeUICorner(0.15, HideUHButton)
  1856.  
  1857. local HideUHStroke = Instance.new('UIStroke', HideUHButton)
  1858. HideUHStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1859. HideUHStroke.Color = Color3.fromRGB(189, 189, 255)
  1860. HideUHStroke.LineJoinMode = Enum.LineJoinMode.Round
  1861. HideUHStroke.Thickness = 1
  1862.  
  1863. local chosing = false
  1864. HideUHButton.MouseButton1Click:Connect(function()
  1865. if chosing then return end
  1866. chosing = true
  1867. HideUHButton.Text = "..."
  1868.  
  1869.  
  1870. local chosenButton
  1871. chosenButton = UIS.InputBegan:Connect(function(input)
  1872. if input.UserInputType ~= Enum.UserInputType.Keyboard then return end
  1873. chosenButton:Disconnect()
  1874. chosing = false
  1875. Save('Hide Key', input.KeyCode.Name)
  1876.  
  1877. HideUHButton.Text = input.KeyCode.Name
  1878.  
  1879. end)
  1880.  
  1881.  
  1882. end)
  1883. HideUHButton.Text = UIS:GetStringForKeyCode( GetSave('Hide Key') )
  1884.  
  1885. UIS.InputBegan:Connect(function(input, gameprocess)
  1886. if input.KeyCode.Name ~= GetSave('Hide Key') or gameprocess then return end
  1887. MainFrame.Visible = not MainFrame.Visible
  1888. end)
  1889.  
  1890. hideAdditionalFrame.MouseButton1Click:Connect(function()
  1891. local enabled = not GetSave(hideAdditionalFrame.Name)
  1892. Save(hideAdditionalFrame.Name, enabled)
  1893.  
  1894. hideAdditionalFrame.Parent.BackgroundColor3 = checkBoxColors[enabled]
  1895.  
  1896. additionalFrame.Visible = not enabled
  1897. end)
  1898. if GetSave(hideAdditionalFrame.Name) then additionalFrame.Visible = false hideAdditionalFrame.Parent.BackgroundColor3 = checkBoxColors[true] end
  1899.  
  1900.  
  1901. webhookUrlBox.FocusLost:Connect(function(enterPressed)
  1902. if not enterPressed or webhookUrlBox.Text == '' then webhookUrlBox.Text = GetSave('Discord Url') return end
  1903.  
  1904. Save("Discord Url", webhookUrlBox.Text)
  1905.  
  1906. end)
  1907. webhookUrlBox.TextSize = 20
  1908. webhookUrlBox.TextScaled = false
  1909. webhookUrlBox.Text = GetSave("Discord Url")
  1910.  
  1911. webhookPingBox.FocusLost:Connect(function(enterPressed)
  1912. if not enterPressed or webhookPingBox.Text == '' or not tonumber(webhookPingBox.Text) then webhookPingBox.Text = GetSave('Discord UserID') return end
  1913.  
  1914. Save("Discord UserID", webhookPingBox.Text)
  1915.  
  1916. end)
  1917. webhookPingBox.Text = GetSave("Discord UserID")
  1918.  
  1919.  
  1920. FPSMax_Misc.FocusLost:Connect(function()
  1921. if FPSMax_Misc.Text == '' or not tonumber(FPSMax_Misc.Text) or tonumber(FPSMax_Misc.Text) < 1 then FPSMax_Misc.Text = GetSave('FPS_LIMIT') return end
  1922. pcall(function()
  1923.  
  1924. if setfpsmax then
  1925. setfpsmax( tonumber(FPSMax_Misc.Text) )
  1926. else
  1927.  
  1928. local maxFPS = math.clamp(tonumber(FPSMax_Misc.Text), 0, 60)
  1929. local notChangedfps
  1930.  
  1931. notChangedfps = FPSMax_Misc.FocusLost:Connect(function()
  1932. if FPSMax_Misc.Text == '' or not tonumber(FPSMax_Misc.Text) or tonumber(FPSMax_Misc.Text) < 1 then return end
  1933. notChangedfps:Disconnect()
  1934. notChangedfps = nil
  1935. end)
  1936.  
  1937. while notChangedfps do
  1938. local t0 = tick()
  1939. RunS.Heartbeat:Wait()
  1940. repeat until (t0 + 1/maxFPS) < tick()
  1941. end
  1942. end
  1943.  
  1944. end)
  1945. Save("FPS_LIMIT", tonumber(FPSMax_Misc.Text) )
  1946. end)
  1947. FPSMax_Misc.Text = GetSave("FPS_LIMIT")
  1948. pcall(function() setfpsmax( GetSave("FPS_LIMIT") ) end)
  1949.  
  1950.  
  1951.  
  1952.  
  1953. TestWebhook.MouseButton1Click:Connect(function()
  1954. local Time = os.date("%X")
  1955. local willBePinged = GetSave(PingDefeatCHB.Name) or GetSave(PingRareCHB.Name) or GetSave(PingUserCHB.Name)
  1956. local userID = "" if GetSave("Discord UserID") ~= "" and willBePinged then userID = string.format("<@%s>", GetSave("Discord UserID")) end
  1957. local discordUrl = GetSave("Discord Url")
  1958.  
  1959. local data = {
  1960. ["content"] = userID,
  1961. ["embeds"] = {
  1962.  
  1963. {
  1964. ["title"] = 'Anime Adventures',
  1965. ['color'] = 11513855,
  1966. ['footer'] = {
  1967. ['text'] = string.format("// Made by MHUB (%s)", Time),
  1968. },
  1969. ['fields'] = {
  1970. {
  1971. ['name'] = 'Test Webhook',
  1972. ['value'] = 'Hi! <3'
  1973. }
  1974. }
  1975.  
  1976. }
  1977.  
  1978.  
  1979.  
  1980. }
  1981. }
  1982.  
  1983. data = HttpService:JSONEncode(data)
  1984. local headers = {["content-type"] = "application/json"}
  1985. local request = http_request or request or HttpPost or syn.request or http.request
  1986. local dataSend = {Url = discordUrl, Body = data, Method = "POST", Headers = headers}
  1987. warn("Sending test webhook...")
  1988.  
  1989. pcall(function() request(dataSend) end)
  1990.  
  1991. end)
  1992.  
  1993. local MacroTabs = Instance.new('Frame', Macro_MacroListSubPage)
  1994. MacroTabs.BackgroundTransparency = 1
  1995. MacroTabs.LayoutOrder = -999
  1996. MacroTabs.Size = UDim2.new(1, 0, 0.0092, 0)
  1997. MacroTabs.Name = 'Macro Tabs'
  1998.  
  1999. local MacroTabsListLayout = Instance.new('UIListLayout', MacroTabs)
  2000. MacroTabsListLayout.Padding = UDim.new(0,0)
  2001. MacroTabsListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  2002. MacroTabsListLayout.FillDirection = Enum.FillDirection.Horizontal
  2003. MacroTabsListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  2004. MacroTabsListLayout.VerticalAlignment = Enum.VerticalAlignment.Center
  2005.  
  2006. local RightOrders = {Main = 1, Tower = 2, Raid = 3, Portal = 4, Other = 5}
  2007. local viewingTab = nil
  2008. for tabName, mapsList in pairs(macroMapList) do
  2009.  
  2010. local MacroList = Instance.new('Frame', Macro_MacroListSubPage)
  2011. MacroList.BackgroundTransparency = 1
  2012. MacroList.Size = UDim2.new(1, 0, 0.984, 0)
  2013. MacroList.Name = tabName
  2014. MacroList.Visible = false
  2015. makeUIList(0, MacroList)
  2016.  
  2017. Orders[MacroList] = 0
  2018.  
  2019. local newTab = Instance.new('TextButton', MacroTabs)
  2020. newTab.BackgroundTransparency = 1
  2021. newTab.BackgroundColor3 = Color3.fromRGB(255,255,255)
  2022. newTab.BorderSizePixel = 0
  2023. newTab.Size = UDim2.new(0.206, 0, 1, 0)
  2024. newTab.Text = ""
  2025. newTab.Name = tabName
  2026. newTab.LayoutOrder = RightOrders[tabName]
  2027. newTab.ZIndex = 5
  2028.  
  2029. newTab.MouseEnter:Connect(function()
  2030. local TweenButton = TS:Create(newTab, newPageButtonBCInfo, {BackgroundTransparency = 0.9})
  2031. TweenButton:Play()
  2032. end)
  2033.  
  2034. newTab.MouseLeave:Connect(function()
  2035. local TweenButton = TS:Create(newTab, newPageButtonBCInfo, {BackgroundTransparency = 1})
  2036. TweenButton:Play()
  2037. end)
  2038.  
  2039. newTab.MouseButton1Click:Connect(function()
  2040. if viewingTab == newTab then return end
  2041.  
  2042. Macro_MacroListSubPage[viewingTab.Name].Visible = false
  2043. MacroList.Visible = true
  2044.  
  2045. viewingTab.bottomLine.Visible = false
  2046. newTab.bottomLine.Visible = true
  2047.  
  2048. viewingTab = newTab
  2049.  
  2050. end)
  2051.  
  2052. local bottomLine = Instance.new('Frame', newTab) bottomLine.Name = 'bottomLine'
  2053. bottomLine.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2054. bottomLine.BorderSizePixel = 0
  2055. bottomLine.Size = UDim2.new(1, 0, 0.05, 0)
  2056. bottomLine.AnchorPoint = Vector2.new(0, 1)
  2057. bottomLine.Position = UDim2.new(0, 0, 1, 0)
  2058. bottomLine.Visible = false
  2059.  
  2060. local tabTxtLabel = Instance.new('TextLabel', newTab)
  2061. tabTxtLabel.BackgroundTransparency = 1
  2062. tabTxtLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  2063. tabTxtLabel.Size = UDim2.new(1, 0, 0.8, 0)
  2064. tabTxtLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
  2065. tabTxtLabel.Font = Enum.Font.GothamBlack
  2066. tabTxtLabel.TextScaled = true
  2067. tabTxtLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  2068. tabTxtLabel.Text = tabName
  2069.  
  2070. for _, mapName in ipairs(mapsList) do
  2071.  
  2072. local newDDLMacroMap = MakeDDL(MacroList, mapName, 0.023)
  2073.  
  2074. newDDLMacroMap.MouseButton1Click:Connect(function()
  2075.  
  2076. local MacrosList = listfiles('MHUB\\Anime Adventures')
  2077.  
  2078. local items = {}
  2079.  
  2080. for _, macro in ipairs(MacrosList) do
  2081. local macroName = string.match(string.sub(macro, 28), "[^.]+")
  2082.  
  2083. table.insert(items, macroName)
  2084.  
  2085. end
  2086.  
  2087. --GetDDL(newDDLMacroMap, items, false, 'Selected Macro Map', mapName, tabName)
  2088.  
  2089. end)
  2090.  
  2091. --local fillDDL = GetSave('Selected Macro Map')
  2092.  
  2093. --DDLlabel(newDDLMacroMap, fillDDL[tabName][mapName])
  2094.  
  2095.  
  2096. end
  2097.  
  2098. end
  2099.  
  2100. viewingTab = Macro_MacroListSubPage['Macro Tabs']['Main']
  2101. viewingTab.bottomLine.Visible = true
  2102. Macro_MacroListSubPage['Main'].Visible = true
  2103.  
  2104. local TypesAndMeaning = {
  2105. ['ChangeTargeting'] = "ChangeTargeting",
  2106. ['Upgrade'] = "Upgrade",
  2107. ['PlaceTower'] = "PlaceTower",
  2108. }
  2109. local LastMacroStartedAt = nil
  2110.  
  2111.  
  2112. local function RecordMacroFunc ()
  2113. if not LevelData then return end
  2114.  
  2115. local MacroFile = GetSave('Selected Macro')
  2116.  
  2117. local macroExist = isfile('YHUB\\ALS\\' .. MacroFile )
  2118. local macroExistJson = isfile('YHUB\\ALS\\' .. MacroFile .. '.json')
  2119.  
  2120. if macroExistJson then MacroFile = 'YHUB\\ALS\\' .. MacroFile .. '.json'
  2121. elseif macroExist then MacroFile = 'YHUB\\ALS\\' .. MacroFile
  2122. else RecordingMacro = false RecordMacro.Parent.BackgroundColor3 = checkBoxColors[false] return
  2123. end
  2124.  
  2125. MacroStatusTitle.Text = 'Macro Status: Recording'
  2126. Macro_ActionTXT.Text = "Action:"
  2127.  
  2128. local connections = {}
  2129. local Steps = {}
  2130. local Step = 1
  2131.  
  2132.  
  2133. connections[1] = workspace._UNITS.ChildAdded:Connect(function(child)
  2134. if child:WaitForChild('_stats'):WaitForChild('player').Value ~= player or not child._stats:WaitForChild('uuid') or not child._stats:WaitForChild('id') then return end
  2135. local unitName = nil
  2136.  
  2137. for equippedUnitUUID, equippedUnitAbout in pairs(EquippedUnits) do
  2138. if equippedUnitUUID ~= child._stats.uuid.Value or equippedUnitAbout.id ~= child._stats.id.Value then continue end
  2139. unitName = equippedUnitAbout.id
  2140. end
  2141.  
  2142. if not unitName then return end
  2143.  
  2144. local unitParams = RaycastParams.new()
  2145. unitParams.FilterDescendantsInstances = {workspace._terrain.ground, workspace._terrain.hill}
  2146. unitParams.FilterType = Enum.RaycastFilterType.Include
  2147. unitParams.IgnoreWater = true
  2148.  
  2149. local pos = workspace:Raycast(child:WaitForChild('_shadow').Position, Vector3.new(0,-10,0), unitParams)
  2150.  
  2151. Steps[tostring(Step)] = {
  2152. ['money'] = child._stats.total_spent.Value;
  2153. ['type'] = 'PlaceTower';
  2154. ['cframe'] = tostring(CFrame.new(pos.Position));
  2155. ['unit'] = unitName
  2156. }
  2157.  
  2158. Macro_ActionTXT.Text = string.format('Action: %s', Step)
  2159. Macro_TypeTXT.Text = string.format("Type: %s", TypesAndMeaning['PlaceTower'])
  2160. Macro_UnitTXT.Text = string.format("Unit: %s", unitName)
  2161. Macro_WaitTXT.Text = string.format("Waiting for: %s$", child._stats.total_spent.Value)
  2162.  
  2163. Step +=1
  2164.  
  2165. local lastSpent = child._stats.total_spent.Value
  2166. local upgradeConnection
  2167. local priorityConnection
  2168.  
  2169. priorityConnection = child._stats.priority.Changed:Connect(function()
  2170.  
  2171. Steps[tostring(Step)] = {
  2172. ['money'] = 0;
  2173. ['type'] = 'ChangeTargeting;
  2174. ['pos'] = tostring(child._shadow.CFrame);
  2175. ['unit'] = unitName
  2176. }
  2177.  
  2178. Macro_ActionTXT.Text = string.format('Action: %s', Step)
  2179. Macro_TypeTXT.Text = string.format("Type: %s", TypesAndMeaning['ChangeTargeting])
  2180. Macro_UnitTXT.Text = string.format("Unit: %s", unitName)
  2181. Macro_WaitTXT.Text = "Waiting for: 0$"
  2182.  
  2183. Step +=1
  2184.  
  2185. end)
  2186.  
  2187. upgradeConnection = child._stats.total_spent.Changed:Connect(function(value)
  2188.  
  2189. Steps[tostring(Step)] = {
  2190. ['money'] = value - lastSpent;
  2191. ['type'] = 'upgrade_unit_ingame';
  2192. ['pos'] = tostring(child._shadow.CFrame);
  2193. }
  2194.  
  2195. Macro_ActionTXT.Text = string.format('Action: %s', Step)
  2196. Macro_TypeTXT.Text = string.format("Type: %s", TypesAndMeaning['upgrade_unit_ingame'])
  2197. Macro_UnitTXT.Text = string.format("Unit: %s", unitName)
  2198. Macro_WaitTXT.Text = string.format("Waiting for: %s$", value - lastSpent)
  2199.  
  2200. Step +=1
  2201. lastSpent = value
  2202.  
  2203. end)
  2204. table.insert(connections, upgradeConnection)
  2205.  
  2206.  
  2207.  
  2208. end)
  2209.  
  2210. connections[2] = workspace._UNITS.ChildRemoved:Connect(function(child)
  2211. if child:WaitForChild('_stats').player.Value ~= player or not child._stats:FindFirstChild('uuid') then return end
  2212. if not child:FindFirstChild('_shadow') then return end
  2213.  
  2214. local unitName = nil
  2215.  
  2216. for equippedUnitUUID, equippedUnitAbout in pairs(EquippedUnits) do
  2217. if equippedUnitUUID ~= child._stats.uuid.Value or equippedUnitAbout.id ~= child._stats.id.Value then continue end
  2218. unitName = equippedUnitAbout.id
  2219. end
  2220.  
  2221. if not unitName then return end
  2222.  
  2223. Steps[tostring(Step)] = {
  2224. ['money'] = player._stats.resource.Value;
  2225. ['type'] = 'sell_unit_ingame';
  2226. ['pos'] = tostring(child._shadow.CFrame);
  2227. }
  2228.  
  2229. Macro_ActionTXT.Text = string.format('Action: %s', Step)
  2230. Macro_TypeTXT.Text = string.format("Type: %s", TypesAndMeaning['sell_unit_ingame'])
  2231. Macro_UnitTXT.Text = string.format("Unit: %s", unitName)
  2232. Macro_WaitTXT.Text = string.format("Waiting for: %s$", math.ceil(player._stats.resource.Value) )
  2233.  
  2234.  
  2235. Step+=1
  2236.  
  2237. end)
  2238.  
  2239.  
  2240. repeat task.wait() until not RecordingMacro
  2241.  
  2242. MacroStatusTitle.Text = 'Macro Status: Recorded'
  2243. Macro_ActionTXT.Text = 'Action:'
  2244. Macro_TypeTXT.Text = 'Type:'
  2245. Macro_UnitTXT.Text = "Unit:"
  2246. Macro_WaitTXT.Text = "Waiting for:"
  2247.  
  2248. for _, connection in ipairs(connections) do
  2249. if connection then connection:Disconnect() end
  2250. end
  2251.  
  2252. writefile(MacroFile, HttpService:JSONEncode(Steps))
  2253.  
  2254. end
  2255.  
  2256. local TabsAndValues
  2257.  
  2258. local function PlayMacroFunc ()
  2259. if RecordingMacro or not LevelData then return end
  2260. local MacroFile = GetSave('Selected Macro')
  2261.  
  2262. if LevelData.floor_num then
  2263. MacroFile = GetSave('Selected Macro Map')['Tower'][LevelData._location_name]
  2264. elseif LevelData._is_map_or_portal_level then
  2265. MacroFile = GetSave('Selected Macro Map')['Portal'][LevelData._location_name]
  2266. else
  2267. MacroFile = GetSave('Selected Macro Map')['Raid'][LevelData._location_name]
  2268.  
  2269. if not MacroFile then MacroFile = GetSave('Selected Macro Map')['Other'][LevelData._location_name] or GetSave('Selected Macro Map')['Other'][LevelData.name] end
  2270. if not MacroFile and LevelData._gamemode ~= 'raid' then MacroFile = GetSave('Selected Macro Map')['Main'][LevelData._location_name] end
  2271. end
  2272. if not MacroFile then MacroFile = GetSave('Selected Macro') end
  2273.  
  2274. if not MacroFile then return end
  2275.  
  2276.  
  2277. local macroExist = isfile('MHUB\\Anime Adventures\\' .. MacroFile )
  2278. local macroExistJson = isfile('MHUB\\Anime Adventures\\' .. MacroFile .. '.json')
  2279.  
  2280. if macroExistJson then MacroFile = 'MHUB\\Anime Adventures\\' .. MacroFile .. '.json'
  2281. elseif macroExist then MacroFile = 'MHUB\\Anime Adventures\\' .. MacroFile
  2282. else return
  2283. end
  2284.  
  2285. MacroFile = HttpService:JSONDecode( readfile(MacroFile) )
  2286. local TotalActions = 0
  2287. local VisibleActions = 0
  2288. local currentAction = 1
  2289.  
  2290. for actionOrder, AboutAction in pairs(MacroFile) do
  2291. if type(AboutAction) ~= 'table' then continue end
  2292.  
  2293. if tonumber(actionOrder) and tonumber(actionOrder) > TotalActions then
  2294. TotalActions = tonumber(actionOrder)
  2295. end
  2296.  
  2297. if not AboutAction['type'] or not TypesAndMeaning[ AboutAction['type'] ] then continue end
  2298. if not AboutAction['money'] then AboutAction.unit = nil AboutAction.pos = nil AboutAction.cframe = nil AboutAction['type'] = nil continue end
  2299. VisibleActions += 1
  2300.  
  2301.  
  2302. end
  2303.  
  2304. LastMacroStartedAt = tick()
  2305. local CurrentMacroStartedAt = LastMacroStartedAt
  2306. local MacroEnded = false
  2307. MacroStatusTitle.Text = 'Macro Status: Playing'
  2308.  
  2309. task.spawn(function()
  2310.  
  2311. for actionNumb = 1, TotalActions do
  2312. if LastMacroStartedAt ~= CurrentMacroStartedAt then break end
  2313.  
  2314. local AboutAction = MacroFile[ tostring(actionNumb) ] if not AboutAction then continue end
  2315. local unitName = AboutAction['unit']
  2316. local unit = nil
  2317. local unitUUID
  2318. if not TypesAndMeaning[ AboutAction['type'] ] then continue end
  2319.  
  2320. if AboutAction['type'] ~= 'PlaceTower' then
  2321. local distance = 10 --if AboutAction['type'] == 'sell_unit_ingame' then distance = 0.3 end
  2322.  
  2323. for _, unitInWorkspace in ipairs(workspace._UNITS:GetChildren()) do
  2324. if not unitInWorkspace:FindFirstChild('_shadow') then continue end
  2325. local newDistance = ( unitInWorkspace._shadow.Position - StringToCFrame(AboutAction.pos).Position ).Magnitude
  2326. if unitInWorkspace:WaitForChild('_stats'):WaitForChild('player').Value ~= player or distance < newDistance then continue end
  2327.  
  2328. local cappedUpgrade = false
  2329.  
  2330. if AboutAction['type'] == 'upgrade_unit_ingame' then
  2331.  
  2332.  
  2333. for equippedslot, unitAbout in pairs(EquippedUnitsAbout) do
  2334. if unitAbout.id ~= unitInWorkspace._stats.id.Value then continue end
  2335. if unitAbout.uuid ~= unitInWorkspace._stats.uuid.Value then continue end
  2336. if #unitAbout.upgrades <= unitInWorkspace._stats.upgrade.Value then cappedUpgrade = true break end
  2337. end
  2338.  
  2339. end
  2340.  
  2341. if cappedUpgrade then continue end
  2342.  
  2343. distance = newDistance
  2344. unit = unitInWorkspace
  2345. unitName = unitInWorkspace.Name
  2346.  
  2347. end
  2348. else
  2349. for uuid, aboutUnit in pairs(EquippedUnits) do
  2350. if aboutUnit.id ~= unitName then continue end
  2351. unitName = aboutUnit.id
  2352. unitUUID = uuid
  2353. break
  2354. end
  2355. end
  2356.  
  2357. if not unitName then continue end
  2358.  
  2359. Macro_ActionTXT.Text = string.format('Action: %s/%s', currentAction, VisibleActions)
  2360. Macro_TypeTXT.Text = string.format("Type: %s", TypesAndMeaning[ AboutAction['type'] ])
  2361. Macro_UnitTXT.Text = string.format("Unit: %s", unitName)
  2362. Macro_WaitTXT.Text = string.format("Waiting for: %s$", math.ceil(AboutAction['money']) )
  2363. currentAction += 1
  2364.  
  2365. repeat task.wait()
  2366. until player._stats.resource.Value >= AboutAction.money or LastMacroStartedAt ~= CurrentMacroStartedAt task.wait(0.1)
  2367. if LastMacroStartedAt ~= CurrentMacroStartedAt then break end
  2368.  
  2369. if AboutAction['type'] == 'PlaceTower' then
  2370. local unitsBefore = 0
  2371. for _, unitInWorkspace in ipairs(workspace._UNITS:GetChildren()) do
  2372. if not unitInWorkspace:FindFirstChild('_shadow') then continue end
  2373. if not unitInWorkspace:FindFirstChild("_stats"):FindFirstChild('id') or unitInWorkspace._stats.id.Value ~= unitName then continue end
  2374. if unitInWorkspace._stats:WaitForChild('player').Value ~= player or unitInWorkspace._stats:WaitForChild('uuid').Value ~= unitUUID then continue end
  2375. unitsBefore += 1
  2376. end
  2377.  
  2378. task.spawn(function() Event['PlaceTower']:InvokeServer( unitUUID, StringToCFrame( AboutAction['cframe'] ) ) end)
  2379.  
  2380. local tries = 0
  2381. repeat
  2382. task.wait(0.1)
  2383. tries += 1
  2384. local unitsCounted = 0
  2385.  
  2386. for _, unitInWorkspace in ipairs(workspace._UNITS:GetChildren()) do
  2387. if not unitInWorkspace:FindFirstChild('_shadow') then continue end
  2388. if not unitInWorkspace:FindFirstChild("_stats"):FindFirstChild('id') or unitInWorkspace._stats.id.Value ~= unitName then continue end
  2389. if unitInWorkspace._stats:WaitForChild('player').Value ~= player or unitInWorkspace._stats:WaitForChild('uuid').Value ~= unitUUID then continue end
  2390. unitsCounted += 1
  2391. end
  2392.  
  2393. if unitsCounted ~= unitsBefore then unitsBefore = -1 end
  2394. until unitsBefore == -1 or tries >= 25
  2395.  
  2396. else
  2397. task.spawn(function() Event[ AboutAction['type'] ]:InvokeServer(unit) end)
  2398. end
  2399.  
  2400. task.wait( math.clamp( tonumber(GetSave('Step Delay')), 0.2, 10) )
  2401. end
  2402.  
  2403. MacroEnded = true
  2404.  
  2405. end)
  2406.  
  2407.  
  2408. repeat task.wait() until MacroEnded or LastMacroStartedAt ~= CurrentMacroStartedAt
  2409.  
  2410. Macro_TypeTXT.Text = "Type:"
  2411. Macro_UnitTXT.Text = "Unit:"
  2412. Macro_WaitTXT.Text = "Waiting for:"
  2413.  
  2414. if LastMacroStartedAt == CurrentMacroStartedAt then
  2415. MacroStatusTitle.Text = 'Macro Status: Ended'
  2416. Macro_ActionTXT.Text = string.format('Action: %s/%s', TotalActions, TotalActions)
  2417. else
  2418. MacroStatusTitle.Text = 'Macro Status: None'
  2419. Macro_ActionTXT.Text = 'Action:'
  2420. end
  2421.  
  2422. end
  2423.  
  2424.  
  2425. RecordMacro.MouseButton1Click:Connect(function()
  2426. if LastMacroStartedAt ~= nil then return end
  2427.  
  2428. RecordingMacro = not RecordingMacro
  2429. RecordMacro.Parent.BackgroundColor3 = checkBoxColors[RecordingMacro]
  2430. if not RecordingMacro then return end
  2431.  
  2432. RecordMacroFunc()
  2433.  
  2434. end)
  2435.  
  2436. PlayMacro.MouseButton1Click:Connect(function()
  2437. if RecordingMacro then return end
  2438.  
  2439. local enabled = not GetSave(PlayMacro.Name)
  2440. Save(PlayMacro.Name, enabled)
  2441.  
  2442. PlayMacro.Parent.BackgroundColor3 = checkBoxColors[enabled]
  2443.  
  2444. if not enabled then LastMacroStartedAt = nil return end
  2445.  
  2446. PlayMacroFunc()
  2447. end)
  2448.  
  2449. if GetSave(PlayMacro.Name) then PlayMacro.Parent.BackgroundColor3 = checkBoxColors[true] spawn(function() PlayMacroFunc() end) end
  2450.  
  2451. local function MoveSlider(slider, min, max, step, abbr)
  2452.  
  2453. local xOffset = math.floor((mouse.X - slider.AbsolutePosition.X) + 0.5)
  2454. local xOffsetClamped = math.clamp(xOffset, 0, slider.AbsoluteSize.X )
  2455.  
  2456. local roundedAbsSize = math.floor(slider.AbsoluteSize.X + 0.5)
  2457. local RoundedOffsetClamped = math.floor(xOffsetClamped + 0.5)
  2458.  
  2459. local sliderValue = RoundedOffsetClamped / roundedAbsSize
  2460. local newValue = sliderValue * max
  2461.  
  2462. local resultValue = math.clamp( newValue - newValue % step, min, max)
  2463. local intervalValue = math.clamp( newValue, min, max)
  2464. if intervalValue-resultValue >= step/2 and resultValue >0 then resultValue += step end
  2465.  
  2466. if resultValue <1 then resultValue = math.floor( ((resultValue*100)+0.5) )/100 else resultValue = math.floor(resultValue) end
  2467.  
  2468.  
  2469.  
  2470. slider.Frame.Size = UDim2.new(math.clamp(resultValue/max, 0, 1), 0, 1, 0)
  2471.  
  2472. if not slider.Parent:FindFirstChild('TextBox') then
  2473. slider.Parent.AmountLabel.Text = string.format("[%s/%s]", resultValue, max)
  2474. else
  2475. slider.Parent.TextBox.Text = string.format("%s %s", resultValue, abbr)
  2476. end
  2477.  
  2478.  
  2479. return resultValue
  2480.  
  2481. end
  2482.  
  2483. local function SliderBoxFunc (sliderFrame, keyName, abbr, max)
  2484. local newStepDelay = tonumber(sliderFrame.TextBox.Text)
  2485. if not newStepDelay or newStepDelay <=0 then return end
  2486. sliderFrame.TextBox.Text = sliderFrame.TextBox.Text .. ' ' .. abbr
  2487.  
  2488. Save(keyName, newStepDelay)
  2489.  
  2490. sliderFrame.slider.Frame.Size = UDim2.new(math.clamp(newStepDelay /max, 0, 1), 0, 1, 0)
  2491. end
  2492.  
  2493. StepDelaySlider.TextBox.FocusLost:Connect(function()
  2494. SliderBoxFunc(StepDelaySlider, "Step Delay", 'seconds', 1)
  2495. end)
  2496. StepDelaySlider.TextBox.Text = string.format("%s seconds", GetSave("Step Delay"))
  2497. StepDelaySlider.slider.Frame.Size = UDim2.new(math.clamp(GetSave("Step Delay"), 0, 1), 0, 1, 0)
  2498.  
  2499.  
  2500. local function sliderFunc (slideFrame, keyName, min, max, step, abbr)
  2501. local connections = {}
  2502.  
  2503. local resultValue = 0
  2504.  
  2505. connections[1] = mouse.Move:Connect(function()
  2506. resultValue = MoveSlider(slideFrame.slider, min, max, step, abbr)
  2507. end)
  2508.  
  2509. connections[2] = mouse.Button1Up:Connect(function()
  2510. for _,connection in ipairs(connections) do if connection then connection:Disconnect() end end
  2511.  
  2512. if not tonumber(abbr) then
  2513. Save(keyName, resultValue)
  2514. else
  2515. local oldSave = GetSave(keyName)
  2516. oldSave[tostring(abbr)] = resultValue
  2517.  
  2518. Save(keyName, oldSave)
  2519. end
  2520. end)
  2521.  
  2522. connections[3] = slideFrame.slider.SliderButton.MouseButton1Up:Connect(function()
  2523. for _,connection in ipairs(connections) do if connection then connection:Disconnect() end end
  2524.  
  2525. if not tonumber(abbr) then
  2526. Save(keyName, resultValue)
  2527. else
  2528. local oldSave = GetSave(keyName)
  2529. oldSave[tostring(abbr)] = resultValue
  2530.  
  2531. Save(keyName, oldSave)
  2532. end
  2533. end)
  2534. end
  2535.  
  2536. StepDelaySlider.slider.SliderButton.MouseButton1Down:Connect(function()
  2537. sliderFunc(StepDelaySlider, "Step Delay", 0, 1, 0.01, 'seconds')
  2538.  
  2539. end)
  2540.  
  2541. selectedMacroDDL.MouseButton1Click:Connect(function()
  2542. local MacrosList = listfiles('MHUB\\Anime Adventures')
  2543.  
  2544. local items = {}
  2545.  
  2546. for _, macro in ipairs(MacrosList) do
  2547. local macroName = string.match(string.sub(macro, 28), "[^.]+")
  2548.  
  2549. table.insert(items, macroName)
  2550.  
  2551. end
  2552.  
  2553. GetDDL(selectedMacroDDL, items, false, 'Selected Macro')
  2554. end)
  2555.  
  2556. DDLlabel(selectedMacroDDL, GetSave('Selected Macro'))
  2557. if IsLobby then getMacroUnits(GetSave('Selected Macro'), MacroUnitsTextBlocks) end
  2558.  
  2559.  
  2560. createMacroBox.FocusLost:Connect(function(enterPressed)
  2561. if not enterPressed and createMacroBox.Text ~= '' then return end
  2562.  
  2563. writefile('MHUB\\Anime Adventures\\' .. createMacroBox.Text .. '.json', HttpService:JSONEncode({}))
  2564. end)
  2565.  
  2566. deleteMacroButton.MouseButton1Click:Connect(function()
  2567.  
  2568. local item = selectedMacroDDL.TextLabel.Text
  2569. if item == "" or item == "None" then return end
  2570.  
  2571. local macroExist = isfile('MHUB\\Anime Adventures\\' .. item)
  2572. local macroExistjson = isfile('MHUB\\Anime Adventures\\' .. item .. '.json')
  2573. if macroExistjson then item = item .. '.json' end
  2574.  
  2575. if not macroExist and not macroExistjson then return end
  2576.  
  2577. delfile('MHUB\\Anime Adventures\\' .. item)
  2578.  
  2579. Save("Selected Macro", "")
  2580. DDLlabel(selectedMacroDDL, GetSave('Selected Macro'))
  2581.  
  2582. end)
  2583.  
  2584. equippingMacroUnits = false
  2585. equipMacroUnitsButton.MouseButton1Click:Connect(function()
  2586. if equippingMacroUnits or GetSave('Selected Macro') == "" then return end
  2587. equippingMacroUnits = true
  2588.  
  2589. local macroSelected = GetSave('Selected Macro')
  2590.  
  2591. local macroExist = isfile('MHUB\\Anime Adventures\\' .. macroSelected)
  2592. local macroExistjson = isfile('MHUB\\Anime Adventures\\' .. macroSelected .. '.json')
  2593. if macroExistjson then macroSelected = macroSelected .. '.json' end
  2594.  
  2595. if not macroExist and not macroExistjson then equippingMacroUnits = false return end
  2596.  
  2597. local MacroAbout = HttpService:JSONDecode( readfile( 'MHUB\\Anime Adventures\\' .. macroSelected) )
  2598. Event['unequip_all']:InvokeServer()
  2599.  
  2600. local alrEquipped = {}
  2601. local unitsFromMacro = {}
  2602. for _, macroTabl in pairs(MacroAbout) do
  2603. if not macroTabl['type'] or macroTabl['type'] ~= 'PlaceTower' then continue end
  2604. table.insert(unitsFromMacro, macroTabl.unit)
  2605. end
  2606.  
  2607. for _, unitName in ipairs(unitsFromMacro) do
  2608.  
  2609. for _, unitInfo in pairs(get_Units_Owner()) do
  2610. if unitInfo['unit_id'] ~= unitName or table.find(alrEquipped, unitName) then continue end
  2611.  
  2612. Event['equip_unit']:InvokeServer(unitInfo['uuid']) table.insert(alrEquipped, unitName)
  2613. task.wait(0.5)
  2614. end
  2615.  
  2616. end
  2617.  
  2618. equippingMacroUnits = false
  2619. end)
  2620.  
  2621.  
  2622.  
  2623.  
  2624. local function checkBoxFunc (checkBox, checkBoxF, checkBoxFuncValue, CustomKey)
  2625. local keySave = CustomKey or checkBox.Name
  2626.  
  2627. checkBox.MouseButton1Click:Connect(function()
  2628. local enabled = not GetSave(keySave)
  2629. Save(keySave, enabled)
  2630.  
  2631. checkBox.Parent.BackgroundColor3 = checkBoxColors[enabled]
  2632. if not enabled then return end
  2633.  
  2634. if checkBoxF then checkBoxF(checkBoxFuncValue, checkBox.Name) end
  2635. end)
  2636.  
  2637. if GetSave(keySave) then
  2638. checkBox.Parent.BackgroundColor3 = checkBoxColors[true]
  2639. if checkBoxF then task.spawn(function() checkBoxF(checkBoxFuncValue, checkBox.Name) end) end
  2640. end
  2641.  
  2642.  
  2643. end
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650. makeUHBigger.MouseButton1Click:Connect(function()
  2651.  
  2652. local enabled = not GetSave(makeUHBigger.Name)
  2653. Save(makeUHBigger.Name, enabled)
  2654.  
  2655. makeUHBigger.Parent.BackgroundColor3 = checkBoxColors[enabled]
  2656.  
  2657. if enabled then
  2658. MainFrame.Size = UDim2.new(1,0,1,0)
  2659. additionalFrame.Size = UDim2.new(0.390, 0, 0.124, 0)
  2660.  
  2661. else
  2662. MainFrame.Size = UDim2.new(0.525, 0, 0.525, 0)
  2663. additionalFrame.Size = UDim2.new(0.195, 0, 0.062, 0)
  2664. end
  2665.  
  2666. end)
  2667.  
  2668. if GetSave(makeUHBigger.Name) then MainFrame.Size = UDim2.new(1,0,1,0) MainFrame.Position = UDim2.new(0.614, 0, 0, 0) additionalFrame.Size = UDim2.new(0.390, 0, 0.124, 0) makeUHBigger.Parent.BackgroundColor3 = checkBoxColors[true] end
  2669.  
  2670.  
  2671. local takedownColor = Color3.fromRGB(255,255,255)
  2672.  
  2673. if GetSave(ColoredTakedowns.Name) then takedownColor = DifferentColorsPoints[clrID] end
  2674.  
  2675. local bGui = Instance.new('BillboardGui', newParent) bGui.Name = 'Takedown Counter'
  2676. bGui.AlwaysOnTop = true
  2677. bGui.ResetOnSpawn = false
  2678. bGui.Size = UDim2.new(4,0, 1.2, 0)
  2679. bGui.StudsOffset = Vector3.new(0,3,0)
  2680.  
  2681. local TakedownCounter = Instance.new('TextLabel', bGui) TakedownCounter.Name = 'T'
  2682. TakedownCounter.BackgroundTransparency = 1
  2683. TakedownCounter.Position = UDim2.new(0,0,0.5,0)
  2684. TakedownCounter.Size = UDim2.new(1,0,0.5,0)
  2685. TakedownCounter.Font = Enum.Font.GothamBold
  2686. TakedownCounter.Text = ""
  2687. TakedownCounter.TextColor3 = takedownColor
  2688. TakedownCounter.TextScaled = true
  2689. TakedownCounter.TextStrokeTransparency = 0.5
  2690. TakedownCounter.Text = 'T:'
  2691.  
  2692. local WorthinessCounter = Instance.new('TextLabel', bGui) WorthinessCounter.Name = 'W'
  2693. WorthinessCounter.BackgroundTransparency = 1
  2694. WorthinessCounter.Size = UDim2.new(1,0,.5,0)
  2695. WorthinessCounter.Font = Enum.Font.GothamBold
  2696. WorthinessCounter.Text = ""
  2697. WorthinessCounter.TextColor3 = takedownColor
  2698. WorthinessCounter.TextScaled = true
  2699. WorthinessCounter.TextStrokeTransparency = 0.5
  2700. WorthinessCounter.Text = 'W:'
  2701.  
  2702. return Takedo
  2703.  
  2704.  
  2705.  
  2706. checkBoxFunc(PingUserCHB)
  2707. checkBoxFunc(PingRareCHB)
  2708. checkBoxFunc(PingDefeatCHB)
  2709. checkBoxFunc(ResultWebhook)
  2710.  
  2711.  
  2712.  
  2713. local function webhook ()
  2714. local ping = GetSave(PingUserCHB.Name)
  2715. local userID = string.format("<@%s>", GetSave("Discord UserID") )
  2716. local webhookUrl = GetSave("Discord Url")
  2717.  
  2718. local newResources = {
  2719. {name = 'XP', amount = player._stats.player_xp.Value - oldPlayerStats.PlayerXP},
  2720. {name = 'Gems', amount = player._stats.gem_amount.Value - oldPlayerStats.Gems},
  2721. {name = 'Gold', amount = player._stats.gold_amount.Value - oldPlayerStats.Gold},
  2722. {name = 'Candy', amount = player._stats._resourceCandies.Value - oldPlayerStats.Candy},
  2723.  
  2724. }
  2725.  
  2726. local newItemsData = getItemsData()
  2727. local newItemsCount = 0
  2728. local newItemsTable = {}
  2729.  
  2730. for itemId, itemData in pairs(newItemsData) do
  2731. if not oldItemsData[itemId] then
  2732. if itemData['Rarity'] and itemData.Rarity == 'Secret' and GetSave(PingRareCHB.Name) then ping = true newSecretItemFunc(itemData.Name, itemData.Amount) end
  2733. newItemsTable[itemData.Name] = itemData.Amount continue
  2734.  
  2735. elseif itemData.Amount <= oldItemsData[itemId].Amount then continue end
  2736.  
  2737. if itemData['Rarity'] and itemData.Rarity == 'Secret' and GetSave(PingRareCHB.Name) then
  2738. ping = true
  2739. newSecretItemFunc(itemData.Name, itemData.Amount - oldItemsData[itemId].Amount)
  2740. end
  2741.  
  2742. newItemsTable[itemData.Name] = itemData.Amount - oldItemsData[itemId].Amount
  2743. newItemsCount += 1
  2744. end
  2745.  
  2746.  
  2747. local result = getMapName(ResultUI.Holder.Title.Text) if string.find(result, 'DEFEAT') and GetSave(PingDefeatCHB.Name) and LevelData._gamemode ~= 'infinite' then ping = true end
  2748. local newGems = ""
  2749. local TotalGems = makeComma(player._stats.gem_amount.Value)
  2750. local TotalGold = makeComma(player._stats.gold_amount.Value)
  2751. local TotalCandy = makeComma(player._stats._resourceCandies.Value)
  2752. local BattlePass = ''
  2753. local reachedTier = 0
  2754. local reachedTierExp = 0
  2755. local nextTierExp = "0/50"
  2756. local myBPexp = 0
  2757.  
  2758. for _, bpModule in ipairs(RS.src.Data.BattlePass:GetChildren()) do
  2759. if not bpModule:IsA('ModuleScript') then continue end
  2760. local bpModulereq = require(bpModule)
  2761.  
  2762. if not bpModulereq[battlePassID] then continue end
  2763.  
  2764. myBPexp = ItemInventoryServiceClient['session']['profile_data']['battlepass_data']
  2765. if myBPexp and myBPexp[battlePassID] and myBPexp[battlePassID].xp then myBPexp = myBPexp[battlePassID].xp else myBPexp = 0 end
  2766.  
  2767.  
  2768. for tierNumb, aboutTier in pairs(bpModulereq[battlePassID].tiers) do
  2769. if aboutTier.xp_required > myBPexp or reachedTierExp > aboutTier.xp_required then continue end
  2770. reachedTierExp = aboutTier.xp_required
  2771. reachedTier = tierNumb
  2772. end
  2773.  
  2774. if bpModulereq[battlePassID].tiers[tostring( tonumber(reachedTier) + 1 )] then
  2775. nextTierExp = string.format('%s/%s',myBPexp - reachedTierExp, bpModulereq[battlePassID].tiers[tostring( tonumber(reachedTier) + 1 )].xp_required - reachedTierExp)
  2776. else
  2777. nextTierExp = 'MAX'
  2778. end
  2779.  
  2780. BattlePass = string.format('%s [%s]', reachedTier, nextTierExp)
  2781.  
  2782. break
  2783. end
  2784.  
  2785. local levelAndUser = string.format("**User :** ||%s (@%s)||", player.Name, player.DisplayName)
  2786. levelAndUser = levelAndUser .. string.format("\n**Level :** %s", string.match(player.PlayerGui.PlaceTowers.Lives.Main.Desc.Level.Text, "%d+") ) .. string.format(" ||%s||", string.match(player.PlayerGui.PlaceTowers.Lives.Main.Desc.Level.Text, "[\[].+") )
  2787. local newItems = ""
  2788.  
  2789. for _, newResourcesTable in ipairs(newResources) do
  2790. if newResourcesTable.amount <=0 then continue end
  2791. newItems = newItems .. string.format("+%s %s\n", math.floor(newResourcesTable.amount), newResourcesTable.name)
  2792. end
  2793.  
  2794. local currentItemCount = 0
  2795. for itemName, itemAmount in pairs(newItemsTable) do
  2796. currentItemCount += 1 local comma = "" if currentItemCount ~= newItemsCount then comma = "\n" end
  2797.  
  2798. newItems = newItems .. string.format('+%s (%s)', itemName, itemAmount) .. comma
  2799.  
  2800. end
  2801.  
  2802. if not ping then userID = "" end
  2803.  
  2804. local data = {
  2805.  
  2806. ["content"] = contentNewSecretItem .. " " .. userID,
  2807. ["embeds"] = {
  2808.  
  2809. {
  2810. ["title"] = 'Anime Adventures',
  2811. ['color'] = 11513855,
  2812. ["description"] = levelAndUser,
  2813. ['footer'] = {
  2814. ['text'] = string.format("// Made by Ultra Hub (%s)", os.date("%X")),
  2815. },
  2816. ['fields'] = {
  2817. {
  2818. ['name'] = "Player Stats",
  2819. ['value'] = string.format( "<:Gems:1148368507029950515> %s\n<:Gold:1148368511463338074> %s\n<:Candy:1179714718613651456> %s\n:tickets: Tier: %s", TotalGems, TotalGold, TotalCandy, BattlePass),
  2820. ['inline'] = true
  2821. },
  2822.  
  2823. {
  2824. ['name'] = "Rewards",
  2825. ['value'] = newItems,
  2826. ['inline'] = true
  2827. },
  2828.  
  2829. {
  2830. ['name'] = "Result",
  2831. ['value'] = result
  2832. }
  2833. }
  2834.  
  2835. }
  2836.  
  2837.  
  2838.  
  2839. }
  2840. }
  2841.  
  2842. data = HttpService:JSONEncode(data)
  2843. local headers = {["content-type"] = "application/json"}
  2844. local request = http_request or request or HttpPost or syn.request or http.request
  2845. local dataSend = {Url = webhookUrl, Body = data, Method = "POST", Headers = headers}
  2846. warn("Sending Result Webhook...")
  2847.  
  2848. pcall(function() request(dataSend) end)
  2849.  
  2850. end
  2851. task.spawn(function()
  2852. pcall(function()
  2853.  
  2854. if queue_on_teleport then
  2855. local UltraHubSCRIPT = 'loadstring(game:HttpGet("https://raw.githubusercontent.com/menshaha/AAMH/main/MHUB.lua"))()'
  2856. queue_on_teleport(UltraHubSCRIPT)
  2857. end
  2858.  
  2859. end)
  2860. end)
  2861.  
  2862.  
  2863. if GameFinished and not IsLobby then
  2864. game:GetService("ReplicatedStorage").endpoints.client_to_server.vote_start:InvokeServer()
  2865.  
  2866. repeat task.wait() until GameFinished.Value and ResultUI.Enabled
  2867.  
  2868. if GetSave(ResultWebhook.Name) then
  2869. webhook()
  2870. end
  2871.  
  2872. endGameFunc()
  2873.  
  2874. delay(180, function()
  2875.  
  2876. if GetSave(AutoLeaveLATE.Name) then
  2877.  
  2878. while true do
  2879. TPLobby()
  2880. task.wait(5)
  2881. end
  2882.  
  2883. end
  2884.  
  2885. end)
  2886.  
  2887. end
  2888.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement