Advertisement
HOLYSHlTz

AnimeAdventures_v2__Beta.lua

Mar 24th, 2023
4,354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 139.46 KB | Gaming | 0 0
  1. --Beta updatefix
  2. local version = "v2.0.0b27"
  3. ---// Loading Section \\---
  4. repeat  task.wait() until game:IsLoaded()
  5. if game.PlaceId == 8304191830 then
  6.     repeat task.wait() until game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
  7.     repeat task.wait() until game.Players.LocalPlayer.PlayerGui:FindFirstChild("collection"):FindFirstChild("grid"):FindFirstChild("List"):FindFirstChild("Outer"):FindFirstChild("UnitFrames")
  8. else
  9.     repeat task.wait() until game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
  10.     game:GetService("ReplicatedStorage").endpoints.client_to_server.vote_start:InvokeServer()
  11.     repeat task.wait() until game:GetService("Workspace")["_waves_started"].Value == true
  12. end
  13. ------------------------------
  14. local a = 'Anime_Adventures' -- Paste Name
  15. local b = game:GetService('Players').LocalPlayer.Name .. '_AnimeAdventures.json'
  16. Settings = {}
  17. function saveSettings()
  18.     local HttpService = game:GetService('HttpService')
  19.     if not isfolder(a) then
  20.         makefolder(a)
  21.     end
  22.     writefile(a .. '/' .. b, HttpService:JSONEncode(Settings))
  23.     Settings = ReadSetting()
  24.     warn("Settings Saved!")
  25. end
  26. function ReadSetting()
  27.     local s, e = pcall(function()
  28.         local HttpService = game:GetService('HttpService')
  29.         if not isfolder(a) then
  30.             makefolder(a)
  31.         end
  32.         return HttpService:JSONDecode(readfile(a .. '/' .. b))
  33.     end)
  34.     if s then
  35.         return e
  36.     else
  37.         saveSettings()
  38.         return ReadSetting()
  39.     end
  40. end
  41. Settings = ReadSetting()
  42. ------------------------------
  43. local HttpService = game:GetService("HttpService")
  44. local Workspace = game:GetService("Workspace")
  45. local plr = game:GetService("Players").LocalPlayer
  46. local RunService = game:GetService("RunService")
  47. local mouse = game.Players.LocalPlayer:GetMouse()
  48. local UserInputService = game:GetService("UserInputService")
  49. ------------------------------
  50. ------------item drop result
  51. local ItemInventoryServiceClient = require(game.ReplicatedStorage.src.client.Services.ItemInventoryServiceClient)
  52. function get_inventory_items_unique_items()
  53.     return ItemInventoryServiceClient["session"]['inventory']['inventory_profile_data']['unique_items']
  54. end
  55. function get_inventory_items()
  56.     return ItemInventoryServiceClient["session"]["inventory"]['inventory_profile_data']['normal_items']
  57. end
  58. function get_Units_Owner()
  59.     return ItemInventoryServiceClient["session"]["collection"]["collection_profile_data"]['owned_units']
  60. end
  61. local Count_Portal_list = 0
  62. local Table_All_Items_Old_data = {}
  63. local Table_All_Items_New_data = {}
  64. for v2, v3 in pairs(game:GetService("ReplicatedStorage").src.Data.Items:GetDescendants()) do
  65.     if v3:IsA("ModuleScript") then
  66.         for v4, v5 in pairs(require(v3)) do
  67.             Table_All_Items_Old_data[v4] = {}
  68.             Table_All_Items_Old_data[v4]['Name'] = v5['name']
  69.             Table_All_Items_Old_data[v4]['Count'] = 0
  70.             Table_All_Items_New_data[v4] = {}
  71.             Table_All_Items_New_data[v4]['Name'] = v5['name']
  72.             Table_All_Items_New_data[v4]['Count'] = 0
  73.         end
  74.     end
  75. end
  76. local Data_Units_All_Games = require(game:GetService("ReplicatedStorage").src.Data.Units)
  77. for i,v in pairs(Data_Units_All_Games) do
  78.     if v.rarity then
  79.         Table_All_Items_Old_data[i] = {}
  80.         Table_All_Items_Old_data[i]['Name'] = v['name']
  81.         Table_All_Items_Old_data[i]['Count'] = 0
  82.         Table_All_Items_Old_data[i]['Count Shiny'] = 0
  83.         Table_All_Items_New_data[i] = {}
  84.         Table_All_Items_New_data[i]['Name'] = v['name']
  85.         Table_All_Items_New_data[i]['Count'] = 0
  86.         Table_All_Items_New_data[i]['Count Shiny'] = 0
  87.     end
  88. end
  89. for i,v in pairs(get_inventory_items()) do
  90.     Table_All_Items_Old_data[i]['Count'] = v
  91. end
  92. for i,v in pairs(get_inventory_items_unique_items()) do
  93.     if string.find(v['item_id'],"portal") or string.find(v['item_id'],"disc") then
  94.         Count_Portal_list = Count_Portal_list + 1
  95.         Table_All_Items_Old_data[v['item_id']]['Count'] = Table_All_Items_Old_data[v['item_id']]['Count'] + 1
  96.     end
  97. end
  98. for i,v in pairs(get_Units_Owner()) do
  99.     Table_All_Items_Old_data[v["unit_id"]]['Count'] = Table_All_Items_Old_data[v["unit_id"]]['Count'] + 1
  100.     if v.shiny then
  101.         Table_All_Items_Old_data[v["unit_id"]]['Count'] = Table_All_Items_Old_data[v["unit_id"]]['Count'] - 1
  102.         Table_All_Items_Old_data[v["unit_id"]]['Count Shiny'] = Table_All_Items_Old_data[v["unit_id"]]['Count Shiny'] + 1
  103.     end
  104. end
  105. ----------------Map & ID Map
  106. local function GetCurrentLevelId()
  107.     if game.Workspace._MAP_CONFIG then
  108.         return game:GetService("Workspace")._MAP_CONFIG.GetLevelData:InvokeServer()["id"]
  109.     end
  110. end
  111. local function GetCurrentLevelName()
  112.     if game.Workspace._MAP_CONFIG then
  113.         return game:GetService("Workspace")._MAP_CONFIG.GetLevelData:InvokeServer()["name"]
  114.     end
  115. end
  116. function comma_value(p1)
  117.     local value = p1;
  118.     while true do
  119.         local value2, value3 = string.gsub(value, "^(-?%d+)(%d%d%d)", "%1,%2");
  120.         value = value2;
  121.         if value3 ~= 0 then else
  122.             break;
  123.         end;
  124.     end;
  125.     return value;
  126. end;
  127. ----------------endMap & ID Map
  128. getgenv().item = "-"
  129. plr.PlayerGui:FindFirstChild("HatchInfo"):FindFirstChild("holder"):FindFirstChild("info1"):FindFirstChild("UnitName").Text = getgenv().item
  130. function webhook()
  131.     if Settings.WebhookEnabled then
  132.     local url = Settings.WebhookUrl
  133.     print("webhook?")
  134.     if url == "" then
  135.         warn("Webhook Url is empty!")
  136.         return
  137.     end
  138.    
  139.     local Time = os.date('!*t', OSTime);
  140.     local thumbnails_avatar = HttpService:JSONDecode(game:HttpGet("https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=" .. game:GetService("Players").LocalPlayer.UserId .. "&size=150x150&format=Png&isCircular=true", true))
  141.     local exec = tostring(identifyexecutor())
  142.     userlevel = plr.PlayerGui:FindFirstChild("spawn_units"):FindFirstChild("Lives"):FindFirstChild("Main"):FindFirstChild("Desc"):FindFirstChild("Level").Text
  143.     totalgems = plr.PlayerGui:FindFirstChild("spawn_units"):FindFirstChild("Lives"):FindFirstChild("Frame"):FindFirstChild("Resource"):FindFirstChild("Gem"):FindFirstChild("Level").Text
  144.    
  145.     ResultHolder = plr.PlayerGui:FindFirstChild("ResultsUI"):FindFirstChild("Holder")
  146.     if game.PlaceId ~= 8304191830 then
  147.     levelname = game:GetService("Workspace"):FindFirstChild("_MAP_CONFIG"):FindFirstChild("GetLevelData"):InvokeServer()["name"]
  148.     result = ResultHolder.Title.Text else levelname, result = "nil","nil" end
  149.     if result == "VICTORY" then result = "VICTORY" end
  150.     if result == "DEFEAT" then result = "DEFEAT" end
  151.    
  152.     _map = game:GetService("Workspace")["_BASES"].player.base["fake_unit"]:WaitForChild("HumanoidRootPart")
  153.     GetLevelData = game.workspace._MAP_CONFIG:WaitForChild("GetLevelData"):InvokeServer()
  154.     world = GetLevelData.world or GetLevelData.name
  155.     mapname = game:GetService("Workspace")._MAP_CONFIG.GetLevelData:InvokeServer()["name"]
  156.     cwaves = game:GetService("Players").LocalPlayer.PlayerGui.ResultsUI.Holder.Middle.WavesCompleted.Text
  157.     ctime = game:GetService("Players").LocalPlayer.PlayerGui.ResultsUI.Holder.Middle.Timer.Text
  158.     --room
  159.     rankroom = game:GetService("Players").LocalPlayer.PlayerGui.InfinityCastleRankingUI.Main.Main.Scroll.YourRanking.FurthestRoom.V.V.Text
  160.     --Rank title
  161.     ranktitle = game:GetService("Players").LocalPlayer.PlayerGui.InfinityCastleRankingUI.Main.Main.Scroll.YourRanking.RankTitle.V.V.Text
  162.     --rank %
  163.     rankper = game:GetService("Players").LocalPlayer.PlayerGui.InfinityCastleRankingUI.Main.Main.Scroll.YourRanking.Ranking.V.V.Text
  164.     waves = cwaves:split(": ")
  165.     if waves ~= nil and waves[2] == "999" then waves[2] = "Use [Auto Leave at Wave] or [Test Webhook]" end 
  166.     ttime = ctime:split(": ")
  167.     if waves ~= nil and ttime[2] == "22:55" then ttime[2] = "Use [Auto Leave at Wave] or [Test Webhook]" end   
  168.     gold = ResultHolder:FindFirstChild("LevelRewards"):FindFirstChild("ScrollingFrame"):FindFirstChild("GoldReward"):FindFirstChild("Main"):FindFirstChild("Amount").Text
  169.     if gold == "+99999" then gold = "+0" end     
  170.     gems = ResultHolder:FindFirstChild("LevelRewards"):FindFirstChild("ScrollingFrame"):FindFirstChild("GemReward"):FindFirstChild("Main"):FindFirstChild("Amount").Text
  171.     if gems == "+99999" then gems = "+0" end     
  172.     xpx = ResultHolder:FindFirstChild("LevelRewards"):FindFirstChild("ScrollingFrame"):FindFirstChild("XPReward"):FindFirstChild("Main"):FindFirstChild("Amount").Text
  173.     xp = xpx:split(" ")
  174.     if xp[1] == "+99999" then xp[1] = "+0" end
  175.     trophy = ResultHolder:FindFirstChild("LevelRewards"):FindFirstChild("ScrollingFrame"):FindFirstChild("TrophyReward"):FindFirstChild("Main"):FindFirstChild("Amount").Text
  176.     if trophy == "+99999" then trophy = "+0" end     
  177.    
  178.     totaltime =  ResultHolder:FindFirstChild("Middle"):FindFirstChild("Timer").Text
  179.     totalwaves = ResultHolder:FindFirstChild("Middle"):FindFirstChild("WavesCompleted").Text
  180.     local TextDropLabel = ""
  181.     local CountAmount = 1
  182.     for i,v in pairs(get_inventory_items()) do
  183.         Table_All_Items_New_data[i]['Count'] = v
  184.     end
  185.     for i,v in pairs(get_inventory_items_unique_items()) do
  186.         if string.find(v['item_id'],"portal") or string.find(v['item_id'],"disc") then
  187.             Table_All_Items_New_data[v['item_id']]['Count'] = Table_All_Items_New_data[v['item_id']]['Count'] + 1
  188.         end
  189.     end
  190.     for i,v in pairs(get_Units_Owner()) do
  191.         Table_All_Items_New_data[v["unit_id"]]['Count'] = Table_All_Items_New_data[v["unit_id"]]['Count'] + 1
  192.         if v.shiny then
  193.             Table_All_Items_New_data[v["unit_id"]]['Count'] = Table_All_Items_New_data[v["unit_id"]]['Count'] - 1
  194.             Table_All_Items_New_data[v["unit_id"]]['Count Shiny'] = Table_All_Items_New_data[v["unit_id"]]['Count Shiny'] + 1
  195.         end
  196.     end
  197.     for i,v in pairs(Table_All_Items_New_data) do
  198.         if v['Count'] > 0 and (v['Count'] - Table_All_Items_Old_data[i]['Count']) > 0 then
  199.             if v['Count Shiny'] and v['Count'] then
  200.                 if v['Count'] > 0 or v['Count Shiny'] > 0 then
  201.                     if v['Count'] > 0 and (v['Count'] - Table_All_Items_Old_data[i]['Count']) > 0 then
  202.                         TextDropLabel = TextDropLabel .. tostring(CountAmount) .. ". " .. tostring(v['Name']) .. " : x" .. tostring(v['Count'] - Table_All_Items_Old_data[i]['Count'])
  203.                         if v['Count Shiny'] > 0 and (v['Count Shiny'] - Table_All_Items_Old_data[i]['Count Shiny']) > 0 then
  204.                             TextDropLabel = TextDropLabel .. " | " .. tostring(v['Name']) .. " (Shiny) : x" .. tostring(v['Count Shiny'] - Table_All_Items_Old_data[i]['Count Shiny']) .. "\n"
  205.                             CountAmount = CountAmount + 1
  206.                         else
  207.                             TextDropLabel = TextDropLabel .. "\n"
  208.                             CountAmount = CountAmount + 1
  209.                         end
  210.                     end
  211.                 end
  212.             end
  213.         elseif v['Count Shiny'] and v['Count Shiny'] > 0 and (v['Count Shiny'] - Table_All_Items_Old_data[i]['Count Shiny']) > 0 then
  214.             TextDropLabel = TextDropLabel .. tostring(CountAmount) .. ". " .. tostring(v['Name']) .. " (Shiny) : x" .. tostring(v['Count Shiny'] - Table_All_Items_Old_data[i]['Count Shiny']) .. "\n"
  215.             CountAmount = CountAmount + 1
  216.         end
  217.     end
  218.     for i,v in pairs(Table_All_Items_New_data) do
  219.         if v['Count'] > 0 and (v['Count'] - Table_All_Items_Old_data[i]['Count']) > 0 then
  220.             if v['Count Shiny'] and v['Count'] then
  221.             elseif string.find(i,"portal") or string.find(i,"disc") then
  222.                 Count_Portal_list = Count_Portal_list + 1
  223.                 if string.gsub(i, "%D", "") == "" then
  224.                     TextDropLabel = TextDropLabel .. tostring(CountAmount) .. ". " .. tostring(v['Name']) .. " : x" .. tostring(v['Count'] - Table_All_Items_Old_data[i]['Count']) .. "\n"
  225.                 else
  226.                     TextDropLabel = TextDropLabel .. tostring(CountAmount) .. ". " .. tostring(v['Name']) .. " Tier " .. tostring(string.gsub(i, "%D", "")) .. " : x" .. tostring(v['Count'] - Table_All_Items_Old_data[i]['Count']) .. "\n"
  227.                 end
  228.                 CountAmount = CountAmount + 1
  229.             else
  230.                 TextDropLabel = TextDropLabel .. tostring(CountAmount) .. ". " .. tostring(v['Name']) .. " : x" .. tostring(v['Count'] - Table_All_Items_Old_data[i]['Count']) .. "\n"
  231.                 CountAmount = CountAmount + 1
  232.             end
  233.         end
  234.     end
  235.     if TextDropLabel == "" then
  236.         TextDropLabel = "Not Have Items Drops"
  237.     end
  238.    
  239.         local data = {
  240.             ["content"] = "",
  241.                 ["username"] = "Anime Adventures | ArponAG V2",
  242.                 ["avatar_url"] = "https://tr.rbxcdn.com/46f3a2a4f78c2a8f69e5e423f5b29ddc/150/150/Image/Png",
  243.                 ["embeds"] = {
  244.                     {
  245.                         ["author"] = {
  246.                             ["name"] = "ArponAG V2 | Results ✔️",
  247.                             ["icon_url"] = "https://cdn.discordapp.com/emojis/997123585476927558.webp?size=96&quality=lossless"
  248.                         },
  249.                         ["thumbnail"] = {
  250.                             ['url'] = thumbnails_avatar.data[1].imageUrl,
  251.                         },
  252.                         ["description"] = " Player Name : 🐱 ||**"..game:GetService("Players").LocalPlayer.Name.."**|| 🐱\nExecutors  : 🎮 "..exec.." 🎮 ",
  253.                         ["color"] = 110335,
  254.                         ["timestamp"] = string.format('%d-%d-%dT%02d:%02d:%02dZ', Time.year, Time.month, Time.day, Time.hour, Time.min, Time.sec),
  255.                         ["fields"] = {
  256.                             {
  257.                                 ["name"] ="Current Level ✨ & Portals 🌀 & Gems 💎 & Gold 💰",
  258.                                 ["value"] = "```ini\n"..tostring(game.Players.LocalPlayer.PlayerGui.spawn_units.Lives.Main.Desc.Level.Text)..  " ✨\nCurrent Portals : ".. tostring(Count_Portal_list) .." 🌀\nCurrent Gems : "..tostring(comma_value(game.Players.LocalPlayer._stats.gem_amount.Value)).. " 💎\nCurrent Gold : "  ..tostring(comma_value(game.Players.LocalPlayer._stats.gold_amount.Value))..  " 💰```",
  259.                             },
  260.                             {
  261.                                 ["name"] ="Results :",
  262.                                 ["value"] = " ```ini\nWorld : "..mapname.. " 🌏\nMap : "..world.. " 🗺️\nResults : "..result.. " ⚔️\nWave End : " ..tostring(waves[2]).." 🌊\nTime : " ..tostring(ttime[2]).." ⌛```",
  263.                                 ["inline"] = true
  264.                             },
  265.                             {
  266.                                 ["name"] ="Rewards :",
  267.                                 ["value"] = "```ini\n" ..comma_value(gold).." Gold 💰\n"..comma_value(gems).." Gems 💎\n"..comma_value(xp[1]).." XP 🧪\n"..trophy.." Trophy 🏆```",
  268.                             },
  269.                             {
  270.                                 ["name"] ="Items Drop :",
  271.                                 ["value"] = "```ini\n" .. TextDropLabel .. "```",
  272.                                 ["inline"] = false
  273.                             }
  274.                         }
  275.                         }
  276.                 }
  277.             }
  278.        
  279.    
  280.     local xd = game:GetService("HttpService"):JSONEncode(data)
  281.    
  282.     local headers = {["content-type"] = "application/json"}
  283.     request = http_request or request or HttpPost or syn.request or http.request
  284.     local sex = {Url = url, Body = xd, Method = "POST", Headers = headers}
  285.     warn("Sending webhook notification...")
  286.     request(sex)
  287. end
  288. end
  289. function BabyWebhook()
  290.     if Settings.BabyWebhookEnabled then
  291.     local url = Settings.WebhookUrl
  292.     print("webhook baby?")
  293.     if url == "" then
  294.         warn("Webhook Url is empty!")
  295.         return
  296.     end
  297.        
  298.         local Time = os.date('!*t', OSTime);
  299.         local thumbnails_avatar = HttpService:JSONDecode(game:HttpGet("https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=" .. game:GetService("Players").LocalPlayer.UserId .. "&size=150x150&format=Png&isCircular=true", true))
  300.         local exec = tostring(identifyexecutor())
  301.         --BTP lv.
  302.         btplv = game:GetService("Players").LocalPlayer.PlayerGui.BattlePass.Main.Level.V.Text
  303.         --next ammo level
  304.         nextlvbtp = game:GetService("Players").LocalPlayer.PlayerGui.BattlePass.Main.FurthestRoom.V.Text
  305.        --room
  306.         rankroom = game:GetService("Players").LocalPlayer.PlayerGui.InfinityCastleRankingUI.Main.Main.Scroll.YourRanking.FurthestRoom.V.V.Text
  307.         if rankroom == "10" then rankroom = "10 or Not Room Yet" end
  308.         --Rank title
  309.         ranktitle = game:GetService("Players").LocalPlayer.PlayerGui.InfinityCastleRankingUI.Main.Main.Scroll.YourRanking.RankTitle.V.V.Text
  310.         if ranktitle == "Grandmaster" then ranktitle = "Grandmaster or Not Ranked Yet" end
  311.         --rank %
  312.         rankper = game:GetService("Players").LocalPlayer.PlayerGui.InfinityCastleRankingUI.Main.Main.Scroll.YourRanking.Ranking.V.V.Text
  313.         if rankper == "10%" then rankper = "10% or Not Ranked Yet" end
  314.         --Current Rank
  315.         crt = game:GetService("Players").LocalPlayer.PlayerGui.TournamentRankingUI.Leaderboard.Ranking.Wrapper.CurrentRank.Ranking.V.Text
  316.         if crt == "10%" then crt = "Tournament Load Not Yet" end
  317.         --Current Prize%
  318.         cpp = game:GetService("Players").LocalPlayer.PlayerGui.TournamentRankingUI.Leaderboard.Ranking.Wrapper.CurrentPrize.V.Text
  319.         if cpp == "10%" then cpp = "Tournament Load Not Yet" end
  320.         --Current Prize
  321.         cp = game:GetService("Players").LocalPlayer.PlayerGui.TournamentRankingUI.Leaderboard.Ranking.Wrapper.CurrentPrize.Prize.Text
  322.         if cp == "0% ~ 49.99%" then cp = "Tournament Load Not Yet" end
  323.         --Current Place#
  324.         cpr = game:GetService("Players").LocalPlayer.PlayerGui.TournamentRankingUI.Leaderboard.Main.Wrapper.Container.YourRow.Place.Text
  325.         if cpr == "#123456" then cpr = "Tournament Load Not Yet" end
  326.         --Dmg or kill
  327.         cdk = game:GetService("Players").LocalPlayer.PlayerGui.TournamentRankingUI.Leaderboard.Main.Wrapper.Container.YourRow.Amount.Text
  328.         if cdk == "123456789000000" then cdk = "Tournament Load Not Yet" end
  329.         --Bracket
  330.         cubk = game:GetService("Players").LocalPlayer.PlayerGui.TournamentRankingUI.LevelSelect.InfoFrame.ScoreInfo.Bracket.V.Text
  331.         if cubk == "N" then cubk = "Tournament Load Not Yet" end
  332.  
  333.         local data = {
  334.             ["content"] = "",
  335.                 ["username"] = "Anime Adventures V2",
  336.                 ["avatar_url"] = "https://tr.rbxcdn.com/46f3a2a4f78c2a8f69e5e423f5b29ddc/150/150/Image/Png",
  337.                 ["embeds"] = {
  338.                     {
  339.                         ["author"] = {
  340.                             ["name"] = " Current BTP & Inf Castle & Tournament Results ✔️",
  341.                             ["icon_url"] = "https://cdn.discordapp.com/emojis/997123585476927558.webp?size=96&quality=lossless"
  342.                         },
  343.                         ["thumbnail"] = {
  344.                             ['url'] = thumbnails_avatar.data[1].imageUrl,
  345.                         },
  346.                         ["description"] = " Player Name : 🐱 ||**"..game:GetService("Players").LocalPlayer.Name.."**|| 🐱",
  347.                         ["color"] = 110335,
  348.                         ["timestamp"] = string.format('%d-%d-%dT%02d:%02d:%02dZ', Time.year, Time.month, Time.day, Time.hour, Time.min, Time.sec),
  349.                         ["fields"] = {
  350.                             {
  351.                                 ["name"] ="Current Battle Pass Results 🔋 ",
  352.                                 ["value"] = "```ini\nCurrent BTP Lv. : "..btplv.."  🔋\nAMMO TO NEXT : "..nextlvbtp.. "  🔋```",
  353.                             },
  354.                             {
  355.                                 ["name"] ="Current Tournament Results 🏆",
  356.                                 ["value"] = "```ini\nYour Bracket: : "..cubk.."  🏆\nCurrent Rank : ["..cpr.." - "..crt.."]  🏆\nDMG or Kill : "..cdk.. "  🏆\nCurrent Prize : "..cpp.. "  🏆\nReward Prize : "  ..cp..  "  🏆```",
  357.                             },
  358.                             {
  359.                                 ["name"] ="Current Infinity Castle Results  🚪",
  360.                                 ["value"] = "```ini\nCurrent Room : "..rankroom.."  🚪\nCurrent Rank : "..ranktitle.. "  📊\nCurrent Percent : "  ..rankper..  "  🏅```",
  361.                             }
  362.                         }
  363.                     }
  364.                 }
  365.             }
  366.        
  367.    
  368.             local xd = game:GetService("HttpService"):JSONEncode(data)
  369.    
  370.             local headers = {["content-type"] = "application/json"}
  371.             request = http_request or request or HttpPost or syn.request or http.request
  372.             local sex = {Url = url, Body = xd, Method = "POST", Headers = headers}
  373.             warn("Sending infcastle webhook notification...")
  374.             request(sex)
  375.         end
  376. end
  377.  
  378. function SnipeShopNew()
  379.     if Settings.snipeWebhookEnabled then
  380. pcall(function()
  381.     SpecialSummonSniperWebhook()
  382.     StandardSummonSniperWebhook()
  383.     ShopSniperWebhook()
  384. end)
  385. end
  386. end
  387. --special
  388. function SpecialSummonSniperWebhook()
  389.     if Settings.snipeWebhookEnabled then
  390.     local url = Settings.WebhookUrl
  391.     print("webhook Special banner?")
  392.     if url == "" then
  393.         warn("Webhook Url is empty!")
  394.         return
  395.     end
  396.        
  397.         local Time = os.date('!*t', OSTime);
  398.  
  399.         local thumbnails_avatar = HttpService:JSONDecode(game:HttpGet("https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=" .. game:GetService("Players").LocalPlayer.UserId .. "&size=150x150&format=Png&isCircular=true", true))
  400.  
  401.         local exec = tostring(identifyexecutor())
  402.  
  403.         special_banner = game:GetService("Players").LocalPlayer.PlayerGui.HatchGuiNew.BannerFrames.EventClover.Main
  404.         units = {
  405.             special_banner["Featured_One"],
  406.             special_banner["Featured_Two"],
  407.             special_banner["Featured_Three"]
  408.         }
  409.  
  410.         unitNamesForJson = {
  411.             special_banner["Featured_One"].name.Text,
  412.             special_banner["Featured_Two"].name.Text,
  413.             special_banner["Featured_Three"].name.Text
  414.         }
  415.  
  416.         local data = {
  417.             ["content"] = "",
  418.                 ["username"] = "Anime Adventures V2",
  419.                 ["avatar_url"] = "https://tr.rbxcdn.com/46f3a2a4f78c2a8f69e5e423f5b29ddc/150/150/Image/Png",
  420.                 ["embeds"] = {
  421.                     {
  422.                         ["author"] = {
  423.                             ["name"] = " Special Banner ",
  424.                             ["icon_url"] = "https://cdn.discordapp.com/emojis/997123585476927558.webp?size=96&quality=lossless"
  425.                         },
  426.                         ["thumbnail"] = {
  427.                             ['url'] = thumbnails_avatar.data[1].imageUrl,
  428.                         },
  429.                         ["description"] = " Player Name : 🐱 ||**"..game:GetService("Players").LocalPlayer.Name.."**|| 🐱",
  430.                         ["color"] = 110335,
  431.                         ["timestamp"] = string.format('%d-%d-%dT%02d:%02d:%02dZ', Time.year, Time.month, Time.day, Time.hour, Time.min, Time.sec),
  432.                         ["fields"] = {
  433.                             {
  434.                                 ["name"] = "```" .. units[1].name.Text .. "```",
  435.                                 ["value"] = "```(" .. units[1].Rarity.Text .. ") [Featured]```",
  436.                                 ["inline"] = true
  437.                             },
  438.                             {
  439.                                 ["name"] = "```" .. units[2].name.Text .. "```",
  440.                                 ["value"] = "```(" .. units[2].Rarity.Text .. ")```",
  441.                                 ["inline"] = true
  442.                             },
  443.                             {
  444.                                 ["name"] = "```" .. units[3].name.Text .. "```",
  445.                                 ["value"] = "```(" .. units[3].Rarity.Text .. ")```",
  446.                                 ["inline"] = true
  447.                             }
  448.                         }
  449.                     }
  450.                 }
  451.             }
  452.        
  453.    
  454.             local xd = game:GetService("HttpService"):JSONEncode(data)
  455.    
  456.             local headers = {["content-type"] = "application/json"}
  457.             request = http_request or request or HttpPost or syn.request or http.request
  458.             local sex = {Url = url, Body = xd, Method = "POST", Headers = headers}
  459.             warn("Sending special banner webhook notification...")
  460.             request(sex)
  461.         end
  462. end
  463.  
  464. --Standar
  465. function StandardSummonSniperWebhook()
  466.     if Settings.snipeWebhookEnabled then
  467.     local url = Settings.WebhookUrl
  468.     print("webhook Standard Banner?")
  469.     if url == "" then
  470.         warn("Webhook Url is empty!")
  471.         return
  472.     end
  473.        
  474.         local Time = os.date('!*t', OSTime);
  475.  
  476.         local thumbnails_avatar = HttpService:JSONDecode(game:HttpGet("https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=" .. game:GetService("Players").LocalPlayer.UserId .. "&size=150x150&format=Png&isCircular=true", true))
  477.  
  478.         local exec = tostring(identifyexecutor())
  479.  
  480.         units = {
  481.             game:GetService("Players").LocalPlayer.PlayerGui.HatchGuiNew.BannerFrames.Standard.Main.Scroll["1"].Main,
  482.             game:GetService("Players").LocalPlayer.PlayerGui.HatchGuiNew.BannerFrames.Standard.Main.Scroll["2"].Main,
  483.             game:GetService("Players").LocalPlayer.PlayerGui.HatchGuiNew.BannerFrames.Standard.Main.Scroll["3"].Main,
  484.             game:GetService("Players").LocalPlayer.PlayerGui.HatchGuiNew.BannerFrames.Standard.Main.Scroll["4"].Main,
  485.             game:GetService("Players").LocalPlayer.PlayerGui.HatchGuiNew.BannerFrames.Standard.Main.Scroll["5"].Main,
  486.             game:GetService("Players").LocalPlayer.PlayerGui.HatchGuiNew.BannerFrames.Standard.Main.Scroll["6"].Main
  487.         }
  488.  
  489.        
  490.             U1 = units[1].petimage.WorldModel:GetChildren()[1].Name
  491.             U2 = units[2].petimage.WorldModel:GetChildren()[1].Name
  492.             U3 = units[3].petimage.WorldModel:GetChildren()[1].Name
  493.             U4 = units[4].petimage.WorldModel:GetChildren()[1].Name
  494.             U5 = units[5].petimage.WorldModel:GetChildren()[1].Name
  495.             U6 = units[6].petimage.WorldModel:GetChildren()[1].Name
  496.        
  497.  
  498.         local data = {
  499.             ["content"] = "",
  500.                 ["username"] = "Anime Adventures V2",
  501.                 ["avatar_url"] = "https://tr.rbxcdn.com/46f3a2a4f78c2a8f69e5e423f5b29ddc/150/150/Image/Png",
  502.                 ["embeds"] = {
  503.                     {
  504.                         ["author"] = {
  505.                             ["name"] = " Standard Banner ",
  506.                             ["icon_url"] = "https://cdn.discordapp.com/emojis/997123585476927558.webp?size=96&quality=lossless"
  507.                         },
  508.                         ["thumbnail"] = {
  509.                             ['url'] = thumbnails_avatar.data[1].imageUrl,
  510.                         },
  511.                         ["description"] = " Player Name : 🐱 ||**"..game:GetService("Players").LocalPlayer.Name.."**|| 🐱",
  512.                         ["color"] = 110335,
  513.                         ["timestamp"] = string.format('%d-%d-%dT%02d:%02d:%02dZ', Time.year, Time.month, Time.day, Time.hour, Time.min, Time.sec),
  514.                         ["fields"] = {
  515.  
  516.                         }
  517.                     }
  518.                 }
  519.             }
  520.  
  521.         for i, unit in pairs(units) do
  522.             unit_stats = {
  523.                 ["name"] = "```" .. unit.petimage.WorldModel:GetChildren()[1].Name .."```",
  524.                 ["value"] = "```(" ..unit.Rarity.Text ..")```",
  525.                 ["inline"] = true
  526.             }
  527.             table.insert(data["embeds"][1]["fields"], unit_stats)
  528.         end
  529.        
  530.    
  531.             local xd = game:GetService("HttpService"):JSONEncode(data)
  532.    
  533.             local headers = {["content-type"] = "application/json"}
  534.             request = http_request or request or HttpPost or syn.request or http.request
  535.             local sex = {Url = url, Body = xd, Method = "POST", Headers = headers}
  536.             warn("Sending Standard banner webhook notification...")
  537.             request(sex)
  538.         end
  539.     end
  540.  
  541. --Bulma's Shop webhook
  542.  
  543. function ShopSniperWebhook()
  544.     if Settings.snipeWebhookEnabled then
  545.         local url = Settings.WebhookUrl
  546.         print("webhook Bulma's webhook?")
  547.         if url == "" then
  548.             warn("Webhook Url is empty!")
  549.             return
  550.         end
  551.         print(game:GetService("ReplicatedStorage").src.client.Services.TravellingMerchantServiceClient)
  552.  
  553.         local Time = os.date('!*t', OSTime);
  554.  
  555.         local thumbnails_avatar = HttpService:JSONDecode(game:HttpGet("https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=" .. game:GetService("Players").LocalPlayer.UserId .. "&size=150x150&format=Png&isCircular=true", true))
  556.  
  557.         local exec = tostring(identifyexecutor())
  558.  
  559.         shop_items = require(game:GetService("ReplicatedStorage").src.client.Services["TravellingMerchantServiceClient"]).SELLING_ITEMS
  560.         shop_item_ids = {}
  561.        
  562.         print("exechere9")
  563.  
  564.         local data = {
  565.             ["content"] = "",
  566.                 ["username"] = "Anime Adventures V2",
  567.                 ["avatar_url"] = "https://tr.rbxcdn.com/46f3a2a4f78c2a8f69e5e423f5b29ddc/150/150/Image/Png",
  568.                 ["embeds"] = {
  569.                     {
  570.                         ["author"] = {
  571.                             ["name"] = " Bulma's Shop ",
  572.                             ["icon_url"] = "https://cdn.discordapp.com/emojis/997123585476927558.webp?size=96&quality=lossless"
  573.                         },
  574.                         ["thumbnail"] = {
  575.                             ['url'] = thumbnails_avatar.data[1].imageUrl,
  576.                         },
  577.                         ["description"] = " Player Name : 🐱 ||**"..game:GetService("Players").LocalPlayer.Name.."**|| 🐱",
  578.                         ["color"] = 110335,
  579.                         ["timestamp"] = string.format('%d-%d-%dT%02d:%02d:%02dZ', Time.year, Time.month, Time.day, Time.hour, Time.min, Time.sec),
  580.                         ["fields"] = {
  581.  
  582.                         }
  583.                     }
  584.                 }
  585.             }
  586.  
  587.        
  588.         print("exechere4")
  589.        
  590.         for i, item in pairs(shop_items) do
  591.             table.insert(shop_item_ids, item["id"])
  592.             if item["gem_cost"] then
  593.                 table.insert(data["embeds"][1]["fields"], {
  594.                     ["name"] = "```" .. item["id"].."```",
  595.                     ["value"] = "```" .. item["gem_cost"] .. " 💎```",
  596.                     ["inline"] = true
  597.                 })
  598.             else
  599.                 table.insert(data["embeds"][1]["fields"], {
  600.                     ["name"] = "```" .. item["id"].."```",
  601.                     ["value"] = "```" .. item["gold_cost"] .. " 💰```",
  602.                     ["inline"] = true
  603.                 })
  604.             end
  605.         end
  606.    
  607.         --print(dump(data["embeds"][1]["fields"]))
  608.  
  609.         if not game:GetService("Workspace")["travelling_merchant"]["is_open"].Value then
  610.             table.insert(data["embeds"][1]["fields"], {
  611.                     ["name"] = "SHOP CLOSED",
  612.                     ["value"] = "SHOP CLOSED",
  613.                     ["inline"] = true
  614.                 })
  615.         end
  616.         print("exec1")
  617.  
  618.         local xd = game:GetService("HttpService"):JSONEncode(data)
  619.    
  620.             local headers = {["content-type"] = "application/json"}
  621.             request = http_request or request or HttpPost or syn.request or http.request
  622.             local sex = {Url = url, Body = xd, Method = "POST", Headers = headers}
  623.             warn("Sending Snipe Bulma's Shop webhook notification...")
  624.             request(sex)
  625.         end
  626.     end
  627. ------------------------------\
  628. if game.CoreGui:FindFirstChild("FinityUI") then
  629.     game.CoreGui["FinityUI"]:Destroy()
  630. end
  631. local dir = "Anime_Adventures/"..game.Players.LocalPlayer.Name
  632. local Uilib = loadstring(game:HttpGet("https://pastebin.com/raw/2n8dwqNf"))()
  633. local exec = tostring(identifyexecutor())
  634. --updatefix
  635. local Window = Uilib.new(true, "[UPD 11.7.5] Anime Adventures "..version.." - "..exec)
  636. Window.ChangeToggleKey(Enum.KeyCode.RightControl)
  637. local Home = Window:Category(" 📋 Home")
  638. local Developers = Home:Sector("Anime Adventures")
  639. local asdasd = Home:Sector(" ")
  640. local UIUPDT = Home:Sector("UI UPDATE (February 20th)")
  641. local Farm = Window:Category(" 🏹 Auto Farm")
  642. local SelectUnits = Farm:Sector("Units Selection")
  643. local SelectWorld = Farm:Sector("World Selection")
  644. local UnitPosition = Farm:Sector("Select Unit Position")
  645. local MoreFarmConfig = Farm:Sector("More Farming Config")
  646. local AutoFarmConfig = Farm:Sector("Auto Farm Config")
  647. local ChallengeConfig = Farm:Sector("Challenge Config")
  648. local UC = Window:Category(" 👥 Unit Config")
  649. local NDY = UC:Sector("Beta Unit Config ")
  650. local NDY2 = UC:Sector(" Reset Unit Config ")
  651. local emptyxx = UC:Sector(" ")
  652. local emptyxx2 = UC:Sector(" ")
  653. local Unit1 = UC:Sector("Unit 1")
  654. local Unit2 = UC:Sector("Unit 2")
  655. local Unit3 = UC:Sector("Unit 3")
  656. local Unit4 = UC:Sector("Unit 4")
  657. local Unit5 = UC:Sector("Unit 5")
  658. local Unit6 = UC:Sector("Unit 6")
  659. local Misc = Window:Category(" 🛠 Misc")
  660. local AutoSummonSec = Misc:Sector("Auto Summon Units")
  661. local AutoSnipeMerchantSec = Misc:Sector("Auto Snipe Merchant")
  662. local WebhookSec = Misc:Sector("Discord Webhook")
  663. local OtherSec = Misc:Sector("Other Options")
  664. ----------------------------------------------
  665. ---------------- Units Selection -------------
  666. ----------------------------------------------
  667. local function UnitSec()
  668.         --#region Select Units Tab
  669.         local Units = {}
  670.        
  671.         function Check()
  672.             local DataUnits = require(game:GetService("ReplicatedStorage").src.Data.Units)
  673.             for i, v in pairs(getgenv().profile_data.equipped_units) do
  674.                 if DataUnits[v.unit_id] and v.equipped_slot then
  675.                     Settings.SelectedUnits["U"..tostring(v.equipped_slot)] = tostring(DataUnits[v.unit_id].id) .. " #" .. tostring(v.uuid)
  676.                     print("U"..tostring(v.equipped_slot).." "..tostring(DataUnits[v.unit_id].id).." #" .. tostring(v.uuid))
  677.                 end
  678.             end
  679.             saveSettings()
  680.         end
  681.         function LoadUnits()
  682.             local DataUnits = require(game:GetService("ReplicatedStorage").src.Data.Units)
  683.             table.clear(Units)
  684.             for i, v in pairs(getgenv().profile_data.equipped_units) do
  685.                 if DataUnits[v.unit_id] then
  686.                     table.insert(Units, DataUnits[v.unit_id].name .. " #" .. tostring(v.uuid))
  687.                 end
  688.             end
  689.             Check()
  690.         end
  691.         function GetUnits()
  692.             if Settings.SelectedUnits == nil then
  693.                 Settings.SelectedUnits = {
  694.                     U1 = "nil",
  695.                     U2 = "nil",
  696.                     U3 = "nil",
  697.                     U4 = "nil",
  698.                     U5 = "nil",
  699.                     U6 = "nil"
  700.                 }
  701.                 saveSettings()
  702.             end
  703.             getgenv().profile_data = { equipped_units = {} }; repeat
  704.                 do
  705.                     for i, v in pairs(getgc(true)) do
  706.                         if type(v) == "table" and rawget(v, "xp") then wait()
  707.                             table.insert(getgenv().profile_data.equipped_units, v)
  708.                         end
  709.                     end
  710.                 end
  711.             until #getgenv().profile_data.equipped_units > 0
  712.             LoadUnits()
  713.         end
  714.     GetUnits()
  715.     SelectUnits:Cheat("Button", "🦸 Select Units", function() --Selects Currently Equipped Units!
  716.         Settings.SelectedUnits = {
  717.             U1 = "nil",
  718.             U2 = "nil",
  719.             U3 = "nil",
  720.             U4 = "nil",
  721.             U5 = "nil",
  722.             U6 = "nil"
  723.         }
  724.         saveSettings()
  725.         GetUnits()
  726.     end)
  727.     function switchteam(string)
  728.         local args = { [1] = string }
  729.         game:GetService("ReplicatedStorage").endpoints.client_to_server.switch_team_loadout:InvokeServer(unpack(args))
  730.     end
  731.     local a = SelectUnits:Cheat("Dropdown", "👥 Select Team",function(preset)
  732.         Settings.SelectedPreset = preset
  733.         print(preset)
  734.         saveSettings()
  735.     end, {
  736.         options = { "Team 1", "Team 2", "Team 3", "Team 4","Team 5" },
  737.         default = Settings.SelectedPreset
  738.     })
  739.     SelectUnits:Cheat("Button", "⌛ Switch Team", function() --loads preset
  740.         preset = Settings.SelectedPreset
  741.         if preset == "Team 1" then
  742.             switchteam("1")
  743.         elseif preset == "Team 2" then
  744.             switchteam("2")
  745.         elseif preset == "Team 3" then
  746.             switchteam("3")
  747.         elseif preset == "Team 4" then
  748.             switchteam("4")
  749.         elseif preset == "Team 5" then
  750.             switchteam("5")
  751.         end
  752.         print(preset)
  753.         GetUnits()
  754.     end)
  755. end
  756. ----------------------------------------------
  757. ------------------ World Section -------------updatefix
  758. ----------------------------------------------
  759. local function WorldSec()
  760.     SelectWorld:Cheat("Dropdown", "🌟 Select Category",function(value)
  761.         print(value)
  762.         Settings.WorldCategory = value
  763.         getgenv().updateworld()
  764.         getgenv().updatelevel()
  765.         getgenv().updatedifficulty()
  766.         saveSettings()
  767.     end, {
  768.         options = {
  769.             "Story Worlds",
  770.             "Legend Stages",
  771.             "Raid Worlds",
  772.             "Portals",
  773.             "Dungeon"
  774.         },
  775.         default = Settings.WorldCategory
  776.     })
  777.     local selectworld = SelectWorld:Cheat("Dropdown", "🌏 Select World",function(value)
  778.         print(value)
  779.         Settings.SelectedWorld = value
  780.         getgenv().updatelevel()
  781.         getgenv().updatedifficulty()
  782.         saveSettings()
  783.     end, {options = { }, default = Settings.SelectedWorld })
  784. --fixmap
  785.     getgenv().updateworld = function()
  786.         selectworld:ClearDrop() local storylist;
  787.         if Settings.WorldCategory == "Story Worlds" then
  788.             storylist = {"Planet Namak", "Shiganshinu District", "Snowy Town","Hidden Sand Village", "Marine's Ford",
  789.             "Ghoul City", "Hollow World", "Ant Kingdom", "Magic Town", "Cursed Academy","Clover Kingdom","Cape Canaveral", "Alien Spaceship","Fabled Kingdom"}
  790.         elseif Settings.WorldCategory == "Legend Stages" then
  791.             storylist = {"Clover Kingdom (Elf Invasion)", "Hollow Invasion","Cape Canaveral (Legend)", "Fabled Kingdom (Legend)"}
  792.         elseif Settings.WorldCategory == "Raid Worlds" then
  793.             storylist = {"Storm Hideout","West City", "Infinity Train", "Shiganshinu District - Raid","Hiddel Sand Village - Raid", "Freezo's Invasion"}
  794.         elseif Settings.WorldCategory == "Portals" then
  795.             storylist = {"Alien Portals","Devil Portals (ANY)", "Demon Portals"}
  796.         elseif Settings.WorldCategory == "Dungeon" then
  797.             storylist = {"Cursed Womb","Crused Parade"}  
  798.         end
  799.    
  800.         for i = 1, #storylist do
  801.             selectworld:AddOption(storylist[i])
  802.         end
  803.     end
  804.     local selectlevel = SelectWorld:Cheat("Dropdown", "✨ Select Level",function(value)
  805.         print(value)
  806.         Settings.SelectedLevel = value
  807.         getgenv().updatedifficulty()
  808.         saveSettings()
  809.     end, {options = { }, default = Settings.SelectedLevel})
  810.     getgenv().updatelevel = function()
  811.         selectlevel:ClearDrop() local levellist; local level = Settings.SelectedWorld;
  812.         ---///Story Worlds\\\---
  813.         if level == "Planet Namak" then
  814.             levellist = {"namek_infinite", "namek_level_1", "namek_level_2", "namek_level_3", "namek_level_4", "namek_level_5", "namek_level_6"}
  815.         elseif level == "Shiganshinu District" then
  816.             levellist = {"aot_infinite", "aot_level_1", "aot_level_2", "aot_level_3", "aot_level_4","aot_level_5", "aot_level_6"}
  817.         elseif level == "Snowy Town" then
  818.             levellist = {"demonslayer_infinite", "demonslayer_level_1", "demonslayer_level_2", "demonslayer_level_3", "demonslayer_level_4", "demonslayer_level_5","demonslayer_level_6"}
  819.         elseif level == "Hidden Sand Village" then
  820.             levellist =  {"naruto_infinite", "naruto_level_1", "naruto_level_2", "naruto_level_3","naruto_level_4", "naruto_level_5", "naruto_level_6"}
  821.         elseif level == "Marine's Ford" then
  822.             levellist = {"marineford_infinite","marineford_level_1","marineford_level_2","marineford_level_3","marineford_level_4","marineford_level_5","marineford_level_6"}
  823.         elseif level == "Ghoul City" then
  824.             levellist = {"tokyoghoul_infinite","tokyoghoul_level_1","tokyoghoul_level_2","tokyoghoul_level_3","tokyoghoul_level_4","tokyoghoul_level_5","tokyoghoul_level_6"}
  825.         elseif level == "Hollow World" then
  826.             levellist = {"hueco_infinite","hueco_level_1","hueco_level_2","hueco_level_3","hueco_level_4","hueco_level_5","hueco_level_6"}
  827.         elseif level == "Ant Kingdom" then
  828.             levellist = {"hxhant_infinite","hxhant_level_1","hxhant_level_2","hxhant_level_3","hxhant_level_4","hxhant_level_5","hxhant_level_6"}
  829.         elseif level == "Magic Town" then
  830.             levellist =  {"magnolia_infinite","magnolia_level_1","magnolia_level_2","magnolia_level_3","magnolia_level_4","magnolia_level_5","magnolia_level_6"}
  831.         elseif level == "Cursed Academy" then
  832.             levellist = {"jjk_infinite","jjk_level_1","jjk_level_2","jjk_level_3", "jjk_level_4","jjk_level_5","jjk_level_6"}
  833.         elseif level == "Clover Kingdom" then
  834.             levellist = {"clover_infinite","clover_level_1","clover_level_2","clover_level_3","clover_level_4","clover_level_5","clover_level_6"}
  835.         elseif level == "Cape Canaveral" then
  836.             levellist = {"jojo_infinite","jojo_level_1","jojo_level_2","jojo_level_3","jojo_level_4","jojo_level_5","jojo_level_6",}
  837.         elseif level == "Alien Spaceship" then
  838.             levellist = {"opm_infinite","opm_level_1","opm_level_2","opm_level_3","opm_level_4","opm_level_5","opm_level_6",}
  839.         elseif level == "Fabled Kingdom" then
  840.             levellist = {"7ds_infinite","7ds_level_1","7ds_level_2","7ds_level_3","7ds_level_4","7ds_level_5","7ds_level_6",}
  841.         --///Legend Stages\\\---
  842.         elseif level == "Clover Kingdom (Elf Invasion)" then
  843.             levellist = {"clover_legend_1","clover_legend_2","clover_legend_3"}
  844.         elseif level == "Hollow Invasion" then
  845.             levellist = {"bleach_legend_1","bleach_legend_2","bleach_legend_3","bleach_legend_4","bleach_legend_5","bleach_legend_6"}
  846.         elseif level == "Cape Canaveral (Legend)" then
  847.             levellist = {"jojo_legend_1","jojo_legend_2","jojo_legend_3"}
  848.         elseif level == "Fabled Kingdom (Legend)" then
  849.             levellist = {"7ds_legend_1","7ds_legend_2","7ds_legend_3"}
  850.         --///Raids\\\---
  851.         elseif level == "Storm Hideout" then
  852.             levellist = {"uchiha_level_1","uchiha_level_2","uchiha_level_3","uchiha_level_4","uchiha_level_5"}
  853.         elseif level == "West City" then
  854.             levellist = {"west_city_raid"}
  855.         elseif level == "Infinity Train" then
  856.             levellist = {"demonslayer_raid_1"}
  857.         elseif level == "Shiganshinu District - Raid" then
  858.             levellist = {"aot_raid_1"}
  859.         elseif level == "Hiddel Sand Village - Raid" then
  860.             levellist = {"naruto_raid_1"}
  861.         elseif level == "Freezo's Invasion" then
  862.             levellist = {"west_city_frieza_level_1","west_city_frieza_level_2","west_city_frieza_level_3","west_city_frieza_level_4","west_city_frieza_level_5"}
  863.         --///Portals\\\---
  864.         elseif level == "Alien Portals" then
  865.             levellist = {"portal_boros_g"}
  866.         elseif level == "Devil Portals (ANY)" then
  867.             levellist = {"portal_csm"}
  868.         elseif level == "Demon Portals" then
  869.             levellist = {"portal_zeldris"}
  870.             ---///Dungeon\\\---    updatefix
  871.         elseif level == "Cursed Womb" then
  872.             levellist = {"jjk_finger"}
  873.         elseif level == "Crused Parade" then
  874.             levellist = {"jjk_raid"}
  875.         end
  876.         for i = 1, #levellist do
  877.             selectlevel:AddOption(levellist[i])
  878.         end
  879.     end
  880.     local selectdiff = SelectWorld:Cheat("Dropdown", "💦 Difficulty",function(value)
  881.         print(value, " Selected")
  882.         Settings.Difficulty = value
  883.         saveSettings()
  884.     end, {
  885.         options = {}, default = Settings.Difficulty
  886.     })
  887.     getgenv().updatedifficulty = function()
  888.         selectdiff:ClearDrop(); level = Settings.SelectedLevel; cata = Settings.WorldCategory; local diff;
  889.         if level == "namek_infinite" or level == "aot_infinite" or level == "demonslayer_infinite"
  890.         or level == "naruto_infinite" or level == "marineford_infinite" or level == "tokyoghoul_infinite" or level == "hueco_infinite"
  891.         or level == "hxhant_infinite" or level == "magnolia_infinite" or level == "jjk_infinite" or level == "clover_infinite"
  892.         or level == "jojo_infinite" or level == "opm_infinite" or cata == "Legend Stages" or cata == "Raid Worlds" then
  893.             diff = {"Hard"}
  894.         elseif cata == "Portals" or cata == "Dungeon"  then
  895.             diff = {"Default"}
  896.         else
  897.             diff = {"Normal", "Hard"}
  898.         end
  899.         for i = 1, #diff do
  900.             selectdiff:AddOption(diff[i])
  901.         end
  902.     end
  903.    
  904.     SelectWorld:Cheat("Checkbox","🙋️ Friends Only  ", function(bool)
  905.         print(bool)
  906.         Settings.isFriendOnly = bool
  907.         saveSettings()
  908.     end,{enabled = Settings.isFriendOnly})
  909. end
  910. ----------------------------------------------
  911. ---------------- AutoFarm Config -------------
  912. ----------------------------------------------
  913. local function AutoFarmSec()
  914.     AutoFarmConfig:Cheat("Checkbox","🌾 Auto Start  ", function(bool)
  915.         print(bool)
  916.         Settings.autostart = bool
  917.         saveSettings()
  918.     end,{enabled = Settings.autostart })
  919.     AutoFarmConfig:Cheat("Checkbox","👨‍🌾 Auto Place unit  ", function(bool)
  920.         print(bool)
  921.         Settings.AutoFarm = bool
  922.         saveSettings()
  923.     end,{enabled = Settings.AutoFarm })
  924.     AutoFarmConfig:Cheat("Checkbox","🏃 Auto Replay  ", function(bool)
  925.         print(bool)
  926.         Settings.AutoReplay = bool
  927.         saveSettings()
  928.     end,{enabled = Settings.AutoReplay})
  929.     AutoFarmConfig:Cheat("Checkbox","🏃 Auto Next Story  ", function(bool)
  930.         print(bool)
  931.         Settings.AutoNext = bool
  932.         saveSettings()
  933.     end,{enabled = Settings.AutoNext})
  934.     AutoFarmConfig:Cheat("Checkbox","🏃 Auto Leave  ", function(bool)
  935.         print(bool)
  936.         Settings.AutoLeave = bool
  937.         saveSettings()
  938.     end,{enabled = Settings.AutoLeave})
  939.    
  940.     AutoFarmConfig:Cheat("Checkbox","🔥 Auto Abilities  ", function(bool)
  941.         print(bool)
  942.         Settings.AutoAbilities = bool
  943.         saveSettings()
  944.     end,{enabled = Settings.AutoAbilities})
  945.     AutoFarmConfig:Cheat("Checkbox","⭐️ Auto Upgrade Units  ", function(bool)
  946.         print(bool)
  947.         Settings.AutoUpgrade = bool
  948.         saveSettings()
  949.     end,{enabled = Settings.AutoUpgrade})
  950.     AutoFarmConfig:Cheat("Checkbox","⭐️ Sell Units At Wave  ", function(bool)
  951.         print(bool)
  952.         Settings.AutoSell = bool
  953.         saveSettings()
  954.     end,{enabled = Settings.AutoSell})
  955.     AutoFarmConfig:Cheat("Checkbox","⭐️ Leave At Wave  ", function(bool)
  956.         print(bool)
  957.         Settings.autoQuit = bool
  958.         saveSettings()
  959.     end,{enabled = Settings.autoQuit})
  960.     AutoFarmConfig:Cheat("Textbox", "Sell or Leave at Wave", function(Value)
  961.         Value = tonumber(Value)
  962.         Settings.AutoSellWave = Value
  963.         saveSettings()
  964.     end, {placeholder = Settings.AutoSellWave})
  965. end
  966. ----------------------------------------------
  967. --------------- More Farm Config ------------- Settings.autoQuit
  968. ----------------------------------------------
  969. local function MoreFarmSec()
  970.     MoreFarmConfig:Cheat("Checkbox","🏯 Auto Next Level inf castle  ", function(bool)
  971.         print(bool)
  972.         Settings.AutoContinue = bool
  973.         saveSettings()
  974.     end,{enabled = Settings.AutoContinue })
  975.     MoreFarmConfig:Cheat("Checkbox","🏰️ Auto Infinity Castle  ", function(bool)
  976.         print(bool)
  977.         Settings.AutoInfinityCastle = bool
  978.         saveSettings()
  979.     end,{enabled = Settings.AutoInfinityCastle})
  980. end
  981. ----------------------------------------------
  982. ----------------- Challenge ------------------
  983. ----------------------------------------------
  984. local function ChallengeSec()
  985.     local challengeconfig = ChallengeConfig:Cheat("Dropdown", "🥇 Select Reward",function(value)
  986.         print(value)
  987.         Settings.SelectedReward = value
  988.         saveSettings()
  989.     end, { options = {"star_fruit_random","star_remnant","gems", "gold"}, default =Settings.SelectedReward})
  990.     ChallengeConfig:Cheat("Checkbox","🎯 Auto Challenge  ", function(bool)
  991.         print(bool)
  992.         Settings.AutoChallenge = bool
  993.         saveSettings()
  994.     end, {enabled =Settings.AutoChallenge})
  995.     ChallengeConfig:Cheat("Checkbox","🏆 Farm Any Rewards  ", function(bool)
  996.         print(bool)
  997.        Settings.AutoChallengeAll = bool
  998.         saveSettings()
  999.     end,{enabled =Settings.AutoChallengeAll})
  1000. end
  1001. ----------------------------------------------
  1002. ------------------ credits -------------------
  1003. ----------------------------------------------
  1004. local function credits()
  1005.     Developers:Cheat("Label","📝 Scripted by: Arpon AG#6612 & Forever4D#0001 & HOLYSHz#3819 ")    
  1006.     Developers:Cheat("Label","📝 Also thanks to Trapstar#7845, bytenode#9646 for the help!")    
  1007.     Developers:Cheat("Label","📐 UI By: detourious @ v3rmillion.net")    
  1008.     Developers:Cheat("Label","🔧 To toggle the script press \"RightControl\"")  
  1009.     Developers:Cheat("Button","🔗 Discord Invite", function()
  1010.         setclipboard("https://discord.gg/2ttfCfzxut")
  1011.     end)    
  1012.     UIUPDT:Cheat("Label","[+] idk \n[+]reeeeeeeeeee")    
  1013. end
  1014. getgenv().posX = 1.5
  1015. getgenv().posZ = 1.5
  1016. ----------------------------------------------
  1017. ---------------- Unit Config -----------------
  1018. ----------------------------------------------
  1019. function updatepos(map, UnitPos, a,a2,a3,a4,a5,a6)
  1020.     warn(map)      
  1021.     if Settings[map] == nil then
  1022.         Settings[map] = {}
  1023.         saveSettings()
  1024.     end
  1025.     if Settings[map][UnitPos] == nil then
  1026.         Settings[map] = {
  1027.             UP1 = {
  1028.                 x = 0,
  1029.                 z = 0,
  1030.                 y = 0,
  1031.                 y2 = 0,
  1032.                 y3 = 0,
  1033.                 y4 = 0,
  1034.                 y5 = 0,
  1035.                 y6 = 0
  1036.             },
  1037.             UP2 = {
  1038.                 x = 0,
  1039.                 z = 0,
  1040.                 y = 0,
  1041.                 y2 = 0,
  1042.                 y3 = 0,
  1043.                 y4 = 0,
  1044.                 y5 = 0,
  1045.                 y6 = 0
  1046.                 },
  1047.             UP3 = {
  1048.                 x = 0,
  1049.                 z = 0,
  1050.                 y = 0,
  1051.                 y2 = 0,
  1052.                 y3 = 0,
  1053.                 y4 = 0,
  1054.                 y5 = 0,
  1055.                 y6 = 0
  1056.             },
  1057.             UP4 = {
  1058.                 x = 0,
  1059.                 z = 0,
  1060.                 y = 0,
  1061.                 y2 = 0,
  1062.                 y3 = 0,
  1063.                 y4 = 0,
  1064.                 y5 = 0,
  1065.                 y6 = 0
  1066.             },
  1067.             UP5 = {
  1068.                 x = 0,
  1069.                 z = 0,
  1070.                 y = 0,
  1071.                 y2 = 0,
  1072.                 y3 = 0,
  1073.                 y4 = 0,
  1074.                 y5 = 0,
  1075.                 y6 = 0
  1076.             },
  1077.             UP6 = {
  1078.                 x = 0,
  1079.                 z = 0,
  1080.                 y = 0,
  1081.                 y2 = 0,
  1082.                 y3 = 0,
  1083.                 y4 = 0,
  1084.                 y5 = 0,
  1085.                 y6 = 0
  1086.             }
  1087.         }
  1088.     saveSettings()
  1089.     end
  1090.     pcall(function()
  1091.        
  1092.     end)
  1093.     Settings[map][UnitPos]["x"] = a.Position.X
  1094.     Settings[map][UnitPos]["z"] = a.Position.Z
  1095.     Settings[map][UnitPos]["y"] = a.Position.Y
  1096.     Settings[map][UnitPos]["y2"] = a2.Position.Y
  1097.     Settings[map][UnitPos]["y3"] = a3.Position.Y
  1098.     Settings[map][UnitPos]["y4"] = a4.Position.Y
  1099.     Settings[map][UnitPos]["y5"] = a5.Position.Y
  1100.     Settings[map][UnitPos]["y6"] = a6.Position.Y
  1101.     print("updatepos")
  1102.     saveSettings()
  1103. end
  1104. --updatefix fixmap
  1105. function savepos(UnitPos, a,a2,a3,a4,a5,a6)
  1106.     if game.Workspace._map:FindFirstChild("namek mushroom model") then
  1107.         updatepos("Namak", UnitPos, a,a2,a3,a4,a5,a6)
  1108.     elseif game.Workspace._map:FindFirstChild("houses_new") then
  1109.         updatepos("Aot", UnitPos, a,a2,a3,a4,a5,a6)
  1110.     elseif game.Workspace._map:FindFirstChild("Snow Particles") then
  1111.         updatepos("Snowy", UnitPos, a,a2,a3,a4,a5,a6)
  1112.     elseif game.Workspace._map:FindFirstChild("sand_gate") then
  1113.         updatepos("Sand", UnitPos, a,a2,a3,a4,a5,a6)
  1114.     elseif game.Workspace._map:FindFirstChild("icebergs") then
  1115.         updatepos("Marine", UnitPos, a,a2,a3,a4,a5,a6)
  1116.     elseif game.Workspace._map:FindFirstChild("Helicopter Pad") then
  1117.         updatepos("Ghoul", UnitPos, a,a2,a3,a4,a5,a6)
  1118.     elseif game.Workspace._map:FindFirstChild("Bones/dust") then
  1119.         updatepos("Hollow", UnitPos, a,a2,a3,a4,a5,a6)
  1120.     elseif game.Workspace._map:FindFirstChild("Ant Nest") then
  1121.         updatepos("Ant", UnitPos, a,a2,a3,a4,a5,a6)
  1122.     elseif game.Workspace._map:FindFirstChild("light poles") then
  1123.         updatepos("Magic", UnitPos, a,a2,a3,a4,a5,a6)
  1124.     elseif game.Workspace._map:FindFirstChild("LanternsGround") then
  1125.         updatepos("Cursed", UnitPos, a,a2,a3,a4,a5,a6)
  1126.     elseif game.Workspace._map:FindFirstChild("pumpkins") then    
  1127.         updatepos("thriller_park", UnitPos, a,a2,a3,a4,a5,a6)
  1128.     elseif game.Workspace._map:FindFirstChild("skeleton") then
  1129.         updatepos("black_clover", UnitPos, a,a2,a3,a4,a5,a6)
  1130.     elseif game.Workspace._map:FindFirstChild("graves") then
  1131.         updatepos("hollow_leg", UnitPos, a,a2,a3,a4,a5,a6)
  1132.     elseif game.Workspace._map:FindFirstChild("vending machines") then
  1133.         updatepos("chainsaw", UnitPos, a,a2,a3,a4,a5,a6)
  1134.     elseif game.Workspace._map:FindFirstChild("SpaceCenter") then
  1135.         updatepos("jojo", UnitPos, a,a2,a3,a4,a5,a6)
  1136.     elseif game.Workspace._map:FindFirstChild("secret") then
  1137.         updatepos("opm", UnitPos, a,a2,a3,a4,a5,a6)
  1138.     elseif game.Workspace._map:FindFirstChild("s") then
  1139.         updatepos("west_city", UnitPos, a,a2,a3,a4,a5,a6)
  1140.     elseif game.Workspace._map:FindFirstChild("Capybara") then
  1141.         updatepos("Storm_Hideout", UnitPos, a,a2,a3,a4,a5,a6)
  1142.     elseif game.Workspace._map:FindFirstChild("snow grass") then
  1143.        updatepos("infinity_trian", UnitPos, a,a2,a3,a4,a5,a6)
  1144.     elseif game.Workspace._map:FindFirstChild("misc nonocollide obstacles") then
  1145.         updatepos("fabled_kingdom", UnitPos, a,a2,a3,a4,a5,a6)
  1146.     end
  1147.     warn("savepos")
  1148. end
  1149. function mobilegui(UnitPos, a,a2,a3,a4,a5,a6)
  1150.     local BillboardGui = Instance.new("BillboardGui")
  1151.     local Frame = Instance.new("Frame")
  1152.     local UIListLayout = Instance.new("UIListLayout")
  1153.     local Done = Instance.new("TextButton")
  1154.     local UICorner = Instance.new("UICorner")
  1155.     local Cancel = Instance.new("TextButton")
  1156.     local UICorner_2 = Instance.new("UICorner")
  1157.     --Properties:
  1158.     BillboardGui.Adornee = a
  1159.     BillboardGui.Parent = game.Players.LocalPlayer.PlayerGui
  1160.     BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  1161.     BillboardGui.Active = true
  1162.     BillboardGui.LightInfluence = 1.000
  1163.     BillboardGui.Size = UDim2.new(7, 0, 3, 0)
  1164.     BillboardGui.SizeOffset = Vector2.new(0, 1.5)
  1165.     Frame.Parent = BillboardGui
  1166.     Frame.BackgroundColor3 = Color3.fromRGB(49, 49, 57)
  1167.     Frame.BackgroundTransparency = 1.000
  1168.     Frame.Size = UDim2.new(1, 0, 0.5, 0)
  1169.     UIListLayout.Parent = Frame
  1170.     UIListLayout.FillDirection = Enum.FillDirection.Horizontal
  1171.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  1172.     UIListLayout.Padding = UDim.new(0.0599999987, 0)
  1173.     Done.Name = "Done"
  1174.     Done.Parent = Frame
  1175.     Done.BackgroundColor3 = Color3.fromRGB(34, 255, 0)
  1176.     Done.Size = UDim2.new(0.469999999, 0, 1, 0)
  1177.     Done.Font = Enum.Font.SourceSansBold
  1178.     Done.Text = "Done"
  1179.     Done.TextColor3 = Color3.fromRGB(255, 255, 255)
  1180.     Done.TextScaled = true
  1181.     Done.TextSize = 1.000
  1182.     Done.TextWrapped = true
  1183.     Done.Activated:Connect(function()
  1184.         _G.gg = false
  1185.         savepos(UnitPos, a,a2,a3,a4,a5,a6)
  1186.         for i = 0, 1, 0.1 do
  1187.             a.Transparency = i
  1188.             a2.Transparency = i
  1189.             a3.Transparency = i
  1190.             a4.Transparency = i
  1191.             a5.Transparency = i
  1192.             a6.Transparency = i
  1193.             task.wait()
  1194.         end
  1195.         a:Destroy()
  1196.         a2:Destroy()
  1197.         a3:Destroy()
  1198.         a4:Destroy()
  1199.         a5:Destroy()
  1200.         a6:Destroy()
  1201.         BillboardGui:Destroy();
  1202.     end)
  1203.    
  1204.     UICorner.CornerRadius = UDim.new(0.119999997, 0)
  1205.     UICorner.Parent = Done
  1206.     Cancel.Name = "Cancel"
  1207.     Cancel.Parent = Frame
  1208.     Cancel.BackgroundColor3 = Color3.fromRGB(255, 0, 4)
  1209.     Cancel.Size = UDim2.new(0.469999999, 0, 1, 0)
  1210.     Cancel.Font = Enum.Font.SourceSansBold
  1211.     Cancel.Text = "Cancel"
  1212.     Cancel.TextColor3 = Color3.fromRGB(255, 255, 255)
  1213.     Cancel.TextScaled = true
  1214.     Cancel.TextSize = 1.000
  1215.     Cancel.TextWrapped = true
  1216.     Cancel.Activated:Connect(function()
  1217.         print("Cancel")
  1218.         _G.gg = false
  1219.         for i = 0, 1, 0.1 do
  1220.             a.Transparency = i
  1221.             a2.Transparency = i
  1222.             a3.Transparency = i
  1223.             a4.Transparency = i
  1224.             a5.Transparency = i
  1225.             a6.Transparency = i
  1226.             task.wait()
  1227.         end
  1228.         a:Destroy()
  1229.         a2:Destroy()
  1230.         a3:Destroy()
  1231.         a4:Destroy()
  1232.         a5:Destroy()
  1233.         a6:Destroy()
  1234.         BillboardGui:Destroy();
  1235.     end)
  1236.    
  1237.     UICorner_2.CornerRadius = UDim.new(0.119999997, 0)
  1238.     UICorner_2.Parent = Cancel
  1239. end
  1240. function MouseClick2(UnitPos)
  1241.     if UserInputService.TouchEnabled then mobile = true else mobile = false end
  1242.     print("a")
  1243.     local raycastParams = RaycastParams.new()
  1244.     raycastParams.FilterType = Enum.RaycastFilterType.Whitelist
  1245.     raycastParams.FilterDescendantsInstances = {game:GetService("Workspace")["_terrain"]}
  1246.     _G.gg = true
  1247.     task.wait(0.5)
  1248.     local x = getgenv().posX
  1249.     local z = getgenv().posZ
  1250.     local a = Instance.new("Part", game.Workspace)
  1251.     local a2 = Instance.new("Part", game.Workspace)
  1252.     local a3 = Instance.new("Part", game.Workspace)
  1253.     local a4 = Instance.new("Part", game.Workspace)
  1254.     local a5 = Instance.new("Part", game.Workspace)
  1255.     local a6 = Instance.new("Part", game.Workspace)
  1256.     a.Size = Vector3.new(1, 1, 1)
  1257.     a2.Size = Vector3.new(1, 1, 1)
  1258.     a3.Size = Vector3.new(1, 1, 1)
  1259.     a4.Size = Vector3.new(1, 1, 1)
  1260.     a5.Size = Vector3.new(1, 1, 1)
  1261.     a6.Size = Vector3.new(1, 1, 1)
  1262.     a.Material = Enum.Material.Neon
  1263.     a2.Material = Enum.Material.Neon
  1264.     a3.Material = Enum.Material.Neon
  1265.     a4.Material = Enum.Material.Neon
  1266.     a5.Material = Enum.Material.Neon
  1267.     a6.Material = Enum.Material.Neon
  1268.     --a.Position = mouse.hit.p
  1269.     game:GetService("RunService").RenderStepped:Connect(function()
  1270.         pcall(function()
  1271.             if _G.gg and not mobile then
  1272.                 mouse.TargetFilter  = a
  1273.                 local xPos = mouse.Hit.Position.X --x position of unit
  1274.                 local zPos = mouse.Hit.Position.Z --z position of unit
  1275.                 local rayOrigin = CFrame.new(xPos, 1000, zPos).p
  1276.                 local rayDestination = CFrame.new(xPos, -500, zPos).p
  1277.                 local rayDirection = (rayDestination - rayOrigin)
  1278.                 local raycastResult = workspace:Raycast(rayOrigin, rayDirection, raycastParams)
  1279.                 a.CFrame = CFrame.new(raycastResult.Position) * CFrame.Angles(0, -0, -0)
  1280.                 local xPos2 = a.Position.X --x position of unit
  1281.                 local zPos2 = a.Position.Z + z --z position of unit
  1282.                 local rayOrigin2 = CFrame.new(xPos2, 1000, zPos2).p
  1283.                 local rayDestination2 = CFrame.new(xPos2, -500, zPos2).p
  1284.                 local rayDirection2 = (rayDestination2 - rayOrigin2)
  1285.                 local raycastResult2 = workspace:Raycast(rayOrigin2, rayDirection2, raycastParams)
  1286.                 a2.CFrame = CFrame.new(raycastResult2.Position) * CFrame.Angles(0, -0, -0)
  1287.                 local xPos3 = a.Position.X + x --x position of unit
  1288.                 local zPos3 = a.Position.Z  --z position of unit
  1289.                 local rayOrigin3 = CFrame.new(xPos3, 1000, zPos3).p
  1290.                 local rayDestination3 = CFrame.new(xPos3, -500, zPos3).p
  1291.                 local rayDirection3 = (rayDestination3 - rayOrigin3)
  1292.                 local raycastResult3 = workspace:Raycast(rayOrigin3, rayDirection3, raycastParams)
  1293.                 a3.CFrame = CFrame.new(raycastResult3.Position) * CFrame.Angles(0, -0, -0)
  1294.                 local xPos4 = a.Position.X - x --x position of unit
  1295.                 local zPos4 = a.Position.Z  --z position of unit
  1296.                 local rayOrigin4 = CFrame.new(xPos4, 1000, zPos4).p
  1297.                 local rayDestination4 = CFrame.new(xPos4, -500, zPos4).p
  1298.                 local rayDirection4 = (rayDestination4 - rayOrigin4)
  1299.                 local raycastResult4 = workspace:Raycast(rayOrigin4, rayDirection4, raycastParams)
  1300.                 a4.CFrame = CFrame.new(raycastResult4.Position) * CFrame.Angles(0, -0, -0)
  1301.                 local xPos5 = a.Position.X + x--x position of unit
  1302.                 local zPos5 = a.Position.Z + z --z position of unit
  1303.                 local rayOrigin5 = CFrame.new(xPos5, 1000, zPos5).p
  1304.                 local rayDestination5 = CFrame.new(xPos5, -500, zPos5).p
  1305.                 local rayDirection5 = (rayDestination5 - rayOrigin5)
  1306.                 local raycastResult5 = workspace:Raycast(rayOrigin5, rayDirection5, raycastParams)
  1307.                 a5.CFrame = CFrame.new(raycastResult5.Position) * CFrame.Angles(0, -0, -0)
  1308.                 local xPos6 = a.Position.X - x --x position of unit
  1309.                 local zPos6 = a.Position.Z + z --z position of unit
  1310.                 local rayOrigin6 = CFrame.new(xPos6, 1000, zPos6).p
  1311.                 local rayDestination6 = CFrame.new(xPos6, -500, zPos6).p
  1312.                 local rayDirection6 = (rayDestination6 - rayOrigin6)
  1313.                 local raycastResult6 = workspace:Raycast(rayOrigin6, rayDirection6, raycastParams)
  1314.                 a6.CFrame = CFrame.new(raycastResult6.Position) * CFrame.Angles(0, -0, -0) 
  1315.             elseif _G.gg and mobile then
  1316.                 warn("MOBILE DEVICE")
  1317.                 UserInputService.TouchLongPress:Connect(function()
  1318.                     mouse.TargetFilter  = a
  1319.                     local xPos = mouse.Hit.Position.X --x position of unit
  1320.                     local zPos = mouse.Hit.Position.Z --z position of unit
  1321.                     local rayOrigin = CFrame.new(xPos, 1000, zPos).p
  1322.                     local rayDestination = CFrame.new(xPos, -500, zPos).p
  1323.                     local rayDirection = (rayDestination - rayOrigin)
  1324.                     local raycastResult = workspace:Raycast(rayOrigin, rayDirection, raycastParams)
  1325.                     a.CFrame = CFrame.new(raycastResult.Position) * CFrame.Angles(0, -0, -0)
  1326.                     local xPos2 = a.Position.X --x position of unit
  1327.                     local zPos2 = a.Position.Z + z --z position of unit
  1328.                     local rayOrigin2 = CFrame.new(xPos2, 1000, zPos2).p
  1329.                     local rayDestination2 = CFrame.new(xPos2, -500, zPos2).p
  1330.                     local rayDirection2 = (rayDestination2 - rayOrigin2)
  1331.                     local raycastResult2 = workspace:Raycast(rayOrigin2, rayDirection2, raycastParams)
  1332.                     a2.CFrame = CFrame.new(raycastResult2.Position) * CFrame.Angles(0, -0, -0)
  1333.                     local xPos3 = a.Position.X + x --x position of unit
  1334.                     local zPos3 = a.Position.Z  --z position of unit
  1335.                     local rayOrigin3 = CFrame.new(xPos3, 1000, zPos3).p
  1336.                     local rayDestination3 = CFrame.new(xPos3, -500, zPos3).p
  1337.                     local rayDirection3 = (rayDestination3 - rayOrigin3)
  1338.                     local raycastResult3 = workspace:Raycast(rayOrigin3, rayDirection3, raycastParams)
  1339.                     a3.CFrame = CFrame.new(raycastResult3.Position) * CFrame.Angles(0, -0, -0)
  1340.                     local xPos4 = a.Position.X - x --x position of unit
  1341.                     local zPos4 = a.Position.Z  --z position of unit
  1342.                     local rayOrigin4 = CFrame.new(xPos4, 1000, zPos4).p
  1343.                     local rayDestination4 = CFrame.new(xPos4, -500, zPos4).p
  1344.                     local rayDirection4 = (rayDestination4 - rayOrigin4)
  1345.                     local raycastResult4 = workspace:Raycast(rayOrigin4, rayDirection4, raycastParams)
  1346.                     a4.CFrame = CFrame.new(raycastResult4.Position) * CFrame.Angles(0, -0, -0)
  1347.                     local xPos5 = a.Position.X + x--x position of unit
  1348.                     local zPos5 = a.Position.Z + z --z position of unit
  1349.                     local rayOrigin5 = CFrame.new(xPos5, 1000, zPos5).p
  1350.                     local rayDestination5 = CFrame.new(xPos5, -500, zPos5).p
  1351.                     local rayDirection5 = (rayDestination5 - rayOrigin5)
  1352.                     local raycastResult5 = workspace:Raycast(rayOrigin5, rayDirection5, raycastParams)
  1353.                     a5.CFrame = CFrame.new(raycastResult5.Position) * CFrame.Angles(0, -0, -0)
  1354.                     local xPos6 = a.Position.X - x --x position of unit
  1355.                     local zPos6 = a.Position.Z + z --z position of unit
  1356.                     local rayOrigin6 = CFrame.new(xPos6, 1000, zPos6).p
  1357.                     local rayDestination6 = CFrame.new(xPos6, -500, zPos6).p
  1358.                     local rayDirection6 = (rayDestination6 - rayOrigin6)
  1359.                     local raycastResult6 = workspace:Raycast(rayOrigin6, rayDirection6, raycastParams)
  1360.                     a6.CFrame = CFrame.new(raycastResult6.Position) * CFrame.Angles(0, -0, -0) 
  1361.                 end)
  1362.             end
  1363.         end)
  1364.     end)
  1365.     task.wait()
  1366.     a.Anchored = true
  1367.     a2.Anchored = true
  1368.     a3.Anchored = true
  1369.     a4.Anchored = true
  1370.     a5.Anchored = true
  1371.     a6.Anchored = true
  1372.     a.CanCollide = false
  1373.     a2.CanCollide = false
  1374.     a3.CanCollide = false
  1375.     a4.CanCollide = false
  1376.     a5.CanCollide = false
  1377.     a6.CanCollide = false
  1378.     if _G.gg and not mobile then
  1379.         kjqhwe = mouse.Button1Down:Connect(function()
  1380.             kjqhwe:Disconnect()
  1381.             print("b")
  1382.             savepos(UnitPos, a,a2,a3,a4,a5,a6)
  1383.             _G.gg = false
  1384.             for i = 0, 1, 0.1 do
  1385.                 a.Transparency = i
  1386.                 a2.Transparency = i
  1387.                 a3.Transparency = i
  1388.                 a4.Transparency = i
  1389.                 a5.Transparency = i
  1390.                 a6.Transparency = i
  1391.                 task.wait()
  1392.             end
  1393.             a:Destroy()
  1394.             a2:Destroy()
  1395.             a3:Destroy()
  1396.             a4:Destroy()
  1397.             a5:Destroy()
  1398.             a6:Destroy()
  1399.         end)
  1400.     elseif _G.gg  and mobile then
  1401.         mobilegui(UnitPos, a,a2,a3,a4,a5,a6)
  1402.     end
  1403. end
  1404. local function UnitPosSec()
  1405.     UnitPosition:Cheat("Button", "Unit 1 Position", function()
  1406.         MouseClick2("UP1")
  1407.     end)
  1408.     UnitPosition:Cheat("Button", "Unit 2 Position", function()
  1409.         MouseClick2("UP2")
  1410.     end)
  1411.     UnitPosition:Cheat("Button", "Unit 3 Position", function()
  1412.         MouseClick2("UP3")
  1413.     end)
  1414.     UnitPosition:Cheat("Button", "Unit 4 Position", function()
  1415.         MouseClick2("UP4")
  1416.     end)
  1417.     UnitPosition:Cheat("Button", "Unit 5 Position", function()
  1418.         MouseClick2("UP5")
  1419.     end)
  1420.     UnitPosition:Cheat("Button", "Unit 6 Position", function()
  1421.         MouseClick2("UP6")
  1422.     end)
  1423. end
  1424. local function unitconfig()
  1425.     --emptyxx:Cheat("Label","    ")
  1426.     --NDY:Cheat("Label","THIS SECTION IS NOT FINISHED SO IT WILL NOT WORK. FOR UPDATE JOIN DISCORD!")
  1427.     --NDY2:Cheat("Label","    ")
  1428.     NDY:Cheat("Checkbox"," Open Unit Config  ", function(bool)
  1429.         print(bool)
  1430.         Settings.unitconfig = bool
  1431.         saveSettings()
  1432.     end,{enabled = Settings.unitconfig })
  1433.     NDY2:Cheat("Button", "Test Reset unit config", function()
  1434.         print(Settings.reunitc)
  1435.         reunitcon()
  1436.     end)
  1437.     --//UNIT 1
  1438.     Unit1:Cheat("Textbox", "Placement Priority", function(Value)
  1439.         Value = tonumber(Value)
  1440.         Settings.U1_UnPlace = Value
  1441.         saveSettings()
  1442.     end, {placeholder = Settings.U1_UnPlace})
  1443.     Unit1:Cheat("Textbox", "Place from wave", function(Value)
  1444.         Value = tonumber(Value)
  1445.         Settings.U1_Wave = Value
  1446.         saveSettings()
  1447.     end, {placeholder = Settings.U1_Wave})
  1448.     Unit1:Cheat("Textbox", "Total Units", function(Value)
  1449.         Value = tonumber(Value)
  1450.         Settings.U1_TotalAmmount = Value
  1451.         saveSettings()
  1452.     end, {placeholder = Settings.U1_TotalAmmount})
  1453.     Unit1:Cheat("Textbox", "Upgrade Priority", function(Value)
  1454.         Value = tonumber(Value)
  1455.         Settings.U1_UpgPro = Value
  1456.         saveSettings()
  1457.     end, {placeholder = Settings.U1_UpgPro})
  1458.     Unit1:Cheat("Textbox", "Upgrade from wave", function(Value)
  1459.         Value = tonumber(Value)
  1460.         Settings.U1_UpgWave = Value
  1461.         saveSettings()
  1462.     end, {placeholder = Settings.U1_UpgWave})
  1463.     Unit1:Cheat("Textbox", "Upgrade Cap", function(Value)
  1464.         Value = tonumber(Value)
  1465.         Settings.U1_UpgCap = Value
  1466.         saveSettings()
  1467.     end, {placeholder = Settings.U1_UpgCap})
  1468.     Unit1:Cheat("Textbox", "Auto Sell at wave", function(Value)
  1469.         Value = tonumber(Value)
  1470.         Settings.U1_SellWave = Value
  1471.         saveSettings()
  1472.     end, {placeholder = Settings.U1_SellWave})
  1473.     --//UNIT 2
  1474.     Unit2:Cheat("Textbox", "Placement Priority", function(Value)
  1475.         Value = tonumber(Value)
  1476.         Settings.U2_UnPlace = Value
  1477.         saveSettings()
  1478.     end, {placeholder = Settings.U2_UnPlace})
  1479.     Unit2:Cheat("Textbox", "Place from wave", function(Value)
  1480.         Value = tonumber(Value)
  1481.         Settings.U2_Wave = Value
  1482.         saveSettings()
  1483.     end, {placeholder = Settings.U2_Wave})
  1484.     Unit2:Cheat("Textbox", "Total Units", function(Value)
  1485.         Value = tonumber(Value)
  1486.         Settings.U2_TotalAmmount = Value
  1487.         saveSettings()
  1488.     end, {placeholder = Settings.U2_TotalAmmount})
  1489.     Unit2:Cheat("Textbox", "Upgrade Priority", function(Value)
  1490.         Value = tonumber(Value)
  1491.         Settings.U2_UpgPro = Value
  1492.         saveSettings()
  1493.     end, {placeholder = Settings.U2_UpgPro})
  1494.     Unit2:Cheat("Textbox", "Upgrade from wave", function(Value)
  1495.         Value = tonumber(Value)
  1496.         Settings.U2_UpgWave = Value
  1497.         saveSettings()
  1498.     end, {placeholder = Settings.U2_UpgWave})
  1499.     Unit2:Cheat("Textbox", "Upgrade Cap", function(Value)
  1500.         Value = tonumber(Value)
  1501.         Settings.U2_UpgCap = Value
  1502.         saveSettings()
  1503.     end, {placeholder = Settings.U2_UpgCap})
  1504.     Unit2:Cheat("Textbox", "Auto Sell at wave", function(Value)
  1505.         Value = tonumber(Value)
  1506.         Settings.U2_SellWave = Value
  1507.         saveSettings()
  1508.     end, {placeholder = Settings.U2_SellWave})
  1509.    
  1510.     --//UNIT 3
  1511.     Unit3:Cheat("Textbox", "Placement Priority", function(Value)
  1512.         Value = tonumber(Value)
  1513.         Settings.U3_UnPlace = Value
  1514.         saveSettings()
  1515.     end, {placeholder = Settings.U3_UnPlace})
  1516.     Unit3:Cheat("Textbox", "Place from wave", function(Value)
  1517.         Value = tonumber(Value)
  1518.         Settings.U3_Wave = Value
  1519.         saveSettings()
  1520.     end, {placeholder = Settings.U3_Wave})
  1521.    
  1522.     Unit3:Cheat("Textbox", "Total Units", function(Value)
  1523.         Value = tonumber(Value)
  1524.         Settings.U3_TotalAmmount = Value
  1525.         saveSettings()
  1526.     end, {placeholder = Settings.U3_TotalAmmount})
  1527.     Unit3:Cheat("Textbox", "Upgrade Priority", function(Value)
  1528.         Value = tonumber(Value)
  1529.         Settings.U3_UpgPro = Value
  1530.         saveSettings()
  1531.     end, {placeholder = Settings.U3_UpgPro})
  1532.    
  1533.     Unit3:Cheat("Textbox", "Upgrade from wave", function(Value)
  1534.         Value = tonumber(Value)
  1535.         Settings.U3_UpgWave = Value
  1536.         saveSettings()
  1537.     end, {placeholder = Settings.U3_UpgWave})
  1538.    
  1539.     Unit3:Cheat("Textbox", "Upgrade Cap", function(Value)
  1540.         Value = tonumber(Value)
  1541.         Settings.U3_UpgCap = Value
  1542.         saveSettings()
  1543.     end, {placeholder = Settings.U3_UpgCap})
  1544.    
  1545.     Unit3:Cheat("Textbox", "Auto Sell at wave", function(Value)
  1546.         Value = tonumber(Value)
  1547.         Settings.U3_SellWave = Value
  1548.         saveSettings()
  1549.     end, {placeholder = Settings.U3_SellWave})
  1550.     --//UNIT 4
  1551.     Unit4:Cheat("Textbox", "Placement Priority", function(Value)
  1552.         Value = tonumber(Value)
  1553.         Settings.U4_UnPlace = Value
  1554.         saveSettings()
  1555.     end, {placeholder = Settings.U4_UnPlace})
  1556.     Unit4:Cheat("Textbox", "Place from wave", function(Value)
  1557.         Value = tonumber(Value)
  1558.         Settings.U4_Wave = Value
  1559.         saveSettings()
  1560.     end, {placeholder = Settings.U4_Wave})
  1561.    
  1562.     Unit4:Cheat("Textbox", "Total Units", function(Value)
  1563.         Value = tonumber(Value)
  1564.         Settings.U4_TotalAmmount = Value
  1565.         saveSettings()
  1566.     end, {placeholder = Settings.U4_TotalAmmount})
  1567.     Unit4:Cheat("Textbox", "Upgrade Priority", function(Value)
  1568.         Value = tonumber(Value)
  1569.         Settings.U4_UpgPro = Value
  1570.         saveSettings()
  1571.     end, {placeholder = Settings.U4_UpgPro})
  1572.    
  1573.     Unit4:Cheat("Textbox", "Upgrade from wave", function(Value)
  1574.         Value = tonumber(Value)
  1575.         Settings.U4_UpgWave = Value
  1576.         saveSettings()
  1577.     end, {placeholder = Settings.U4_UpgWave})
  1578.    
  1579.     Unit4:Cheat("Textbox", "Upgrade Cap", function(Value)
  1580.         Value = tonumber(Value)
  1581.         Settings.U4_UpgCap = Value
  1582.         saveSettings()
  1583.     end, {placeholder = Settings.U4_UpgCap})
  1584.    
  1585.     Unit4:Cheat("Textbox", "Auto Sell at wave", function(Value)
  1586.         Value = tonumber(Value)
  1587.         Settings.U4_SellWave = Value
  1588.         saveSettings()
  1589.     end, {placeholder = Settings.U4_SellWave})
  1590.    
  1591.     --//UNIT 5
  1592.     Unit5:Cheat("Textbox", "Placement Priority", function(Value)
  1593.         Value = tonumber(Value)
  1594.         Settings.U5_UnPlace = Value
  1595.         saveSettings()
  1596.     end, {placeholder = Settings.U5_UnPlace})
  1597.     Unit5:Cheat("Textbox", "Place from wave", function(Value)
  1598.         Value = tonumber(Value)
  1599.         Settings.U5_Wave = Value
  1600.         saveSettings()
  1601.     end, {placeholder = Settings.U5_Wave})
  1602.        
  1603.     Unit5:Cheat("Textbox", "Total Units", function(Value)
  1604.         Value = tonumber(Value)
  1605.         Settings.U5_TotalAmmount = Value
  1606.         saveSettings()
  1607.     end, {placeholder = Settings.U5_TotalAmmount})
  1608.     Unit5:Cheat("Textbox", "Upgrade Priority", function(Value)
  1609.         Value = tonumber(Value)
  1610.         Settings.U5_UpgPro = Value
  1611.         saveSettings()
  1612.     end, {placeholder = Settings.U5_UpgPro})
  1613.        
  1614.     Unit5:Cheat("Textbox", "Upgrade from wave", function(Value)
  1615.         Value = tonumber(Value)
  1616.         Settings.U5_UpgWave = Value
  1617.         saveSettings()
  1618.     end, {placeholder = Settings.U5_UpgWave})
  1619.        
  1620.     Unit5:Cheat("Textbox", "Upgrade Cap", function(Value)
  1621.         Value = tonumber(Value)
  1622.         Settings.U5_UpgCap = Value
  1623.         saveSettings()
  1624.     end, {placeholder = Settings.U5_UpgCap})
  1625.        
  1626.     Unit5:Cheat("Textbox", "Auto Sell at wave", function(Value)
  1627.         Value = tonumber(Value)
  1628.         Settings.U5_SellWave = Value
  1629.         saveSettings()
  1630.     end, {placeholder = Settings.U5_SellWave})
  1631.     --//UNIT 6
  1632.     Unit6:Cheat("Textbox", "Placement Priority", function(Value)
  1633.         Value = tonumber(Value)
  1634.         Settings.U6_UnPlace = Value
  1635.         saveSettings()
  1636.     end, {placeholder = Settings.U6_UnPlace})
  1637.     Unit6:Cheat("Textbox", "Place from wave", function(Value)
  1638.         Value = tonumber(Value)
  1639.         Settings.U6_Wave = Value
  1640.         saveSettings()
  1641.     end, {placeholder = Settings.U6_Wave})
  1642.    
  1643.     Unit6:Cheat("Textbox", "Total Units", function(Value)
  1644.         Value = tonumber(Value)
  1645.         Settings.U6_TotalAmmount = Value
  1646.         saveSettings()
  1647.     end, {placeholder = Settings.U6_TotalAmmount})
  1648.     Unit6:Cheat("Textbox", "Upgrade Priority", function(Value)
  1649.         Value = tonumber(Value)
  1650.         Settings.U6_UpgPro = Value
  1651.         saveSettings()
  1652.     end, {placeholder = Settings.U6_UpgPro})
  1653.    
  1654.     Unit6:Cheat("Textbox", "Upgrade from wave", function(Value)
  1655.         Value = tonumber(Value)
  1656.         Settings.U6_UpgWave = Value
  1657.         saveSettings()
  1658.     end, {placeholder = Settings.U6_UpgWave})
  1659.    
  1660.     Unit6:Cheat("Textbox", "Upgrade Cap", function(Value)
  1661.         Value = tonumber(Value)
  1662.         Settings.U6_UpgCap = Value
  1663.         saveSettings()
  1664.     end, {placeholder = Settings.U6_UpgCap})
  1665.    
  1666.     Unit6:Cheat("Textbox", "Auto Sell at wave", function(Value)
  1667.         Value = tonumber(Value)
  1668.         Settings.U6_SellWave = Value
  1669.         saveSettings()
  1670.     end, {placeholder = Settings.U6_SellWave})
  1671. end
  1672. ----------------------------------------------
  1673. ---------------- Auto Summon -----------------
  1674. ----------------------------------------------
  1675. function SummonUnits(banner, method)
  1676.     local args = {
  1677.         [1] = tostring(banner),
  1678.         [2] = tostring(method)
  1679.     }
  1680.     game:GetService("ReplicatedStorage").endpoints.client_to_server.buy_from_banner:InvokeServer(unpack(args))
  1681.     wait(1.5)
  1682. end
  1683. function AutoSummon()
  1684.     local aaselectbanner = AutoSummonSec:Cheat("Dropdown", "Select Banner",function(value)
  1685.         getgenv().SelectedBanner = value
  1686.     end, { options = {"Special", "Standard"}})
  1687.     local aaselectbanner = AutoSummonSec:Cheat("Dropdown", "Select Method",function(value)
  1688.         getgenv().SelectedMethod = value
  1689.     end, { options = {"ticket", "gems", "gems10"}})
  1690.     AutoSummonSec:Cheat("Checkbox","Auto Summon", function(bool)
  1691.         getgenv().AutoSummon = bool
  1692.     end)
  1693. end
  1694. ----------------------------------------------
  1695. ------------ Auto Snipe Merchant -------------
  1696. ----------------------------------------------
  1697. function buymerchant(item)
  1698.     local args = { [1] = item }
  1699.     game:GetService("ReplicatedStorage").endpoints.client_to_server.buy_travelling_merchant_item:InvokeServer(unpack(args))
  1700. end
  1701. function snipefunc(item)
  1702.     if item =="Any StarFruits" then
  1703.         if game:GetService("Workspace")["travelling_merchant"]["is_open"].Value == true then
  1704.             for i,v in pairs(game:GetService("Workspace")["travelling_merchant"]:FindFirstChild("stand"):FindFirstChild("items"):GetChildren()) do
  1705.                 if v.Name:match("StarFruitsRainbow") then
  1706.                     buymerchant(v.Name)
  1707.                     print(v.Name)
  1708.                 end  
  1709.             end
  1710.         end        
  1711.     elseif item == "Any Items"then
  1712.         if game:GetService("Workspace")["travelling_merchant"]["is_open"].Value == true then
  1713.             for i,v in pairs(game:GetService("Workspace")["travelling_merchant"]:FindFirstChild("stand"):FindFirstChild("items"):GetChildren()) do
  1714.                 if v.Name:match("LuckPotion") or v.Name:match("star_remnant") or v.Name:match("summon_ticket") then
  1715.                     buymerchant(v.Name)
  1716.                     print(v.Name)
  1717.                 end  
  1718.             end
  1719.         end
  1720.     else
  1721.         for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.ItemShop:FindFirstChild("Window"):FindFirstChild("Outer"):FindFirstChild("ItemFrames"):GetChildren()) do
  1722.             if game:GetService("Workspace")["travelling_merchant"]["is_open"].Value == true then
  1723.                 for i,v in pairs(game:GetService("Workspace")["travelling_merchant"]:FindFirstChild("stand"):FindFirstChild("items"):GetChildren()) do
  1724.                     if v.Name:match(tostring(item)) then
  1725.                         buymerchant(v.Name)
  1726.                         print(v.Name)
  1727.                     end  
  1728.                 end
  1729.             end
  1730.         end
  1731.     end
  1732. end
  1733. function SnipeMerchant()
  1734.     AutoSnipeMerchantSec:Cheat("Dropdown", "Select Star Fruit",function(value)
  1735.         Settings.ASM_SelectedFruit = value
  1736.         saveSettings()
  1737.     end, { options = {"None","StarFruit","StarFruitGreen","StarFruitRed", "StarFruitPink","StarFruitBlue","StarFruitEpic"}, default =Settings.ASM_SelectedFruit})
  1738.    
  1739.     AutoSnipeMerchantSec:Cheat("Dropdown", "Select Other Items",function(value)
  1740.         Settings.ASM_SelectedOtherItems = value
  1741.         saveSettings()
  1742.     end, { options = {"None","Any Items","LuckPotion","star_remnant","summon_ticket"}, default =Settings.ASM_SelectedOtherItems})
  1743.     AutoSnipeMerchantSec:Cheat("Dropdown", "Select Evo Items",function(value)
  1744.         Settings.ASM_SelectedEvoItems = value
  1745.         saveSettings()
  1746.     end, { options = {"None"}, default =Settings.ASM_SelectedEvoItems})
  1747.     AutoSnipeMerchantSec:Cheat("Checkbox","Enable Auto Snipe", function(bool)
  1748.         Settings.AutoSnipeMerchant = bool
  1749.         saveSettings()
  1750.     end,{enabled = Settings.AutoSnipeMerchant })
  1751. end
  1752. ----------------------------------------------
  1753. -------------- Discord Webhook ---------------
  1754. ----------------------------------------------
  1755. function Webhooksec()
  1756.     WebhookSec:Cheat("Textbox", "Webhook Url", function(Value)
  1757.         Settings.WebhookUrl = Value
  1758.         saveSettings()
  1759.     end, {placeholder = Settings.WebhookUrl})
  1760.  
  1761.     WebhookSec:Cheat("Checkbox","Enable Webhook", function(bool)
  1762.         Settings.WebhookEnabled = bool
  1763.         saveSettings()
  1764.     end,{enabled = Settings.WebhookEnabled})
  1765.  
  1766.     WebhookSec:Cheat("Checkbox","Enable Baby Webhook [BTP,Castle,Tour]", function(bool)
  1767.         Settings.BabyWebhookEnabled = bool
  1768.         saveSettings()
  1769.     end,{enabled = Settings.BabyWebhookEnabled})
  1770.  
  1771.     WebhookSec:Cheat("Checkbox","Enable Snipe Webhook [Banner & Shop]", function(bool)
  1772.         Settings.snipeWebhookEnabled = bool
  1773.         saveSettings()
  1774.     end,{enabled = Settings.snipeWebhookEnabled})
  1775.  
  1776.     WebhookSec:Cheat("Button", "Test Webhook", function()
  1777.         print(Settings.WebhookUrl)
  1778.         webhook()
  1779.     end)
  1780. end
  1781.  
  1782. function Webhooksec2()
  1783.  
  1784.     WebhookSec:Cheat("Button", "Test Baby Webhook", function()
  1785.         print(Settings.WebhookUrl)
  1786.         BabyWebhook()
  1787.         SnipeShopNew()
  1788.     end)
  1789. end
  1790. ----------------------------------------------
  1791. ------------------ Others --------------------
  1792. ----------------------------------------------
  1793. function autoload()
  1794.     pcall(function()
  1795.         local exec = tostring(identifyexecutor())
  1796.         if exec == "Synapse X" and Settings.AutoLoadScript then
  1797.             syn.queue_on_teleport("loadstring(game:HttpGet('https://raw.githubusercontent.com/ArponAG/Scripts/main/AnimeAdventures_v2__Beta.lua'))()")
  1798.         elseif exec ~= "Synapse X" and Settings.AutoLoadScript then
  1799.             queue_on_teleport("loadstring(game:HttpGet('https://raw.githubusercontent.com/ArponAG/Scripts/main/AnimeAdventures_v2__Beta.lua'))()")
  1800.         end
  1801.     end)
  1802. end
  1803. function others()
  1804.     OtherSec:Cheat("Checkbox","Auto Load Script", function(bool)
  1805.         Settings.AutoLoadScript = bool
  1806.         saveSettings()
  1807.         autoload()
  1808.     end,{enabled = Settings.AutoLoadScript})
  1809.     OtherSec:Cheat("Checkbox","Hide Name Player", function(bool)
  1810.         Settings.hidenamep = bool
  1811.         saveSettings()
  1812.         hidename()
  1813.     end,{enabled = Settings.hidenamep})
  1814. end
  1815. ----------------------------------------------
  1816. ------------ /\/\/\/\/\/\/\/\/\ --------------
  1817. ----------------------------------------------
  1818. if game.PlaceId == 8304191830 then
  1819.     UnitPosition:Cheat("Label","Not available in game Lobby!")    
  1820.     UnitSec()
  1821.     WorldSec()
  1822.     AutoFarmSec()
  1823.     MoreFarmSec()
  1824.     ChallengeSec()
  1825.     unitconfig()
  1826.     credits()
  1827.     AutoSummon()
  1828.     SnipeMerchant()
  1829.     Webhooksec()
  1830.     Webhooksec2()
  1831.     others()
  1832. else
  1833.     SelectUnits:Cheat("Label","Only available in game Lobby!")    
  1834.     AutoSummonSec:Cheat("Label","Only available in game Lobby!")    
  1835.     WorldSec()
  1836.     AutoFarmSec()
  1837.     MoreFarmSec()
  1838.     ChallengeSec()
  1839.     UnitPosSec()
  1840.     unitconfig()
  1841.     credits()
  1842.     SnipeMerchant()
  1843.     Webhooksec()
  1844.     others()
  1845.     WebhookSec:Cheat("Label","")
  1846.     WebhookSec:Cheat("Label","Test Baby&Shop Webhook Only available in game Lobby!")
  1847. end
  1848. ----------------------------------------------
  1849. ------------ /\/\/\/\/\/\/\/\/\ --------------
  1850. ----------------------------------------------
  1851. local function checkChallenge()
  1852.     for i,v in pairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do
  1853.         if v:IsA("SurfaceGui") then
  1854.             if v:FindFirstChild("ChallengeCleared") then
  1855.                 return v.ChallengeCleared.Visible
  1856.             end
  1857.         end
  1858.     end
  1859. end
  1860. local function checkReward()
  1861.     if checkChallenge() == false then
  1862.         if Settings.SelectedReward == game:GetService("Workspace")["_LOBBIES"]["_DATA"]["_CHALLENGE"]["current_reward"].Value then
  1863.             return true
  1864.         elseif Settings.AutoChallengeAll then
  1865.             return true
  1866.         else
  1867.             return false
  1868.         end
  1869.     else
  1870.         return false
  1871.     end
  1872. end
  1873. local function startChallenge()
  1874.     if game.PlaceId == 8304191830 then
  1875.         local cpos = plr.Character.HumanoidRootPart.CFrame
  1876.         if Settings.AutoChallenge and Settings.AutoFarm  and checkReward() == true then
  1877.             for i, v in pairs(game:GetService("Workspace")["_CHALLENGES"].Challenges:GetDescendants()) do
  1878.                 if v.Name == "Owner" and v.Value == nil then
  1879.                     --print(v.Parent.Name.." "..v.Parent:GetFullName())
  1880.                     local args = {  [1] = tostring(v.Parent.Name) }
  1881.                     game:GetService("ReplicatedStorage").endpoints.client_to_server.request_join_lobby:InvokeServer(unpack(args))
  1882.                     Settings.chdoor = v.Parent.Name
  1883.                     break
  1884.                 end
  1885.             end
  1886.             task.wait()
  1887.             plr.Character.HumanoidRootPart.CFrame = cpos
  1888.         end
  1889.     end
  1890. end
  1891. --test fixportal
  1892. function getBorosPortals()
  1893.     local portals = {}
  1894.     for _, item in pairs(get_inventory_items_unique_items()) do
  1895.         if item["item_id"] == "portal_boros_g" then
  1896.             table.insert(portals, item)
  1897.         end
  1898.     end
  1899.     return portals
  1900. end
  1901. function getCSMPortals()
  1902.     local portals = {}
  1903.     for _, item in pairs(get_inventory_items_unique_items()) do
  1904.         if item["item_id"] == "portal_csm" or "portal_csm1" or "portal_csm2" or "portal_csm3" or "portal_csm4" or "portal_csm5" then
  1905.             table.insert(portals, item)
  1906.         end
  1907.     end
  1908.     return portals
  1909. end
  1910. function getZeldrisPortals()
  1911.     local portals = {}
  1912.     for _, item in pairs(get_inventory_items_unique_items()) do
  1913.         if item["item_id"] == "portal_zeldris" then
  1914.             table.insert(portals, item)
  1915.         end
  1916.     end
  1917.     return portals
  1918. end
  1919. function GetPortals(id)
  1920.     local reg = getreg()
  1921.     local portals = {}
  1922.     for i,v in next, reg do
  1923.         if type(v) == 'function' then
  1924.             if getfenv(v).script then
  1925.                 for _, v in pairs(debug.getupvalues(v)) do
  1926.                     if type(v) == 'table' then
  1927.                         if v["session"] then
  1928.                             for _, item in pairs(v["session"]["inventory"]['inventory_profile_data']['unique_items']) do
  1929.                             if item["item_id"]:match(id) then
  1930.                                     table.insert(portals, item)
  1931.                               end
  1932.                             end
  1933.                             return portals
  1934.                         end
  1935.                     end
  1936.                 end
  1937.             end
  1938.         end
  1939.     end
  1940. end
  1941. Settings.teleporting = true
  1942. getgenv().door = "_lobbytemplategreen1"
  1943. local function startfarming()
  1944.     if game.PlaceId == 8304191830 and not Settings.farmprotal and Settings.autostart and Settings.AutoFarm and Settings.teleporting and not Settings.AutoInfinityCastle then
  1945.         local cpos = plr.Character.HumanoidRootPart.CFrame; cata = Settings.WorldCategory; level = Settings.SelectedLevel;
  1946.        
  1947.         if cata == "Story Worlds" or cata == "Legend Stages" then
  1948.             if tostring(game.Workspace._LOBBIES.Story[getgenv().door].Owner.Value) ~= plr.Name then
  1949.                 for i, v in pairs(game:GetService("Workspace")["_LOBBIES"].Story:GetDescendants()) do
  1950.                     if v.Name == "Owner" and v.Value == nil then
  1951.                         local args = { [1] = tostring(v.Parent.Name) }
  1952.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_join_lobby:InvokeServer(unpack(args))
  1953.    
  1954.                         task.wait()
  1955.                    
  1956.                         local args = {
  1957.                             [1] = tostring(v.Parent.Name), -- Lobby
  1958.                             [2] = Settings.SelectedLevel, -- World/Level
  1959.                             [3] = Settings.isFriendOnly or true, -- Friends Only or not
  1960.                             [4] = Settings.Difficulty }
  1961.    
  1962.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_lock_level:InvokeServer(unpack(args))
  1963.    
  1964.                         local args = { [1] =tostring(v.Parent.Name) }
  1965.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_game:InvokeServer(unpack(args))
  1966.                        
  1967.                         getgenv().door = v.Parent.Name print(v.Parent.Name) --v.Parent:GetFullName()
  1968.                         plr.Character.HumanoidRootPart.CFrame = v.Parent.Door.CFrame
  1969.                         break
  1970.                     end
  1971.                 end
  1972.    
  1973.                 task.wait()
  1974.    
  1975.                 plr.Character.HumanoidRootPart.CFrame = cpos
  1976.    
  1977.                 if Workspace._LOBBIES.Story[getgenv().door].Owner == plr.Name then
  1978.                     if Workspace._LOBBIES.Story[getgenv().door].Teleporting.Value == true then
  1979.                         getgenv().teleporting = false
  1980.                     else
  1981.                         getgenv().teleporting = true
  1982.                     end
  1983.                 end
  1984.    
  1985.                 pcall(function()
  1986.                     BabyWebhook()
  1987.                     SnipeShopNew()
  1988.                
  1989.                 end)
  1990.                 print("send Webhook")
  1991.                 task.wait(1.1)
  1992.                 warn("farming")
  1993.                 task.wait(3)
  1994.             end
  1995.         elseif cata == "Raid Worlds" then
  1996.             getgenv().door =  "_lobbytemplate212"
  1997.             if tostring(game.Workspace._RAID.Raid[getgenv().door].Owner.Value) ~= plr.Name then
  1998.                 for i, v in pairs(game:GetService("Workspace")["_RAID"].Raid:GetDescendants()) do
  1999.                     if v.Name == "Owner" and v.Value == nil then
  2000.                         local args = { [1] = tostring(v.Parent.Name) }
  2001.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_join_lobby:InvokeServer(unpack(args))
  2002.    
  2003.                         task.wait()
  2004.                    
  2005.                         local args = {
  2006.                             [1] = tostring(v.Parent.Name), -- Lobby
  2007.                             [2] = Settings.SelectedLevel, -- World/Level
  2008.                             [3] = Settings.isFriendOnly or true, -- Friends Only or not
  2009.                             [4] = Settings.Difficulty }
  2010.    
  2011.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_lock_level:InvokeServer(unpack(args))
  2012.    
  2013.                         local args = { [1] =tostring(v.Parent.Name) }
  2014.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_game:InvokeServer(unpack(args))
  2015.                        
  2016.                         getgenv().door = v.Parent.Name print(v.Parent.Name) --v.Parent:GetFullName()
  2017.                         plr.Character.HumanoidRootPart.CFrame = v.Parent.Door.CFrame
  2018.                         break
  2019.                     end
  2020.                 end
  2021.    
  2022.                 task.wait()
  2023.    
  2024.                 plr.Character.HumanoidRootPart.CFrame = cpos
  2025.    
  2026.                 if Workspace._RAID.Raid[getgenv().door].Owner == plr.Name then
  2027.                     if Workspace._RAID.Raid[getgenv().door].Teleporting.Value == true then
  2028.                         getgenv().teleporting = false
  2029.                     else
  2030.                         getgenv().teleporting = true
  2031.                     end
  2032.                 end
  2033.    
  2034.                 pcall(function()
  2035.                     BabyWebhook()
  2036.                     SnipeShopNew()
  2037.                
  2038.                 end)
  2039.                 print("send Webhook")
  2040.                 task.wait(1.1)
  2041.                 warn("farming")
  2042.                 task.wait(3)
  2043.             end
  2044.         elseif cata == "Portals" then
  2045.             --aline fixportal
  2046.             if level == "portal_boros_g" then
  2047.                 local args = {
  2048.                     [1] = GetPortals("portal_boros_g")[1]["uuid"],
  2049.                     [2] = { ["friends_only"] = getgenv().isFriendOnly } }
  2050.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.use_portal:InvokeServer(unpack(args))
  2051.                
  2052.                 task.wait(1.5)
  2053.                 for i,v in pairs(game:GetService("Workspace")["_PORTALS"].Lobbies:GetDescendants()) do
  2054.                     if v.Name == "Owner" and tostring(v.value) == game.Players.LocalPlayer.Name then
  2055.                         local args = { [1] = tostring(v.Parent.Name) }
  2056.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_game:InvokeServer(unpack(args))
  2057.                         break;
  2058.                     end
  2059.                 end
  2060.                 warn("Aline farming")
  2061.                 task.wait(7)
  2062.                 --Devil fixportal      
  2063.             elseif level == "portal_csm" then
  2064.                 local args = {
  2065.                     [1] = GetPortals("portal_csm")[1]["uuid"],
  2066.                     [2] = { ["friends_only"] = getgenv().isFriendOnly } }
  2067.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.use_portal:InvokeServer(unpack(args))
  2068.                
  2069.                 task.wait(1.5)
  2070.                 for i,v in pairs(game:GetService("Workspace")["_PORTALS"].Lobbies:GetDescendants()) do
  2071.                     if v.Name == "Owner" and tostring(v.value) == game.Players.LocalPlayer.Name then
  2072.                         local args = { [1] = tostring(v.Parent.Name) }
  2073.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_game:InvokeServer(unpack(args))
  2074.                         break;
  2075.                     end
  2076.                 end
  2077.                 pcall(function()
  2078.                     BabyWebhook()
  2079.                     SnipeShopNew()
  2080.                
  2081.                 end)
  2082.                 print("send Webhook")
  2083.                 task.wait(1.1)
  2084.                 warn("Devil farming")
  2085.                 task.wait(7)
  2086.                 --7Ds fixportal    
  2087.             elseif level == "portal_zeldris" then
  2088.                 local args = {
  2089.                     [1] = GetPortals("portal_zeldris")[1]["uuid"],
  2090.                     [2] = { ["friends_only"] = getgenv().isFriendOnly } }
  2091.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.use_portal:InvokeServer(unpack(args))
  2092.                
  2093.                 task.wait(1.5)
  2094.                 for i,v in pairs(game:GetService("Workspace")["_PORTALS"].Lobbies:GetDescendants()) do
  2095.                     if v.Name == "Owner" and tostring(v.value) == game.Players.LocalPlayer.Name then
  2096.                         local args = { [1] = tostring(v.Parent.Name) }
  2097.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_game:InvokeServer(unpack(args))
  2098.                         break;
  2099.                     end
  2100.                 end
  2101.                 pcall(function()
  2102.                     BabyWebhook()
  2103.                     SnipeShopNew()
  2104.                
  2105.                 end)
  2106.                 print("send Webhook")
  2107.                 task.wait(1.1)
  2108.                 warn("7ds farming")
  2109.                 task.wait(7)
  2110.             end
  2111.         elseif cata == "Dungeon" then
  2112.             if level == "jjk_finger" then --_lobbytemplate_event222
  2113.             getgenv().door = "_lobbytemplate_event222"
  2114.             local string_1 = "_lobbytemplate_event222";
  2115.             local table_1 = {
  2116.                 ["selected_key"] = "key_jjk_finger" --key_jjk_finger
  2117.             };
  2118.             local Target = game:GetService("ReplicatedStorage").endpoints["client_to_server"]["request_join_lobby"];
  2119.             Target:InvokeServer(string_1, table_1);
  2120.        
  2121.             if tostring(game.Workspace._DUNGEONS.Lobbies[getgenv().door].Owner.Value) ~= plr.Name then
  2122.                 for i, v in pairs(game:GetService("Workspace")["_DUNGEONS"].Lobbies:GetDescendants()) do
  2123.                     if v.Name == "Owner" and v.Value == nil then
  2124.                         local args = { [1] = tostring(v.Parent.Name) }
  2125.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_join_lobby:InvokeServer(unpack(args))
  2126.    
  2127.                         task.wait()
  2128.                    
  2129.                         local args = {
  2130.                             [1] = tostring(v.Parent.Name), -- Lobby
  2131.                             [2] = Settings.SelectedLevel, -- World/Level
  2132.                             [3] = Settings.isFriendOnly or true, -- Friends Only or not
  2133.                             [4] = Settings.Difficulty
  2134.                         }
  2135.    
  2136.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_lock_level:InvokeServer(unpack(args))
  2137.    
  2138.                         local args = { [1] =tostring(v.Parent.Name) }
  2139.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_game:InvokeServer(unpack(args))
  2140.                        
  2141.                         getgenv().door = v.Parent.Name print(v.Parent.Name) --v.Parent:GetFullName()
  2142.                         plr.Character.HumanoidRootPart.CFrame = v.Parent.Door.CFrame
  2143.                         break
  2144.                     end
  2145.                 end
  2146.    
  2147.                 task.wait()
  2148.    
  2149.                 plr.Character.HumanoidRootPart.CFrame = cpos
  2150.    
  2151.                 if Workspace._DUNGEONS.Lobbies[getgenv().door].Owner == plr.Name then
  2152.                     if Workspace._DUNGEONS.Lobbies[getgenv().door].Teleporting.Value == true then
  2153.                         getgenv().teleporting = false
  2154.                     else
  2155.                         getgenv().teleporting = true
  2156.                     end
  2157.                 end
  2158.    
  2159.                 pcall(function()
  2160.                     BabyWebhook()
  2161.                     SnipeShopNew()
  2162.                
  2163.                 end)
  2164.                 print("send Webhook")
  2165.                 task.wait(1.1)
  2166.                 warn("DUNGEONS jjk_finger farming")
  2167.                 task.wait(3)
  2168.             end
  2169.                 --ดันเกะโท
  2170.         elseif cata == "Dungeon" then
  2171.             if level == "jjk_raid" then
  2172.                 getgenv().door = "_lobbytemplate_event23"
  2173.                 local string_1 = "_lobbytemplate_event23";
  2174.                 local table_1 = {
  2175.                     ["selected_key"] = "key_jjk_map"
  2176.                 };
  2177.                 local Target = game:GetService("ReplicatedStorage").endpoints["client_to_server"]["request_join_lobby"];
  2178.                 Target:InvokeServer(string_1, table_1);
  2179.            
  2180.                 if tostring(game.Workspace._DUNGEONS.Lobbies[getgenv().door].Owner.Value) ~= plr.Name then
  2181.                     for i, v in pairs(game:GetService("Workspace")["_DUNGEONS"].Lobbies:GetDescendants()) do
  2182.                         if v.Name == "Owner" and v.Value == nil then
  2183.                             local args = { [1] = tostring(v.Parent.Name) }
  2184.                             game:GetService("ReplicatedStorage").endpoints.client_to_server.request_join_lobby:InvokeServer(unpack(args))
  2185.        
  2186.                             task.wait()
  2187.                        
  2188.                             local args = {
  2189.                                 [1] = tostring(v.Parent.Name), -- Lobby
  2190.                                 [2] = Settings.SelectedLevel, -- World/Level
  2191.                                 [3] = Settings.isFriendOnly or true, -- Friends Only or not
  2192.                                 [4] = Settings.Difficulty
  2193.                             }
  2194.        
  2195.                             game:GetService("ReplicatedStorage").endpoints.client_to_server.request_lock_level:InvokeServer(unpack(args))
  2196.        
  2197.                             local args = { [1] =tostring(v.Parent.Name) }
  2198.                             game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_game:InvokeServer(unpack(args))
  2199.                            
  2200.                             getgenv().door = v.Parent.Name print(v.Parent.Name) --v.Parent:GetFullName()
  2201.                             plr.Character.HumanoidRootPart.CFrame = v.Parent.Door.CFrame
  2202.                             break
  2203.                         end
  2204.                     end
  2205.        
  2206.                     task.wait()
  2207.        
  2208.                     plr.Character.HumanoidRootPart.CFrame = cpos
  2209.        
  2210.                     if Workspace._DUNGEONS.Lobbies[getgenv().door].Owner == plr.Name then
  2211.                         if Workspace._DUNGEONS.Lobbies[getgenv().door].Teleporting.Value == true then
  2212.                             getgenv().teleporting = false
  2213.                         else
  2214.                             getgenv().teleporting = true
  2215.                         end
  2216.                     end
  2217.        
  2218.                     pcall(function()
  2219.                         BabyWebhook()
  2220.                         SnipeShopNew()
  2221.                    
  2222.                     end)
  2223.                     print("send Webhook")
  2224.                     task.wait(1.1)
  2225.                     warn("DUNGEONS jjk_raid farming")
  2226.                     task.wait(3)
  2227.                 end
  2228.                 end
  2229.             end
  2230.         end
  2231.     end
  2232. end
  2233. getgenv().autoabilityerr = false
  2234. function autoabilityfunc()
  2235.     local success, err = pcall(function() --///
  2236.         repeat task.wait() until game:GetService("Workspace"):WaitForChild("_UNITS")
  2237.         for i, v in ipairs(game:GetService("Workspace")["_UNITS"]:GetChildren()) do
  2238.             if v:FindFirstChild("_stats") then
  2239.                 if v._stats:FindFirstChild("player") and v._stats:FindFirstChild("xp") then
  2240.                     if tostring(v["_stats"].player.Value) == game.Players.LocalPlayer.Name and v["_stats"].xp.Value > 0 then
  2241.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.use_active_attack:InvokeServer(v)
  2242.                     end
  2243.                 end
  2244.             end
  2245.         end
  2246.     end)
  2247.      
  2248.      if err then
  2249.          warn("//////////////////////////////////////////////////")
  2250.          getgenv().autoabilityerr = true
  2251.          error(err)
  2252.      end
  2253. end
  2254. function autoupgradefunc()
  2255.     local success, err = pcall(function() --///
  2256.         repeat task.wait() until game:GetService("Workspace"):WaitForChild("_UNITS")
  2257.         for i, v in ipairs(game:GetService("Workspace")["_UNITS"]:GetChildren()) do
  2258.            if v:FindFirstChild("_stats") then
  2259.                 if tostring(v["_stats"].player.Value) == game.Players.LocalPlayer.Name and v["_stats"].xp.Value >= 0 then
  2260.                     game:GetService("ReplicatedStorage").endpoints.client_to_server.upgrade_unit_ingame:InvokeServer(v)
  2261.                 end
  2262.             end
  2263.         end
  2264.     end)
  2265.     if err then
  2266.         warn("//////////////////////////////////////////////////")
  2267.         warn("//////////////////////////////////////////////////")
  2268.         getgenv().autoupgradeerr = true
  2269.         error(err)
  2270.     end
  2271. end
  2272. local function FarmInfinityCastle()
  2273.     if Settings.AutoInfinityCastle and Settings.AutoFarm or Settings.AutoInfinityCastle then
  2274.         if game.PlaceId == 8304191830 then
  2275.             game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(12423.1855, 155.24025, 3198.07593, -1.34111269e-06, -2.02512282e-08, 1, 3.91705386e-13, 1, 2.02512282e-08, -1, 4.18864542e-13, -1.34111269e-06)
  2276.             getgenv().infinityroom = 0
  2277.             for i, v in pairs(game:GetService("Players")[game.Players.LocalPlayer.Name].PlayerGui.InfiniteTowerUI.LevelSelect.InfoFrame.LevelButtons:GetChildren()) do
  2278.                 if v.Name == "FloorButton" then
  2279.                     if v.clear.Visible == false and v.Locked.Visible == false then
  2280.                         local room = string.split(v.Main.text.Text, " ")
  2281.                         local args = {
  2282.                             [1] = tonumber(room[2])
  2283.                         }
  2284.                        
  2285.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_infinite_tower:InvokeServer(unpack(args))
  2286.                         getgenv().infinityroom = tonumber(room[2])
  2287.                         break
  2288.                     end
  2289.                 end
  2290.             end
  2291.             task.wait(6)
  2292.         end
  2293.     end
  2294. end
  2295. --updatefix fixmap
  2296.  
  2297. coroutine.resume(coroutine.create(function()
  2298.     while task.wait() do
  2299.         if not Settings.AutoInfinityCastle then
  2300.             if not checkChallenge() then --Challenge_Not_Complete
  2301.                 if  Settings.AutoChallenge and checkReward() == true then
  2302.                     startChallenge() --S_Challenge
  2303.                 else
  2304.                     startfarming()--S_Farming
  2305.                 end
  2306.             elseif checkChallenge() == true then
  2307.                 startfarming()--S_Farming
  2308.                 BabyWebhook()
  2309.                 SnipeShopNew()
  2310.             end
  2311.         elseif not Settings.AutoInfinityCastle == true then--Infiniy Castle
  2312.             if not checkChallenge() then --Challenge_Not_Complete
  2313.                 if  Settings.AutoChallengeAll then
  2314.                     startChallenge() --S_Challenge
  2315.                 else
  2316.                     startfarming()--S_Farming
  2317.                 end
  2318.             elseif checkChallenge() == true then
  2319.                 startfarming()--S_Farming
  2320.                 BabyWebhook()
  2321.                 SnipeShopNew()
  2322.             end
  2323.         elseif Settings.AutoInfinityCastle == true then--Infiniy Castle
  2324.             if not checkChallenge() then --Challenge_Not_Complete
  2325.                 if  Settings.AutoChallenge and checkReward() == true then
  2326.                     startChallenge() --S_Challenge
  2327.                 else
  2328.                     FarmInfinityCastle()--S_Farming
  2329.                 end
  2330.             elseif checkChallenge() == true then
  2331.                 FarmInfinityCastle()--S_Farming
  2332.                 BabyWebhook()
  2333.                 SnipeShopNew()
  2334.             end
  2335.         end
  2336.         if game.PlaceId ~= 8304191830 then
  2337.             local _wave = game:GetService("Workspace"):WaitForChild("_wave_num")
  2338.             if Settings.autoQuit and not Settings.AutoSell and tonumber(Settings.AutoSellWave) <= _wave.Value then
  2339.                 pcall(function() webhook() end)
  2340.                 print("send Webhook")
  2341.                 task.wait(2.1)
  2342.                 print("Returning to lobby...")
  2343.                 task.wait(2.1)
  2344.                 Teleport()
  2345.             end
  2346.             if Settings.AutoSell and not Settings.autoQuit and tonumber(Settings.AutoSellWave) <= _wave.Value then
  2347.                 getgenv().disableatuofarm = true
  2348.                 repeat task.wait() until game:GetService("Workspace"):WaitForChild("_UNITS")
  2349.                 for i, v in ipairs(game:GetService("Workspace")["_UNITS"]:GetChildren()) do
  2350.                     repeat task.wait()
  2351.                     until v:WaitForChild("_stats")
  2352.                     if tostring(v["_stats"].player.Value) == game.Players.LocalPlayer.Name then
  2353.                         repeat
  2354.                             task.wait()
  2355.                         until v:WaitForChild("_stats"):WaitForChild("upgrade")
  2356.            
  2357.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.sell_unit_ingame:InvokeServer(v)
  2358.                     end
  2359.                 end
  2360.             end
  2361.         end
  2362.     end
  2363. end))
  2364. --updatefix fixmap
  2365. coroutine.resume(coroutine.create(function()
  2366.     while task.wait(2) do
  2367.         if Settings.AutoAbilities then
  2368.             if game.PlaceId ~= 8304191830 then
  2369.                 pcall(function()
  2370.                     autoabilityfunc()
  2371.                 end)
  2372.             end
  2373.             if  getgenv().autoabilityerr == true then
  2374.                 task.wait()
  2375.                 autoabilityfunc()
  2376.                 getgenv().autoabilityerr = false
  2377.             end
  2378.         end
  2379.        
  2380.         if Settings.AutoUpgrade then
  2381.             if game.PlaceId ~= 8304191830 then
  2382.                 pcall(function()
  2383.                     autoupgradefunc()
  2384.                 end)
  2385.             end
  2386.             if  getgenv().autoupgradeerr == true then
  2387.                 task.wait()
  2388.                 autoupgradefunc()
  2389.                 getgenv().autoupgradeerr = false
  2390.             end
  2391.         end
  2392.     end
  2393. end))
  2394. ------// Auto Leave \\------
  2395. --#region Auto Leave
  2396. local PlaceID = 8304191830
  2397. local AllIDs = {}
  2398. local foundAnything = ""
  2399. local actualHour = os.date("!*t").hour
  2400. local Deleted = false
  2401. local last
  2402. local File = pcall(function()
  2403.    AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  2404. end)
  2405. if not File then
  2406.    table.insert(AllIDs, actualHour)
  2407.    writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  2408. end
  2409. function TPReturner()
  2410.    local Site;
  2411.    if foundAnything == "" then
  2412.        Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  2413.    else
  2414.        Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  2415.    end
  2416.    local ID = ""
  2417.    if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  2418.        foundAnything = Site.nextPageCursor
  2419.    end
  2420.    local num = 0;
  2421.    local extranum = 0
  2422.    for i,v in pairs(Site.data) do
  2423.        extranum += 1
  2424.        local Possible = true
  2425.        ID = tostring(v.id)
  2426.        if tonumber(v.maxPlayers) > tonumber(v.playing) then
  2427.            if extranum ~= 1 and tonumber(v.playing) < last or extranum == 1 then
  2428.                last = tonumber(v.playing)
  2429.            elseif extranum ~= 1 then
  2430.                continue
  2431.            end
  2432.            for _,Existing in pairs(AllIDs) do
  2433.                if num ~= 0 then
  2434.                    if ID == tostring(Existing) then
  2435.                        Possible = false
  2436.                    end
  2437.                else
  2438.                    if tonumber(actualHour) ~= tonumber(Existing) then
  2439.                        local delFile = pcall(function()
  2440.                            delfile("NotSameServers.json")
  2441.                            AllIDs = {}
  2442.                            table.insert(AllIDs, actualHour)
  2443.                        end)
  2444.                    end
  2445.                end
  2446.                num = num + 1
  2447.            end
  2448.            if Possible == true then
  2449.                table.insert(AllIDs, ID)
  2450.                wait()
  2451.                pcall(function()
  2452.                    writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  2453.                    wait()
  2454.                    game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  2455.                end)
  2456.                wait(4)
  2457.            end
  2458.        end
  2459.    end
  2460. end
  2461. function Teleport()
  2462.    while wait() do
  2463.        pcall(function()
  2464.            TPReturner()
  2465.            if foundAnything ~= "" then
  2466.                TPReturner()
  2467.            end
  2468.        end)
  2469.    end
  2470. end
  2471. coroutine.resume(coroutine.create(function()
  2472.    
  2473.     task.spawn(function()
  2474.         local GameFinished = game:GetService("Workspace"):WaitForChild("_DATA"):WaitForChild("GameFinished")
  2475.         GameFinished:GetPropertyChangedSignal("Value"):Connect(function()
  2476.             print("Changed", GameFinished.Value == true)
  2477.             if GameFinished.Value == true then
  2478.                 repeat task.wait() until  game:GetService("Players").LocalPlayer.PlayerGui.ResultsUI.Enabled == true
  2479.                 pcall(function() webhook() end)
  2480.                 print("Wait next or leave")
  2481.                 task.wait(2.1)
  2482.                 if Settings.AutoReplay then
  2483.                     local a={[1]="replay"} game:GetService("ReplicatedStorage").endpoints.client_to_server.set_game_finished_vote:InvokeServer(unpack(a))
  2484.                     local a={[1]="replay"} game:GetService("ReplicatedStorage").endpoints.client_to_server.set_game_finished_vote:InvokeServer(unpack(a))
  2485.                     print("Replay...")        
  2486.                 elseif Settings.AutoNext then
  2487.                     local a={[1]="next_story"} game:GetService("ReplicatedStorage").endpoints.client_to_server.set_game_finished_vote:InvokeServer(unpack(a))
  2488.                     local a={[1]="next_story"} game:GetService("ReplicatedStorage").endpoints.client_to_server.set_game_finished_vote:InvokeServer(unpack(a))
  2489.                     print("Next Story...")
  2490.                 elseif Settings.AutoContinue then
  2491.                     local a={[1]="NextRetry"} game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_infinite_tower_from_game:InvokeServer(unpack(a))
  2492.                     local a={[1]="NextRetry"} game:GetService("ReplicatedStorage").endpoints.client_to_server.request_start_infinite_tower_from_game:InvokeServer(unpack(a))  
  2493.                     print("Next Room infint Castle...")              
  2494.                 elseif Settings.AutoLeave and not Settings.AutoReplay and not Settings.AutoNext and not Settings.AutoContinue then
  2495.                    game:GetService("TeleportService"):Teleport(8304191830, game.Players.LocalPlayer)
  2496.                
  2497.                     Teleport()
  2498.                     print("Returning to lobby...")
  2499.                 end
  2500.             end
  2501.         end)
  2502.     end)
  2503.     while task.wait() do
  2504.         if getgenv().AutoSummon then
  2505.             if getgenv().SelectedBanner == "Special" and getgenv().SelectedMethod ~= nil then
  2506.                 SummonUnits("EventClover", getgenv().SelectedMethod)
  2507.             elseif getgenv().SelectedBanner == "Standard" and getgenv().SelectedMethod ~= nil then
  2508.                 SummonUnits("Standard", getgenv().SelectedMethod)
  2509.             end
  2510.         end
  2511.         if Settings.AutoSnipeMerchant then
  2512.             if Settings.ASM_SelectedFruit ~= "None" or Settings.ASM_SelectedFruit ~= nil then
  2513.                 if Settings.ASM_SelectedFruit == "Any StarFruits" then
  2514.                     snipefunc("Any StarFruits")
  2515.                 else
  2516.                     snipefunc(Settings.ASM_SelectedFruit)
  2517.                 end
  2518.             end
  2519.             if Settings.ASM_SelectedOtherItems ~= "None" or Settings.ASM_SelectedOtherItems ~= nil then
  2520.                 if Settings.ASM_SelectedOtherItems == "Any StarFruits" then
  2521.                     snipefunc("Any Items")
  2522.                 else
  2523.                     snipefunc(Settings.ASM_SelectedOtherItems)
  2524.                 end
  2525.             end
  2526.             if Settings.ASM_SelectedEvoItems ~= "None" or Settings.ASM_SelectedEvoItems ~= nil then
  2527.            
  2528.             end
  2529.         end
  2530.     end  
  2531. end))
  2532. function PlacePos(map,name,_uuid,unit)
  2533.     if Settings.AutoFarm and not getgenv().disableatuofarm then
  2534.         x = getgenv().posX; z = getgenv().posZ
  2535.         local pos = Settings[map][unit]
  2536.         warn(map.." attempt to place "..name)
  2537.         if name ~= "metal_knight_evolved" then
  2538.             local i = math.random(1,6)
  2539.             if i == 1 then
  2540.                     local args = {
  2541.                     [1] = _uuid,
  2542.                     [2] = CFrame.new(Vector3.new(pos["x"], pos["y"], pos["z"]) )
  2543.                 }
  2544.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2545.                 return
  2546.             elseif i == 2 then
  2547.                     local args = {
  2548.                     [1] = _uuid,
  2549.                     [2] = CFrame.new(Vector3.new(pos["x"], pos["y2"], pos["z"] + z) )
  2550.                 }
  2551.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2552.                 return
  2553.             elseif i == 3 then
  2554.                     local args = {
  2555.                     [1] = _uuid,
  2556.                     [2] = CFrame.new(Vector3.new(pos["x"] + x, pos["y3"], pos["z"]) )
  2557.                 }
  2558.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2559.                 return
  2560.             elseif i == 4 then
  2561.                     local args = {
  2562.                     [1] = _uuid,
  2563.                     [2] = CFrame.new(Vector3.new(pos["x"] - x, pos["y4"], pos["z"]) )
  2564.                 }
  2565.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2566.                 return
  2567.             elseif i == 5 then
  2568.                     local args = {
  2569.                     [1] = _uuid,
  2570.                     [2] = CFrame.new(Vector3.new(pos["x"] + x, pos["y5"], pos["z"] + z) )
  2571.                 }
  2572.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2573.                 return
  2574.             elseif i == 6 then
  2575.                     local args = {
  2576.                     [1] = _uuid,
  2577.                     [2] = CFrame.new(Vector3.new(pos["x"] - x, pos["y6"], pos["z"] + z) )
  2578.                 }
  2579.                 game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2580.                 return
  2581.             end
  2582.         elseif name == "metal_knight_evolved" then
  2583.             local i = math.random(1,6)
  2584.             if i == 1 then
  2585.                 task.spawn(function()
  2586.                     --place units 0
  2587.                     print("p1 metal knight evolved")
  2588.                     local args = {
  2589.                         [1] = _uuid,
  2590.                         [2] = CFrame.new(Vector3.new(pos["x"], pos["y"], pos["z"]) )
  2591.                     }
  2592.                     game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2593.                 end)
  2594.                 return
  2595.             elseif i == 2 then
  2596.                 task.spawn(function()
  2597.                     --place units 1
  2598.                     task.wait(2)
  2599.                     local args = {
  2600.                         [1] = _uuid,
  2601.                         [2] = CFrame.new(Vector3.new(pos["x"], pos["y2"], pos["z"] + z) )
  2602.                     }
  2603.                     game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2604.                 end)
  2605.                 return
  2606.             elseif i == 3 then
  2607.                 task.spawn(function()
  2608.                     --place units 2
  2609.                     task.wait(3)
  2610.                     local args = {
  2611.                         [1] = _uuid,
  2612.                         [2] = CFrame.new(Vector3.new(pos["x"] + x, pos["y3"], pos["z"]) )
  2613.                     }
  2614.                     game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2615.                 end)
  2616.                 return
  2617.             end
  2618.         end
  2619.     end
  2620. end
  2621.  
  2622. function upgradeunit(name, min)
  2623.     unitList = {}
  2624.     for i, v in ipairs(game:GetService("Workspace")["_UNITS"]:GetChildren()) do
  2625.        if v:FindFirstChild("_stats") and v:FindFirstChild("_hitbox") then
  2626.             if tostring(v["_stats"].player.Value) == game.Players.LocalPlayer.Name and v["_stats"].xp.Value >= 0 then
  2627.                 if v.Name == name and v._stats.upgrade.Value <= min then
  2628.                     table.insert(unitList, {v["_stats"]["id"].Value, v["_stats"]["uuid"].Value, v, v["_stats"]["upgrade"].Value})
  2629.                    game:GetService("ReplicatedStorage").endpoints.client_to_server.upgrade_unit_ingame:InvokeServer(v)
  2630.                 end
  2631.             end
  2632.         end
  2633.     end
  2634. end
  2635.  
  2636. function sellunit(name)
  2637.     repeat task.wait() until game:GetService("Workspace"):WaitForChild("_UNITS")
  2638.     for i, v in ipairs(game:GetService("Workspace")["_UNITS"]:GetChildren()) do
  2639.         repeat task.wait() until v:WaitForChild("_stats")
  2640.         if v.Name == name and tostring(v["_stats"].player.Value) == game.Players.LocalPlayer.Name and v._stats:FindFirstChild("upgrade") then
  2641.             game:GetService("ReplicatedStorage").endpoints.client_to_server.sell_unit_ingame:InvokeServer(v)
  2642.         end
  2643.     end
  2644. end
  2645.  
  2646. function GetUnitInfo(Unit)
  2647.     local unitinfo = Settings.SelectedUnits[Unit]
  2648.     local unitinfo_ = unitinfo:split(" #")
  2649.     local _units = {}
  2650.     local uu = {}
  2651.     table.clear(_units)
  2652.     table.clear(uu)
  2653.     local name = " "
  2654.     local min;
  2655.     for i, v in pairs(game:GetService("Workspace")["_UNITS"]:GetChildren()) do
  2656.         for i,v in pairs(v:GetChildren()) do
  2657.             if v.Name == "_stats" then
  2658.                 if v:FindFirstChild("uuid") then
  2659.                     if v.uuid.Value == unitinfo_[2] then
  2660.                         table.insert(_units,v.Parent.Name)
  2661.                         name = v.Parent.Name
  2662.                     end
  2663.                 end
  2664.                 if v:FindFirstChild("uuid") and v:FindFirstChild("upgrade") then
  2665.                     if v.uuid.Value == unitinfo_[2] then
  2666.                         table.insert(uu,v.upgrade.Value)
  2667.                     end
  2668.                 end
  2669.             end
  2670.         end
  2671.     end
  2672.    
  2673.     if #uu ~= 0 then
  2674.         min = math.min(table.unpack(uu))
  2675.         table.sort(uu, function(a, b) return a < b end)
  2676.         local min = uu[1]
  2677.     end
  2678.    
  2679.     return #_units or 0, unitinfo_[1], unitinfo_[2], min or 0
  2680. end
  2681.  
  2682. function PlaceUnitsTEST(map,name,_uuid,unit)
  2683.     current_wave = game:GetService("Workspace")["_wave_num"].Value
  2684.     U1_wv, U2_wv, U3_wv, U4_wv, U5_wv, U6_wv = Settings.U1_Wave or 1, Settings.U2_Wave or 1, Settings.U3_Wave or 1, Settings.U4_Wave or 1, Settings.U5_Wave or 1, Settings.U6_Wave or 1
  2685.     U1_TAmm, U2_TAmm, U3_TAmm, U4_TAmm, U5_TAmm, U6_TAmm = Settings.U1_TotalAmmount or 6, Settings.U2_TotalAmmount or 6, Settings.U3_TotalAmmount or 6, Settings.U4_TotalAmmount or 6, Settings.U5_TotalAmmount or 6, Settings.U6_TotalAmmount or 6
  2686.     U1_upgW, U2_upgW, U3_upgW, U4_upgW, U5_upgW, U6_upgW = Settings.U1_UpgWave or 1, Settings.U2_UpgWave or 1, Settings.U3_UpgWave or 1, Settings.U4_UpgWave or 1, Settings.U5_UpgWave or 1, Settings.U6_UpgWave or 1
  2687.     U1_upgCap, U2_upgCap, U3_upgCap, U4_upgCap, U5_upgCap, U6_upgCap = Settings.U1_UpgCap or 99, Settings.U2_UpgCap or 99, Settings.U3_UpgCap or 99, Settings.U4_UpgCap or 99, Settings.U5_UpgCap or 99, Settings.U6_UpgCap or 99
  2688.     U1_sellW, U2_sellW, U3_sellW, U4_sellW, U5_sellW, U6_sellW = Settings.U1_SellWave or 999, Settings.U2_SellWave or 999, Settings.U3_SellWave or 999, Settings.U4_SellWave or 999, Settings.U5_SellWave or 999, Settings.U6_SellWave or 999
  2689.     U1_upgP, U2_upgP, U3_upgP, U4_upgP, U5_upgP, U6_upgP = Settings.U1_UpgPro or 1, Settings.U2_UpgPro or 1, Settings.U3_UpgPro or 1, Settings.U4_UpgPro or 1, Settings.U5_UpgPro or 1, Settings.U6_UpgPro or 1
  2690.     U1_UnP, U2_UnP, U3_UnP, U4_UnP, U5_UnP, U6_UnP = Settings.U1_UnPlace or 1, Settings.U2_UnPlace or 1, Settings.U3_UnPlace or 1, Settings.U4_UnPlace or 1, Settings.U5_UnPlace or 1, Settings.U6_UnPlace or 1
  2691.     --//Unit 1
  2692.     local U1_amm, U1_name, U1_uuid, U1_u = GetUnitInfo("U1")
  2693.     if U1_wv <= current_wave and U1_amm <= U1_TAmm then
  2694.         --[[if U1_UnP <= U1_wv and U1_UnP <= U2_UnP and U1_UnP <= U3_UnP and U1_UnP <= U4_UnP and U1_UnP <= U5_UnP and U1_UnP <= U6_UnP then]]
  2695.         if U1_sellW >= current_wave and U1_amm < U1_TAmm then
  2696.             print("placing u1..")
  2697.             PlacePos(map, U1_name, U1_uuid,"UP1")
  2698.         elseif U1_sellW <= current_wave then
  2699.             print("selling u1..")
  2700.             sellunit(U1_name)
  2701.         end
  2702.         if U1_u < U1_upgCap and U1_upgW <= current_wave and U1_sellW >= current_wave --[[and U1_upgP <= U2_upgP and U1_upgP <= U3_upgP and U1_upgP <= U4_upgP and U1_upgP <= U5_upgP and U1_upgP <= U6_upgP]] then
  2703.             print("upgrading u1..")
  2704.             upgradeunit(tostring(U1_name), (U1_upgCap))
  2705.         end
  2706.     end
  2707. --end
  2708.     --//Unit 2
  2709.     local U2_amm, U2_name, U2_uuid, U2_u = GetUnitInfo("U2")
  2710.     if U2_wv <= current_wave and U2_amm <= U2_TAmm then
  2711.         --[[if U2_UnP <= U2_wv and  U2_UnP <= U1_UnP and U2_UnP <= U3_UnP and U2_UnP <= U4_UnP and U2_UnP <= U5_UnP and U2_UnP <= U6_UnP then]]
  2712.         if U2_sellW >= current_wave and U2_amm < U2_TAmm then
  2713.             print("placing u2..")
  2714.             PlacePos(map, U2_name, U2_uuid,"UP2")
  2715.         elseif U2_sellW <= current_wave then
  2716.             print("selling u2..")
  2717.             sellunit(U2_name)
  2718.         end
  2719.         if U2_u < U2_upgCap and U2_upgW <= current_wave and U2_sellW >= current_wave --[[and U2_upgP <= U1_upgP and U2_upgP <= U3_upgP and U2_upgP <= U4_upgP and U2_upgP <= U5_upgP and U2_upgP <= U6_upgP]]  then
  2720.             print("upgrading u2..")
  2721.             upgradeunit(tostring(U2_name), (U2_upgCap))
  2722.         end
  2723.     end
  2724. --end
  2725.     --//Unit 3
  2726.     local U3_amm, U3_name, U3_uuid, U3_u = GetUnitInfo("U3")
  2727.     if U3_wv <= current_wave and U3_amm <= U3_TAmm then
  2728.         --[[if U3_UnP <= U3_wv and U3_UnP <= U1_UnP and U3_UnP <= U2_UnP and U3_UnP <= U4_UnP and U3_UnP <= U5_UnP and U3_UnP <= U6_UnP then]]
  2729.         if U3_sellW >= current_wave and U3_amm < U3_TAmm then
  2730.             print("placing u3..")
  2731.             PlacePos(map, U3_name, U3_uuid,"UP3")
  2732.         elseif U3_sellW <= current_wave then
  2733.             print("selling u3..")
  2734.             sellunit(U3_name)
  2735.         end
  2736.         if U3_u < U3_upgCap and U3_upgW <= current_wave --[[and U3_sellW >= current_wave and U3_upgP <= U1_upgP and U3_upgP <= U2_upgP and U3_upgP <= U4_upgP and U3_upgP <= U5_upgP and U3_upgP <= U6_upgP]] then
  2737.             print("upgrading u3..")
  2738.             upgradeunit(tostring(U3_name), (U3_upgCap))
  2739.         end
  2740.     end
  2741. --end
  2742.     --//Unit 4
  2743.     local U4_amm, U4_name, U4_uuid, U4_u = GetUnitInfo("U4")
  2744.     if U4_wv <= current_wave and U4_amm <= U4_TAmm then
  2745.         --[[if U4_UnP <= U4_wv and U4_UnP <= U1_UnP and U4_UnP <= U2_UnP and U4_UnP <= U3_UnP and U4_UnP <= U5_UnP and U4_UnP <= U6_UnP then]]
  2746.         if U4_sellW >= current_wave and U4_amm < U4_TAmm then
  2747.             print("placing u4..")
  2748.             PlacePos(map, U4_name, U4_uuid,"UP4")
  2749.         elseif U4_sellW <= current_wave then
  2750.             print("selling u4..")
  2751.             sellunit(U4_name)
  2752.         end
  2753.         if U4_u < U4_upgCap and U4_upgW <= current_wave and U4_sellW >= current_wave --[[and U4_upgP <= U1_upgP and U4_upgP <= U2_upgP and U4_upgP <= U3_upgP and U4_upgP <= U5_upgP and U4_upgP <= U6_upgP]] then
  2754.             print("upgrading u4..")
  2755.             upgradeunit(tostring(U4_name), (U4_upgCap))
  2756.         end
  2757.     end
  2758. --end
  2759.     --//Unit 5
  2760.     local U5_amm, U5_name, U5_uuid, U5_u = GetUnitInfo("U5")
  2761.     if U5_wv <= current_wave and U5_amm <= U5_TAmm then
  2762.         --[[if U5_UnP <= U5_wv and U5_UnP <= U1_UnP and U5_UnP <= U2_UnP and U5_UnP <= U3_UnP and U5_UnP <= U4_UnP and U5_UnP <= U6_UnP then]]
  2763.         if U5_sellW >= current_wave and U5_amm < U5_TAmm then
  2764.             print("placing u5..")
  2765.             PlacePos(map, U5_name, U5_uuid,"UP5")
  2766.         elseif U5_sellW <= current_wave then
  2767.             print("selling u5..")
  2768.             sellunit(U5_name)
  2769.         end
  2770.         if U5_u < U5_upgCap and U5_upgW <= current_wave and U5_sellW >= current_wave --[[and U5_upgP <= U1_upgP and U5_upgP <= U2_upgP and U5_upgP <= U3_upgP and U5_upgP <= U4_upgP and U5_upgP <= U6_upgP]] then
  2771.             print("upgrading u5..")
  2772.             upgradeunit(tostring(U5_name), (U5_upgCap))
  2773.         end
  2774.     end
  2775. --end
  2776.     --//Unit 6
  2777.     local U6_amm, U6_name, U6_uuid, U6_u = GetUnitInfo("U6")
  2778.     if U6_wv <= current_wave and U6_amm <= U6_TAmm then
  2779.         --[[if U6_UnP <= U6_wv and U6_UnP <= U1_UnP and U6_UnP <= U2_UnP and U6_UnP <= U3_UnP and U6_UnP <= U4_UnP and U6_UnP <= U5_UnP then]]
  2780.         if U6_sellW >= current_wave and U6_amm < U6_TAmm then
  2781.             print("placing u6..")
  2782.             PlacePos(map, U6_name, U6_uuid,"UP6")
  2783.         elseif U6_sellW <= current_wave then
  2784.             print("selling u6..")
  2785.             sellunit(U6_name)
  2786.         end
  2787.         if U6_u < U6_upgCap and U6_upgW <= current_wave and U6_sellW >= current_wave --[[and U6_upgP <= U1_upgP and U6_upgP <= U2_upgP and U6_upgP <= U3_upgP and U6_upgP <= U4_upgP and U6_upgP <= U5_upgP]]  then
  2788.             print("upgrading u6..")
  2789.             upgradeunit(tostring(U6_name), (U6_upgCap))
  2790.         end
  2791.     end
  2792. end
  2793. --end
  2794.  
  2795. --test reset unit config
  2796. function reunitcon()
  2797.     print("reset unit config ?")
  2798.     if Settings.U1_Wave then
  2799.         Settings.U1_Wave = 1 end
  2800.     if Settings.U2_Wave then
  2801.         Settings.U2_Wave = 1 end
  2802.     if Settings.U3_Wave then
  2803.         Settings.U3_Wave = 1 end
  2804.     if Settings.U4_Wave then
  2805.         Settings.U4_Wave = 1 end
  2806.     if Settings.U5_Wave then
  2807.         Settings.U5_Wave = 1 end
  2808.     if Settings.U6_Wave then
  2809.         Settings.U6_Wave = 1 end
  2810.     if Settings.U1_TotalAmmount then
  2811.         Settings.U1_TotalAmmount = 6 end
  2812.     if Settings.U2_TotalAmmount then
  2813.         Settings.U2_TotalAmmount = 6 end
  2814.     if Settings.U3_TotalAmmount then
  2815.         Settings.U3_TotalAmmount = 6 end
  2816.     if Settings.U4_TotalAmmount then
  2817.         Settings.U4_TotalAmmount = 6 end
  2818.     if Settings.U5_TotalAmmount then
  2819.         Settings.U5_TotalAmmount = 6 end
  2820.     if Settings.U6_TotalAmmount then
  2821.         Settings.U6_TotalAmmount = 6 end
  2822.     if Settings.U1_UpgWave then
  2823.         Settings.U1_UpgWave = 1 end
  2824.     if Settings.U2_UpgWave then
  2825.         Settings.U2_UpgWave = 1 end
  2826.     if Settings.U3_UpgWave then
  2827.         Settings.U3_UpgWave = 1 end
  2828.     if Settings.U4_UpgWave then
  2829.         Settings.U4_UpgWave = 1 end
  2830.     if Settings.U5_UpgWave then
  2831.         Settings.U5_UpgWave = 1 end
  2832.     if Settings.U6_UpgWave then
  2833.         Settings.U6_UpgWave = 1 end
  2834.     if Settings.U1_UpgCap then
  2835.         Settings.U1_UpgCap = 99 end
  2836.     if Settings.U2_UpgCap then
  2837.         Settings.U2_UpgCap = 99 end
  2838.     if Settings.U3_UpgCap then
  2839.         Settings.U3_UpgCap = 99 end
  2840.     if Settings.U4_UpgCap then
  2841.         Settings.U4_UpgCap = 99 end
  2842.     if Settings.U5_UpgCap then
  2843.         Settings.U5_UpgCap = 99 end
  2844.     if Settings.U6_UpgCap then
  2845.         Settings.U6_UpgCap = 99 end
  2846.     if Settings.U1_SellWave then
  2847.         Settings.U1_SellWave = 99 end
  2848.     if Settings.U2_SellWave then
  2849.         Settings.U2_SellWave = 99 end
  2850.     if Settings.U3_SellWave then
  2851.         Settings.U3_SellWave = 99 end
  2852.     if Settings.U4_SellWave then
  2853.         Settings.U4_SellWave = 99 end
  2854.     if Settings.U5_SellWave then
  2855.         Settings.U5_SellWave = 99 end
  2856.     if Settings.U6_SellWave then
  2857.         Settings.U6_SellWave = 99 end
  2858.     if Settings.U1_UpgPro then
  2859.         Settings.U1_UpgPro = 1 end
  2860.     if Settings.U2_UpgPro then
  2861.         Settings.U2_UpgPro = 1 end
  2862.     if Settings.U3_UpgPro then
  2863.         Settings.U3_UpgPro = 1 end
  2864.     if Settings.U4_UpgPro then
  2865.         Settings.U4_UpgPro = 1 end
  2866.     if Settings.U5_UpgPro then
  2867.         Settings.U5_UpgPro = 1 end
  2868.     if Settings.U6_UpgPro then
  2869.         Settings.U6_UpgPro = 1 end
  2870.     if Settings.U1_UnPlace then
  2871.         Settings.U1_UnPlace = 1 end
  2872.     if Settings.U2_UnPlace then
  2873.         Settings.U2_UnPlace = 1 end
  2874.     if Settings.U3_UnPlace then
  2875.         Settings.U3_UnPlace = 1 end
  2876.     if Settings.U4_UnPlace then
  2877.         Settings.U4_UnPlace = 1 end
  2878.     if Settings.U5_UnPlace then
  2879.         Settings.U5_UnPlace = 1 end
  2880.     if Settings.U6_UnPlace then
  2881.         Settings.U6_UnPlace = 1 end
  2882.  
  2883. end
  2884. if Settings.reunitc then
  2885.     reunitcon()
  2886. end
  2887. --fix sell and place spam
  2888. function PlaceUnits(map,name,_uuid,unit)
  2889.     pcall(function()
  2890.         if Settings.AutoFarm and not getgenv().disableatuofarm then
  2891.             x = getgenv().posX; z = getgenv().posZ
  2892.             for i = 1, 6 do
  2893.                 local unitinfo = Settings.SelectedUnits["U" .. i]
  2894.                 if unitinfo ~= nil then
  2895.                     local unitinfo_ = unitinfo:split(" #")
  2896.                     local pos = Settings[map]["UP" .. i]
  2897.                     print(map.." attempt to place "..unitinfo_[1])
  2898.    
  2899.                     if unitinfo_[1] ~= "metal_knight_evolved" then
  2900.    
  2901.                         --place units 0
  2902.                         local args = {
  2903.                             [1] = unitinfo_[2],
  2904.                             [2] = CFrame.new(Vector3.new(pos["x"], pos["y"], pos["z"]) )
  2905.                         }
  2906.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2907.            
  2908.                         --place units 1
  2909.                         local args = {
  2910.                             [1] = unitinfo_[2],
  2911.                             [2] = CFrame.new(Vector3.new(pos["x"], pos["y2"], pos["z"] + z) )
  2912.                         }
  2913.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2914.            
  2915.                         --place units 2
  2916.                         local args = {
  2917.                             [1] = unitinfo_[2],
  2918.                             [2] = CFrame.new(Vector3.new(pos["x"] + x, pos["y3"], pos["z"]) )
  2919.                         }
  2920.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2921.            
  2922.                         --place units 3
  2923.                         local args = {
  2924.                             [1] = unitinfo_[2],
  2925.                             [2] = CFrame.new(Vector3.new(pos["x"] - x, pos["y4"], pos["z"]) )
  2926.                         }
  2927.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2928.            
  2929.                         --place units 4
  2930.                         local args = {
  2931.                             [1] = unitinfo_[2],
  2932.                             [2] = CFrame.new(Vector3.new(pos["x"] + x, pos["y5"], pos["z"] + z) )
  2933.                         }
  2934.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2935.            
  2936.                         --place units 5
  2937.                         local args = {
  2938.                             [1] = unitinfo_[2],
  2939.                             [2] = CFrame.new(Vector3.new(pos["x"] - x, pos["y6"], pos["z"] + z) )
  2940.                         }
  2941.                         game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2942.    
  2943.                     elseif unitinfo_[1] == "metal_knight_evolved" then
  2944.                         task.spawn(function()
  2945.                             --place units 0
  2946.                             local args = {
  2947.                                 [1] = unitinfo_[2],
  2948.                                 [2] = CFrame.new(Vector3.new(pos["x"], pos["y"], pos["z"]) )
  2949.                             }
  2950.                             game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2951.                         end)
  2952.    
  2953.                         task.spawn(function()
  2954.                             --place units 1
  2955.                             task.wait(2)
  2956.                             local args = {
  2957.                                 [1] = unitinfo_[2],
  2958.                                 [2] = CFrame.new(Vector3.new(pos["x"], pos["y"], pos["z"] + z) )
  2959.                             }
  2960.                             game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2961.                         end)
  2962.    
  2963.                         task.spawn(function()
  2964.                             --place units 2
  2965.                             task.wait(3)
  2966.                             local args = {
  2967.                                 [1] = unitinfo_[2],
  2968.                                 [2] = CFrame.new(Vector3.new(pos["x"] + x, pos["y"], pos["z"]) )
  2969.                             }
  2970.                             game:GetService("ReplicatedStorage").endpoints.client_to_server.spawn_unit:InvokeServer(unpack(args))
  2971.                         end)
  2972.                     end
  2973.                 end
  2974.             end
  2975.         end
  2976.     end)
  2977. end
  2978. coroutine.resume(coroutine.create(function()
  2979.     while task.wait(1.5) do
  2980.         if game.PlaceId ~= 8304191830 and Settings.AutoFarm and Settings.unitconfig and not getgenv().disableatuofarm then
  2981.             warn("Enable Unit Config")
  2982.             local _wave = game:GetService("Workspace"):WaitForChild("_wave_num")
  2983.             repeat task.wait() until game:GetService("Workspace"):WaitForChild("_map")
  2984.             if game.Workspace._map:FindFirstChild("namek mushroom model") then
  2985.                 PlaceUnitsTEST("Namak")
  2986.             elseif game.Workspace._map:FindFirstChild("houses_new") then
  2987.                 PlaceUnitsTEST("Aot")
  2988.             elseif game.Workspace._map:FindFirstChild("Snow Particles") then
  2989.                 PlaceUnitsTEST("Snowy")
  2990.             elseif game.Workspace._map:FindFirstChild("sand_gate") then
  2991.                 PlaceUnitsTEST("Sand")
  2992.             elseif game.Workspace._map:FindFirstChild("icebergs") then
  2993.                 PlaceUnitsTEST("Marine")
  2994.             elseif game.Workspace._map:FindFirstChild("Helicopter Pad") then
  2995.                 PlaceUnitsTEST("Ghoul")
  2996.             elseif game.Workspace._map:FindFirstChild("Bones/dust") then
  2997.                 PlaceUnitsTEST("Hollow")
  2998.             elseif game.Workspace._map:FindFirstChild("Ant Nest") then
  2999.                 PlaceUnitsTEST("Ant")
  3000.             elseif game.Workspace._map:FindFirstChild("light poles") then
  3001.                 PlaceUnitsTEST("Magic")
  3002.             elseif game.Workspace._map:FindFirstChild("LanternsGround") then
  3003.                 PlaceUnitsTEST("Cursed")
  3004.             elseif game.Workspace._map:FindFirstChild("pumpkins") then    
  3005.                 PlaceUnitsTEST("thriller_park")  
  3006.             elseif game.Workspace._map:FindFirstChild("skeleton") then
  3007.                 PlaceUnitsTEST("black_clover")
  3008.             elseif game.Workspace._map:FindFirstChild("graves") then
  3009.                 PlaceUnitsTEST("hollow_leg")
  3010.             elseif game.Workspace._map:FindFirstChild("vending machines") then
  3011.                 PlaceUnitsTEST("chainsaw")
  3012.             elseif game.Workspace._map:FindFirstChild("SpaceCenter") then
  3013.                 PlaceUnitsTEST("jojo")
  3014.             elseif game.Workspace._map:FindFirstChild("secret") then
  3015.                 PlaceUnitsTEST("opm")
  3016.             elseif game.Workspace._map:FindFirstChild("s") then
  3017.                 PlaceUnitsTEST("west_city")
  3018.             elseif game.Workspace._map:FindFirstChild("Capybara") then
  3019.                 PlaceUnitsTEST("Storm_Hideout")
  3020.             elseif game.Workspace._map:FindFirstChild("snow grass") then
  3021.                 PlaceUnitsTEST("infinity_trian")
  3022.             elseif game.Workspace._map:FindFirstChild("misc nonocollide obstacles") then
  3023.                 PlaceUnitsTEST("fabled_kingdom")
  3024.             end
  3025.         end
  3026.     end
  3027. end))
  3028. coroutine.resume(coroutine.create(function()
  3029.     while task.wait(1.5) do
  3030.         if game.PlaceId ~= 8304191830 and Settings.AutoFarm and not Settings.unitconfig and not getgenv().disableatuofarm then
  3031.             warn("Disabled Unit Config")
  3032.             local _wave = game:GetService("Workspace"):WaitForChild("_wave_num")
  3033.             repeat task.wait() until game:GetService("Workspace"):WaitForChild("_map")
  3034.             if game.Workspace._map:FindFirstChild("namek mushroom model") then
  3035.                 PlaceUnits("Namak")
  3036.             elseif game.Workspace._map:FindFirstChild("houses_new") then
  3037.                 PlaceUnits("Aot")
  3038.             elseif game.Workspace._map:FindFirstChild("Snow Particles") then
  3039.                 PlaceUnits("Snowy")
  3040.             elseif game.Workspace._map:FindFirstChild("sand_gate") then
  3041.                 PlaceUnits("Sand")
  3042.             elseif game.Workspace._map:FindFirstChild("icebergs") then
  3043.                 PlaceUnits("Marine")
  3044.             elseif game.Workspace._map:FindFirstChild("Helicopter Pad") then
  3045.                 PlaceUnits("Ghoul")
  3046.             elseif game.Workspace._map:FindFirstChild("Bones/dust") then
  3047.                 PlaceUnits("Hollow")
  3048.             elseif game.Workspace._map:FindFirstChild("Ant Nest") then
  3049.                 PlaceUnits("Ant")
  3050.             elseif game.Workspace._map:FindFirstChild("light poles") then
  3051.                 PlaceUnits("Magic")
  3052.             elseif game.Workspace._map:FindFirstChild("LanternsGround") then
  3053.                 PlaceUnits("Cursed")
  3054.             elseif game.Workspace._map:FindFirstChild("pumpkins") then    
  3055.                 PlaceUnits("thriller_park")  
  3056.             elseif game.Workspace._map:FindFirstChild("skeleton") then
  3057.                 PlaceUnits("black_clover")
  3058.             elseif game.Workspace._map:FindFirstChild("graves") then
  3059.                 PlaceUnits("hollow_leg")
  3060.             elseif game.Workspace._map:FindFirstChild("vending machines") then
  3061.                 PlaceUnits("chainsaw")
  3062.             elseif game.Workspace._map:FindFirstChild("SpaceCenter") then
  3063.                 PlaceUnits("jojo")
  3064.             elseif game.Workspace._map:FindFirstChild("secret") then
  3065.                 PlaceUnits("opm")
  3066.             elseif game.Workspace._map:FindFirstChild("s") then
  3067.                 PlaceUnits("west_city")
  3068.             elseif game.Workspace._map:FindFirstChild("Capybara") then
  3069.                 PlaceUnits("Storm_Hideout")
  3070.             elseif game.Workspace._map:FindFirstChild("snow grass") then
  3071.                 PlaceUnits("infinity_trian")
  3072.             elseif game.Workspace._map:FindFirstChild("misc nonocollide obstacles") then
  3073.                 PlaceUnits("fabled_kingdom")
  3074.             end
  3075.         end
  3076.     end
  3077. end))
  3078. pcall(function()
  3079.     local vu = game:GetService("VirtualUser")
  3080.     game:GetService("Players").LocalPlayer.Idled:connect(function()
  3081.         vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  3082.         wait(1)
  3083.         vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  3084.     end)
  3085.     game:GetService("ReplicatedStorage").endpoints.client_to_server.claim_daily_reward:InvokeServer()
  3086.     warn(" Anti-AFK Loaded !!!")
  3087. end)
  3088. if Settings.AutoLoadScript then
  3089.     autoload()
  3090. end
  3091. --disms
  3092. if game.PlaceId ~= 8304191830 then
  3093.     game:GetService("ReplicatedStorage").packages.assets["ui_sfx"].error.Volume = 0
  3094.     game:GetService("ReplicatedStorage").packages.assets["ui_sfx"].error_old.Volume = 0
  3095.     game.Players.LocalPlayer.PlayerGui.MessageGui.Enabled = false --disables the annoying error messages
  3096. end
  3097. --hide name
  3098. function hidename()
  3099. task.spawn(function()  -- Hides name for yters (not sure if its Fe)
  3100.     while task.wait() do
  3101.         pcall(function()
  3102.             if game.Players.LocalPlayer.Character.Head:FindFirstChild("_overhead") then
  3103.                 game.Players.LocalPlayer.Character.Head:FindFirstChild("_overhead"):Destroy()
  3104.             end
  3105.         end)
  3106.     end
  3107. end)
  3108. end
  3109. if Settings.hidenamep then
  3110.     hidename()
  3111. end
  3112. warn("Hider Name Loaded!!!")
  3113. warn(" AA v2 Loaded !!!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement