-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] -- Restored Bubble Hub Script for Build A Boat For Treasure local Players = game:GetService("Players") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local VirtualUser = game:GetService("VirtualUser") local VirtualInputManager = game:GetService("VirtualInputManager") local CoreGui = game:GetService("CoreGui") local LocalPlayer = Players.LocalPlayer local genv = (getgenv and getgenv()) or _G if game.PlaceId ~= 537413528 then return print("Hello :>") end local WIND_UI_CDN = { "https://github.com/Footagesus/WindUI/releases/download/1.6.65/main.lua", "https://raw.githubusercontent.com/Footagesus/WindUI/main/dist/main.lua" } local function loadWindUI() if genv._BABFTWindUI then return genv._BABFTWindUI end local loader = loadstring for _, url in ipairs(WIND_UI_CDN) do local ok, result = pcall(function() return game:HttpGet(url, true) end) if ok and result and #result > 1000 then local fn = loader(result, "WindUI") if type(fn) == "function" then local ok2, uiInstance = pcall(fn) if ok2 and type(uiInstance) == "table" and uiInstance.CreateWindow then genv._BABFTWindUI = uiInstance return uiInstance end end end end return nil end local WindUI = loadWindUI() if not WindUI then if LocalPlayer then pcall(function() LocalPlayer:Kick("[BABFT] WindUI yuklenemedi.") end) end while true do task.wait() end end local farmConfig = { AutoFarm = true, AutoLaunch = true, AutoClaim = true, UseStagePath = true, ZeroGravity = true, NoclipFarm = true, AntiAfk = true, FlySpeed = 380, FlyHeight = 95, ClaimWait = 2, LoopDelay = 3, RespawnWait = 6 } local farmState = { busy = false, lastRun = "Idle", sessionRuns = 0, waypointCount = 0 } if genv._BABFTFarmCONFIG then for k, v in pairs(genv._BABFTFarmCONFIG) do farmConfig[k] = v end else genv._BABFTFarmCONFIG = farmConfig end if genv._BABFTFarmState then farmState = genv._BABFTFarmState else genv._BABFTFarmState = farmState end farmConfig.AutoFarm = true local currentSessionId = (genv._BABFTFarmSession or 0) + 1 genv._BABFTFarmSession = currentSessionId local function isSessionValid() return genv._BABFTFarmSession == currentSessionId end local defaultGravity = workspace.Gravity local activeTween = nil local claimRiverGold = workspace:WaitForChild("ClaimRiverResultsGold", 10) local fallbackWaypoints = { CFrame.new(-43.6134491, 62.1137619, 672.744934, -0.999842644, -0.00183729955, 0.017645346, 0, 0.994622767, 0.103564225, -0.0177407414, 0.103547923, -0.994466245), CFrame.new(-60.1504707, 97.4659729, 8767.91406, -0.99889338, 0.000705028593, 0.0470264405, 0, 0.999887645, -0.0149902813, -0.047031723, -0.0149736926, -0.998781145), CFrame.new(-54.331871, -345.398346, 9488.60645, -0.98221302, 0, 0.187770084, 0, 1, 0, -0.187770084, 0, -0.98221302) } local function getCharacter() return LocalPlayer.Character end local function getCharacterModel() local model = workspace:FindFirstChild(LocalPlayer.Name) if model and model:IsA("Model") then return model end return nil end local function getTeamZone() local team = LocalPlayer.Team if not team then return nil end local zone = workspace:FindFirstChild(team.Name .. "Zone") if not zone then zone = workspace:FindFirstChild("Really " .. team.Name .. "Zone") end return zone end local function getHumanoidRootPart() local char = getCharacter() if char then return char:FindFirstChild("HumanoidRootPart") end return nil end local function getGoldenChestTrigger() local boatStages = workspace:FindFirstChild("BoatStages") if not boatStages then return nil end local normalStages = boatStages:FindFirstChild("NormalStages") if not normalStages then return nil end local theEnd = normalStages:FindFirstChild("TheEnd") if not theEnd then return nil end local goldenChest = theEnd:FindFirstChild("GoldenChest") if not goldenChest then return nil end local trigger = goldenChest:FindFirstChild("Trigger", true) if trigger and trigger:IsA("BasePart") then return trigger end return nil end local function getStageWaypoints() local boatStages = workspace:FindFirstChild("BoatStages") local normalStages = boatStages and boatStages:FindFirstChild("NormalStages") if not normalStages then return {} end local rawStages = {} for _, stage in ipairs(normalStages:GetChildren()) do if stage:IsA("Model") and stage.Name ~= "TheEnd" then local pivot = stage:GetPivot() table.insert(rawStages, { z = pivot.Position.Z, pos = Vector3.new(-54, farmConfig.FlyHeight, pivot.Position.Z) }) end end table.sort(rawStages, function(a, b) return a.z < b.z end) local waypoints = {} for _, item in ipairs(rawStages) do table.insert(waypoints, CFrame.new(item.pos)) end local trigger = getGoldenChestTrigger() if trigger then local preChest = trigger.Position + Vector3.new(0, farmConfig.FlyHeight + 20, -120) local chestPos = trigger.Position + Vector3.new(0, 4, 0) table.insert(waypoints, CFrame.new(preChest)) table.insert(waypoints, CFrame.new(chestPos)) end return waypoints end local function getWaypoints() if farmConfig.UseStagePath then local stageWaypoints = getStageWaypoints() if #stageWaypoints >= 2 then farmState.waypointCount = #stageWaypoints return stageWaypoints end end farmState.waypointCount = #fallbackWaypoints return fallbackWaypoints end local function teleportTo(targetCFrame) local root = getHumanoidRootPart() if root then root.CFrame = targetCFrame root.AssemblyLinearVelocity = Vector3.zero root.AssemblyAngularVelocity = Vector3.zero end local model = getCharacterModel() if model then pcall(function() model:PivotTo(targetCFrame) end) end end local function flyTo(targetCFrame, isLastPoint) local root = getHumanoidRootPart() if not root then return false end if activeTween then pcall(function() activeTween:Cancel() end) activeTween = nil end local distance = (root.Position - targetCFrame.Position).Magnitude if distance < 2 then teleportTo(targetCFrame) return true end local flyTime = math.max(distance / math.max(farmConfig.FlySpeed, 50), 0.05) if farmConfig.ZeroGravity then workspace.Gravity = not isLastPoint and 0 or defaultGravity end activeTween = TweenService:Create(root, TweenInfo.new(flyTime, Enum.EasingStyle.Linear), { CFrame = targetCFrame }) local isCompleted = false local tweenConn tweenConn = activeTween.Completed:Connect(function(playbackState) isCompleted = (playbackState == Enum.PlaybackState.Completed) if tweenConn then tweenConn:Disconnect() tweenConn = nil end end) activeTween:Play() local startTime = os.clock() while isSessionValid() and not isCompleted do if activeTween and root.Parent then local model = getCharacterModel() if model then pcall(function() model:PivotTo(root.CFrame) end) end end if os.clock() - startTime > flyTime + 2 then break end RunService.Heartbeat:Wait() end if activeTween then pcall(function() activeTween:Cancel() end) activeTween = nil end teleportTo(targetCFrame) if isLastPoint and farmConfig.ZeroGravity then workspace.Gravity = defaultGravity end return isCompleted or (root.Position - targetCFrame.Position).Magnitude < 25 end local function autoLaunch() if not farmConfig.AutoLaunch then return false end local zone = getTeamZone() if not zone then return false end local voteLaunchRE = zone:FindFirstChild("VoteLaunchRE", true) if not voteLaunchRE or not voteLaunchRE:IsA("RemoteEvent") then return false end return pcall(function() voteLaunchRE:FireServer() end) end local function claimReward() local root = getHumanoidRootPart() local trigger = getGoldenChestTrigger() if root and trigger then teleportTo(trigger.CFrame + Vector3.new(0, 3, 0)) for _ = 1, 3 do if root and trigger then pcall(function() firetouchinterest(root, trigger, 0) firetouchinterest(root, trigger, 1) end) end task.wait(0.15) end end if farmConfig.AutoClaim and claimRiverGold then pcall(function() claimRiverGold:FireServer() end) end task.wait(farmConfig.ClaimWait) end local function waitForCharacter(timeout) local startTime = os.clock() timeout = timeout or 20 repeat local char = getCharacter() local root = char and char:FindFirstChild("HumanoidRootPart") local humanoid = char and char:FindFirstChildOfClass("Humanoid") if root and humanoid and humanoid.Health > 0 then return char end task.wait(0.1) until not isSessionValid() or (os.clock() - startTime > timeout) return nil end local function runFarmCycle() if farmState.busy then return false end farmState.busy = true local ok, err = pcall(function() farmState.lastRun = "Launching..." autoLaunch() task.wait(1.2) if not waitForCharacter(15) then farmState.lastRun = "Character missing" return end if farmConfig.NoclipFarm then RunService.Stepped:Connect(function() if not isSessionValid() or not farmConfig.NoclipFarm then return end local char = getCharacter() if char then for _, desc in ipairs(char:GetDescendants()) do if desc:IsA("BasePart") then desc.CanCollide = false end end end local model = getCharacterModel() if model then for _, desc in ipairs(model:GetDescendants()) do if desc:IsA("BasePart") then desc.CanCollide = false end end end end) end local waypoints = getWaypoints() farmState.lastRun = "Flying (" .. tostring(#waypoints) .. " pts)" for i, cframe in ipairs(waypoints) do if not isSessionValid() or not farmConfig.AutoFarm then farmState.lastRun = "Stopped" return end farmState.lastRun = string.format("Fly %d/%d", i, #waypoints) if not flyTo(cframe, i == #waypoints) and not isSessionValid() then return end end farmState.lastRun = "Claiming treasure" claimReward() farmState.sessionRuns = farmState.sessionRuns + 1 farmState.lastRun = "Done (#" .. tostring(farmState.sessionRuns) .. ")" end) if not ok then farmState.lastRun = "Error: " .. tostring(err) end if farmConfig.ZeroGravity then workspace.Gravity = defaultGravity end farmState.busy = false return ok end local function farmLoop() while isSessionValid() and farmConfig.AutoFarm do runFarmCycle() if not isSessionValid() or not farmConfig.AutoFarm then break end farmState.lastRun = "Waiting respawn..." waitForCharacter(farmConfig.RespawnWait) task.wait(farmConfig.LoopDelay) end end local function toggleAutoFarm(enabled) farmConfig.AutoFarm = enabled if not enabled then if activeTween then pcall(function() activeTween:Cancel() end) activeTween = nil end if farmConfig.ZeroGravity then workspace.Gravity = defaultGravity end farmState.lastRun = "Idle" return end task.spawn(farmLoop) end if genv._BABFTFarmWindow then pcall(function() local win = genv._BABFTFarmWindow if win.Close then win:Close() elseif win.Destroy then win:Destroy() end end) genv._BABFTFarmWindow = nil end local farmWindow = WindUI:CreateWindow({ Title = "Bubble Hub", Author = "discord.gg/wgJKZA6xbh", Folder = genv, Icon = "ship", Theme = "Dark", ToggleKey = Enum.KeyCode.RightShift, HideSearchBar = true, NewElements = true, OpenButton = { Title = "BABFT", Enabled = true, Draggable = true, Position = UDim2.fromScale(0.02, 0.45) } }) genv._BABFTFarmWindow = farmWindow local farmTab = farmWindow:Tab({ Title = "Farm", Icon = "zap", Desc = "Treasure farm" }) farmTab:Toggle({ Title = "Auto Farm Treasure", Desc = "Son hazineye uc, claim et, tekrarla", Default = true, Callback = function(state) toggleAutoFarm(state) end }) if farmConfig.AntiAfk then LocalPlayer.Idled:Connect(function() pcall(function() VirtualUser:CaptureController() VirtualUser:ClickButton2(Vector2.new()) end) pcall(function() VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.K, false, game) task.wait(0.05) VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.K, false, game) end) end) end toggleAutoFarm(true)