Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))();
- local SaveManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/SaveManager.lua"))();
- local InterfaceManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/InterfaceManager.lua"))();
- local AntiAFK = game:GetService("VirtualUser");
- game.Players.LocalPlayer.Idled:Connect(function()
- AntiAFK:CaptureController();
- AntiAFK:ClickButton2(Vector2.new());
- wait(2);
- end);
- local Window = Fluent:CreateWindow({Title="Cultivation-Simulator 養成模擬器",SubTitle="作者:澤澤",TabWidth=160,Size=UDim2.fromOffset(580, 460),Acrylic=true,Theme="Dark",MinimizeKey=Enum.KeyCode.LeftControl});
- local Tabs = {PAGE=Window:AddTab({Title="自述",Icon="hammer"}),Main=Window:AddTab({Title="Main",Icon="play"}),PAGE1=Window:AddTab({Title="抽取",Icon="egg"}),PAGE2=Window:AddTab({Title="其他功能",Icon="arrow-right"}),Settings=Window:AddTab({Title="Settings",Icon="settings"})};
- do
- Fluent:Notify({Title="通知",Content="腳本已載入",Duration=5});
- Fluent:Notify({Title="通知",Content="Anti-AFK:Start",Duration=5});
- end
- local Options = Fluent.Options;
- local player = game:GetService("Players").LocalPlayer;
- local values = player:WaitForChild("值");
- local playersetting = values:WaitForChild("设置");
- local privileges = values:WaitForChild("特权");
- local playerGui = player.PlayerGui;
- local mainmission = playerGui.GUI:WaitForChild("主界面"):WaitForChild("主城"):WaitForChild("主线任务"):WaitForChild("按钮"):WaitForChild("提示").Visible;
- local missionnamelist = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("商店"):WaitForChild("通行证任务"):WaitForChild("背景"):WaitForChild("任务列表");
- local guiPath = playerGui.GUI:WaitForChild("主界面"):WaitForChild("战斗");
- local levelInfoUI = guiPath:WaitForChild("关卡信息"):WaitForChild("文本");
- local victoryResult = guiPath:WaitForChild("胜利结果");
- local lottery = playerGui.GUI:WaitForChild("二级界面"):WaitForChild("商店"):WaitForChild("背景"):WaitForChild("右侧界面"):WaitForChild("召唤");
- local currency = player:WaitForChild("值"):WaitForChild("货币");
- local diamonds = currency:WaitForChild("钻石");
- local sword = lottery:WaitForChild("法宝"):WaitForChild("等级区域");
- local sword_level = sword:WaitForChild("值").text;
- local sword_value = sword:WaitForChild("进度条"):WaitForChild("值"):WaitForChild("值").text;
- local skill = lottery:WaitForChild("技能"):WaitForChild("等级区域");
- local skill_level = skill:WaitForChild("值").text;
- local skill_value = skill:WaitForChild("进度条"):WaitForChild("值"):WaitForChild("值").text;
- local sword_tickets = currency:WaitForChild("法宝抽奖券").value;
- local skill_tickets = currency:WaitForChild("技能抽奖券").value;
- local extract_sword_level;
- local extract_sword_value;
- local extract_skill_level;
- local extract_skill_value;
- local useDiamonds = false;
- local namechangechick = false;
- local savemodecheck2 = false;
- local screenGui = Instance.new("ScreenGui");
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui");
- local blackBlock = Instance.new("Frame");
- blackBlock.Size = UDim2.new(200, 0, 200, 0);
- blackBlock.Position = UDim2.new(0, 0, 0, 0);
- blackBlock.BackgroundColor3 = Color3.fromRGB(0, 0, 0);
- blackBlock.Visible = false;
- blackBlock.Parent = screenGui;
- local function gamepassmissionnamechange()
- if missionnamelist then
- local gamepassmissionlist = missionnamelist:FindFirstChild("任务项预制体");
- if gamepassmissionlist then
- local gamepassmissionLayoutOrder = gamepassmissionlist.LayoutOrder;
- gamepassmissionlist.Name = tostring(gamepassmissionLayoutOrder);
- else
- 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();
- print("任務--名稱--已全部更改");
- namechangechick = true;
- end
- end
- end
- while not namechangechick do
- gamepassmissionnamechange();
- end
- local closestScene = nil;
- local closestPosition = nil;
- local closestDistance = math.huge;
- local localPlayer = game.Players.LocalPlayer;
- local character = localPlayer.Character or localPlayer.CharacterAdded:Wait();
- local rootPart = character:WaitForChild("HumanoidRootPart");
- for i = 1, 9 do
- local sceneName = "主场景" .. (((i > 1) and tostring(i)) or "");
- local scene = workspace:WaitForChild(sceneName, 5);
- if scene then
- local respawnPoint = scene:WaitForChild("重生点", 5);
- if respawnPoint then
- local distance = (respawnPoint.CFrame.Position - rootPart.CFrame.Position).Magnitude;
- if (distance < closestDistance) then
- closestDistance = distance;
- closestScene = scene;
- closestPosition = respawnPoint.Position + Vector3.new(0, 4.9, 0);
- end
- else
- print("主場景:", scene.Name, "中未找到重生點");
- end
- else
- print("未找到主場景:", sceneName);
- end
- end
- if (closestScene and closestPosition) then
- print("初始場景為:", closestScene.Name);
- print("重生點座標 (x, y, z):", closestPosition.X, closestPosition.Y, closestPosition.Z);
- end
- local Players = game:GetService("Players");
- local playerInRange = false;
- local hasPrintedNoPlayer = false;
- local inRange = false;
- local isDetectionEnabled = false;
- local timescheck = 0;
- local savemodetime = 9;
- local function checkPlayersInRange()
- local character = localPlayer.Character;
- if (not character or not character:FindFirstChild("HumanoidRootPart")) then
- return;
- end
- local boxPosition = character.HumanoidRootPart.Position;
- local boxSize = Vector3.new(500, 500, 500) / 2;
- playerInRange = false;
- for _, player in pairs(Players:GetPlayers()) do
- if ((player ~= localPlayer) and player.Character and player.Character:FindFirstChild("HumanoidRootPart")) then
- local playerPosition = player.Character.HumanoidRootPart.Position;
- 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);
- if inRange then
- playerInRange = true;
- break;
- end
- end
- end
- if playerInRange then
- if (timescheck == 0) then
- print("有玩家在範圍內");
- savemodetime = 9;
- timescheck = 1;
- hasPrintedNoPlayer = true;
- end
- elseif (timescheck == 1) then
- print("範圍內玩家已離開");
- timescheck = 0;
- hasPrintedNoPlayer = false;
- end
- if (not playerInRange and not hasPrintedNoPlayer) then
- print("範圍內無玩家");
- savemodetime = 3;
- hasPrintedNoPlayer = true;
- end
- end
- local function setupRangeDetection()
- while true do
- if isDetectionEnabled then
- checkPlayersInRange();
- end
- wait(0.1);
- end
- end
- local function toggleDetection()
- if not savemodecheck2 then
- isDetectionEnabled = true;
- print("檢測已啟用");
- else
- isDetectionEnabled = false;
- savemodetime = 3;
- print("檢測已關閉");
- end
- end
- spawn(setupRangeDetection);
- local previousLevelText = levelInfoUI.Text or "";
- local previousVictoryText = victoryResult.Text or "";
- local levelNumber = 0;
- local restart = false;
- local function isEmpty(text)
- return (text == nil) or (text:gsub("%s+", "") == "");
- end
- local function updateLevelText()
- local currentLevelText = levelInfoUI.Text;
- if (not isEmpty(currentLevelText) and (currentLevelText ~= previousLevelText)) then
- previousLevelText = currentLevelText;
- levelNumber = previousLevelText:match("World (%d+)") or 0;
- end
- end
- local function updateVictoryText()
- local currentVictoryText = victoryResult.Text;
- if (currentVictoryText ~= previousVictoryText) then
- previousVictoryText = currentVictoryText;
- local losewave = previousVictoryText;
- local victoryWaveNumber = previousVictoryText:match("Wave (%d+)") or 100;
- local victoryText = previousVictoryText:match("Wave %d+ (.+)") or "結束";
- if (victoryWaveNumber == 100) then
- restart = true;
- end
- if (losewave == 100) then
- restart = true;
- end
- end
- end
- local function checkAndUpdate()
- updateLevelText();
- updateVictoryText();
- end
- local function restart_level()
- local number = tonumber(levelNumber:match("%d+"));
- print("重啟世界", number);
- local args = {[1]=number};
- 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));
- end
- local function mainmissionchack()
- mainmission = playerGui.GUI:WaitForChild("主界面"):WaitForChild("主城"):WaitForChild("主线任务"):WaitForChild("按钮"):WaitForChild("提示").Visible;
- if (mainmission == true) then
- print("任務完成,可領取");
- 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();
- end
- end
- local function gamepassmission()
- if missionnamelist then
- for _, child in ipairs(missionnamelist:GetChildren()) do
- if (child:IsA("Frame") and (child.Visible == true)) then
- local missionname = child.Name;
- missionname = tonumber(missionname);
- local nameLabel = child:WaitForChild("名称");
- if nameLabel then
- local taskProgress = nameLabel.Text:match("%((%d+/%d+)%)");
- if taskProgress then
- local A_num, B_num = taskProgress:match("(%d+)%/(%d+)");
- A_num = tonumber(A_num);
- B_num = tonumber(B_num);
- if (A_num and B_num and ((A_num / B_num) >= 1)) then
- print("可領取");
- local args = {[1]=missionname};
- 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));
- 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();
- end
- end
- end
- end
- end
- end
- end
- local function usesword_ticket()
- print("抽獎:法寶");
- local args = {[1]="\230\179\149\229\174\157",[2]=false};
- 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));
- end
- local function useskill_ticket()
- print("抽獎:技能");
- local args = {[1]="\230\138\128\232\131\189",[2]=false};
- 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));
- end
- local MIN_TICKETS = 8;
- local DIAMONDS_PER_TICKET = 50;
- local function checkTicketsAndDiamonds(tickets, diamonds, itemType, useDiamonds)
- if (tickets >= MIN_TICKETS) then
- return true;
- end
- local missingTickets = MIN_TICKETS - tickets;
- if not useDiamonds then
- return false;
- end
- local requiredDiamonds = missingTickets * DIAMONDS_PER_TICKET;
- if (diamonds >= requiredDiamonds) then
- return true;
- else
- return false;
- end
- end
- local function processLottery(type, tickets, diamonds, useDiamonds)
- local canProceed = checkTicketsAndDiamonds(tickets, diamonds, type, useDiamonds);
- if canProceed then
- if (type == "法寶") then
- usesword_ticket();
- elseif (type == "技能") then
- useskill_ticket();
- end
- else
- end
- return canProceed;
- end
- local function compare_ticket_type(sword_tickets, skill_tickets, sword_level, skill_level, sword_value, skill_value, diamonds, useDiamonds)
- if (sword_level == skill_level) then
- if (sword_value > skill_value) then
- processLottery("技能", skill_tickets, diamonds, useDiamonds);
- elseif (sword_value < skill_value) then
- processLottery("法寶", sword_tickets, diamonds, useDiamonds);
- else
- local canSword = processLottery("法寶", sword_tickets, diamonds, useDiamonds);
- local canSkill = processLottery("技能", skill_tickets, diamonds, useDiamonds);
- if (not canSword and not canSkill) then
- end
- end
- elseif (sword_level > skill_level) then
- processLottery("技能", skill_tickets, diamonds, useDiamonds);
- else
- processLottery("法寶", sword_tickets, diamonds, useDiamonds);
- end
- end
- local function fetchData()
- sword_level = sword:WaitForChild("值").Text;
- sword_value = sword:WaitForChild("进度条"):WaitForChild("值"):WaitForChild("值").Text;
- skill_level = skill:WaitForChild("值").Text;
- skill_value = skill:WaitForChild("进度条"):WaitForChild("值"):WaitForChild("值").Text;
- sword_tickets = currency:WaitForChild("法宝抽奖券").Value;
- skill_tickets = currency:WaitForChild("技能抽奖券").Value;
- diamonds = currency:WaitForChild("钻石").Value;
- end
- local function updateExtractedValues()
- fetchData();
- extract_sword_level = tonumber(string.match(sword_level, "%d+"));
- extract_sword_value = tonumber(string.match(sword_value, "^(%d+)/"));
- extract_skill_level = tonumber(string.match(skill_level, "%d+"));
- extract_skill_value = tonumber(string.match(skill_value, "^(%d+)/"));
- end
- Tabs.PAGE:AddParagraph({Title="最後更新時間:2024/12/22",Content="製作時間:2024/12/20"});
- Tabs.PAGE:AddButton({Title="手機板UI",Description="更多功能...",Callback=function()
- loadstring(game:HttpGet("https://pastebin.com/raw/thwJrecP"))();
- end});
- Tabs.PAGE:AddButton({Title="開黑幕/關閉",Callback=function()
- print("開黑幕/關閉");
- blackBlock.Visible = not blackBlock.Visible;
- end});
- Tabs.PAGE:AddButton({Title="統計- - 每秒擊殺/金幣數",Callback=function()
- loadstring(game:HttpGet("https://pastebin.com/raw/0NqSi46N"))();
- loadstring(game:HttpGet("https://pastebin.com/raw/HGQXdAiz"))();
- end});
- local Toggle = Tabs.PAGE:AddToggle("SaveMode", {Title="安全模式",Default=false});
- Toggle:OnChanged(function()
- if Toggle.Value then
- inRange = false;
- playerInRange = false;
- timescheck = 0;
- hasPrintedNoPlayer = false;
- savemodecheck2 = false;
- toggleDetection();
- else
- savemodecheck2 = true;
- toggleDetection();
- end
- end);
- Options.SaveMode:SetValue(true);
- Tabs.Main:AddButton({Title="掛機模式開關",Callback=function()
- local AFKmod = playersetting:WaitForChild("自动战斗");
- if (AFKmod.Value == true) then
- AFKmod.Value = false;
- else
- AFKmod.Value = true;
- end
- end});
- local Toggle = Tabs.Main:AddToggle("AutoCollectherbs", {Title="自動採草藥",Default=false});
- Toggle:OnChanged(function()
- if Toggle.Value then
- spawn(function()
- while Toggle.Value do
- local args = {[1]=1,[2]=nil};
- 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));
- local args = {[1]=2,[2]=nil};
- 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));
- local args = {[1]=3,[2]=nil};
- 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));
- local args = {[1]=4,[2]=nil};
- 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));
- local args = {[1]=5,[2]=nil};
- 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));
- local args = {[1]=6,[2]=nil};
- 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));
- wait(60);
- end
- end);
- end
- end);
- Options.AutoCollectherbs:SetValue(false);
- local Toggle = Tabs.Main:AddToggle("invest", {Title="投資",Default=false});
- Toggle:OnChanged(function()
- if Toggle.Value then
- spawn(function()
- while Toggle.Value do
- for i = 1, 3 do
- local args = {i};
- 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));
- print("領取", i);
- end
- wait(5);
- for i = 1, 3 do
- local args = {i};
- 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));
- print("投資", i);
- end
- wait(600);
- end
- end);
- end
- end);
- Options.invest:SetValue(false);
- local Toggle = Tabs.Main:AddToggle("rewardstasks", {Title="任務完成自動領取(不包括每日任務)",Default=false});
- Toggle:OnChanged(function()
- spawn(function()
- while Toggle.Value do
- mainmissionchack();
- gamepassmission();
- wait(1);
- end
- end);
- end);
- Options.rewardstasks:SetValue(false);
- local Toggle = Tabs.Main:AddToggle("Autostart", {Title="戰鬥結束後自動開始(只支援世界戰鬥)",Default=false});
- Toggle:OnChanged(function()
- spawn(function()
- while Toggle.Value do
- checkAndUpdate();
- if (restart == true) then
- rootPart.CFrame = CFrame.new(closestPosition);
- wait(0.5);
- wait(savemodetime);
- restart_level();
- wait(0.5);
- restart = false;
- end
- wait(0.3);
- end
- end);
- end);
- Options.Autostart:SetValue(false);
- Tabs.PAGE1:AddButton({Title="GamePass- - 解鎖自動煉製",Callback=function()
- local superRefining = privileges:WaitForChild("超级炼制");
- superRefining.Value = false;
- local automaticRefining = privileges:WaitForChild("自动炼制");
- automaticRefining.Value = true;
- end});
- Tabs.PAGE1:AddButton({Title="GamePass- - 解鎖背包擴充",Callback=function()
- local backpack = privileges:WaitForChild("扩充背包");
- backpack.Value = true;
- end});
- local Toggle = Tabs.PAGE1:AddToggle("Autolottery", {Title="自動抽法寶/技能",Default=false});
- Toggle:OnChanged(function()
- if Toggle.Value then
- spawn(function()
- while Toggle.Value do
- updateExtractedValues();
- wait(0.2);
- compare_ticket_type(sword_tickets, skill_tickets, extract_sword_level, extract_skill_level, extract_sword_value, extract_skill_value, diamonds, useDiamonds);
- wait(0.2);
- end
- end);
- end
- end);
- Options.Autolottery:SetValue(false);
- local Toggle = Tabs.PAGE1:AddToggle("USEDiamondSwitch", {Title="自動抽法寶/技能",Default=false});
- Toggle:OnChanged(function()
- if Toggle.Value then
- useDiamonds = Toggle.Value;
- end
- end);
- Options.USEDiamondSwitch:SetValue(false);
- local function checkTime()
- while true do
- local currentTime = os.date("*t");
- if ((currentTime.hour == 0) and (currentTime.min == 0)) then
- wait(1);
- namechangechick = false;
- gamepassmissionnamechange();
- wait(60);
- else
- wait(1);
- end
- end
- end
- spawn(function()
- checkTime();
- end);
- local replicatedStorage = game:GetService("ReplicatedStorage");
- Tabs.PAGE2:AddButton({Title="開啟郵件",Callback=function()
- local event = replicatedStorage:FindFirstChild("打开邮件", true);
- if (event and event:IsA("BindableEvent")) then
- event:Fire("打开郵件");
- end
- end});
- Tabs.PAGE2:AddButton({Title="開啟陣法",Callback=function()
- local event = replicatedStorage:FindFirstChild("打开阵法", true);
- if (event and event:IsA("BindableEvent")) then
- event:Fire("打开陣法");
- end
- end});
- Tabs.PAGE2:AddButton({Title="開啟轉盤",Callback=function()
- local event = replicatedStorage:FindFirstChild("打开转盘", true);
- if (event and event:IsA("BindableEvent")) then
- event:Fire("打開轉盤");
- end
- end});
- Tabs.PAGE2:AddButton({Title="開啟轉盤",Callback=function()
- local event = replicatedStorage:FindFirstChild("打开世界树", true);
- if (event and event:IsA("BindableEvent")) then
- event:Fire("打開世界樹");
- end
- end});
- SaveManager:SetLibrary(Fluent);
- InterfaceManager:SetLibrary(Fluent);
- SaveManager:IgnoreThemeSettings();
- SaveManager:SetIgnoreIndexes({});
- InterfaceManager:SetFolder("GAME_Cultivation-Simulator");
- SaveManager:SetFolder("Cultivation-Simulator/By:澤澤");
- InterfaceManager:BuildInterfaceSection(Tabs.Settings);
- SaveManager:BuildConfigSection(Tabs.Settings);
- Window:SelectTab(1);
- Fluent:Notify({Title="GAME_Cultivation-Simulator",Content="腳本已經加載。",Duration=8});
- SaveManager:LoadAutoloadConfig();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement