Advertisement
chen399d

Cultivation-Simulator養成模擬器

Sep 28th, 2024 (edited)
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 30.72 KB | Source Code | 0 0
  1. local library = loadstring(game:HttpGet("https://pastebin.com/raw/d40xPN0c", true))();
  2. local AntiAFK = game:GetService("VirtualUser");
  3. game.Players.LocalPlayer.Idled:Connect(function()
  4.     AntiAFK:CaptureController();
  5.     AntiAFK:ClickButton2(Vector2.new());
  6.     wait(2);
  7. end);
  8. local window = library:AddWindow("Cultivation-Simulator 養成模擬器", {main_color=Color3.fromRGB(41, 74, 122),min_size=Vector2.new(275, 265),can_resize=false});
  9. local features = window:AddTab("自述");
  10. features:Show();
  11. features:AddLabel("作者:澤澤   介面:Elerium v2");
  12. features:AddLabel("AntiAFK:start");
  13. features:AddLabel("製作時間:2024/09/27");
  14. features:AddLabel("最後更新時間:2024/12/18");
  15. local timeLabel = features:AddLabel("當前時間:00/00/00 00:00:00");
  16. local timezoneLabel = features:AddLabel("時區:UTC+00:00");
  17. local function getFormattedTime()
  18.     return os.date("%Y/%m/%d %H:%M:%S");
  19. end
  20. local function getLocalTimezone()
  21.     local offset = os.date("%z");
  22.     return string.format("UTC%s", offset:sub(1, 3) .. ":" .. offset:sub(4, 5));
  23. end
  24. local function updateLabel()
  25.     timeLabel.Text = "當前時間:" .. getFormattedTime();
  26.     timezoneLabel.Text = "時區:" .. getLocalTimezone();
  27. end
  28. spawn(function()
  29.     while true do
  30.         updateLabel();
  31.         wait(1);
  32.     end
  33. end);
  34. local player = game:GetService("Players").LocalPlayer;
  35. local playerGui = player.PlayerGui;
  36. local guiPath = playerGui.GUI:WaitForChild("主界面"):WaitForChild("战斗");
  37. local levelInfoUI = guiPath:WaitForChild("关卡信息"):WaitForChild("文本");
  38. local victoryResult = guiPath:WaitForChild("胜利结果");
  39. local values = player:WaitForChild("值");
  40. local playersetting = values:WaitForChild("设置");
  41. local privileges = values:WaitForChild("特权");
  42. local player = game:GetService("Players").LocalPlayer;
  43. local playerGui = player.PlayerGui;
  44. local lottery = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("商店"):WaitForChild("背景"):WaitForChild("右侧界面"):WaitForChild("召唤");
  45. local currency = player:WaitForChild("值"):WaitForChild("货币");
  46. local diamonds = currency:WaitForChild("钻石");
  47. local mainmission = playerGui.GUI:WaitForChild("主界面"):WaitForChild("主城"):WaitForChild("主线任务"):WaitForChild("按钮"):WaitForChild("提示").Visible;
  48. local namechangechick = false;
  49. local missionnamelist = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("商店"):WaitForChild("通行证任务"):WaitForChild("背景"):WaitForChild("任务列表");
  50. local sword_tickets = currency:WaitForChild("法宝抽奖券").value;
  51. local skill_tickets = currency:WaitForChild("技能抽奖券").value;
  52. local sword = lottery:WaitForChild("法宝"):WaitForChild("等级区域");
  53. local sword_level = sword:WaitForChild("值").text;
  54. local sword_value = sword:WaitForChild("进度条"):WaitForChild("值"):WaitForChild("值").text;
  55. local skill = lottery:WaitForChild("技能"):WaitForChild("等级区域");
  56. local skill_level = skill:WaitForChild("值").text;
  57. local skill_value = skill:WaitForChild("进度条"):WaitForChild("值"):WaitForChild("值").text;
  58. local extract_sword_level;
  59. local extract_sword_value;
  60. local extract_skill_level;
  61. local extract_skill_value;
  62. local useDiamonds = false;
  63. local savemodetime = 9;
  64. local Dungeonslist = playerGui:WaitForChild("GUI"):WaitForChild("二级界面"):WaitForChild("关卡选择"):WaitForChild("背景"):WaitForChild("右侧界面"):WaitForChild("副本"):WaitForChild("列表");
  65. local DungeonDungeon = Dungeonslist:FindFirstChild("副本预制体");
  66. local Dungeonnamechangechick = false;
  67. local Ore_Dungeonkey, Gem_Dungeonkey, Gold_Dungeonkey, Relic_Dungeonkey, Rune_Dungeonkey, Hover_Dungeonkey;
  68. local turntable = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("抽奖转盘"):WaitForChild("抽奖按钮"):WaitForChild("按钮"):WaitForChild("名称").Text;
  69. turntable = string.match(turntable, "%d+");
  70. turntable = tonumber(turntable) or 0;
  71. local Guilddonation = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("公会"):WaitForChild("捐献"):WaitForChild("背景"):WaitForChild("按钮"):WaitForChild("确定按钮"):WaitForChild("次数").Text;
  72. Guilddonation = string.match(Guilddonation, "%d+");
  73. Guilddonation = tonumber(Guilddonation) or 0;
  74. local mailList = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("邮件"):WaitForChild("背景"):WaitForChild("邮件列表");
  75. local mailCheckCompleted = false;
  76. local AFKmod_check = 1;
  77. local Players = game:GetService("Players");
  78. local isDetectionEnabled = true;
  79. local timescheck = 0;
  80. local inRange = false;
  81. local playerInRange = false;
  82. local hasPrintedNoPlayer = false;
  83. local localPlayer = game.Players.LocalPlayer;
  84. local character = localPlayer.Character or localPlayer.CharacterAdded:Wait();
  85. local rootPart = character:WaitForChild("HumanoidRootPart");
  86. local closestScene = nil;
  87. local closestPosition = nil;
  88. local closestDistance = math.huge;
  89. for i = 1, 9 do
  90.     local sceneName = "主场景" .. (((i > 1) and tostring(i)) or "");
  91.     local scene = workspace:WaitForChild(sceneName, 5);
  92.     if scene then
  93.         local respawnPoint = scene:WaitForChild("重生点", 5);
  94.         if respawnPoint then
  95.             local distance = (respawnPoint.CFrame.Position - rootPart.CFrame.Position).Magnitude;
  96.             if (distance < closestDistance) then
  97.                 closestDistance = distance;
  98.                 closestScene = scene;
  99.                 closestPosition = respawnPoint.Position + Vector3.new(0, 4.9, 0);
  100.             end
  101.         else
  102.             print("主場景:", scene.Name, "中未找到重生點");
  103.         end
  104.     else
  105.         print("未找到主場景:", sceneName);
  106.     end
  107. end
  108. if (closestScene and closestPosition) then
  109.     print("初始場景為:", closestScene.Name);
  110.     print("重生點座標 (x, y, z):", closestPosition.X, closestPosition.Y, closestPosition.Z);
  111. else
  112.     print("未找到任何有效的出生點");
  113. end
  114. local function checkPlayersInRange()
  115.     local character = localPlayer.Character;
  116.     if (not character or not character:FindFirstChild("HumanoidRootPart")) then
  117.         return;
  118.     end
  119.     local boxPosition = character.HumanoidRootPart.Position;
  120.     local boxSize = Vector3.new(500, 500, 500) / 2;
  121.     playerInRange = false;
  122.     for _, player in pairs(Players:GetPlayers()) do
  123.         if ((player ~= localPlayer) and player.Character and player.Character:FindFirstChild("HumanoidRootPart")) then
  124.             local playerPosition = player.Character.HumanoidRootPart.Position;
  125.             local inRange = (math.abs(playerPosition.X - boxPosition.X) <= boxSize.X) and (math.abs(playerPosition.Y - boxPosition.Y) <= boxSize.Y) and (math.abs(playerPosition.Z - boxPosition.Z) <= boxSize.Z);
  126.             if inRange then
  127.                 playerInRange = true;
  128.                 break;
  129.             end
  130.         end
  131.     end
  132.     if playerInRange then
  133.         if (timescheck == 0) then
  134.             print("有玩家在範圍內");
  135.             savemodetime = 9;
  136.             timescheck = 1;
  137.             hasPrintedNoPlayer = true;
  138.         end
  139.     elseif (timescheck == 1) then
  140.         print("範圍內玩家已離開");
  141.         timescheck = 0;
  142.         hasPrintedNoPlayer = false;
  143.     end
  144.     if (not playerInRange and not hasPrintedNoPlayer) then
  145.         print("範圍內無玩家");
  146.         savemodetime = 3;
  147.         hasPrintedNoPlayer = true;
  148.     end
  149. end
  150. local function setupRangeDetection()
  151.     while true do
  152.         if isDetectionEnabled then
  153.             checkPlayersInRange();
  154.         end
  155.         wait(0.1);
  156.     end
  157. end
  158. local function toggleDetection()
  159.     isDetectionEnabled = not isDetectionEnabled;
  160.     print("檢測已" .. ((isDetectionEnabled and "啟用") or "關閉"));
  161.     if not isDetectionEnabled then
  162.         savemodetime = 3;
  163.     end
  164. end
  165. spawn(setupRangeDetection);
  166. local button;
  167. local function updateButtonText()
  168.     if isDetectionEnabled then
  169.         button.Text = "關閉安全模式";
  170.     else
  171.         button.Text = "啟用安全模式";
  172.     end
  173. end
  174. button = features:AddButton("啟用安全模式", function()
  175.     inRange = false;
  176.     playerInRange = false;
  177.     timescheck = 0;
  178.     hasPrintedNoPlayer = false;
  179.     toggleDetection();
  180.     updateButtonText();
  181. end);
  182. updateButtonText();
  183. local screenGui = Instance.new("ScreenGui");
  184. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui");
  185. local blackBlock = Instance.new("Frame");
  186. blackBlock.Size = UDim2.new(200, 0, 200, 0);
  187. blackBlock.Position = UDim2.new(0, 0, 0, 0);
  188. blackBlock.BackgroundColor3 = Color3.fromRGB(0, 0, 0);
  189. blackBlock.Visible = false;
  190. blackBlock.Parent = screenGui;
  191. features:AddButton("開黑幕/關閉", function()
  192.     blackBlock.Visible = not blackBlock.Visible;
  193. end);
  194. local features = window:AddTab("Main");
  195. features:AddButton("掛機模式", function()
  196.     local AFKmod = playersetting:WaitForChild("自动战斗");
  197.     if (AFKmod_check == 1) then
  198.         AFKmod.Value = true;
  199.         AFKmod_check = 0;
  200.     else
  201.         AFKmod.Value = false;
  202.         AFKmod_check = 1;
  203.     end
  204. end);
  205. local function gamepassmissionnamechange()
  206.     if missionnamelist then
  207.         local gamepassmissionlist = missionnamelist:FindFirstChild("任务项预制体");
  208.         if gamepassmissionlist then
  209.             local gamepassmissionLayoutOrder = gamepassmissionlist.LayoutOrder;
  210.             gamepassmissionlist.Name = tostring(gamepassmissionLayoutOrder);
  211.         else
  212.             game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\230\156\136\233\128\154\232\161\140\232\175\129"):FindFirstChild("\232\142\183\229\143\150\230\149\176\230\141\174"):FireServer();
  213.             print("任務--名稱--已全部更改");
  214.             namechangechick = true;
  215.         end
  216.     end
  217. end
  218. while not namechangechick do
  219.     gamepassmissionnamechange();
  220. end
  221. local function mainmissionchack()
  222.     mainmission = playerGui.GUI:WaitForChild("主界面"):WaitForChild("主城"):WaitForChild("主线任务"):WaitForChild("按钮"):WaitForChild("提示").Visible;
  223.     if (mainmission == true) then
  224.         print("任務完成,可領取");
  225.         game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\228\184\187\231\186\191\228\187\187\229\138\161"):FindFirstChild("\233\162\134\229\143\150\229\165\150\229\138\177"):FireServer();
  226.     end
  227. end
  228. local function gamepassmission()
  229.     if missionnamelist then
  230.         for _, child in ipairs(missionnamelist:GetChildren()) do
  231.             if (child:IsA("Frame") and (child.Visible == true)) then
  232.                 local missionname = child.Name;
  233.                 missionname = tonumber(missionname);
  234.                 local nameLabel = child:WaitForChild("名称");
  235.                 if nameLabel then
  236.                     local taskProgress = nameLabel.Text:match("%((%d+/%d+)%)");
  237.                     if taskProgress then
  238.                         local A_num, B_num = taskProgress:match("(%d+)%/(%d+)");
  239.                         A_num = tonumber(A_num);
  240.                         B_num = tonumber(B_num);
  241.                         if (A_num and B_num and ((A_num / B_num) >= 1)) then
  242.                             print("可領取");
  243.                             local args = {[1]=missionname};
  244.                             game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\230\156\136\233\128\154\232\161\140\232\175\129"):FindFirstChild("\229\174\140\230\136\144\228\187\187\229\138\161"):FireServer(unpack(args));
  245.                             game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\230\156\136\233\128\154\232\161\140\232\175\129"):FindFirstChild("\232\142\183\229\143\150\230\149\176\230\141\174"):FireServer();
  246.                         end
  247.                     end
  248.                 end
  249.             end
  250.         end
  251.     end
  252. end
  253. local rewardstasks = false;
  254. local rewardstasks = features:AddSwitch("任務自動領取(包括Gamepass)", function(bool)
  255.     rewardstasks = bool;
  256.     if rewardstasks then
  257.         while rewardstasks do
  258.             mainmissionchack();
  259.             gamepassmission();
  260.             wait(1);
  261.         end
  262.     end
  263. end);
  264. rewardstasks:Set(false);
  265. local invest = false;
  266. local invest = features:AddSwitch("投資", function(bool)
  267.     invest = bool;
  268.     if invest then
  269.         while invest do
  270.             for i = 1, 3 do
  271.                 local args = {i};
  272.                 game:GetService("ReplicatedStorage")["\228\186\139\228\187\182"]["\229\133\172\231\148\168"]["\229\149\134\229\186\151"]["\233\147\182\232\161\140"]["\233\162\134\229\143\150\231\144\134\232\180\162"]:FireServer(unpack(args));
  273.                 print("領取", i);
  274.             end
  275.             wait(5);
  276.             for i = 1, 3 do
  277.                 local args = {i};
  278.                 game:GetService("ReplicatedStorage")["\228\186\139\228\187\182"]["\229\133\172\231\148\168"]["\229\149\134\229\186\151"]["\233\147\182\232\161\140"]["\232\180\173\228\185\176\231\144\134\232\180\162"]:FireServer(unpack(args));
  279.                 print("投資", i);
  280.             end
  281.             wait(600);
  282.         end
  283.     end
  284. end);
  285. invest:Set(false);
  286. local AutoCollectherbs = false;
  287. local AutoCollectherbs = features:AddSwitch("自動採草藥", function(bool)
  288.     AutoCollectherbs = bool;
  289.     if AutoCollectherbs then
  290.         while AutoCollectherbs do
  291.             local args = {[1]=1,[2]=nil};
  292.             game:GetService("ReplicatedStorage")["\228\186\139\228\187\182"]["\229\133\172\231\148\168"]["\229\134\156\231\148\176"]["\233\135\135\233\155\134"]:FireServer(unpack(args));
  293.             local args = {[1]=2,[2]=nil};
  294.             game:GetService("ReplicatedStorage")["\228\186\139\228\187\182"]["\229\133\172\231\148\168"]["\229\134\156\231\148\176"]["\233\135\135\233\155\134"]:FireServer(unpack(args));
  295.             local args = {[1]=3,[2]=nil};
  296.             game:GetService("ReplicatedStorage")["\228\186\139\228\187\182"]["\229\133\172\231\148\168"]["\229\134\156\231\148\176"]["\233\135\135\233\155\134"]:FireServer(unpack(args));
  297.             local args = {[1]=4,[2]=nil};
  298.             game:GetService("ReplicatedStorage")["\228\186\139\228\187\182"]["\229\133\172\231\148\168"]["\229\134\156\231\148\176"]["\233\135\135\233\155\134"]:FireServer(unpack(args));
  299.             local args = {[1]=5,[2]=nil};
  300.             game:GetService("ReplicatedStorage")["\228\186\139\228\187\182"]["\229\133\172\231\148\168"]["\229\134\156\231\148\176"]["\233\135\135\233\155\134"]:FireServer(unpack(args));
  301.             local args = {[1]=6,[2]=nil};
  302.             game:GetService("ReplicatedStorage")["\228\186\139\228\187\182"]["\229\133\172\231\148\168"]["\229\134\156\231\148\176"]["\233\135\135\233\155\134"]:FireServer(unpack(args));
  303.             wait(60);
  304.         end
  305.     end
  306. end);
  307. AutoCollectherbs:Set(false);
  308. local previousLevelText = levelInfoUI.Text or "";
  309. local previousVictoryText = victoryResult.Text or "";
  310. local levelNumber = 0;
  311. local restart = false;
  312. local function isEmpty(text)
  313.     return (text == nil) or (text:gsub("%s+", "") == "");
  314. end
  315. local function updateLevelText()
  316.     local currentLevelText = levelInfoUI.Text;
  317.     if (not isEmpty(currentLevelText) and (currentLevelText ~= previousLevelText)) then
  318.         previousLevelText = currentLevelText;
  319.         levelNumber = previousLevelText:match("World (%d+)") or 0;
  320.     end
  321. end
  322. local function updateVictoryText()
  323.     local currentVictoryText = victoryResult.Text;
  324.     if (currentVictoryText ~= previousVictoryText) then
  325.         previousVictoryText = currentVictoryText;
  326.         local losewave = previousVictoryText;
  327.         local victoryWaveNumber = previousVictoryText:match("Wave (%d+)") or 100;
  328.         local victoryText = previousVictoryText:match("Wave %d+ (.+)") or "結束";
  329.         if (victoryWaveNumber == 100) then
  330.             restart = true;
  331.         end
  332.         if (losewave == 100) then
  333.             restart = true;
  334.         end
  335.     end
  336. end
  337. local function checkAndUpdate()
  338.     updateLevelText();
  339.     updateVictoryText();
  340. end
  341. local function restart_level()
  342.     local number = tonumber(levelNumber:match("%d+"));
  343.     print("重啟世界", number);
  344.     local args = {[1]=number};
  345.     game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\229\133\179\229\141\161"):FindFirstChild("\232\191\155\229\133\165\228\184\150\231\149\140\229\133\179\229\141\161"):FireServer(unpack(args));
  346. end
  347. local function usesword_ticket()
  348.     print("抽獎:法寶");
  349.     local args = {[1]="\230\179\149\229\174\157",[2]=false};
  350.     game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\229\149\134\229\186\151"):FindFirstChild("\229\143\172\229\148\164"):FindFirstChild("\230\138\189\229\165\150"):FireServer(unpack(args));
  351. end
  352. local function useskill_ticket()
  353.     print("抽獎:技能");
  354.     local args = {[1]="\230\138\128\232\131\189",[2]=false};
  355.     game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\229\149\134\229\186\151"):FindFirstChild("\229\143\172\229\148\164"):FindFirstChild("\230\138\189\229\165\150"):FireServer(unpack(args));
  356. end
  357. local MIN_TICKETS = 8;
  358. local DIAMONDS_PER_TICKET = 50;
  359. local function checkTicketsAndDiamonds(tickets, diamonds, itemType, useDiamonds)
  360.     if (tickets >= MIN_TICKETS) then
  361.         return true;
  362.     end
  363.     local missingTickets = MIN_TICKETS - tickets;
  364.     if not useDiamonds then
  365.         return false;
  366.     end
  367.     local requiredDiamonds = missingTickets * DIAMONDS_PER_TICKET;
  368.     if (diamonds >= requiredDiamonds) then
  369.         return true;
  370.     else
  371.         return false;
  372.     end
  373. end
  374. local function processLottery(type, tickets, diamonds, useDiamonds)
  375.     local canProceed = checkTicketsAndDiamonds(tickets, diamonds, type, useDiamonds);
  376.     if canProceed then
  377.         if (type == "法寶") then
  378.             usesword_ticket();
  379.         elseif (type == "技能") then
  380.             useskill_ticket();
  381.         end
  382.     else
  383.     end
  384.     return canProceed;
  385. end
  386. local function compare_ticket_type(sword_tickets, skill_tickets, sword_level, skill_level, sword_value, skill_value, diamonds, useDiamonds)
  387.     if (sword_level == skill_level) then
  388.         if (sword_value > skill_value) then
  389.             processLottery("技能", skill_tickets, diamonds, useDiamonds);
  390.         elseif (sword_value < skill_value) then
  391.             processLottery("法寶", sword_tickets, diamonds, useDiamonds);
  392.         else
  393.             local canSword = processLottery("法寶", sword_tickets, diamonds, useDiamonds);
  394.             local canSkill = processLottery("技能", skill_tickets, diamonds, useDiamonds);
  395.             if (not canSword and not canSkill) then
  396.             end
  397.         end
  398.     elseif (sword_level > skill_level) then
  399.         processLottery("技能", skill_tickets, diamonds, useDiamonds);
  400.     else
  401.         processLottery("法寶", sword_tickets, diamonds, useDiamonds);
  402.     end
  403. end
  404. local function fetchData()
  405.     sword_level = sword:WaitForChild("值").Text;
  406.     sword_value = sword:WaitForChild("进度条"):WaitForChild("值"):WaitForChild("值").Text;
  407.     skill_level = skill:WaitForChild("值").Text;
  408.     skill_value = skill:WaitForChild("进度条"):WaitForChild("值"):WaitForChild("值").Text;
  409.     sword_tickets = currency:WaitForChild("法宝抽奖券").Value;
  410.     skill_tickets = currency:WaitForChild("技能抽奖券").Value;
  411.     diamonds = currency:WaitForChild("钻石").Value;
  412. end
  413. local function updateExtractedValues()
  414.     fetchData();
  415.     extract_sword_level = tonumber(string.match(sword_level, "%d+"));
  416.     extract_sword_value = tonumber(string.match(sword_value, "^(%d+)/"));
  417.     extract_skill_level = tonumber(string.match(skill_level, "%d+"));
  418.     extract_skill_value = tonumber(string.match(skill_value, "^(%d+)/"));
  419. end
  420. local Autolottery = false;
  421. local AutolotterySwitch = features:AddSwitch("自動抽法寶/技能", function(bool)
  422.     Autolottery = bool;
  423.     if Autolottery then
  424.         while Autolottery do
  425.             updateExtractedValues();
  426.             wait(0.2);
  427.             compare_ticket_type(sword_tickets, skill_tickets, extract_sword_level, extract_skill_level, extract_sword_value, extract_skill_value, diamonds, useDiamonds);
  428.             wait(0.2);
  429.         end
  430.     end
  431. end);
  432. AutolotterySwitch:Set(false);
  433. local USEDiamondSwitch = features:AddSwitch("啟用鑽石抽取", function(bool)
  434.     useDiamonds = bool;
  435. end);
  436. USEDiamondSwitch:Set(false);
  437. features:AddLabel(" ∇ --需要成功完成波次100 ");
  438. local Autostart = false;
  439. local Autostart = features:AddSwitch("戰鬥結束後自動開始(只支援世界戰鬥)", function(bool)
  440.     Autostart = bool;
  441.     if Autostart then
  442.         while Autostart do
  443.             checkAndUpdate();
  444.             if (restart == true) then
  445.                 rootPart.CFrame = CFrame.new(closestPosition);
  446.                 wait(0.5);
  447.                 wait(savemodetime);
  448.                 restart_level();
  449.                 wait(0.5);
  450.                 restart = false;
  451.             end
  452.             wait(0.3);
  453.         end
  454.     end
  455. end);
  456. Autostart:Set(false);
  457. local function checkDungeonkey()
  458.     Ore_Dungeonkey = string.match(Dungeonslist.OreDungeon:WaitForChild("钥匙"):WaitForChild("值").Text, "^%d+");
  459.     Gem_Dungeonkey = string.match(Dungeonslist.GemDungeon:WaitForChild("钥匙"):WaitForChild("值").Text, "^%d+");
  460.     Gold_Dungeonkey = string.match(Dungeonslist.GoldDungeon:WaitForChild("钥匙"):WaitForChild("值").Text, "^%d+");
  461.     Relic_Dungeonkey = string.match(Dungeonslist.RelicDungeon:WaitForChild("钥匙"):WaitForChild("值").Text, "^%d+");
  462.     Rune_Dungeonkey = string.match(Dungeonslist.RuneDungeon:WaitForChild("钥匙"):WaitForChild("值").Text, "^%d+");
  463.     Hover_Dungeonkey = string.match(Dungeonslist.HoverDungeon:WaitForChild("钥匙"):WaitForChild("值").Text, "^%d+");
  464. end
  465. local function Dungeonnamechange()
  466.     if DungeonDungeon then
  467.         local dungeonFolder = Dungeonslist:FindFirstChild("副本预制体");
  468.         if dungeonFolder then
  469.             local dungeonsname = dungeonFolder:FindFirstChild("名称");
  470.             dungeonsname = dungeonsname.Text;
  471.             dungeonsname = string.gsub(dungeonsname, "%s+", "");
  472.             dungeonFolder.Name = dungeonsname;
  473.         else
  474.             Dungeonnamechangechick = true;
  475.             print("地下城--名稱--已全部更改");
  476.             checkDungeonkey();
  477.         end
  478.     else
  479.         print("地下城--名稱--已全部更改");
  480.         Dungeonnamechangechick = true;
  481.     end
  482. end
  483. while not Dungeonnamechangechick do
  484.     Dungeonnamechange();
  485. end
  486. local features = window:AddTab("副本");
  487. features:AddButton("快速副本傳送", function()
  488.     local ohInstance1 = game:GetService("Players").LocalPlayer;
  489.     game:GetService("ReplicatedStorage")[utf8.char(20107, 20214)][utf8.char(20844, 29992)][utf8.char(22330, 26223)][utf8.char(35775, 38382)]:FireServer(ohInstance1);
  490. end);
  491. local textLabel = features:AddLabel("礦石地下城鑰匙:");
  492. local textLabel2 = features:AddLabel("金幣地下城鑰匙:");
  493. local textLabel3 = features:AddLabel("靈石地下城鑰匙:");
  494. local textLabel4 = features:AddLabel("符石地下城鑰匙:");
  495. local textLabel5 = features:AddLabel("遺物地下城鑰匙:");
  496. local textLabel6 = features:AddLabel("懸浮地下城鑰匙:");
  497. local function DungeonKeyUpd()
  498.     checkDungeonkey();
  499.     textLabel.Text = "礦石地下城鑰匙:" .. (Ore_Dungeonkey or "0");
  500.     textLabel2.Text = "金幣地下城鑰匙:" .. (Gold_Dungeonkey or "0");
  501.     textLabel3.Text = "靈石地下城鑰匙:" .. (Gem_Dungeonkey or "0");
  502.     textLabel4.Text = "符石地下城鑰匙:" .. (Rune_Dungeonkey or "0");
  503.     textLabel5.Text = "遺物地下城鑰匙:" .. (Relic_Dungeonkey or "0");
  504.     textLabel6.Text = "懸浮地下城鑰匙:" .. (Hover_Dungeonkey or "0");
  505. end
  506. spawn(function()
  507.     while true do
  508.         DungeonKeyUpd();
  509.         wait(1);
  510.     end
  511. end);
  512. local features = window:AddTab("其他");
  513. local timeLabel = features:AddLabel("距離下自動獲取還有 0 秒");
  514. local playerGui = game.Players.LocalPlayer.PlayerGui;
  515. local Online_Gift = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("节日活动商店"):WaitForChild("背景"):WaitForChild("右侧界面"):WaitForChild("在线奖励"):WaitForChild("列表");
  516. local Gife_check = false;
  517. local countdownList = {};
  518. local hasExecutedToday = false;
  519. local lastExecutedDay = os.date("%d");
  520. local function convertToSeconds(timeText)
  521.     local minutes, seconds = string.match(timeText, "(%d+):(%d+)");
  522.     if (minutes and seconds) then
  523.         return (tonumber(minutes) * 60) + tonumber(seconds);
  524.     end
  525.     return nil;
  526. end
  527. local function GetOnlineGiftCountdown()
  528.     hasExecutedToday = true;
  529.     local minTime = math.huge;
  530.     for i = 1, 6 do
  531.         local rewardName = string.format("在线奖励%02d", i);
  532.         local rewardFolder = Online_Gift:FindFirstChild(rewardName);
  533.         if rewardFolder then
  534.             local button = rewardFolder:FindFirstChild("按钮");
  535.             local countdown = button and button:FindFirstChild("倒计时");
  536.             if countdown then
  537.                 local countdownText = countdown.Text;
  538.                 countdownList[rewardName] = countdownText;
  539.                 if string.match(countdownText, "CLAIMED!") then
  540.                 elseif string.match(countdownText, "DONE") then
  541.                     minTime = math.min(minTime, 0);
  542.                 elseif string.match(countdownText, "%d+:%d+") then
  543.                     local totalSeconds = convertToSeconds(countdownText);
  544.                     if totalSeconds then
  545.                         minTime = math.min(minTime, totalSeconds);
  546.                     end
  547.                 else
  548.                 end
  549.             else
  550.             end
  551.         else
  552.         end
  553.     end
  554.     return ((minTime < math.huge) and minTime) or nil;
  555. end
  556. local minCountdown = GetOnlineGiftCountdown();
  557. local nowminCountdown = minCountdown;
  558. local check_timers = false;
  559. local function Online_Gift_start()
  560.     local newMinCountdown = GetOnlineGiftCountdown();
  561.     if (newMinCountdown and (newMinCountdown == minCountdown)) then
  562.         check_timers = true;
  563.     else
  564.         check_timers = false;
  565.     end
  566.     if check_timers then
  567.         nowminCountdown = nowminCountdown - 1;
  568.     else
  569.         minCountdown = newMinCountdown;
  570.         nowminCountdown = minCountdown;
  571.     end
  572.     if (nowminCountdown and (nowminCountdown > 0)) then
  573.         timeLabel.Text = string.format("距離下自動獲取還有 %d 秒", nowminCountdown);
  574.     elseif (nowminCountdown and (nowminCountdown <= 0)) then
  575.         timeLabel.Text = "倒計時結束,準備獲取獎勳";
  576.         for i = 1, 6 do
  577.             local args = {[1]=i};
  578.             game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\232\138\130\230\151\165\230\180\187\229\138\168"):FindFirstChild("\233\162\134\229\143\150\229\165\150\229\138\177"):FireServer(unpack(args));
  579.         end
  580.     else
  581.         timeLabel.Text = "已全部領取";
  582.         Gife_check = false;
  583.     end
  584. end
  585. local function Online_Gift_check()
  586.     while Gife_check do
  587.         Online_Gift_start();
  588.         wait(1);
  589.     end
  590. end
  591. features:AddButton("自動領取在線獎勳", function()
  592.     Gife_check = true;
  593.     spawn(Online_Gift_check);
  594. end);
  595. local function CheckAllRewardsCompleted()
  596.     local allCompleted = true;
  597.     GetOnlineGiftCountdown();
  598.     for i = 1, 6 do
  599.         local rewardName = string.format("在线奖励%02d", i);
  600.         local status = countdownList[rewardName];
  601.         if (not status or not string.match(status, "DONE")) then
  602.             allCompleted = false;
  603.             break;
  604.         end
  605.     end
  606.     if allCompleted then
  607.         print("所有在線獎勳已完成!");
  608.         Gife_check = false;
  609.     end
  610. end
  611. spawn(function()
  612.     while Gife_check and not hasExecutedToday do
  613.         CheckAllRewardsCompleted();
  614.         wait(60);
  615.     end
  616. end);
  617. spawn(function()
  618.     while true do
  619.         local currentHour = tonumber(os.date("%H"));
  620.         local currentDay = os.date("%d");
  621.         if ((currentHour == 1) and (lastExecutedDay ~= currentDay)) then
  622.             hasExecutedToday = false;
  623.             print("一點、自動領取在線獎勳");
  624.             wait(0.1);
  625.             Gife_check = true;
  626.             lastExecutedDay = currentDay;
  627.         end
  628.         wait(60);
  629.     end
  630. end);
  631. features:AddLabel(" - - 解鎖通行證");
  632. features:AddButton("解鎖自動煉製", function()
  633.     local superRefining = privileges:WaitForChild("超级炼制");
  634.     superRefining.Value = false;
  635.     local automaticRefining = privileges:WaitForChild("自动炼制");
  636.     automaticRefining.Value = true;
  637. end);
  638. features:AddButton("背包擴充", function()
  639.     local backpack = privileges:WaitForChild("扩充背包");
  640.     backpack.Value = true;
  641. end);
  642. features:AddLabel(" - - 統計");
  643. features:AddButton("每秒擊殺/金幣數", function()
  644.     loadstring(game:HttpGet("https://pastebin.com/raw/0NqSi46N"))();
  645.     loadstring(game:HttpGet("https://pastebin.com/raw/HGQXdAiz"))();
  646. end);
  647. features = window:AddTab("每日任務");
  648. local turntabtimmer = false;
  649. local turntabletext = features:AddLabel("抽獎轉盤剩餘次數:");
  650. local Guilddonationtext = features:AddLabel("公會捐贈剩餘次數:");
  651. local mail_text = features:AddLabel("郵箱有郵件待領取!!");
  652. local function turntabletextupd()
  653.     local turntable = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("抽奖转盘"):WaitForChild("抽奖按钮"):WaitForChild("按钮"):WaitForChild("名称").Text;
  654.     turntable = string.match(turntable, "%d+");
  655.     turntable = tonumber(turntable) or 0;
  656.     if (turntable == 0) then
  657.         turntabletext.Text = "抽獎轉盤已完成✅";
  658.     elseif turntabtimmer then
  659.         local waitTime = 5;
  660.         for i = waitTime, 1, -1 do
  661.             turntabletext.Text = "請等待... " .. tostring(i);
  662.             wait(1);
  663.         end
  664.         wait(0.5);
  665.         turntabletext.Text = "領取獎勳";
  666.         turntabtimmer = false;
  667.     else
  668.         turntabletext.Text = "抽獎轉盤剩餘次數: " .. tostring(turntable);
  669.     end
  670. end
  671. local function checkMail()
  672.     local newMail = mailList:FindFirstChild("FallingGemsfromtheSky");
  673.     local gamePassMail = mailList:FindFirstChild("MysteriousLetter");
  674.     if (newMail or gamePassMail) then
  675.         local newMailText = "";
  676.         if newMail then
  677.             newMailText = newMail:WaitForChild("领取按钮"):WaitForChild("按钮"):WaitForChild("名称").Text;
  678.         end
  679.         local gamePassMailText = "";
  680.         if gamePassMail then
  681.             gamePassMailText = gamePassMail:WaitForChild("领取按钮"):WaitForChild("按钮"):WaitForChild("名称").Text;
  682.         end
  683.         if ((newMailText == "Claim") or (gamePassMailText ~= "Unlock")) then
  684.             mail_text.Text = "郵箱有郵件待領取!!";
  685.         else
  686.             mail_text.Text = "郵箱無郵件可領取。";
  687.         end
  688.     end
  689. end
  690. local function updateStatus()
  691.     mailCheckCompleted = false;
  692. end
  693. local function checkTime()
  694.     while true do
  695.         local currentTime = os.date("*t");
  696.         if ((currentTime.hour == 0) and (currentTime.min == 0)) then
  697.             updateStatus();
  698.             wait(60);
  699.         else
  700.             wait(1);
  701.         end
  702.     end
  703. end
  704. spawn(function()
  705.     checkTime();
  706. end);
  707. local function changeMailName()
  708.     local mailFolder = mailList:FindFirstChild("邮件");
  709.     if mailFolder then
  710.         local mailNameObject = mailFolder:FindFirstChild("名称");
  711.         if mailNameObject then
  712.             local mailName = string.gsub(mailNameObject.Text, "%s+", "");
  713.             mailFolder.Name = mailName;
  714.         end
  715.     else
  716.         mailCheckCompleted = true;
  717.         print("郵件--名稱--已全部更改");
  718.     end
  719. end
  720. while not mailCheckCompleted do
  721.     changeMailName();
  722. end
  723. local function Guilddonationudp()
  724.     local Guilddonation = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("公会"):WaitForChild("捐献"):WaitForChild("背景"):WaitForChild("按钮"):WaitForChild("确定按钮"):WaitForChild("次数").Text;
  725.     Guilddonation = string.match(Guilddonation, "%d+");
  726.     Guilddonation = tonumber(Guilddonation) or 0;
  727.     if (Guilddonation == 0) then
  728.         Guilddonationtext.Text = "公會捐贈已完成✅";
  729.     else
  730.         Guilddonationtext.Text = "公會捐贈剩餘次數: " .. tostring(Guilddonation);
  731.     end
  732. end
  733. spawn(function()
  734.     while true do
  735.         turntabletextupd();
  736.         Guilddonationudp();
  737.         checkMail();
  738.         wait(1);
  739.     end
  740. end);
  741. features:AddButton("抽獎轉盤", function()
  742.     local remainingTurntableAttempts = tonumber(turntabletext.Text:match("%d+")) or 0;
  743.     if (remainingTurntableAttempts > 0) then
  744.         if not turntabtimmer then
  745.             game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\232\189\172\231\155\152"):FindFirstChild("\230\138\189\229\165\150"):FireServer();
  746.             turntabtimmer = true;
  747.         else
  748.             print("請等待...");
  749.         end
  750.     else
  751.         print("已完成轉盤");
  752.     end
  753. end);
  754. features:AddButton("公會捐贈", function()
  755.     local Guilddonation = tonumber(Guilddonationtext.Text:match("%d+")) or 0;
  756.     if (Guilddonation > 0) then
  757.         game:GetService("ReplicatedStorage"):FindFirstChild("\228\186\139\228\187\182"):FindFirstChild("\229\133\172\231\148\168"):FindFirstChild("\229\133\172\228\188\154"):FindFirstChild("\230\141\144\231\140\174"):FireServer();
  758.         wait(1);
  759.     else
  760.         print("已完成捐贈");
  761.     end
  762. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement