Auto Fill Auto Empty Auto Tokens Collect Chest
Key Required

Auto Fill Auto Empty Auto Tokens Collect Chest

[🔱ATLANTIS] Drain the Lakeneutralneutral 23 views 23 executesUpdated Jul 6, 2026
Unrated
00
Lua Script•142 lines (3480 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Library = loadstring(game:HttpGet(
	"https://raw.githubusercontent.com/theneutral0ne/wally-modified/refs/heads/main/wally-modified.lua"
))()

local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()

LocalPlayer.CharacterAdded:Connect(function(NewCharacter)
	Character = NewCharacter
end)

local Flags = {
	AutoFill = false,
	AutoPour = false,
	AutoTake = false,
}

local Remotes = require(ReplicatedStorage.Verdant.Remotes)
local Drains = {}
local Chests = {}

for _, obj in pairs(getgc(true)) do
    if type(obj) == "table" and rawget(obj, "_draining") ~= nil and rawget(obj, "_waterGen") ~= nil then
        table.insert(Drains, obj)
    end
	if type(obj) == "table" and rawget(obj, "_opened") ~= nil and rawget(obj, "_instance") ~= nil then
        table.insert(Chests, obj)
    end
end

local Window = Library:CreateWindow("Drain the Lake", {
	persistwindow = false,
	itemspacing = 2,
	underlinecolor = "rainbow",
	togglestyle = "checkmark",
	usehiddengui = true,
})

Window:Section("Main")

Window:Toggle("Auto Fill", {
	location = flags,
	flag = "AutoFill",
	default = false,
}, function(State)
	Flags.AutoFill = State
end)

Window:Toggle("Auto Pour", {
	location = flags,
	flag = "AutoPour",
	default = false,
}, function(State)
	Flags.AutoPour = State
end)

Window:Toggle("Auto Take", {
	location = flags,
	flag = "AutoTake",
	default = false,
}, function(State)
	Flags.AutoTake = State
end)

Window:Button("Collect Chests", {
	flag = "CollectChests",
}, function()
	local AutoPourApi = Library:GetControlApiByFlag("AutoPour")
	AutoPourApi:SetEnabled(false)
	local OldPosition = Character.HumanoidRootPart.CFrame
	for _, Chest in Chests do
		local success = pcall(function()
			while not Chest._opened do
				if Chest._instance:IsA("BasePart") then
					task.wait()
					Character.HumanoidRootPart.CFrame = Chest._instance.CFrame
					Remotes:Fire("Chest.Open", Chest._instance)
				else
					break
				end
			end
		end)
		if not success then
			break
		end
	end
	Character.HumanoidRootPart.CFrame = OldPosition
	local ButtonApi = Library:GetControlApiByFlag("CollectChests")
	ButtonApi:SetVisible(false)
end)

function Pour()
	if not Flags.AlreadyPouring then
		Flags.AlreadyPouring = true
		OldPosition = Character.HumanoidRootPart.CFrame
		local TargetDrain
		for _,Drain in Drains do
			if not Drain._draining then
				TargetDrain = Drain
				break
			end
		end
		while BucketFill >= 1 do
			task.wait()
			Character.HumanoidRootPart.CFrame = TargetDrain._vacuum.WorldPivot
			Remotes:Fire("Bucket.Poured", TargetDrain._prompt)
		end
		Character.HumanoidRootPart.CFrame = OldPosition
		Flags.AlreadyPouring = false
	end
end

RunService.RenderStepped:Connect(function(Delta)
	BucketFill = LocalPlayer:GetAttribute("BucketFill")
	if not BucketFill then
		return
	end

	if Flags.AutoTake then
		for _,Drain in Drains do
			if Drain._awaitingTake then
				Remotes:Fire("Tokens.Take", Drain._prompt)
				fireproximityprompt(Drain._takePrompt, Character.HumanoidRootPart, 0)
				fireproximityprompt(Drain._takePrompt, Character.HumanoidRootPart, 1)
			end
		end
	end

	if Flags.AutoFill and BucketFill < 1 then
		Remotes:Fire("Bucket.Used")
	end

	if Flags.AutoPour and BucketFill >= 1 then
		if not Flags.AlreadyPouring then
			Pour()
		end
	end
end)

Features & Information

Auto Fill Bucket Auto Empty Bucket Auto Take Tokens Collect All Chest

Community Comments (0)

No comments yet for this script.

More Scripts for [🔱ATLANTIS] Drain the Lake