AutoCollect/Fishing/Quest Script (And Extras) (UPD4)
Key Required

AutoCollect/Fishing/Quest Script (And Extras) (UPD4)

[📜 NEW SCROLLS] ElementalismSurelyBlissSurelyBliss 4.1K views 377 executesUpdated Apr 24, 2026
5.0/ 5(3 votes)
30100% Positive
Lua Script•1702 lines (67389 chars)
--[[
	WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
]]
-- AutoCollect Script | Rayfield UI v1.4
-- Place this as a LocalScript inside StarterPlayerScripts or StarterCharacterScripts

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")

-- ─────────────────────────────────────────────
--  Rayfield Library Load
-- ─────────────────────────────────────────────
local RayfieldLib = loadstring(game:HttpGet("https://sirius.menu/rayfield"))()

-- ─────────────────────────────────────────────
--  Configuration
-- ─────────────────────────────────────────────
local CONFIG = {
    CollectableNames = {
        "Apple", "Banana", "Blue Berry", "Blue Crystal Piece",
        "Coconut", "Metal Scrap", "Obsidian Shard", "Pumpkin",
        "Radiant Shell", "Rose", "Watermelon", "Wood",
    },
    CollectRange       = 10,
    CollectDelay       = 0.15,
    PromptPopupDelay   = 0.35,
    TeleportToItem     = true,
    TeleportOffset     = Vector3.new(0, 0, 2),
    UseTween           = false,
    TweenSpeed         = 100,  -- studs per second
    QuestUseTween      = false,
    QuestTweenSpeed    = 100,  -- studs per second
    UndergroundYOffset = -5,
}

-- ─────────────────────────────────────────────
--  State
-- ─────────────────────────────────────────────
local AutoCollect = { Enabled = false, Running = false, Thread = nil }
local EarthM1     = { Enabled = false, Running = false, Thread = nil, FireRate = 1 }
local WaterM1     = { Enabled = false, Running = false, Thread = nil, FireRate = 1 }
local FireM1      = { Enabled = false, Running = false, Thread = nil }
local AutoScroll  = { Enabled = false, Running = false, Thread = nil, ReturnOnDone = true, SweepDelay = 2 }
local AutoFish    = { Enabled = false, Running = false, Thread = nil }
local AutoQuest      = { Enabled = false, Running = false, Thread = nil, LoopDelay = 3 }
local AutoEmilyQuest = { Enabled = false, Running = false, Thread = nil, LoopDelay = 3 }

local VisualFeatures = {
    FullbrightEnabled      = false,
    NoFogEnabled           = false,
    UndergroundEnabled     = false,
    OriginalBrightness     = nil,
    OriginalAmbient        = nil,
    OriginalOutdoorAmbient = nil,
    OriginalFogEnd         = nil,
    OriginalFogStart       = nil,
    OriginalYOffset        = nil,
}

local ESP = {
    Enabled      = false,
    ShowNames    = true,
    ShowHealth   = true,
    ShowDistance = true,
    MaxDistance  = 500,
    Objects      = {},
    Connection   = nil,
}

-- ─────────────────────────────────────────────
--  Earth M1
-- ─────────────────────────────────────────────
local function fireEarthM1()
    local args = { true, "Boulder Toss" }
    Player.Character:WaitForChild("Earth"):WaitForChild("Fire"):FireServer(unpack(args))
end

local function startEarthM1Loop()
    if EarthM1.Running then return end
    EarthM1.Running = true
    EarthM1.Thread = task.spawn(function()
        while EarthM1.Enabled do
            pcall(fireEarthM1)
            task.wait(1)
        end
        EarthM1.Running = false
    end)
    task.spawn(function()
        while EarthM1.Enabled do
            local ok, energy = pcall(function()
                return workspace:WaitForChild("Characters"):WaitForChild("NanamiJJSTTV"):WaitForChild("Energy")
            end)
            if not ok or not energy then task.wait(1) continue end
            local conn
            conn = energy:GetPropertyChangedSignal("Value"):Connect(function()
                if EarthM1.Enabled and energy.Value <= 10 then
                    conn:Disconnect()
                    RayfieldLib:Notify({ Title = "Energy Depleted", Content = "Auto-resetting character...", Duration = 3, Image = 4483362458 })
                    task.wait(0.2)
                    Player:LoadCharacter()
                end
            end)
            while EarthM1.Enabled do task.wait(0.5) end
            pcall(function() conn:Disconnect() end)
        end
    end)
end

local function stopEarthM1Loop()
    EarthM1.Enabled = false EarthM1.Running = false
    if EarthM1.Thread then task.cancel(EarthM1.Thread) EarthM1.Thread = nil end
end

-- ─────────────────────────────────────────────
--  Water M1
-- ─────────────────────────────────────────────
local function fireWaterM1()
    local args = { true, "Water Kick" }
    Player:WaitForChild("Backpack"):WaitForChild("Water"):WaitForChild("Fire"):FireServer(unpack(args))
end

local function startWaterM1Loop()
    if WaterM1.Running then return end
    WaterM1.Running = true
    WaterM1.Thread = task.spawn(function()
        while WaterM1.Enabled do
            pcall(fireWaterM1)
            task.wait(1)
        end
        WaterM1.Running = false WaterM1.Thread = nil
    end)
end

local function stopWaterM1Loop()
    WaterM1.Enabled = false WaterM1.Running = false
    if WaterM1.Thread then task.cancel(WaterM1.Thread) WaterM1.Thread = nil end
end

-- ─────────────────────────────────────────────
--  Fire M1
-- ─────────────────────────────────────────────
local function fireFireM1()
    local args = { true, "Fireball" }
    Player.Character:WaitForChild("Fire"):WaitForChild("Fire"):FireServer(unpack(args))
end

local function startFireM1Loop()
    if FireM1.Running then return end
    FireM1.Running = true
    FireM1.Thread = task.spawn(function()
        while FireM1.Enabled do
            pcall(fireFireM1)
            task.wait(1)
        end
        FireM1.Running = false FireM1.Thread = nil
    end)
end

local function stopFireM1Loop()
    FireM1.Enabled = false FireM1.Running = false
    if FireM1.Thread then task.cancel(FireM1.Thread) FireM1.Thread = nil end
end

-- ─────────────────────────────────────────────
--  Helpers
-- ─────────────────────────────────────────────
local function getPromptsIn(instance)
    local prompts = {}
    for _, desc in ipairs(instance:GetDescendants()) do
        if desc:IsA("ProximityPrompt") then table.insert(prompts, desc) end
    end
    if #prompts == 0 then
        for _, desc in ipairs(instance:GetDescendants()) do
            if desc:IsA("BasePart") or desc:IsA("MeshPart") or desc:IsA("Part") then
                for _, child in ipairs(desc:GetChildren()) do
                    if child:IsA("ProximityPrompt") then table.insert(prompts, child) end
                end
            end
        end
    end
    return prompts
end

local function getItemPosition(item)
    if item:IsA("Model") then
        if item.PrimaryPart then return item.PrimaryPart.Position end
        for _, d in ipairs(item:GetDescendants()) do
            if d:IsA("BasePart") then return d.Position end
        end
    elseif item:IsA("BasePart") then return item.Position end
    return nil
end

local function teleportTo(pos, useUnderground)
    if not pos then return end
    local offset = useUnderground
        and Vector3.new(0, CONFIG.UndergroundYOffset, 0)
        or  CONFIG.TeleportOffset
    local targetCFrame = CFrame.new(pos + offset)
    if CONFIG.UseTween then
        local dist = (HumanoidRootPart.Position - (pos + offset)).Magnitude
        local duration = math.max(0.05, dist / CONFIG.TweenSpeed)
        local tween = TweenService:Create(
            HumanoidRootPart,
            TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
            { CFrame = targetCFrame }
        )
        tween:Play()
        tween.Completed:Wait()
    else
        HumanoidRootPart.CFrame = targetCFrame
        task.wait(0.05)
    end
end

local function inRange(pos)
    if not pos then return false end
    return (HumanoidRootPart.Position - pos).Magnitude <= CONFIG.CollectRange
end

local function teleportToInstance(instance)
    if not instance then return end
    local pos = nil
    if instance:IsA("Model") then
        if instance.PrimaryPart then pos = instance.PrimaryPart.Position
        else
            for _, d in ipairs(instance:GetDescendants()) do
                if d:IsA("BasePart") then pos = d.Position break end
            end
        end
        if not pos then
            local ok, pivot = pcall(function() return instance:GetPivot().Position end)
            if ok then pos = pivot end
        end
    elseif instance:IsA("BasePart") then pos = instance.Position end
    if pos then
        HumanoidRootPart.CFrame = CFrame.new(pos + Vector3.new(0, 5, 0))
        RayfieldLib:Notify({ Title = "Teleported", Content = "Moved to " .. instance.Name, Duration = 2, Image = 4483362458 })
    else
        warn("[TP] Could not find position for: " .. instance.Name)
    end
end

-- ─────────────────────────────────────────────
--  ESP
-- ─────────────────────────────────────────────
local function createESPForPlayer(plr)
    if plr == Player then return end
    if ESP.Objects[plr] then return end

    local char = plr.Character
    if not char then return end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    local hum = char:FindFirstChildOfClass("Humanoid")
    if not hrp or not hum then return end

    local highlight = Instance.new("Highlight")
    highlight.FillColor    = Color3.fromRGB(255, 255, 255)
    highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
    highlight.FillTransparency    = 0.6
    highlight.OutlineTransparency = 0
    highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
    highlight.Adornee   = char
    highlight.Parent    = char

    local billboard = Instance.new("BillboardGui")
    billboard.Name          = "ESP_Billboard"
    billboard.Size          = UDim2.new(0, 150, 0, 50)
    billboard.StudsOffset   = Vector3.new(0, 3, 0)
    billboard.AlwaysOnTop   = true
    billboard.Adornee       = hrp
    billboard.Parent        = char

    local nameLabel = Instance.new("TextLabel")
    nameLabel.Name               = "NameLabel"
    nameLabel.Size               = UDim2.new(1, 0, 0.5, 0)
    nameLabel.Position           = UDim2.new(0, 0, 0, 0)
    nameLabel.BackgroundTransparency = 1
    nameLabel.TextColor3         = Color3.fromRGB(255, 255, 255)
    nameLabel.TextStrokeTransparency = 0
    nameLabel.TextStrokeColor3   = Color3.fromRGB(0, 0, 0)
    nameLabel.Font               = Enum.Font.GothamBold
    nameLabel.TextSize           = 13
    nameLabel.Text               = plr.Name
    nameLabel.Parent             = billboard

    local infoLabel = Instance.new("TextLabel")
    infoLabel.Name               = "InfoLabel"
    infoLabel.Size               = UDim2.new(1, 0, 0.5, 0)
    infoLabel.Position           = UDim2.new(0, 0, 0.5, 0)
    infoLabel.BackgroundTransparency = 1
    infoLabel.TextColor3         = Color3.fromRGB(255, 255, 255)
    infoLabel.TextStrokeTransparency = 0
    infoLabel.TextStrokeColor3   = Color3.fromRGB(0, 0, 0)
    infoLabel.Font               = Enum.Font.Gotham
    infoLabel.TextSize           = 11
    infoLabel.Text               = ""
    infoLabel.Parent             = billboard

    local customHealth = nil
    local chOk, ch = pcall(function()
        return workspace:WaitForChild("Characters", 2):WaitForChild(plr.Name, 2):WaitForChild("Health", 2)
    end)
    if chOk and ch then customHealth = ch end

    ESP.Objects[plr] = {
        Highlight    = highlight,
        Billboard    = billboard,
        NameLabel    = nameLabel,
        InfoLabel    = infoLabel,
        Humanoid     = hum,
        HRP          = hrp,
        CustomHealth = customHealth,
    }
end

local function removeESPForPlayer(plr)
    local obj = ESP.Objects[plr]
    if not obj then return end
    pcall(function() obj.Highlight:Destroy() end)
    pcall(function() obj.Billboard:Destroy() end)
    ESP.Objects[plr] = nil
end

local function removeAllESP()
    for plr in pairs(ESP.Objects) do removeESPForPlayer(plr) end
    ESP.Objects = {}
end

local function updateESP()
    if not ESP.Enabled then return end
    local myPos = HumanoidRootPart and HumanoidRootPart.Position or Vector3.zero
    for plr, obj in pairs(ESP.Objects) do
        if not plr or not plr.Parent or not plr.Character then removeESPForPlayer(plr) continue end
        local hrp = obj.HRP
        local hum = obj.Humanoid
        if not hrp or not hrp.Parent or not hum or not hum.Parent then
            local char = plr.Character
            if char then
                obj.HRP      = char:FindFirstChild("HumanoidRootPart")
                obj.Humanoid = char:FindFirstChildOfClass("Humanoid")
                obj.Highlight.Adornee = char
                obj.Billboard.Adornee = obj.HRP
            end
            continue
        end
        local dist = (myPos - hrp.Position).Magnitude
        local withinRange = dist <= ESP.MaxDistance
        obj.Highlight.Enabled = withinRange
        obj.Billboard.Enabled = withinRange
        if not withinRange then continue end
        obj.NameLabel.Visible = ESP.ShowNames
        obj.NameLabel.Text    = plr.Name
        local infoText = ""
        if ESP.ShowHealth then
            local hp, maxHp = 0, 0
            local ch = obj.CustomHealth
            if ch and ch.Parent then
                hp    = math.floor(ch.Value)
                maxHp = math.floor(ch.MaxValue)
            else
                local ok2, ch2 = pcall(function()
                    local chars = workspace:FindFirstChild("Characters")
                    if not chars then return nil end
                    local pChar = chars:FindFirstChild(plr.Name)
                    if not pChar then return nil end
                    return pChar:FindFirstChild("Health")
                end)
                if ok2 and ch2 then
                    obj.CustomHealth = ch2
                    hp    = math.floor(ch2.Value)
                    maxHp = math.floor(ch2.MaxValue)
                end
            end
            infoText = "HP: " .. hp .. "/" .. maxHp
        end
        if ESP.ShowDistance then
            if infoText ~= "" then infoText = infoText .. "  " end
            infoText = infoText .. math.floor(dist) .. " studs"
        end
        obj.InfoLabel.Visible = (ESP.ShowHealth or ESP.ShowDistance)
        obj.InfoLabel.Text    = infoText
    end
end

local function enableESP()
    ESP.Enabled = true
    for _, plr in ipairs(Players:GetPlayers()) do
        if plr ~= Player then pcall(createESPForPlayer, plr) end
    end
    Players.PlayerAdded:Connect(function(plr)
        plr.CharacterAdded:Connect(function()
            task.wait(0.5)
            if ESP.Enabled then pcall(createESPForPlayer, plr) end
        end)
    end)
    for _, plr in ipairs(Players:GetPlayers()) do
        if plr ~= Player then
            plr.CharacterAdded:Connect(function()
                task.wait(0.5)
                removeESPForPlayer(plr)
                if ESP.Enabled then pcall(createESPForPlayer, plr) end
            end)
        end
    end
    ESP.Connection = RunService.Heartbeat:Connect(updateESP)
end

local function disableESP()
    ESP.Enabled = false
    if ESP.Connection then ESP.Connection:Disconnect() ESP.Connection = nil end
    removeAllESP()
end

-- ─────────────────────────────────────────────
--  Core Collect Loop
-- ─────────────────────────────────────────────
local function tryCollectItem(item)
    local pos = getItemPosition(item) if not pos then return false end

    if CONFIG.TeleportToItem then
        if VisualFeatures.UndergroundEnabled then
            -- Snap directly below the item immediately
            HumanoidRootPart.CFrame = CFrame.new(
                pos.X,
                pos.Y + CONFIG.UndergroundYOffset,
                pos.Z
            )
        else
            teleportTo(pos, false)
        end
        pos = getItemPosition(item)
        if not pos then return false end
    end

    if not inRange(pos) then return false end

    -- While interacting, hold the player locked below the item every Heartbeat
    -- so physics can't push them away before the prompt fires
    local interactDone = false
    local anchorConn = nil
    if VisualFeatures.UndergroundEnabled then
        anchorConn = RunService.Heartbeat:Connect(function()
            if interactDone then return end
            local ipos = getItemPosition(item)
            if ipos then
                HumanoidRootPart.CFrame = CFrame.new(
                    ipos.X,
                    ipos.Y + CONFIG.UndergroundYOffset,
                    ipos.Z
                )
            end
        end)
    end

    task.wait(CONFIG.PromptPopupDelay)

    local prompts = getPromptsIn(item)
    local success = false
    if #prompts > 0 then
        for _, prompt in ipairs(prompts) do
            if not AutoCollect.Enabled then break end
            pcall(fireproximityprompt, prompt) task.wait(0.05)
        end
        success = true
    else
        for _, desc in ipairs(item:GetDescendants()) do
            if desc:IsA("ClickDetector") then pcall(fireclickdetector, desc) success = true end
        end
    end

    interactDone = true
    if anchorConn then anchorConn:Disconnect() anchorConn = nil end

    return success
end

local function collectAll()
    local collectables = workspace:FindFirstChild("Collectables")
    if not collectables then return end
    for _, folderName in ipairs(CONFIG.CollectableNames) do
        if not AutoCollect.Enabled then return end
        local folder = collectables:FindFirstChild(folderName)
        if not folder then continue end
        local items = folder:GetChildren()
        if #items == 0 then continue end
        local lastSuccessAt = tick()
        for _, item in ipairs(items) do
            if not AutoCollect.Enabled then return end
            if Humanoid.Health <= 0 then return end
            if not item.Parent then continue end
            if (tick() - lastSuccessAt) >= 5 then break end
            local ok, result = pcall(tryCollectItem, item)
            if ok and result then lastSuccessAt = tick() end
            if not AutoCollect.Enabled then return end
            task.wait(CONFIG.CollectDelay)
        end
    end
end

local function startLoop()
    AutoCollect.Running = false
    if AutoCollect.Thread then task.cancel(AutoCollect.Thread) AutoCollect.Thread = nil end
    AutoCollect.Running = true
    AutoCollect.Thread = task.spawn(function()
        while AutoCollect.Enabled do
            pcall(collectAll)
            if not AutoCollect.Enabled then break end
            task.wait(0.3)
        end
        AutoCollect.Running = false AutoCollect.Thread = nil
    end)
end

local function stopLoop()
    AutoCollect.Enabled = false AutoCollect.Running = false
    if AutoCollect.Thread then task.cancel(AutoCollect.Thread) AutoCollect.Thread = nil end
end

-- ─────────────────────────────────────────────
--  Player Features
-- ─────────────────────────────────────────────
local PlayerFeatures = {
    HitboxEnabled = false, HitboxSize = 10, HitboxTransparency = 0.5,
    HitboxPart = "HumanoidRootPart", HitboxOriginals = {}, HitboxConnection = nil,
    FlyEnabled = false, FlySpeed = 50, FlyThread = nil, BodyVel = nil, BodyGyro = nil,
    SpeedEnabled = false, WalkSpeed = 50, JumpEnabled = false, JumpPower = 100,
}

local function getTargetPart(char, partName)
    if partName == "HumanoidRootPart" then return char:FindFirstChild("HumanoidRootPart")
    elseif partName == "Head" then return char:FindFirstChild("Head")
    elseif partName == "Torso" or partName == "UpperTorso" then
        return char:FindFirstChild("UpperTorso") or char:FindFirstChild("Torso")
    elseif partName == "LowerTorso" then return char:FindFirstChild("LowerTorso") end
    return char:FindFirstChild(partName)
end

local function applyHitboxToPlayer(plr)
    if plr == Player then return end
    local char = plr.Character if not char then return end
    local part = getTargetPart(char, PlayerFeatures.HitboxPart) if not part then return end
    if not PlayerFeatures.HitboxOriginals[plr] then
        PlayerFeatures.HitboxOriginals[plr] = { part = part, origSize = part.Size, origTransp = part.Transparency }
    end
    part.Size = Vector3.new(PlayerFeatures.HitboxSize, PlayerFeatures.HitboxSize, PlayerFeatures.HitboxSize)
    part.Transparency = PlayerFeatures.HitboxTransparency
end

local function restoreHitboxForPlayer(plr)
    local data = PlayerFeatures.HitboxOriginals[plr] if not data then return end
    pcall(function() data.part.Size = data.origSize data.part.Transparency = data.origTransp end)
    PlayerFeatures.HitboxOriginals[plr] = nil
end

local function applyHitboxAll() for _, plr in ipairs(Players:GetPlayers()) do pcall(applyHitboxToPlayer, plr) end end
local function restoreHitboxAll() for plr in pairs(PlayerFeatures.HitboxOriginals) do pcall(restoreHitboxForPlayer, plr) end PlayerFeatures.HitboxOriginals = {} end
local function refreshHitboxAll() if not PlayerFeatures.HitboxEnabled then return end restoreHitboxAll() applyHitboxAll() end

local function enableHitbox()
    PlayerFeatures.HitboxEnabled = true applyHitboxAll()
    PlayerFeatures.HitboxConnection = Players.PlayerAdded:Connect(function(plr)
        plr.CharacterAdded:Connect(function() task.wait(1) if PlayerFeatures.HitboxEnabled then pcall(applyHitboxToPlayer, plr) end end)
    end)
    for _, plr in ipairs(Players:GetPlayers()) do
        if plr ~= Player then
            plr.CharacterAdded:Connect(function() task.wait(1) if PlayerFeatures.HitboxEnabled then pcall(applyHitboxToPlayer, plr) end end)
        end
    end
end

local function disableHitbox()
    PlayerFeatures.HitboxEnabled = false restoreHitboxAll()
    if PlayerFeatures.HitboxConnection then PlayerFeatures.HitboxConnection:Disconnect() PlayerFeatures.HitboxConnection = nil end
end

local function enableFly()
    PlayerFeatures.FlyEnabled = true
    local char = Player.Character if not char then return end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    local hum = char:FindFirstChildOfClass("Humanoid")
    if not hrp or not hum then return end
    hum.PlatformStand = true
    local bv = Instance.new("BodyVelocity")
    bv.Velocity = Vector3.zero bv.MaxForce = Vector3.new(1e6,1e6,1e6) bv.Parent = hrp
    PlayerFeatures.BodyVel = bv
    local bg = Instance.new("BodyGyro")
    bg.MaxTorque = Vector3.new(1e6,1e6,1e6) bg.P = 1e6 bg.CFrame = hrp.CFrame bg.Parent = hrp
    PlayerFeatures.BodyGyro = bg
    PlayerFeatures.FlyThread = task.spawn(function()
        local cam = workspace.CurrentCamera
        while PlayerFeatures.FlyEnabled do
            local dir = Vector3.zero
            if UserInputService:IsKeyDown(Enum.KeyCode.W)         then dir = dir + cam.CFrame.LookVector  end
            if UserInputService:IsKeyDown(Enum.KeyCode.S)         then dir = dir - cam.CFrame.LookVector  end
            if UserInputService:IsKeyDown(Enum.KeyCode.A)         then dir = dir - cam.CFrame.RightVector end
            if UserInputService:IsKeyDown(Enum.KeyCode.D)         then dir = dir + cam.CFrame.RightVector end
            if UserInputService:IsKeyDown(Enum.KeyCode.Space)     then dir = dir + Vector3.new(0,1,0)     end
            if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then dir = dir - Vector3.new(0,1,0)     end
            bv.Velocity = dir.Magnitude > 0 and dir.Unit * PlayerFeatures.FlySpeed or Vector3.zero
            bg.CFrame = CFrame.new(Vector3.zero, cam.CFrame.LookVector)
            RunService.Heartbeat:Wait()
        end
    end)
end

local function disableFly()
    PlayerFeatures.FlyEnabled = false
    if PlayerFeatures.FlyThread then task.cancel(PlayerFeatures.FlyThread) PlayerFeatures.FlyThread = nil end
    if PlayerFeatures.BodyVel   then PlayerFeatures.BodyVel:Destroy()   PlayerFeatures.BodyVel   = nil end
    if PlayerFeatures.BodyGyro  then PlayerFeatures.BodyGyro:Destroy()  PlayerFeatures.BodyGyro  = nil end
    local char = Player.Character
    if char then local hum = char:FindFirstChildOfClass("Humanoid") if hum then hum.PlatformStand = false end end
end

local function applySpeed()
    local char = Player.Character if not char then return end
    local hum = char:FindFirstChildOfClass("Humanoid") if not hum then return end
    hum.WalkSpeed = PlayerFeatures.SpeedEnabled and PlayerFeatures.WalkSpeed or 16
end

local function applyJump()
    local char = Player.Character if not char then return end
    local hum = char:FindFirstChildOfClass("Humanoid") if not hum then return end
    hum.JumpPower = PlayerFeatures.JumpEnabled and PlayerFeatures.JumpPower or 50
end

Player.CharacterAdded:Connect(function(char)
    task.wait(0.5)
    if PlayerFeatures.SpeedEnabled then applySpeed() end
    if PlayerFeatures.JumpEnabled  then applyJump()  end
    if PlayerFeatures.FlyEnabled   then disableFly() task.wait(0.5) enableFly() end
end)

-- ─────────────────────────────────────────────
--  Fullbright & No Fog
-- ─────────────────────────────────────────────
local function enableFullbright()
    local L = game:GetService("Lighting")
    VisualFeatures.OriginalBrightness     = L.Brightness
    VisualFeatures.OriginalAmbient        = L.Ambient
    VisualFeatures.OriginalOutdoorAmbient = L.OutdoorAmbient
    L.Brightness = 2
    L.Ambient        = Color3.fromRGB(178,178,178)
    L.OutdoorAmbient = Color3.fromRGB(178,178,178)
    for _, e in ipairs(L:GetChildren()) do
        if e:IsA("Atmosphere") then
            pcall(function() e.Density  = 0 end)
            pcall(function() e.Haze     = 0 end)
            pcall(function() e.Glare    = 0 end)
            pcall(function() e.Offset   = 0 end)
        elseif e:IsA("BlurEffect") or e:IsA("ColorCorrectionEffect") or e:IsA("SunRaysEffect") then
            pcall(function() e.Enabled = false end)
        end
    end
end

local function disableFullbright()
    local L = game:GetService("Lighting")
    if VisualFeatures.OriginalBrightness then
        L.Brightness     = VisualFeatures.OriginalBrightness
        L.Ambient        = VisualFeatures.OriginalAmbient
        L.OutdoorAmbient = VisualFeatures.OriginalOutdoorAmbient
    end
    for _, e in ipairs(L:GetChildren()) do
        if e:IsA("Atmosphere") then
            pcall(function() e.Density  = 0.395 end)
            pcall(function() e.Haze     = 0 end)
            pcall(function() e.Glare    = 0 end)
            pcall(function() e.Offset   = 0 end)
        elseif e:IsA("BlurEffect") or e:IsA("ColorCorrectionEffect") or e:IsA("SunRaysEffect") then
            pcall(function() e.Enabled = true end)
        end
    end
end

local function enableNoFog()
    local L = game:GetService("Lighting")
    VisualFeatures.OriginalFogEnd   = L.FogEnd
    VisualFeatures.OriginalFogStart = L.FogStart
    L.FogEnd = 100000 L.FogStart = 100000
    for _, e in ipairs(L:GetChildren()) do
        if e:IsA("Atmosphere") then e.Density = 0 e.Haze = 0 end
    end
end

local function disableNoFog()
    local L = game:GetService("Lighting")
    if VisualFeatures.OriginalFogEnd then
        L.FogEnd   = VisualFeatures.OriginalFogEnd
        L.FogStart = VisualFeatures.OriginalFogStart
    end
end

-- ─────────────────────────────────────────────
--  Underground / NoClip Mode
-- ─────────────────────────────────────────────

-- Continuously re-disables CanCollide every frame so the engine can't re-enable it
local NoClipConnection = nil

local function setCharacterCollision(enabled)
    local char = Player.Character
    if not char then return end
    for _, part in ipairs(char:GetDescendants()) do
        if part:IsA("BasePart") then
            pcall(function() part.CanCollide = enabled end)
        end
    end
end

local function enableUnderground()
    VisualFeatures.UndergroundEnabled = true
    -- Stop any previous noclip loop
    if NoClipConnection then NoClipConnection:Disconnect() NoClipConnection = nil end
    -- Heartbeat loop: re-zero CanCollide every frame so physics never re-enables it
    NoClipConnection = RunService.Heartbeat:Connect(function()
        local char = Player.Character
        if not char then return end
        for _, part in ipairs(char:GetDescendants()) do
            if part:IsA("BasePart") then
                part.CanCollide = false
            end
        end
    end)
    -- PlatformStand freezes humanoid physics so our CFrame assignments stick
    local hum = Player.Character and Player.Character:FindFirstChildOfClass("Humanoid")
    if hum then hum.PlatformStand = true end
end

local function disableUnderground()
    VisualFeatures.UndergroundEnabled = false
    if NoClipConnection then NoClipConnection:Disconnect() NoClipConnection = nil end
    -- Restore collision and unfreeze humanoid
    setCharacterCollision(true)
    local hum = Player.Character and Player.Character:FindFirstChildOfClass("Humanoid")
    if hum then hum.PlatformStand = false end
end



-- ─────────────────────────────────────────────
--  Auto Scroll Logic
-- ─────────────────────────────────────────────
local function getScrollPosition(scroll)
    if scroll:IsA("Model") then
        if scroll.PrimaryPart then return scroll.PrimaryPart.Position end
        for _, d in ipairs(scroll:GetDescendants()) do if d:IsA("BasePart") then return d.Position end end
    elseif scroll:IsA("BasePart") then return scroll.Position end
    return nil
end

local function collectScroll(scroll)
    local pos = getScrollPosition(scroll) if not pos then return false end
    HumanoidRootPart.CFrame = CFrame.new(pos + Vector3.new(0,2,0))
    task.wait(CONFIG.PromptPopupDelay)
    local fired = false
    for _, desc in ipairs(scroll:GetDescendants()) do
        if desc:IsA("ProximityPrompt") then pcall(fireproximityprompt, desc) fired = true end
    end
    if not fired then
        for _, desc in ipairs(scroll:GetDescendants()) do
            if desc:IsA("ClickDetector") then pcall(fireclickdetector, desc) fired = true end
        end
    end
    task.wait(CONFIG.CollectDelay)
    return fired
end

local function scrollSweep()
    local worldRefs = workspace:FindFirstChild("WorldEventReferences") if not worldRefs then return 0 end
    local spawns = worldRefs:FindFirstChild("ScrollSpawns") if not spawns then return 0 end
    local scrolls = spawns:GetChildren() if #scrolls == 0 then return 0 end
    local originCFrame = HumanoidRootPart.CFrame
    local collected = 0
    for _, scroll in ipairs(scrolls) do
        if not AutoScroll.Enabled then break end
        if Humanoid.Health <= 0 then break end
        if not scroll.Parent then continue end
        local ok, result = pcall(collectScroll, scroll)
        if ok and result then collected = collected + 1 end
    end
    if AutoScroll.ReturnOnDone and AutoScroll.Enabled then HumanoidRootPart.CFrame = originCFrame end
    return collected
end

local function startScrollLoop()
    if AutoScroll.Running then return end
    AutoScroll.Running = true
    AutoScroll.Thread = task.spawn(function()
        while AutoScroll.Enabled do
            pcall(scrollSweep)
            task.wait(AutoScroll.SweepDelay)
        end
        AutoScroll.Running = false
    end)
end

local function stopScrollLoop()
    AutoScroll.Enabled = false AutoScroll.Running = false
    if AutoScroll.Thread then task.cancel(AutoScroll.Thread) AutoScroll.Thread = nil end
end

-- ─────────────────────────────────────────────
--  Auto Fishing
-- ─────────────────────────────────────────────
local VIM = game:GetService("VirtualInputManager")

local function simulateClick()
    local center = workspace.CurrentCamera.ViewportSize / 2
    VIM:SendMouseButtonEvent(center.X, center.Y, 0, true,  game, 0)
    task.wait(0.05)
    VIM:SendMouseButtonEvent(center.X, center.Y, 0, false, game, 0)
end

local function getFishingBait()
    local char = Player.Character
    if not char then return nil end
    local rod = char:FindFirstChild("Meteoric Fishing Rod")
    if not rod then return nil end
    return rod:FindFirstChild("FishingBait", true)
end

local function rodEquipped()
    local char = Player.Character
    if not char then return false end
    return char:FindFirstChild("Meteoric Fishing Rod") ~= nil
end

local function startFishLoop()
    if AutoFish.Running then return end
    AutoFish.Running = true
    AutoFish.Thread = task.spawn(function()
        while AutoFish.Enabled do
            if not rodEquipped() then task.wait(0.5) continue end
            if not getFishingBait() then
                simulateClick()
                task.wait(1.5)
                if not AutoFish.Enabled then break end
            end
            local reacted = false
            local watchConn
            watchConn = workspace.ChildAdded:Connect(function(child)
                if child.Name == "RodReactEffect" and AutoFish.Enabled then
                    task.wait(0.05)
                    simulateClick()
                    reacted = true
                end
            end)
            local elapsed = 0
            while AutoFish.Enabled and not reacted and elapsed < 30 do
                task.wait(0.1)
                elapsed = elapsed + 0.1
                if not getFishingBait() then break end
            end
            watchConn:Disconnect()
            task.wait(0.8)
        end
        AutoFish.Running = false
        AutoFish.Thread  = nil
    end)
end

local function stopFishLoop()
    AutoFish.Enabled = false
    AutoFish.Running = false
    if AutoFish.Thread then task.cancel(AutoFish.Thread) AutoFish.Thread = nil end
end

-- ─────────────────────────────────────────────
--  Client Platform
-- ─────────────────────────────────────────────
local ClientPlatform = {
    Enabled  = false,
    Part     = nil,
    Thread   = nil,
}

local function enablePlatform()
    ClientPlatform.Enabled = true
    if ClientPlatform.Part then ClientPlatform.Part:Destroy() ClientPlatform.Part = nil end
    local plat = Instance.new("Part")
    plat.Name         = "ClientPlatform"
    plat.Size         = Vector3.new(12, 0.4, 12)
    plat.Anchored     = true
    plat.CanCollide   = true
    plat.Transparency = 0.4
    plat.Color        = Color3.fromRGB(80, 180, 255)
    plat.Material     = Enum.Material.SmoothPlastic
    plat.CastShadow   = false
    plat.Parent       = workspace
    ClientPlatform.Part = plat
    ClientPlatform.Thread = task.spawn(function()
        while ClientPlatform.Enabled do
            local char = Player.Character
            local hrp  = char and char:FindFirstChild("HumanoidRootPart")
            if hrp then
                plat.CFrame = CFrame.new(hrp.Position.X, hrp.Position.Y - 3.2, hrp.Position.Z)
            end
            RunService.Heartbeat:Wait()
        end
    end)
end

local function disablePlatform()
    ClientPlatform.Enabled = false
    if ClientPlatform.Thread then task.cancel(ClientPlatform.Thread) ClientPlatform.Thread = nil end
    if ClientPlatform.Part   then ClientPlatform.Part:Destroy()     ClientPlatform.Part   = nil end
end

-- ─────────────────────────────────────────────
--  Auto Quest – Ella's Necklace
-- ─────────────────────────────────────────────
local function getEllaTorso()
    local dn = workspace:FindFirstChild("DialogueNPCs") if not dn then return nil end
    local qr = dn:FindFirstChild("QuestRelated")        if not qr then return nil end
    local fl = qr:FindFirstChild("FindLostThingQuests") if not fl then return nil end
    local el = fl:FindFirstChild("Ella")                if not el then return nil end
    return el, el:FindFirstChild("Torso") or el:FindFirstChild("UpperTorso")
end

local function getNecklace()
    local inter = workspace:FindFirstChild("Interactions") if not inter then return nil end
    local lost  = inter:FindFirstChild("LostThings")       if not lost  then return nil end
    return lost:FindFirstChild("EllasNecklace")
end

local function getPartPosition(instance)
    if not instance then return nil end
    if instance:IsA("Model") then
        if instance.PrimaryPart then return instance.PrimaryPart.Position end
        for _, d in ipairs(instance:GetDescendants()) do
            if d:IsA("BasePart") then return d.Position end
        end
        local ok, piv = pcall(function() return instance:GetPivot().Position end)
        if ok then return piv end
    elseif instance:IsA("BasePart") then
        return instance.Position
    end
    return nil
end

-- Shared tween/teleport helper for both quest cycles
local function questMoveTo(targetCFrame)
    if CONFIG.QuestUseTween then
        local dist = (HumanoidRootPart.Position - targetCFrame.Position).Magnitude
        local duration = math.max(0.05, dist / CONFIG.QuestTweenSpeed)
        local tween = TweenService:Create(
            HumanoidRootPart,
            TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
            { CFrame = targetCFrame }
        )
        tween:Play()
        tween.Completed:Wait()
    else
        HumanoidRootPart.CFrame = targetCFrame
        task.wait(0.05)
    end
end

-- Holds player pinned at a position every Heartbeat while callback runs
-- Prevents physics pushing the player back above ground mid-interaction
local function withAnchor(anchorPos, callback)
    local done = false
    local conn = RunService.Heartbeat:Connect(function()
        if done then return end
        HumanoidRootPart.CFrame = CFrame.new(anchorPos)
    end)
    pcall(callback)
    done = true
    conn:Disconnect()
end

local function questCycle()
    -- Step 1: teleport to Snow Village so Ella loads in range
    local lp = workspace:FindFirstChild("LocationParts")
    local snowVillage = lp and lp:FindFirstChild("Snow Village")
    if snowVillage then
        local svPos = getPartPosition(snowVillage)
        if svPos then
            questMoveTo(CFrame.new(svPos))
            task.wait(0.6)
        end
    end

    -- Step 2: locate Ella
    local ella, ellaTorso = getEllaTorso()
    if not ella or not ellaTorso then
        warn("[AutoQuest] Ella not found.")
        return false
    end

    -- Step 3: move below Ella using UndergroundYOffset
    local ellaBelowPos = ellaTorso.Position + Vector3.new(0, CONFIG.UndergroundYOffset, 0)
    questMoveTo(CFrame.new(ellaBelowPos))
    task.wait(0.2)

    -- Step 4+5: fire prompt and AcceptQuest while anchored underground
    withAnchor(ellaBelowPos, function()
        local prompt = ellaTorso:FindFirstChild("ProximityPrompt")
        if prompt then pcall(fireproximityprompt, prompt) end
        task.wait(CONFIG.PromptPopupDelay + 0.2)
        pcall(function()
            workspace
                :WaitForChild("DialogueNPCs")
                :WaitForChild("QuestRelated")
                :WaitForChild("FindLostThingQuests")
                :WaitForChild("Ella")
                :WaitForChild("Torso")
                :WaitForChild("ProximityPrompt")
                :WaitForChild("Answer")
                :FireServer("AcceptQuest")
        end)
        task.wait(0.4)
    end)

    -- Step 6: locate necklace
    local necklace = getNecklace()
    if not necklace then warn("[AutoQuest] EllasNecklace not found.") return false end
    local neckPos = getPartPosition(necklace)
    if not neckPos then warn("[AutoQuest] Could not resolve necklace position.") return false end

    -- Step 7+8: move below necklace and interact while anchored
    local neckBelowPos = neckPos + Vector3.new(0, CONFIG.UndergroundYOffset, 0)
    questMoveTo(CFrame.new(neckBelowPos))
    task.wait(0.2)

    withAnchor(neckBelowPos, function()
        task.wait(CONFIG.PromptPopupDelay)
        local fired = false
        for _, desc in ipairs(necklace:GetDescendants()) do
            if desc:IsA("ProximityPrompt") then pcall(fireproximityprompt, desc) fired = true end
        end
        if not fired then
            for _, desc in ipairs(necklace:GetDescendants()) do
                if desc:IsA("ClickDetector") then pcall(fireclickdetector, desc) fired = true end
            end
        end
        if not fired then warn("[AutoQuest] No interaction found on EllasNecklace.") end
        task.wait(0.3)
    end)

    -- Step 9: return below Ella
    local _, ellaTorso2 = getEllaTorso()
    if ellaTorso2 then
        questMoveTo(CFrame.new(ellaTorso2.Position + Vector3.new(0, CONFIG.UndergroundYOffset, 0)))
    end
    task.wait(0.3)

    return true
end

local function startQuestLoop()
    if AutoQuest.Running then return end
    AutoQuest.Running = true
    enableUnderground()
    AutoQuest.Thread = task.spawn(function()
        while AutoQuest.Enabled do
            if Humanoid.Health <= 0 then task.wait(1) continue end
            local ok, err = pcall(questCycle)
            if not ok then warn("[AutoQuest] Cycle error: " .. tostring(err)) end
            if not AutoQuest.Enabled then break end
            task.wait(AutoQuest.LoopDelay)
        end
        AutoQuest.Running = false
        AutoQuest.Thread  = nil
    end)
end

local function stopQuestLoop()
    AutoQuest.Enabled = false
    AutoQuest.Running = false
    if AutoQuest.Thread then task.cancel(AutoQuest.Thread) AutoQuest.Thread = nil end
    disableUnderground()
end

-- ─────────────────────────────────────────────
--  Auto Quest – Emily's Cat
-- ─────────────────────────────────────────────
local function getEmilyTorso()
    local dn = workspace:FindFirstChild("DialogueNPCs") if not dn then return nil, nil end
    local qr = dn:FindFirstChild("QuestRelated")        if not qr then return nil, nil end
    local fl = qr:FindFirstChild("FindLostThingQuests") if not fl then return nil, nil end
    local em = fl:FindFirstChild("Emily")               if not em then return nil, nil end
    return em, em:FindFirstChild("Torso") or em:FindFirstChild("UpperTorso")
end

local function getEmilysCat()
    local inter = workspace:FindFirstChild("Interactions") if not inter then return nil end
    local lost  = inter:FindFirstChild("LostThings")       if not lost  then return nil end
    return lost:FindFirstChild("EmilysCat")
end

local function emilyCycle()
    -- Step 1: teleport to Wind Village so Emily loads in range
    local lp = workspace:FindFirstChild("LocationParts")
    local windVillage = lp and lp:FindFirstChild("Wind Village")
    if windVillage then
        local wvPos = getPartPosition(windVillage)
        if wvPos then
            questMoveTo(CFrame.new(wvPos))
            task.wait(0.6)
        end
    end

    -- Step 2: locate Emily
    local emily, emilyTorso = getEmilyTorso()
    if not emily or not emilyTorso then
        warn("[EmilyQuest] Emily not found.")
        return false
    end

    -- Step 3: move below Emily using UndergroundYOffset
    local emilyBelowPos = emilyTorso.Position + Vector3.new(0, CONFIG.UndergroundYOffset, 0)
    questMoveTo(CFrame.new(emilyBelowPos))
    task.wait(0.2)

    -- Step 4+5: fire prompt and AcceptQuest while anchored underground
    withAnchor(emilyBelowPos, function()
        local prompt = emilyTorso:FindFirstChild("ProximityPrompt")
        if prompt then pcall(fireproximityprompt, prompt) end
        task.wait(CONFIG.PromptPopupDelay + 0.2)
        pcall(function()
            workspace
                :WaitForChild("DialogueNPCs")
                :WaitForChild("QuestRelated")
                :WaitForChild("FindLostThingQuests")
                :WaitForChild("Emily")
                :WaitForChild("Torso")
                :WaitForChild("ProximityPrompt")
                :WaitForChild("Answer")
                :FireServer("AcceptQuest")
        end)
        task.wait(0.4)
    end)

    -- Step 6: locate the cat
    local cat = getEmilysCat()
    if not cat then warn("[EmilyQuest] EmilysCat not found.") return false end
    local catPos = getPartPosition(cat)
    if not catPos then warn("[EmilyQuest] Could not resolve cat position.") return false end

    -- Step 7+8: move below cat and interact while anchored
    local catBelowPos = catPos + Vector3.new(0, CONFIG.UndergroundYOffset, 0)
    questMoveTo(CFrame.new(catBelowPos))
    task.wait(0.2)

    withAnchor(catBelowPos, function()
        task.wait(CONFIG.PromptPopupDelay)
        local fired = false
        for _, desc in ipairs(cat:GetDescendants()) do
            if desc:IsA("ProximityPrompt") then pcall(fireproximityprompt, desc) fired = true end
        end
        if not fired then
            for _, desc in ipairs(cat:GetDescendants()) do
                if desc:IsA("ClickDetector") then pcall(fireclickdetector, desc) fired = true end
            end
        end
        if not fired then warn("[EmilyQuest] No interaction found on EmilysCat.") end
        task.wait(0.3)
    end)

    -- Step 9: return below Emily
    local _, emilyTorso2 = getEmilyTorso()
    if emilyTorso2 then
        questMoveTo(CFrame.new(emilyTorso2.Position + Vector3.new(0, CONFIG.UndergroundYOffset, 0)))
    end
    task.wait(0.3)

    return true
end

local function startEmilyQuestLoop()
    if AutoEmilyQuest.Running then return end
    AutoEmilyQuest.Running = true
    enableUnderground()
    AutoEmilyQuest.Thread = task.spawn(function()
        while AutoEmilyQuest.Enabled do
            if Humanoid.Health <= 0 then task.wait(1) continue end
            local ok, err = pcall(emilyCycle)
            if not ok then warn("[EmilyQuest] Cycle error: " .. tostring(err)) end
            if not AutoEmilyQuest.Enabled then break end
            task.wait(AutoEmilyQuest.LoopDelay)
        end
        AutoEmilyQuest.Running = false
        AutoEmilyQuest.Thread  = nil
    end)
end

local function stopEmilyQuestLoop()
    AutoEmilyQuest.Enabled = false
    AutoEmilyQuest.Running = false
    if AutoEmilyQuest.Thread then task.cancel(AutoEmilyQuest.Thread) AutoEmilyQuest.Thread = nil end
    disableUnderground()
end

-- ─────────────────────────────────────────────
--  Rayfield UI
-- ─────────────────────────────────────────────
local Window = RayfieldLib:CreateWindow({
    Name            = "Auto Collect",
    LoadingTitle    = "Loading...",
    LoadingSubtitle = "Collectables Script",
    ConfigurationSaving = { Enabled = true, FolderName = "AutoCollectScript", FileName = "Config" },
    Discord = { Enabled = false },
    KeySystem = false,
})

-- ── Tab: Collect ──────────────────────────────
local CollectTab = Window:CreateTab("Collect", 4483362458)
CollectTab:CreateSection("Auto Collect")
CollectTab:CreateToggle({
    Name = "Auto Collect", CurrentValue = false, Flag = "AutoCollectToggle",
    Callback = function(value)
        AutoCollect.Enabled = value
        if value then
            Character        = Player.Character or Player.CharacterAdded:Wait()
            HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
            Humanoid         = Character:WaitForChild("Humanoid")
            startLoop()
        else stopLoop() end
    end,
})
CollectTab:CreateSection("Settings")
CollectTab:CreateToggle({
    Name = "Teleport To Items", CurrentValue = true, Flag = "TeleportToggle",
    Callback = function(value) CONFIG.TeleportToItem = value end,
})
CollectTab:CreateToggle({
    Name = "Tween Instead of Teleport", CurrentValue = false, Flag = "UseTweenToggle",
    Callback = function(value) CONFIG.UseTween = value end,
})
CollectTab:CreateSlider({
    Name = "Tween Speed", Range = {10, 500}, Increment = 10, Suffix = " studs/s",
    CurrentValue = CONFIG.TweenSpeed, Flag = "TweenSpeed",
    Callback = function(value) CONFIG.TweenSpeed = value end,
})
CollectTab:CreateLabel("Tween smoothly moves to each item instead of instant TP.")
CollectTab:CreateLabel("\"Instant TP is risky — Tween is recommended for safety.\"")
CollectTab:CreateSection("Underground")
CollectTab:CreateToggle({
    Name = "Underground Mode", CurrentValue = false, Flag = "UndergroundToggle",
    Callback = function(value)
        VisualFeatures.UndergroundEnabled = value
        if value then enableUnderground() else disableUnderground() end
    end,
})
CollectTab:CreateSlider({
    Name = "Y Offset", Range = {-30, 10}, Increment = 1, Suffix = " studs",
    CurrentValue = CONFIG.UndergroundYOffset, Flag = "UndergroundYOffset",
    Callback = function(value) CONFIG.UndergroundYOffset = value end,
})
CollectTab:CreateLabel("Disables collision & hovers your char below each item.")
CollectTab:CreateLabel("Negative = deeper underground. Positive = closer to surface.")
CollectTab:CreateSection("Collection")
CollectTab:CreateSlider({
    Name = "Collect Range (studs)", Range = {3,30}, Increment = 1, Suffix = " studs",
    CurrentValue = CONFIG.CollectRange, Flag = "CollectRange",
    Callback = function(value) CONFIG.CollectRange = value end,
})
CollectTab:CreateSlider({
    Name = "Collect Delay (ms)", Range = {50,1000}, Increment = 50, Suffix = " ms",
    CurrentValue = CONFIG.CollectDelay * 1000, Flag = "CollectDelay",
    Callback = function(value) CONFIG.CollectDelay = value / 1000 end,
})

-- ── Tab: Combat ───────────────────────────────
local CombatTab = Window:CreateTab("Combat", 4483362458)

CombatTab:CreateSection("Earth M1")
CombatTab:CreateToggle({
    Name = "Auto Earth M1", CurrentValue = false, Flag = "AutoEarthM1Toggle",
    Callback = function(value) EarthM1.Enabled = value if value then startEarthM1Loop() else stopEarthM1Loop() end end,
})
CombatTab:CreateSlider({
    Name = "Earth Fire Rate", Range = {1, 20}, Increment = 1, Suffix = " attacks/sec",
    CurrentValue = 1, Flag = "EarthFireRateSlider",
    Callback = function(value) EarthM1.FireRate = 1 / (tonumber(value) or 1) end,
})
CombatTab:CreateLabel("Fires the Earth M1 (Boulder Toss) at selected rate.")

CombatTab:CreateSection("Water M1")
CombatTab:CreateToggle({
    Name = "Auto Water M1", CurrentValue = false, Flag = "AutoWaterM1Toggle",
    Callback = function(value) WaterM1.Enabled = value if value then startWaterM1Loop() else stopWaterM1Loop() end end,
})
CombatTab:CreateSlider({
    Name = "Water Fire Rate", Range = {1, 20}, Increment = 1, Suffix = " attacks/sec",
    CurrentValue = 1, Flag = "WaterFireRateSlider",
    Callback = function(value) WaterM1.FireRate = 1 / (tonumber(value) or 1) end,
})
CombatTab:CreateLabel("Fires the Water M1 (Water Kick) at selected rate.")

CombatTab:CreateSection("Fire M1")
CombatTab:CreateToggle({
    Name = "Auto Fire M1", CurrentValue = false, Flag = "AutoFireM1Toggle",
    Callback = function(value) FireM1.Enabled = value if value then startFireM1Loop() else stopFireM1Loop() end end,
})
CombatTab:CreateLabel("Fires the Fire M1 remote (Fireball) every 1 second.")

-- ── Tab: Scrolls ──────────────────────────────
local ScrollTab = Window:CreateTab("Scrolls", 4483362458)
ScrollTab:CreateSection("Auto Scroll Teleporter")
ScrollTab:CreateToggle({
    Name = "Auto Collect Scrolls", CurrentValue = false, Flag = "AutoScrollToggle",
    Callback = function(value)
        AutoScroll.Enabled = value
        if value then
            Character        = Player.Character or Player.CharacterAdded:Wait()
            HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
            Humanoid         = Character:WaitForChild("Humanoid")
            startScrollLoop()
        else stopScrollLoop() end
    end,
})
ScrollTab:CreateToggle({
    Name = "Return To Origin After Sweep", CurrentValue = true, Flag = "ScrollReturnToggle",
    Callback = function(value) AutoScroll.ReturnOnDone = value end,
})
ScrollTab:CreateSection("Timing")
ScrollTab:CreateSlider({
    Name = "Rescan Delay", Range = {1,30}, Increment = 1, Suffix = " sec",
    CurrentValue = AutoScroll.SweepDelay, Flag = "ScrollSweepDelay",
    Callback = function(value) AutoScroll.SweepDelay = value end,
})
ScrollTab:CreateLabel("Rescans workspace.WorldEventReferences.ScrollSpawns")
ScrollTab:CreateLabel("Teleports to each scroll, collects, returns to origin.")

-- ── Tab: Teleport ─────────────────────────────
local TeleportTab = Window:CreateTab("Teleport", 4483362458)
TeleportTab:CreateSection("Locations")

local Locations = {
    "Beach", "Beauty Salon", "Cave", "Crystal Cave", "Flame Village",
    "Forest", "Mountain", "Oasis", "Snow Village", "Snowy Land",
    "Spiritual World", "Terra Village", "Volcano", "Wind Village",
}
for _, locName in ipairs(Locations) do
    TeleportTab:CreateButton({
        Name = locName,
        Callback = function()
            local lp = workspace:FindFirstChild("LocationParts") if not lp then return end
            local target = lp:FindFirstChild(locName)
            if target then teleportToInstance(target) end
        end,
    })
end

TeleportTab:CreateSection("Special NPCs")
local SpecialNPCs = {
    { Name = "Trait Reroll",   Path = {"DialogueNPCs","TraitReroll"} },
    { Name = "Skin Reset",     Path = {"DialogueNPCs","SkinReset"} },
    { Name = "Karma Cleanser", Path = {"DialogueNPCs","KarmaCleanser"} },
    { Name = "Face Reset",     Path = {"DialogueNPCs","FaceReset"} },
    { Name = "Element Reset",  Path = {"DialogueNPCs","ElementReset"} },
}
for _, npc in ipairs(SpecialNPCs) do
    TeleportTab:CreateButton({
        Name = npc.Name,
        Callback = function()
            local target = workspace
            for _, part in ipairs(npc.Path) do
                target = target:FindFirstChild(part)
                if not target then return end
            end
            teleportToInstance(target)
        end,
    })
end

TeleportTab:CreateSection("Collectors")
local CollectorVillages = { "FlameVillage", "SnowyVillage", "TerraVillage", "WindVillage" }
for _, villageName in ipairs(CollectorVillages) do
    TeleportTab:CreateButton({
        Name = villageName .. " Collector",
        Callback = function()
            local dn = workspace:FindFirstChild("DialogueNPCs") if not dn then return end
            local col = dn:FindFirstChild("Collectors")         if not col then return end
            local target = col:FindFirstChild(villageName)
            if target then teleportToInstance(target) end
        end,
    })
end

-- ── Tab: Player ───────────────────────────────
local PlayerTab = Window:CreateTab("Player", 4483362458)

PlayerTab:CreateSection("ESP")
PlayerTab:CreateToggle({
    Name = "Player ESP", CurrentValue = false, Flag = "ESPToggle",
    Callback = function(value) ESP.Enabled = value if value then enableESP() else disableESP() end end,
})
PlayerTab:CreateToggle({
    Name = "Show Names", CurrentValue = true, Flag = "ESPNames",
    Callback = function(value) ESP.ShowNames = value end,
})
PlayerTab:CreateToggle({
    Name = "Show Health", CurrentValue = true, Flag = "ESPHealth",
    Callback = function(value) ESP.ShowHealth = value end,
})
PlayerTab:CreateToggle({
    Name = "Show Distance", CurrentValue = true, Flag = "ESPDistance",
    Callback = function(value) ESP.ShowDistance = value end,
})
PlayerTab:CreateSlider({
    Name = "Max ESP Distance", Range = {50, 2000}, Increment = 50, Suffix = " studs",
    CurrentValue = ESP.MaxDistance, Flag = "ESPMaxDist",
    Callback = function(value) ESP.MaxDistance = value end,
})

PlayerTab:CreateSection("Hitbox Expander")
PlayerTab:CreateToggle({
    Name = "Expand Hitboxes", CurrentValue = false, Flag = "HitboxToggle",
    Callback = function(value) if value then enableHitbox() else disableHitbox() end end,
})
PlayerTab:CreateDropdown({
    Name = "Target Part", Options = {"HumanoidRootPart","Head","Torso","LowerTorso"},
    CurrentOption = {"HumanoidRootPart"}, Flag = "HitboxPart",
    Callback = function(selected) PlayerFeatures.HitboxPart = selected[1] or selected refreshHitboxAll() end,
})
PlayerTab:CreateSlider({
    Name = "Hitbox Size", Range = {1,60}, Increment = 1, Suffix = " studs",
    CurrentValue = PlayerFeatures.HitboxSize, Flag = "HitboxSize",
    Callback = function(value) PlayerFeatures.HitboxSize = value refreshHitboxAll() end,
})
PlayerTab:CreateSlider({
    Name = "Hitbox Transparency", Range = {0,10}, Increment = 1, Suffix = "/10",
    CurrentValue = PlayerFeatures.HitboxTransparency * 10, Flag = "HitboxTransparency",
    Callback = function(value) PlayerFeatures.HitboxTransparency = value / 10 refreshHitboxAll() end,
})

PlayerTab:CreateSection("Fly")
PlayerTab:CreateToggle({
    Name = "Fly", CurrentValue = false, Flag = "FlyToggle",
    Callback = function(value) if value then enableFly() else disableFly() end end,
})
PlayerTab:CreateSlider({
    Name = "Fly Speed", Range = {10,250}, Increment = 5, Suffix = " studs/s",
    CurrentValue = PlayerFeatures.FlySpeed, Flag = "FlySpeed",
    Callback = function(value) PlayerFeatures.FlySpeed = value end,
})
PlayerTab:CreateLabel("WASD to move  |  Space = up  |  Shift = down")

PlayerTab:CreateSection("Speed")
PlayerTab:CreateToggle({
    Name = "Speed Boost", CurrentValue = false, Flag = "SpeedToggle",
    Callback = function(value) PlayerFeatures.SpeedEnabled = value applySpeed() end,
})
PlayerTab:CreateSlider({
    Name = "Walk Speed", Range = {16,500}, Increment = 1, Suffix = " studs/s",
    CurrentValue = PlayerFeatures.WalkSpeed, Flag = "WalkSpeed",
    Callback = function(value) PlayerFeatures.WalkSpeed = value if PlayerFeatures.SpeedEnabled then applySpeed() end end,
})

PlayerTab:CreateSection("Jump")
PlayerTab:CreateToggle({
    Name = "Jump Boost", CurrentValue = false, Flag = "JumpToggle",
    Callback = function(value) PlayerFeatures.JumpEnabled = value applyJump() end,
})
PlayerTab:CreateSlider({
    Name = "Jump Power", Range = {50,500}, Increment = 5, Suffix = " power",
    CurrentValue = PlayerFeatures.JumpPower, Flag = "JumpPower",
    Callback = function(value) PlayerFeatures.JumpPower = value if PlayerFeatures.JumpEnabled then applyJump() end end,
})

PlayerTab:CreateSection("Visuals")
PlayerTab:CreateToggle({
    Name = "Fullbright", CurrentValue = false, Flag = "FullbrightToggle",
    Callback = function(value) VisualFeatures.FullbrightEnabled = value if value then enableFullbright() else disableFullbright() end end,
})
PlayerTab:CreateToggle({
    Name = "No Fog", CurrentValue = false, Flag = "NoFogToggle",
    Callback = function(value) VisualFeatures.NoFogEnabled = value if value then enableNoFog() else disableNoFog() end end,
})


-- ── Tab: Items ────────────────────────────────
local ItemsTab = Window:CreateTab("Items", 4483362458)
ItemsTab:CreateSection("Collectable Types")
local EnabledItems = {}
for _, name in ipairs(CONFIG.CollectableNames) do EnabledItems[name] = true end
for _, name in ipairs(CONFIG.CollectableNames) do
    ItemsTab:CreateToggle({
        Name = name, CurrentValue = true, Flag = "Item_" .. name:gsub(" ","_"),
        Callback = function(value)
            EnabledItems[name] = value
            local newList = {}
            for n, active in pairs(EnabledItems) do if active then table.insert(newList, n) end end
            CONFIG.CollectableNames = newList
        end,
    })
end

-- ── Tab: Fishing ──────────────────────────────
local FishTab = Window:CreateTab("Fishing", 4483362458)

FishTab:CreateSection("Auto Fishing")
FishTab:CreateToggle({
    Name = "Auto Fish", CurrentValue = false, Flag = "AutoFishToggle",
    Callback = function(value)
        AutoFish.Enabled = value
        if value then
            Character        = Player.Character or Player.CharacterAdded:Wait()
            HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
            Humanoid         = Character:WaitForChild("Humanoid")
            startFishLoop()
        else stopFishLoop() end
    end,
})

FishTab:CreateSection("Water Platform")
FishTab:CreateToggle({
    Name = "Client Platform", CurrentValue = false, Flag = "ClientPlatformToggle",
    Callback = function(value) ClientPlatform.Enabled = value if value then enablePlatform() else disablePlatform() end end,
})
FishTab:CreateLabel("Spawns a client-side platform under your feet.")
FishTab:CreateLabel("Walk over water, enable fly + platform to hover.")
FishTab:CreateLabel("Only visible to you — other players cannot see it.")

FishTab:CreateSection("Instructions")
FishTab:CreateLabel("1. Enable Fly, fly over water.")
FishTab:CreateLabel("2. Enable Client Platform.")
FishTab:CreateLabel("3. Disable Fly to land on platform.")
FishTab:CreateLabel("4. Equip rod, point at water, enable Auto Fish.")

-- ── Tab: Quest ────────────────────────────────
local QuestTab = Window:CreateTab("Quest", 4483362458)

QuestTab:CreateSection("Ella's Necklace Quest")
QuestTab:CreateToggle({
    Name = "Auto Quest", CurrentValue = false, Flag = "AutoQuestToggle",
    Callback = function(value)
        AutoQuest.Enabled = value
        if value then
            Character        = Player.Character or Player.CharacterAdded:Wait()
            HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
            Humanoid         = Character:WaitForChild("Humanoid")
            startQuestLoop()
            RayfieldLib:Notify({
                Title   = "Auto Quest Started",
                Content = "Farming Ella's Necklace quest...",
                Duration = 3, Image = 4483362458,
            })
        else
            stopQuestLoop()
            RayfieldLib:Notify({
                Title   = "Auto Quest Stopped",
                Content = "Quest farming disabled.",
                Duration = 3, Image = 4483362458,
            })
        end
    end,
})

QuestTab:CreateSection("Timing")
QuestTab:CreateSlider({
    Name = "Loop Delay", Range = {1, 60}, Increment = 1, Suffix = " sec",
    CurrentValue = AutoQuest.LoopDelay, Flag = "QuestLoopDelay",
    Callback = function(value) AutoQuest.LoopDelay = value end,
})
QuestTab:CreateSection("Movement")
QuestTab:CreateToggle({
    Name = "Tween Instead of Teleport", CurrentValue = false, Flag = "QuestUseTweenToggle",
    Callback = function(value) CONFIG.QuestUseTween = value end,
})
QuestTab:CreateSlider({
    Name = "Tween Speed", Range = {10, 500}, Increment = 10, Suffix = " studs/s",
    CurrentValue = CONFIG.QuestTweenSpeed, Flag = "QuestTweenSpeed",
    Callback = function(value) CONFIG.QuestTweenSpeed = value end,
})
QuestTab:CreateLabel("\"Instant TP is risky — Tween is recommended for safety.\"")

QuestTab:CreateSection("How It Works")
QuestTab:CreateLabel("1. TPs below Ella & fires her ProximityPrompt.")
QuestTab:CreateLabel("2. Fires AcceptQuest to start the quest.")
QuestTab:CreateLabel("3. TPs below EllasNecklace & collects it.")
QuestTab:CreateLabel("4. Returns below Ella, then repeats.")
QuestTab:CreateLabel("Set Loop Delay to match the quest reset timer.")

-- ── Tab: Emily Quest ──────────────────────────
local EmilyQuestTab = Window:CreateTab("Emily Quest", 4483362458)

EmilyQuestTab:CreateSection("Emily's Cat Quest")
EmilyQuestTab:CreateToggle({
    Name = "Auto Emily Quest", CurrentValue = false, Flag = "AutoEmilyQuestToggle",
    Callback = function(value)
        AutoEmilyQuest.Enabled = value
        if value then
            Character        = Player.Character or Player.CharacterAdded:Wait()
            HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
            Humanoid         = Character:WaitForChild("Humanoid")
            startEmilyQuestLoop()
            RayfieldLib:Notify({
                Title    = "Emily Quest Started",
                Content  = "Farming Emily's Cat quest...",
                Duration = 3, Image = 4483362458,
            })
        else
            stopEmilyQuestLoop()
            RayfieldLib:Notify({
                Title    = "Emily Quest Stopped",
                Content  = "Emily quest farming disabled.",
                Duration = 3, Image = 4483362458,
            })
        end
    end,
})

EmilyQuestTab:CreateSection("Timing")
EmilyQuestTab:CreateSlider({
    Name = "Loop Delay", Range = {1, 60}, Increment = 1, Suffix = " sec",
    CurrentValue = AutoEmilyQuest.LoopDelay, Flag = "EmilyQuestLoopDelay",
    Callback = function(value) AutoEmilyQuest.LoopDelay = value end,
})
EmilyQuestTab:CreateSection("Movement")
EmilyQuestTab:CreateToggle({
    Name = "Tween Instead of Teleport", CurrentValue = false, Flag = "EmilyQuestUseTweenToggle",
    Callback = function(value) CONFIG.QuestUseTween = value end,
})
EmilyQuestTab:CreateSlider({
    Name = "Tween Speed", Range = {10, 500}, Increment = 10, Suffix = " studs/s",
    CurrentValue = CONFIG.QuestTweenSpeed, Flag = "EmilyQuestTweenSpeed",
    Callback = function(value) CONFIG.QuestTweenSpeed = value end,
})
EmilyQuestTab:CreateLabel("\"Instant TP is risky — Tween is recommended for safety.\"")

EmilyQuestTab:CreateSection("How It Works")
EmilyQuestTab:CreateLabel("1. TPs below Emily & fires her ProximityPrompt.")
EmilyQuestTab:CreateLabel("2. Fires AcceptQuest to start the quest.")
EmilyQuestTab:CreateLabel("3. TPs below EmilysCat & collects it.")
EmilyQuestTab:CreateLabel("4. Returns below Emily, then repeats.")
EmilyQuestTab:CreateLabel("Set Loop Delay to match the quest reset timer.")

-- ── Tab: Info ─────────────────────────────────
local InfoTab = Window:CreateTab("Info", 4483362458)
InfoTab:CreateSection("About")
InfoTab:CreateLabel("Auto Collect + Combat + Teleport + ESP + Quest v2.4")
InfoTab:CreateLabel("Collects items from workspace.Collectables")
InfoTab:CreateLabel("Uses ProximityPrompt (E key) interaction")
InfoTab:CreateLabel("Enable Teleport for fastest collection")

InfoTab:CreateSection("Status")
local statusLabel = InfoTab:CreateLabel("Status: Idle")
task.spawn(function()
    while true do
        task.wait(1)
        local collectables = workspace:FindFirstChild("Collectables")
        local count = 0
        if collectables then
            for _, fn in ipairs(CONFIG.CollectableNames) do
                local f = collectables:FindFirstChild(fn)
                if f then count = count + #f:GetChildren() end
            end
        end
        local espCount = 0
        for _ in pairs(ESP.Objects) do espCount = espCount + 1 end
        statusLabel:Set(
            "Collect:" .. (AutoCollect.Enabled      and "ON" or "OFF") ..
            " | Earth:"  .. (EarthM1.Enabled         and "ON" or "OFF") ..
            " | Water:"  .. (WaterM1.Enabled         and "ON" or "OFF") ..
            " | Fire:"   .. (FireM1.Enabled          and "ON" or "OFF") ..
            " | Quest:"  .. (AutoQuest.Enabled       and "ON" or "OFF") ..
            " | Emily:"  .. (AutoEmilyQuest.Enabled  and "ON" or "OFF") ..
            " | ESP:"    .. (ESP.Enabled and espCount.."p" or "OFF") ..
            " | Items:"  .. count
        )
    end
end)

-- ─────────────────────────────────────────────
--  Character respawn handling
-- ─────────────────────────────────────────────
Player.CharacterAdded:Connect(function(char)
    Character        = char
    HumanoidRootPart = char:WaitForChild("HumanoidRootPart")
    Humanoid         = char:WaitForChild("Humanoid")
    -- Re-apply underground/noclip after respawn
    if VisualFeatures.UndergroundEnabled then
        task.wait(0.5)
        enableUnderground()
    end
    if AutoCollect.Enabled      then task.wait(1) stopLoop()           startLoop()           end
    if AutoQuest.Enabled        then task.wait(1) stopQuestLoop()      startQuestLoop()      end
    if AutoEmilyQuest.Enabled   then task.wait(1) stopEmilyQuestLoop() startEmilyQuestLoop() end
end)

-- ─────────────────────────────────────────────
--  Notify on load
-- ─────────────────────────────────────────────
RayfieldLib:Notify({
    Title    = "Made by Bliss",
    Content  = "Thanks Claude 🤍",
    Duration = 6,
    Image    = 4483362458,
})

Features & Information

Autocollect AutoFish (Meteorite Rod) Enjoy i dont really care if yall take it since its genuine shit but the autocollect makes alot and you can go to the spirit world to reroll with dex.

Community Comments (26)

cero_101cero_101Apr 24, 2026

OH UR MY GOAT FINALLY

cero_101cero_101Apr 24, 2026

IV ACTUALLY JUST BEEN WAITING AND WAITING AND WAITING AND WAITING

Replying to @cero_101
h0533243h0533243Apr 25, 2026

@cero_101 that may be because you didnt created a script called "Script request" for "Elementalism" Others and I did it is why this game got script

cero_101cero_101Apr 24, 2026

yo whats ur discord? I wanna dm to show my thanks fr

Replying to @cero_101
SurelyBlissSurelyBlissApr 25, 2026

@cero_101 brydagoat67

kayvonreid3kayvonreid3Apr 25, 2026

Hey um.. what Ai did you use to make this script and how?

Replying to @kayvonreid3
SurelyBlissSurelyBlissApr 25, 2026

@kayvonreid3 I used claude and just having basic knowledge is all you need for example the autocollect all you need is the folder where the items spawn and then tell the ai to make it auto interact and rescan for new items etc. This wont work when the game makes a proper anticheat tho then you will likely need like tweening.

Replying to @SurelyBliss
kayvonreid3kayvonreid3Apr 25, 2026

@SurelyBliss Thank you. Also one more question, how do I get the items folder?

Replying to @kayvonreid3
SurelyBlissSurelyBlissApr 25, 2026

@kayvonreid3 Its in the workspace folder in collectables

h0533243h0533243Apr 25, 2026(edited)

would be nice if there was auto quest/auto farm etc etc more features

Replying to @h0533243
SurelyBlissSurelyBlissApr 25, 2026

@h0533243 I could try that but are quests repeatable in this game?

Replying to @SurelyBliss
h0533243h0533243Apr 25, 2026

@SurelyBliss Yes

kayvonreid3kayvonreid3Apr 26, 2026

Hey if you’re not too busy could you pls try to make a script for an avatar game called Rocast. It’s very good and increasing in players so I’d really enjoy a auto farm script

Replying to @kayvonreid3
h0533243h0533243Apr 26, 2026

@kayvonreid3 This game had scripts, I think in the past but now theres none and i think they wont gonna work.

Replying to @h0533243
kayvonreid3kayvonreid3Apr 27, 2026

@h0533243 someone made a script for it

GrrrGANGGrrrGANGApr 27, 2026

can you make the auto collect have a safe feature cause underground doesn't seem to be working

Replying to @GrrrGANG
SurelyBlissSurelyBlissApr 27, 2026

@GrrrGANG Ill try to work on that tmrw

Triple_HTriple_HApr 27, 2026

Hey man I just tried it out it works and it's good as hell but I was wondering why is the hitbox expander not working? Is it broken or I'm not doing something properly if it's broken, would you mind fixing it? Thanks!

Replying to @Triple_H
SurelyBlissSurelyBlissApr 27, 2026

@Triple_H It works for m1s like fists

GrrrGANGGrrrGANGApr 27, 2026

script works well a safe quest feature would be awesome too just a suggestion

zenkrzenkrApr 30, 2026

Yo, elementalism js updated with a new anti cheat so far auto quest and auto collect doesnt work but teleport seems to be working fine

Replying to @zenkr
SurelyBlissSurelyBlissMay 1, 2026

@zenkr Ill try to update when i can im currently sick and cant test nothing i added tweening tho just now so it might work

Flup_style_01Flup_style_01Apr 30, 2026

Please update.

Triple_HTriple_HMay 2, 2026

Can u please fix the hitbox expander? It's really not working rn thanks man

xaxoalxaxoalMay 8, 2026

Bro pleasee create an auto parry for this game for pvp

xeriielxeriielJul 5, 2026

how am i supposed to copy the exact script that i can put on my executor app...

More Scripts for [📜 NEW SCROLLS] Elementalism