Run it
Copy the script and paste it into your executor.
Players = :()
ReplicatedStorage = :()
VirtualInputManager = :()
UserInputService = :()
HttpService = :()
Player = Players.LocalPlayer
PlayerGui = Player:()
Backpack = Player:()
RNG = Random.()
Env = ()
InstanceId =
(.())
..
.. (.(,))
Env.DigOPInstanceId = InstanceId
()
Env.DigOPInstanceId == InstanceId
ExecutorName =
(()
identifyexecutor
ExecutorName = (())
getexecutorname
ExecutorName = (())
)
Caps = {
Mouse1Click = (mouse1click) == ,
FirePrompt = () == ,
ReadFile = (readfile) == ,
WriteFile = (writefile) == ,
IsFile = (isfile) == ,
MakeFolder = (makefolder) == ,
IsFolder = (isfolder) ==
}
SAVE_FOLDER =
SAVE_FILE = SAVE_FOLDER ..
()
Caps.MakeFolder
(()
Caps.IsFolder
(SAVE_FOLDER)
(SAVE_FOLDER)
(SAVE_FOLDER)
)
()
()
Caps.ReadFile Caps.IsFile
{}
success,data = (()
(SAVE_FILE)
HttpService:(
(SAVE_FILE)
)
)
success (data) ==
data
{}
Saved = ()
(data)
Caps.WriteFile
()
(()
(
SAVE_FILE,
HttpService:(data)
)
)
(rootObject,name,timeout)
started = .()
found = rootObject:(name,)
found
()
.() - started < (timeout )
.()
found =
rootObject:(
name,
)
found
(name)
found =
(
ReplicatedStorage,
name,
)
found
(..name)
found
ShopFunctions =
(
)
ItemsFunctions =
(
)
ItemsEvents =
(
)
DataFunctions =
(
)
MiscFunctions =
(
)
PedestalFunctions =
(
)
SellFunctions =
(
)
ShovelEvents =
(
)
DetectorEvents =
(
)
BuyGearRemote =
ShopFunctions:()
EquipGearRemote =
ShopFunctions:()
BeginCleaningRemote =
ItemsFunctions:()
SaveCleanProgressRemote =
ItemsEvents:()
FinishCleaningRemote =
ItemsEvents:()
RequestDataRemote =
DataFunctions:()
RequestPlotRemote =
MiscFunctions:()
PlaceItemRemote =
PedestalFunctions:()
PickupItemRemote =
PedestalFunctions:()
SellHeldRemote =
SellFunctions:()
DigSceneStartRemote =
ShovelEvents:()
DigSceneEndRemote =
ShovelEvents:()
BuriedNodesRemote =
DetectorEvents:()
SetDetectorHeldRemote =
DetectorEvents:()
RequestId = -
(remote,timeout,...)
()
,
RequestId -=
id = RequestId
finished =
status
result
connection
connection =
remote.OnClientEvent:((
responseId,
responseStatus,
responseResult
)
()
responseId ~= id
status = responseStatus
result = responseResult
finished =
)
args = .(...)
fired = (()
remote:(
id,
.(args,,args.n)
)
)
fired
connection:()
,
started = .()
finished
()
.() - started < (timeout )
.()
connection:()
() finished
,
status ~=
,result
,result
Shovels = {
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,}
}
Detectors = {
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,},
{,,,,}
}
Settings = {
AutoFarm = Saved.AutoFarm == ,
ActiveIsland =
(Saved.ActiveIsland) ==
Saved.ActiveIsland
,
AutoDig =
Saved.AutoDig ~= ,
AutoFastClick =
Saved.AutoFastClick ~= ,
AutoClean =
Saved.AutoClean ~= ,
AutoPlace =
Saved.AutoPlace ~= ,
AutoSell =
Saved.AutoSell ~= ,
AutoBuyShovel =
Saved.AutoBuyShovel ~= ,
AutoBuyDetector =
Saved.AutoBuyDetector ~=
}
ActiveIsland =
IslandToggles = {}
IslandStates = {}
IslandProfiles = {}
ChangingToggle =
ManualFastClick =
TestDigActive =
Busy =
Searching =
Digging =
CandidateLock =
NextSearch =
NextGearCheck =
CachedData
DataTime =
PlotNumber
CachedPlot
CachedSeller
CachedPedestals
PedestalCacheTime =
BuriedNodes = {}
FailedNodes = {}
KnownValues = {}
FULL_CLEAN_MASK =
.(,)
Rayfield
()
({
AutoFarm = Settings.AutoFarm,
ActiveIsland =
ActiveIsland
ActiveIsland.Name
Settings.ActiveIsland,
AutoDig = Settings.AutoDig,
AutoFastClick =
Settings.AutoFastClick,
AutoClean =
Settings.AutoClean,
AutoPlace =
Settings.AutoPlace,
AutoSell =
Settings.AutoSell,
AutoBuyShovel =
Settings.AutoBuyShovel,
AutoBuyDetector =
Settings.AutoBuyDetector
})
()
Player.Character
()
char = ()
char
char:(
)
()
char = ()
char
char:(
)
(title,content)
Rayfield ()
(()
Rayfield:({
Title = title,
Content = content,
Duration =
})
)
()
hrp = ()
hrp
hrp.CFrame
(cf)
hrp = ()
hrp cf
hrp.CFrame = cf
hrp.AssemblyLinearVelocity = .zero
hrp.AssemblyAngularVelocity = .zero
(object)
object
object:()
object
object:()
object.PrimaryPart
object:(
,
)
object:(
,
)
object:(
,
)
(object)
hrp = ()
part = (object)
hrp part
hrp.CFrame =
part.CFrame
* .(
,
part.Size.Y / + ,
)
hrp.AssemblyLinearVelocity = .zero
hrp.AssemblyAngularVelocity = .zero
(object,distance)
hrp = ()
part = (object)
hrp part
hrp.CFrame =
part.CFrame
* .(
,
,
-(distance )
)
hrp.AssemblyLinearVelocity = .zero
hrp.AssemblyAngularVelocity = .zero
(force)
force
CachedData
.() - DataTime <
CachedData
success,data =
(
RequestDataRemote,
)
success
(data) ==
CachedData = data
DataTime = .()
CachedData
()
DataTime =
()
(uid,data)
data = data ()
data
(data.Inventory) ~=
_,item (
data.Inventory
)
(item) ==
item.uid == uid
item
(item)
(item) ==
(item.uid) ==
(
item.dirty ~=
item.condition ~=
item.pedestalSlot ~=
)
()
result = {}
data = ()
data
(data.Inventory) ~=
result
_,item (
data.Inventory
)
(item)
.(
result,
item
)
result
()
data = ()
data
(data.Inventory) ~=
_,item (
data.Inventory
)
(item)
item.dirty ==
item.pedestalSlot ==
item
(uid)
containers = {
(),
Backpack
}
_,container (
containers
)
container
_,object (
container:()
)
object:()
object:(
) == uid
object
(uid,timeout)
started = .()
tool =
(uid)
tool
tool
.()
()
.() - started
>= (timeout )
()
hum = ()
hum
(()
hum:()
)
.()
(uid)
tool =
(
uid,
)
tool
hum = ()
hum
(()
hum:()
)
.()
(()
hum:(tool)
)
started = .()
char = ()
held =
char
char:(
)
held
held:(
) == uid
.()
()
.() - started >
()
hum = ()
hum
_,tool (
Backpack:()
)
tool:()
name =
.(
tool.Name
)
.(
name,
,
,
)
(()
hum:(tool)
)
(value)
(()
SetDetectorHeldRemote:(
value
)
)
()
()
()
data =
()
data
data.EquippedShovel
(()
(
EquipGearRemote,
,
,
data.EquippedShovel
)
)
.()
()
()
.()
()
CachedPlot
CachedPlot.Parent
CachedPlot
plots =
:(
)
plots
_,plot (
plots:()
)
plot:(
) == Player.UserId
CachedPlot = plot
plot
PlotNumber
success,number =
(
RequestPlotRemote,
)
success
(number) ==
PlotNumber = number
PlotNumber
CachedPlot =
plots:(
.. (PlotNumber)
)
CachedPlot
()
plot = ()
plot
bench =
plot:(
,
)
bench
bench:(
,
)
bench
()
CachedPedestals
.() - PedestalCacheTime <
valid =
_,pedestal (
CachedPedestals
)
pedestal.Parent
valid =
valid
CachedPedestals
result = {}
plot = ()
plot
result
_,object (
plot:()
)
object:()
(
object:(
)
) ==
object:(
) ==
.(
result,
object
)
.(
result,
(a,b)
a:()
<
b:()
)
CachedPedestals = result
PedestalCacheTime = .()
result
(slot)
_,pedestal (
()
)
pedestal:(
) == slot
pedestal
(pedestal)
uid =
pedestal:(
)
(uid) ~=
uid ==
()
_,pedestal (
()
)
(
pedestal
)
pedestal
(text)
(text) ~=
clean =
text:(,)
:(,)
:(,)
:(,)
number,suffix =
clean:(
)
number = (number)
number
suffix =
.(
suffix
)
mult = {
[] = ,
k = ,
m = ,
b = ,
t = ,
qa = ,
qi = ,
sx = ,
sp = ,
oc = ,
no = ,
dc =
}
number
* (
mult[suffix]
)
(item)
item
KnownValues[item.uid]
KnownValues[item.uid]
_,key ({
,
,
,
,
,
,
,
})
(item[key]) ==
item[key]
tool =
(
item.uid
)
tool
_,key ({
,
,
,
,
,
,
,
})
value =
tool:(
key
)
(value) ==
value
(pedestal)
_,object (
pedestal:()
)
object:()
lower =
.(
object.Name
)
lower ==
.(
lower,
,
,
)
value =
(
object.Text
)
value
value
uid =
pedestal:(
)
(uid) ==
uid ~=
(
(
uid,
()
)
)
(pedestal)
uid =
pedestal:(
)
(uid) ~=
uid ==
item =
(
uid,
()
)
item
item.favorited ==
()
weakest
weakestValue = .huge
_,pedestal (
()
)
(pedestal)
(
pedestal
)
value =
(
pedestal
)
value
value < weakestValue
weakest = pedestal
weakestValue = value
weakest,weakestValue
(object,words)
object
fallback
_,descendant (
object:()
)
descendant:(
)
fallback =
fallback descendant
text =
.(
(
descendant.ActionText
)
..
.. (
descendant.ObjectText
)
..
.. descendant.Name
)
_,word (
words {}
)
.(
text,
.(word),
,
)
descendant
fallback
(prompt)
prompt
Caps.FirePrompt
success =
(()
(
prompt
)
)
success
.()
duration =
.(
prompt.HoldDuration,
)
success =
(()
prompt:()
.(
duration +
)
prompt:()
)
success
.()
key =
prompt.KeyboardKeyCode
key == .KeyCode.Unknown
key = .KeyCode.E
success =
(()
VirtualInputManager:(
,
key,
,
)
.(
duration +
)
VirtualInputManager:(
,
key,
,
)
)
.()
success
(
pedestal,
uid,
timeout
)
started = .()
data =
()
item =
(
uid,
data
)
pedestalUid =
pedestal:(
)
(
pedestalUid ==
pedestalUid ==
)
item
item.pedestalSlot ==
.()
()
.() - started
> (timeout )
(pedestal)
pedestal
slot =
pedestal:(
)
uid =
pedestal:(
)
(slot) ~=
(uid) ~=
uid ==
()
(
pedestal,
)
.()
prompt =
(
pedestal,
{
,
,
}
)
prompt
(prompt)
(
pedestal,
uid,
)
CachedPedestals =
uid
success =
(
PickupItemRemote,
,
slot
)
success
(
pedestal,
uid,
)
CachedPedestals =
uid
()
CachedSeller
CachedSeller.Parent
CachedSeller
islands =
:(
)
islands
home =
islands:(
)
home
CachedSeller =
home:(
,
)
CachedSeller
CachedSeller
CachedSeller =
islands:(
,
)
CachedSeller
(uid)
(
uid,
()
) ~=
(uid)
uid
,
item =
(
uid,
()
)
item
,
item.favorited ==
,
item.pedestalSlot ~=
,
()
(uid)
,
seller =
()
seller
,
(
seller,
)
.()
attempt = ,
(uid)
.()
success,result =
(
SellHeldRemote,
)
.()
(uid)
()
,
result ==
()
,
attempt <
(
seller,
)
.()
()
,
(
pedestal,
uid,
timeout
)
started = .()
pedestal:(
) == uid
()
CachedPedestals =
.()
()
.() - started
> (timeout )
(pedestal,uid)
pedestal uid
slot =
pedestal:(
)
(slot) ~=
()
(uid)
(
pedestal,
)
.()
success,result =
(
PlaceItemRemote,
,
slot,
uid
)
success
result ==
(
pedestal,
uid,
)
()
prompt =
(
pedestal,
{}
)
prompt
(uid)
(prompt)
(
pedestal,
uid,
)
()
()
(uid,force)
allowPlace =
force
Settings.AutoPlace
allowSell =
force
Settings.AutoSell
returnPosition =
()
item =
(
uid,
()
)
item
item.dirty ==
(
returnPosition
)
newValue =
(item)
open =
()
open
allowPlace
success =
(
open,
uid
)
(
returnPosition
)
()
success
(
,
)
success
allowSell
success,reason =
(uid)
(
returnPosition
)
()
success
(
,
.. (reason)
)
success
(
returnPosition
)
()
weakest,weakestValue =
()
weakest
newValue <=
newValue <= weakestValue
allowSell
success,reason =
(uid)
(
returnPosition
)
()
success
(
,
.. (reason)
)
success
(
returnPosition
)
()
allowPlace
allowSell
success,reason =
(uid)
(
returnPosition
)
()
success
(
,
.. (reason)
)
success
(
returnPosition
)
()
oldUid =
weakest:(
)
oldSlot =
weakest:(
)
picked =
(
weakest
)
picked ~= oldUid
(
returnPosition
)
()
(
,
)
.()
allowSell
soldOld,reason =
(oldUid)
soldOld
original =
(
oldSlot
)
original
(
original,
oldUid
)
(
returnPosition
)
()
(
,
.. (reason)
)
.()
target =
(
oldSlot
)
placed =
target
(
target,
uid
)
(
returnPosition
)
()
placed
allowSell
(
,
)
(
,
)
placed ==
(
item,
manageAfter,
forceManage
)
item item.uid
uid = item.uid
returnPosition =
()
bench =
()
bench
(bench)
.()
()
(uid)
(
returnPosition
)
()
success,result =
(
BeginCleaningRemote,
,
uid
)
success
(
returnPosition
)
()
(result) ==
KnownValues[uid] = result
(result) ==
_,key ({
,
,
,
,
,
})
(result[key]) ==
KnownValues[uid] =
result[key]
(()
SaveCleanProgressRemote:(
uid,
FULL_CLEAN_MASK
)
)
.()
(()
FinishCleaningRemote:(
uid
)
)
cleaned =
started = .()
updated =
(
uid,
()
)
updated
updated.dirty ==
cleaned =
.()
()
.() - started >
(
returnPosition
)
()
cleaned
manageAfter
(
uid,
forceManage
)
NextSearch =
.() +
cleaned
(list,id)
_,gear (list)
gear[] == id
gear
(
data,
islandId
)
islandId ==
data
(
data.UnlockedIslands
) ==
.(
data.UnlockedIslands,
islandId
) ~=
(data,key,id)
data
(data[key]) ==
.(
data[key],
id
) ~=
(
list,
data,
key
)
data
(data[key]) ~=
best
score = -.huge
_,id (
data[key]
)
gear =
(
list,
id
)
gear
gear[] > score
best = gear
score = gear[]
best
(
list,
data,
ownedKey,
equippedKey
)
data
money =
(data.Gold)
current =
(
list,
data[equippedKey]
)
bestScore =
current
current[]
best
_,gear (list)
gear[] >
gear[] <= money
gear[] > bestScore
(
data,
gear[]
)
(
data,
ownedKey,
gear[]
)
best = gear
bestScore = gear[]
best
ShopCache = {}
(
gear,
folderName
)
key =
folderName
..
.. gear[]
cached =
ShopCache[key]
cached
cached.Parent
cached
_,object (
:()
)
object:()
object.Name == gear[]
ancestor =
object.Parent
ancestor
ancestor ~=
ancestor.Name == folderName
ShopCache[key] = object
object
ancestor =
ancestor.Parent
(
category,
list,
ownedKey,
equippedKey,
shopFolder
)
data =
()
data
current =
(
list,
data[equippedKey]
)
ownedBest =
(
list,
data,
ownedKey
)
ownedBest
(
current
ownedBest[] > current[]
)
success =
(
EquipGearRemote,
,
category,
ownedBest[]
)
()
()
success ==
gear =
(
list,
data,
ownedKey,
equippedKey
)
gear
returnPosition =
()
shop =
(
gear,
shopFolder
)
shop
(shop)
.()
success,bought =
(
BuyGearRemote,
,
category,
gear[]
)
success
bought ==
.()
(
EquipGearRemote,
,
category,
gear[]
)
()
(
returnPosition
)
()
success
bought ==
()
(
,
Shovels,
,
,
)
()
(
,
Detectors,
,
,
)
()
gui =
PlayerGui:(
)
gui
bar =
gui:(
,
)
bar
bar:()
bar.Visible
()
Digging
()
hrp = ()
hum = ()
hrp
hrp:(
)
hrp
hum
hrp.Anchored
hum.AutoRotate ==
DigSceneStartRemote.OnClientEvent:(
(userId)
()
(userId) ==
userId ~= Player.UserId
Digging =
CandidateLock =
.() +
)
DigSceneEndRemote.OnClientEvent:(
(userId)
()
(userId) ==
userId ~= Player.UserId
.(
,
()
()
Digging =
CandidateLock =
NextSearch =
.() +
TestDigActive =
()
)
)
BuriedNodesRemote.OnClientEvent:(
(added,removed)
()
(added) ==
_,node (added)
(node) ==
(node.id) ==
(node.position)
==
BuriedNodes[node.id] =
node
(removed) ==
_,id (removed)
BuriedNodes[id] =
FailedNodes[id] =
)
()
Caps.Mouse1Click
success =
(()
()
)
success
camera =
.CurrentCamera
camera
size =
camera.ViewportSize
(()
VirtualInputManager:(
size.X / ,
size.Y / ,
,
,
,
)
VirtualInputManager:(
size.X / ,
size.Y / ,
,
,
,
)
)
()
char = ()
char
tool =
char:(
)
tool
(()
tool:()
)
()
IslandsFolder =
:(
)
(object)
object:()
object.Name ==
(island)
IslandProfiles[island] =
IslandStates[island] =
(island)
parts = {}
island
island.Parent
{
Island = island,
Parts = parts,
Mode =
}
_,object (
island:()
)
(object)
ancestor =
object.Parent
valid =
object.Parent
object.Parent.Name
==
valid
ancestor
ancestor ~= island
ancestor.Name ==
valid =
ancestor =
ancestor.Parent
valid
.(
parts,
object
)
.(
parts,
(a,b)
a:()
<
b:()
)
{
Island = island,
Parts = parts,
Mode =
#parts >=
}
(island)
cached =
IslandProfiles[island]
cached
valid =
_,part (
cached.Parts
)
part.Parent
valid =
valid
cached
profile =
(
island
)
IslandProfiles[island] =
profile
profile
(island)
IslandStates[island]
IslandStates[island] = {
Cursor = ,
FailedParts = {}
}
IslandStates[island]
(
part,
position,
padding
)
point =
part.CFrame:(
position
)
padding = padding
.(point.X)
<= part.Size.X / + padding
.(point.Z)
<= part.Size.Z / + padding
(
island,
profile
)
ignore = {}
char = ()
char
.(
ignore,
char
)
profile =
profile
(
island
)
_,part (
profile.Parts
)
.(
ignore,
part
)
ignore
(
island,
position,
profile
)
params =
RaycastParams.()
params.FilterType =
.RaycastFilterType.Exclude
params.IgnoreWater =
params.FilterDescendantsInstances =
(
island,
profile
)
:(
position
+ .(
,
,
),
.(
,
-,
),
params
)
(
island,
position,
profile
)
()
hrp = ()
hum = ()
hrp hum
result =
(
island,
position,
profile
)
result
offset =
hum.HipHeight
+ hrp.Size.Y /
+
hrp.CFrame =
.(
result.Position
+ .(
,
offset,
)
)
* hrp.CFrame.Rotation
hrp.AssemblyLinearVelocity =
.zero
hrp.AssemblyAngularVelocity =
.zero
(
part,
inset
)
inset = inset
halfX =
.(
,
part.Size.X
*
* ( - inset)
)
halfZ =
.(
,
part.Size.Z
*
* ( - inset)
)
x =
halfX >
RNG:(
-halfX,
halfX
)
z =
halfZ >
RNG:(
-halfZ,
halfZ
)
part.CFrame
* .(
x,
,
z
)
(
profile
)
hrp = ()
hrp
best
bestDistance = .huge
now = .()
id,node (
BuriedNodes
)
(node) ==
(node.position)
==
valid =
_,part (
profile.Parts
)
(
part,
node.position,
)
valid =
valid
failed =
FailedNodes[id]
failed
now >= failed
distance =
(
hrp.Position
- node.position
).Magnitude
distance
< bestDistance
bestDistance =
distance
best = node
best
(profile)
parts = profile.Parts
#parts ==
state =
(
profile.Island
)
now = .()
_ = ,#parts
state.Cursor +=
state.Cursor > #parts
state.Cursor =
part =
parts[state.Cursor]
failed =
state.FailedParts[part]
part.Parent
(
failed
now >= failed
)
part
parts[
RNG:(
,
#parts
)
]
(profile)
hrp = ()
hrp
_,part (
profile.Parts
)
(
part,
hrp.Position,
)
part
nearest
nearestDistance = .huge
_,part (
profile.Parts
)
distance =
(
hrp.Position
- part.Position
).Magnitude
distance < nearestDistance
nearestDistance = distance
nearest = part
nearest
(timeout)
CandidateLock =
.() +
()
()
started = .()
()
CandidateLock =
.() +
()
.()
()
.() - started
> (timeout )
grace = .()
()
CandidateLock =
.() +
.()
()
.() - grace >
CandidateLock =
(profile,node)
(
profile.Island,
node.position,
profile
)
FailedNodes[node.id] =
.() +
()
.()
()
()
FailedNodes[node.id] =
.() +
(profile,part)
part
part.Parent
point =
(
part,
)
(
profile.Island,
point,
profile
)
(
profile.Island
).FailedParts[part] =
.() +
()
.()
()
()
(
profile.Island
).FailedParts[part] =
.() +
(profile,part)
part
part.Parent
point =
(
part,
)
(
profile.Island,
point,
profile
)
()
.()
()
()
(
oneTest,
island
)
()
Searching
Busy
()
island =
island ActiveIsland
island
island.Parent
profile =
(
island
)
if #profile.Parts == 0 then
notify(
island.Name,
"No DigArea parts found"
)
return false
end
Searching = true
local found = false
while alive()
and (
oneTest
or (
Settings.AutoFarm
and Settings.AutoDig
and ActiveIsland == island
)
) do
if Busy or isDigging() then
found = isDigging()
break
end
local node =
getNearestNodeForProfile(
profile
)
if node then
if tryNode(
profile,
node
) then
found = true
break
end
elseif profile.Mode == "Hotspots" then
local hotspot =
nextHotspot(
profile
)
if hotspot
and tryHotspot(
profile,
hotspot
) then
found = true
break
end
else
local zone =
nearestZone(
profile
)
if zone
and tryZone(
profile,
zone
) then
found = true
break
end
end
task.wait(0.005)
end
Searching = false
return found
end
local function sellAll()
if Busy then
return
end
Busy = true
local returnPosition =
savePosition()
local snapshot =
inventoryEntries()
local sold = 0
local protected = 0
local failed = 0
for _,original in ipairs(snapshot) do
if not alive() then
break
end
local item =
findInventory(
original.uid,
refreshData()
)
if not item then
continue
end
if item.pedestalSlot ~= nil then
continue
end
if item.favorited == true then
protected += 1
continue
end
local success,reason =
sellUid(
item.uid
)
if success then
sold += 1
elseif reason == "favorited" then
protected += 1
else
failed += 1
end
task.wait(0.04)
end
restorePosition(
returnPosition
)
resetDigEquipment()
Busy = false
notify(
"Sell All",
"Sold "
.. tostring(sold)
.. " | Protected "
.. tostring(protected)
.. " | Failed "
.. tostring(failed)
)
end
local function testClean()
if Busy then
return
end
local choices = {}
for _,item in ipairs(
inventoryEntries()
) do
if item.pedestalSlot == nil
and item.dirty == true then
table.insert(
choices,
item
)
end
end
if #choices == 0 then
notify(
"Clean Test",
"No dirty item"
)
return
end
local item =
choices[
RNG:NextInteger(
1,
#choices
)
]
Busy = true
local success =
instantClean(
item,
false,
true
)
Busy = false
notify(
"Clean Test",
success
and "Worked"
or "Failed"
)
end
local function testSell()
if Busy then
return
end
local choices = {}
for _,item in ipairs(
inventoryEntries()
) do
if item.pedestalSlot == nil
and item.favorited ~= true then
table.insert(
choices,
item
)
end
end
if #choices == 0 then
notify(
"Sell Test",
"No sellable inventory item"
)
return
end
local item =
choices[
RNG:NextInteger(
1,
#choices
)
]
Busy = true
local success,reason =
sellUid(
item.uid
)
Busy = false
notify(
"Sell Test",
success
and "Worked"
or tostring(reason)
)
end
local function testManage()
if Busy then
return
end
local choices = {}
for _,item in ipairs(
inventoryEntries()
) do
if item.pedestalSlot == nil
and item.dirty == false
and item.favorited ~= true then
table.insert(
choices,
item
)
end
end
if #choices == 0 then
notify(
"Item Test",
"No clean unplaced item"
)
return
end
local item =
choices[
RNG:NextInteger(
1,
#choices
)
]
Busy = true
local success =
manageItem(
item.uid,
true
)
Busy = false
notify(
"Item Test",
success
and "Worked"
or "Failed"
)
end
Rayfield =
loadstring(
game:HttpGet(
"https://sirius.menu/rayfield"
)
)()
local Window =
Rayfield:CreateWindow({
Name = "Dig OP",
Icon = 0,
LoadingTitle = "Dig OP",
LoadingSubtitle = ExecutorName,
ShowText = "Dig OP",
Theme = "Default",
ToggleUIKeybind = "K",
DisableRayfieldPrompts = false,
DisableBuildWarnings = false,
ConfigurationSaving = {
Enabled = false
}
})
local Main =
Window:CreateTab(
"Main",
4483362458
)
Main:CreateParagraph({
Title = "Executor",
Content =
ExecutorName
.. "\nNative Click: "
.. tostring(Caps.Mouse1Click)
.. "\nNative Prompt: "
.. tostring(Caps.FirePrompt)
.. "\nFile Save: "
.. tostring(Caps.WriteFile)
})
Main:CreateParagraph({
Title = "AUTO FARM FEATURES",
Content =
"Turn individual systems on/off below. These only affect AUTO FARM."
})
Main:CreateToggle({
Name = "Auto Dig",
CurrentValue =
Settings.AutoDig,
Flag = "AutoDig",
Callback = function(value)
Settings.AutoDig = value
persist()
if value
and Settings.AutoFarm
and ActiveIsland
and not Busy
and not Searching
and not isDigging() then
task.spawn(
searchDig,
false,
ActiveIsland
)
end
end
})
Main:CreateToggle({
Name = "Auto Fast Click",
CurrentValue =
Settings.AutoFastClick,
Flag = "AutoFastClick",
Callback = function(value)
Settings.AutoFastClick =
value
persist()
end
})
Main:CreateToggle({
Name = "Auto Clean",
CurrentValue =
Settings.AutoClean,
Flag = "AutoClean",
Callback = function(value)
Settings.AutoClean =
value
persist()
end
})
Main:CreateToggle({
Name = "Auto Place / Replace",
CurrentValue =
Settings.AutoPlace,
Flag = "AutoPlace",
Callback = function(value)
Settings.AutoPlace =
value
persist()
end
})
Main:CreateToggle({
Name = "Auto Sell",
CurrentValue =
Settings.AutoSell,
Flag = "AutoSell",
Callback = function(value)
Settings.AutoSell =
value
persist()
end
})
Main:CreateToggle({
Name = "Auto Buy Best Shovel",
CurrentValue =
Settings.AutoBuyShovel,
Flag = "AutoBuyShovel",
Callback = function(value)
Settings.AutoBuyShovel =
value
persist()
end
})
Main:CreateToggle({
Name = "Auto Buy Best Detector",
CurrentValue =
Settings.AutoBuyDetector,
Flag = "AutoBuyDetector",
Callback = function(value)
Settings.AutoBuyDetector =
value
persist()
end
})
Main:CreateParagraph({
Title = "Hotkeys",
Content =
"F = Manual Fast Click | K = Hide UI"
})
Main:CreateButton({
Name = "TEST - Auto Clean",
Callback = function()
task.spawn(
testClean
)
end
})
Main:CreateButton({
Name = "TEST - Sell Random Inventory Item",
Callback = function()
task.spawn(
testSell
)
end
})
Main:CreateButton({
Name = "TEST - Place / Replace / Sell",
Callback = function()
task.spawn(
testManage
)
end
})
Main:CreateButton({
Name = "TEST - Buy Best Shovel",
Callback = function()
if Busy then
return
end
task.spawn(function()
Busy = true
local success =
autoBuyShovel()
Busy = false
notify(
"Shovel Test",
success
and "Upgrade handled"
or "No upgrade"
)
end)
end
})
Main:CreateButton({
Name = "TEST - Buy Best Detector",
Callback = function()
if Busy then
return
end
task.spawn(function()
Busy = true
local success =
autoBuyDetector()
Busy = false
notify(
"Detector Test",
success
and "Upgrade handled"
or "No upgrade"
)
end)
end
})
Main:CreateButton({
Name = "SELL ALL INVENTORY ITEMS",
Callback = function()
task.spawn(
sellAll
)
end
})
local Islands = {}
for _,island in ipairs(
IslandsFolder:GetChildren()
) do
local profile =
getIslandProfile(
island
)
if #profile.Parts > 0 then
table.insert(
Islands,
island
)
end
island.DescendantAdded:Connect(
function(object)
if not alive() then
return
end
if object.Name == "DigArea"
or object.Name == "DigAreas"
or object.Name == "DigAreaMesh" then
invalidateIsland(
island
)
end
end
)
island.DescendantRemoving:Connect(
function(object)
if not alive() then
return
end
if object.Name == "DigArea"
or object.Name == "DigAreas"
or object.Name == "DigAreaMesh" then
invalidateIsland(
island
)
end
end
)
end
table.sort(
Islands,
function(a,b)
return
a.Name:lower()
<
b.Name:lower()
end
)
local function disableOtherToggles(selected)
ChangingToggle = true
for island,toggle in pairs(
IslandToggles
) do
if island ~= selected then
pcall(function()
toggle:Set(false)
end)
end
end
ChangingToggle = false
end
local function startFarm(island)
if not alive()
or not island
or not island.Parent then
return
end
disableOtherToggles(
island
)
ActiveIsland = island
Settings.AutoFarm = true
Settings.ActiveIsland = island.Name
CandidateLock = 0
NextSearch = 0
NextGearCheck = 0
persist()
local profile =
getIslandProfile(
island
)
notify(
island.Name,
"Auto Farm ON | "
.. profile.Mode
.. " | "
.. tostring(#profile.Parts)
.. " DigAreas"
)
if Settings.AutoDig then
task.spawn(function()
resetDigEquipment()
searchDig(
false,
island
)
end)
end
end
local function stopFarm(island)
if ActiveIsland ~= island then
return
end
Settings.AutoFarm = false
Settings.ActiveIsland = nil
ActiveIsland = nil
CandidateLock = 0
persist()
setDetectorHeld(false)
resetDigEquipment()
notify(
island.Name,
"Auto Farm OFF"
)
end
for _,island in ipairs(Islands) do
local Island = island
local profile =
getIslandProfile(
Island
)
local tab =
Window:CreateTab(
Island.Name,
4483362458
)
tab:CreateParagraph({
Title = "Dig System",
Content =
"Detected: "
.. profile.Mode
.. "\nDigArea parts: "
.. tostring(#profile.Parts)
})
local toggle
toggle =
tab:CreateToggle({
Name =
"AUTO FARM - "
.. Island.Name,
CurrentValue = false,
Flag =
"Farm_"
.. Island.Name,
Callback = function(value)
if ChangingToggle
or not alive() then
return
end
if value then
startFarm(Island)
else
stopFarm(Island)
end
end
})
IslandToggles[Island] =
toggle
tab:CreateButton({
Name = "TEST - Dig System",
Callback = function()
if Busy
or Searching
or isDigging() then
return
end
TestDigActive = true
task.spawn(function()
local success =
searchDig(
true,
Island
)
if not success then
TestDigActive = false
end
notify(
Island.Name,
success
and "Dig started"
or "No dig found"
)
end)
end
})
tab:CreateButton({
Name = "TEST - Teleport Candidate",
Callback = function()
local current =
getIslandProfile(
Island
)
if #current.Parts == 0 then
notify(
Island.Name,
"No DigAreas"
)
return
end
local part
if current.Mode == "Hotspots" then
part =
nextHotspot(
current
)
else
part =
nearestZone(
current
)
end
if not part then
return
end
local success =
teleportGround(
Island,
randomPointInPart(
part,
current.Mode == "Hotspots"
and 0.3
or 0.1
),
current
)
notify(
Island.Name,
success
and "Teleported"
or "Raycast failed"
)
end
})
tab:CreateButton({
Name = "Refresh Dig Detection",
Callback = function()
invalidateIsland(
Island
)
local updated =
getIslandProfile(
Island
)
notify(
Island.Name,
updated.Mode
.. " | "
.. tostring(#updated.Parts)
.. " DigAreas"
)
end
})
end
UserInputService.InputBegan:Connect(
function(input,processed)
if not alive()
or processed then
return
end
if input.KeyCode
== Enum.KeyCode.F then
ManualFastClick =
not ManualFastClick
notify(
"Fast Click",
ManualFastClick
and "ON"
or "OFF"
)
end
end
)
task.spawn(function()
while alive() do
task.wait(0.012)
if isDigging()
and (
ManualFastClick
or TestDigActive
or (
Settings.AutoFarm
and Settings.AutoFastClick
)
) then
digClick()
end
end
end)
task.spawn(function()
while alive() do
task.wait(0.04)
if not Settings.AutoFarm
or not ActiveIsland then
continue
end
if not ActiveIsland.Parent then
Settings.AutoFarm = false
ActiveIsland = nil
persist()
continue
end
if Busy
or Searching
or isDigging() then
continue
end
if Settings.AutoClean then
local dirty =
getDirtyItem()
if dirty then
Busy = true
instantClean(
dirty,
Settings.AutoPlace
or Settings.AutoSell,
false
)
Busy = false
resetDigEquipment()
continue
end
end
if not Settings.AutoDig then
continue
end
if os.clock() < NextSearch then
continue
end
if CandidateLock > 0
and os.clock() < CandidateLock then
continue
end
local island = ActiveIsland
task.spawn(
searchDig,
false,
island
)
end
end)
task.spawn(function()
while alive() do
task.wait(0.7)
if not Settings.AutoFarm
or not ActiveIsland then
continue
end
if Busy
or Searching
or isDigging() then
continue
end
if os.clock()
< NextGearCheck then
continue
end
NextGearCheck =
os.clock() + 1.3
local didSomething = false
Busy = true
if Settings.AutoBuyShovel then
autoBuyShovel()
didSomething = true
task.wait(0.05)
end
if Settings.AutoBuyDetector then
autoBuyDetector()
didSomething = true
end
if didSomething then
resetDigEquipment()
end
Busy = false
end
end)
Player.CharacterAdded:Connect(
function()
if not alive() then
return
end
task.wait(0.6)
Digging = false
Searching = false
CandidateLock = 0
NextSearch =
os.clock() + 0.3
CachedPlot = nil
CachedPedestals = nil
resetDigEquipment()
if Settings.AutoFarm
and Settings.AutoDig
and ActiveIsland
and ActiveIsland.Parent then
task.spawn(
searchDig,
false,
ActiveIsland
)
end
end
)
local SavedIsland
if Settings.ActiveIsland then
SavedIsland =
IslandsFolder:FindFirstChild(
Settings.ActiveIsland
)
end
if Settings.AutoFarm
and SavedIsland
and getIslandProfile(
SavedIsland
).Mode ~= "None" then
task.delay(
1,
function()
if not alive() then
return
end
local toggle =
IslandToggles[
SavedIsland
]
if toggle then
pcall(function()
toggle:Set(true)
end)
else
startFarm(
SavedIsland
)
end
end
)
end
Rayfield:Notify({
Title = "Dig OP",
Content =
ExecutorName
.. " | Auto Farm feature toggles added | K = UI",
Duration = 5
})Loads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: sirius.menu.
Works with Madium, Xeno, Real, and other executors OPEN SOURCE i dont honestly care if you take this and use it as your own INCLUDES: Auto Farm, Auto sell, Auto dig, Auto place, Auto clean, Auto buy, and more i think

[馃巸] Dig & Clean 馃Ъ