Run it
Copy the script and paste it into your executor.
.(()
(()
madComm = :():(, )
ev = madComm madComm:(, )
ev ev:()
)
)
.(()
(()
gui = :():(, )
gui
(desc)
desc.Name ==
desc:()
_, desc (gui:())
(desc)
gui.DescendantAdded:(checkDesc)
)
)
.PlaceId ==
Rayfield = (:())()
Window = Rayfield:({
Name = ,
Icon = ,
LoadingTitle = ,
LoadingSubtitle = ,
Theme = ,
DisableRayfieldPrompts = ,
DisableBuildWarnings = ,
ConfigurationSaving = {
Enabled = ,
FolderName = ,
FileName =
},
})
initialLoad =
(position, locationName)
player = .Players.LocalPlayer
character = player.Character player.CharacterAdded:()
hrp = character:()
hrp
hrp.CFrame = .(position)
Rayfield:({
Title = ,
Content = .. locationName,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
staticLocations = {
[] = .(-, , -),
[] = .(-, , ),
[] = .(, , -),
[] = .(-, , , -, -, , , , , -, , -)
}
staticLocationNames = {, , , }
Farm = Window:(, )
Teleport = Window:(, )
MobileSupport = Window:(, )
MobileSection = MobileSupport:()
MobileSupport:({
Title = ,
Content =
})
MobileDivider = MobileSupport:()
PlayerSection = Teleport:()
()
playerNames = {}
_, player (.Players:())
player ~= .Players.LocalPlayer
.(playerNames, player.Name)
PlayerDropdown
PlayerDropdown:(playerNames)
PlayerDropdown:({selectedPlayer })
playerNames
selectedPlayer =
PlayerDropdown
PlayerDropdown = Teleport:({
Name = ,
Options = (),
CurrentOption = {},
MultipleOptions = ,
Flag = ,
Callback = (Option)
selectedPlayer = Option[]
,
})
Teleport:({
Name = ,
Callback = ()
selectedPlayer selectedPlayer ==
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
targetPlayer = .Players:(selectedPlayer)
targetPlayer targetPlayer.Character
targetHRP = targetPlayer.Character:()
localPlayer = .Players.LocalPlayer
character = localPlayer.Character localPlayer.CharacterAdded:()
hrp = character:()
targetHRP hrp
offset = targetHRP.CFrame.LookVector * - + .(, , )
hrp.CFrame = targetHRP.CFrame + offset
Rayfield:({
Title = ,
Content = .. targetPlayer.Name,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
,
})
.(()
.()
()
)
.Players.PlayerAdded:((player)
.()
()
)
.Players.PlayerRemoving:((player)
.()
()
)
PlayerDivider = Teleport:()
StaticTeleportSection = Teleport:()
selectedStaticLocation = staticLocationNames[]
Teleport:({
Name = ,
Options = staticLocationNames,
CurrentOption = {selectedStaticLocation},
MultipleOptions = ,
Flag = ,
Callback = (Option)
selectedStaticLocation = Option[]
,
})
Teleport:({
Name = ,
Callback = ()
pos = staticLocations[selectedStaticLocation]
pos
(pos, selectedStaticLocation)
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
,
})
LocationDivider = Teleport:()
PlotSection = Teleport:()
plotOptions = {}
i = ,
.(plotOptions, .. i)
selectedPlot = plotOptions[]
Teleport:({
Name = ,
Options = plotOptions,
CurrentOption = {selectedPlot},
MultipleOptions = ,
Flag = ,
Callback = (Option)
selectedPlot = Option[]
,
})
Teleport:({
Name = ,
Callback = ()
plotNumber = (.(selectedPlot, ))
plotNumber
plotsFolder = :():()
plot = plotsFolder:((plotNumber))
plot
centrePart = plot:()
centrePart
player = .Players.LocalPlayer
character = player.Character player.CharacterAdded:()
hrp = character:()
hrp
hrp.CFrame = .(centrePart.Position + .(, , ))
Rayfield:({
Title = ,
Content = .. selectedPlot,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = .. selectedPlot,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = selectedPlot .. ,
Duration = ,
Image = ,
})
,
})
TeleportSection = Teleport:()
TycoonButton = Teleport:({
Name = ,
Flag = ,
Callback = ()
()
player = .Players.LocalPlayer
plotsFolder = :()
teleportPartName =
(buildPlot)
#buildPlot:() >
()
_, plotModel (plotsFolder:())
plotModel:()
buildPlot = plotModel:()
buildPlot (buildPlot)
plotModel
myPlot = ()
myPlot
centrePart = myPlot:(teleportPartName)
centrePart centrePart:()
character = player.Character player.CharacterAdded:()
hrp = character:()
hrp
hrp.CFrame = .(centrePart.Position + .(, , ))
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
initialLoad
()
,
})
Misc = Window:(, )
Section = Misc:()
SellOreSection = MobileSupport:()
SellOreButton = MobileSupport:({
Name = ,
Callback = ()
player = .Players.LocalPlayer
character = player.Character player.CharacterAdded:()
hrp = character:()
savedCFrame = hrp.CFrame
cargoPrompt =
positionCargoVolume =
factoryGridItemsServer = :():()
factoryGridItemsClient = :():()
factoryGridItemsServer
_, folder (factoryGridItemsServer:())
folder:()
cargoVolume = folder:() folder:()
cargoVolume
cargoVolume = folder:(, )
cargoVolume
foundPrompt = cargoVolume:() cargoVolume:() cargoVolume:(, )
foundPrompt
_, desc (cargoVolume:())
desc:()
foundPrompt = desc
foundPrompt
cargoPrompt = foundPrompt
factoryGridItemsClient
clientFolder = factoryGridItemsClient:(folder.Name)
clientFolder
clientSubFolder = clientFolder:(folder.Name)
clientSubFolder
positionCargoVolume = clientSubFolder:() clientSubFolder.Unloader1:() clientSubFolder:(, )
cargoPrompt positionCargoVolume
cargoPrompt positionCargoVolume
()
count =
playerWorkspace = :():(player.Name)
playerWorkspace
orePackCargo = playerWorkspace:()
orePackCargo
_, child (orePackCargo:())
child:() child:() child:()
count = count +
count
oreCount = ()
hrp.CFrame = positionCargoVolume.CFrame * .(, , )
.()
cargoPrompt.HoldDuration =
(cargoPrompt)
.()
hrp.CFrame = savedCFrame
Rayfield:({
Title = ,
Content = .. oreCount .. ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
,
})
MobileWaypointSection = MobileSupport:()
MobileWaypointLabel = MobileSupport:()
SetWaypointButton = MobileSupport:({
Name = ,
Callback = ()
player = .Players.LocalPlayer
character = player.Character player.CharacterAdded:()
hrp = character:()
hrp
.savedWaypoint = hrp.CFrame
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
,
})
TeleportToWaypointButton = MobileSupport:({
Name = ,
Callback = ()
player = .Players.LocalPlayer
character = player.Character player.CharacterAdded:()
hrp = character:()
hrp .savedWaypoint
hrp.CFrame = .savedWaypoint
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = .savedWaypoint ,
Duration = ,
Image = ,
})
,
})
Credits = Window:(, )
CreatorSection = Credits:()
Credits:({
Title = ,
Content =
})
DividerCredits = Credits:()
VersionSection = Credits:()
Credits:({
Title = ,
Content =
})
Button = Misc:({
Name = ,
Callback = ()
player = .Players.LocalPlayer
plotsFolder = :()
PlayerSlot =
(buildPlot)
#buildPlot:() >
_, plotModel (plotsFolder:())
plotModel:()
buildPlot = plotModel:()
buildPlot (buildPlot)
PlayerSlot = plotModel.Name
PlayerSlot
factoryGridItemsClient = :():()
factoryGridItemsClient
vehicleSpawner =
vehicleSpawnerPos =
proximityPrompt =
_, folder (factoryGridItemsClient:())
folder:()
subFolder = folder:(folder.Name)
subFolder
spawner = subFolder:()
spawner
screenPart = spawner:()
screenPart
prompt = screenPart:()
prompt
vehicleSpawner = spawner
vehicleSpawnerPos = screenPart.Position
proximityPrompt = prompt
vehicleSpawner proximityPrompt
.Workspace[player.Name].HumanoidRootPart.CFrame = .(vehicleSpawnerPos)
.()
proximityPrompt.HoldDuration =
(proximityPrompt)
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
,
})
ShopDropdown = Misc:({
Name = ,
Options = {, , , , },
CurrentOption = {},
MultipleOptions = ,
Flag = ,
Callback = (Option)
(selectedOption)
selectedOption ==
player = .Players.LocalPlayer
character = player.Character player.CharacterAdded:()
hrp = character:()
hrp
Rayfield:({
Title = ,
Content = ,
Duration = ,
Image = ,
})
originalPosition = hrp.CFrame
shopObject, shopName
selectedOption ==
shopObject = :():()
shopName =
selectedOption ==
shopObject = :():()
shopName =
selectedOption ==
shopObject = :():()
shopName =
selectedOption ==
shopObject = :():()
shopName =
shopObject
Rayfield:({
Title = ,
Content = shopName .. ,
Duration = ,
Image = ,
})
activationPoint = shopObject:()
shopObject:()
shopObject:()
shopObject:()
shopObject:()
activationPoint activationPoint:()
Rayfield:({
Title = ,
Content = shopName .. ,
Duration = ,
Image = ,
})
proximityPrompt = activationPoint:()
proximityPrompt
_, child (activationPoint:())
child:()
proximityPrompt = child
proximityPrompt
Rayfield:({
Title = ,
Content = shopName .. ,
Duration = ,
Image = ,
})
shopPos = activationPoint.Position
hrp.CFrame = .(shopPos + .(, , ))
.()
proximityPrompt.HoldDuration =
(proximityPrompt)
Rayfield:({
Title = shopName,
Content = .. shopName .. ,
Duration = ,
Image = ,
})
.()
i = , , -
.()
i % == i <=
Rayfield:({
Title = ,
Content = .. i .. ,
Duration = ,
Image = ,
})
player player.Parent player.Character
currentCharacter = player.Character
currentHrp = currentCharacter:()
currentHrp
currentHrp.CFrame = originalPosition
Rayfield:({
Title = shopName,
Content = ,
Duration = ,
Image = ,
})
selectedOption = Option[]
(selectedOption)
selectedOption ~=
.(()
.()
ShopDropdown:({})
)
,
})
Slider = Misc:({
Name = ,
Range = {, },
Increment = ,
Suffix = ,
CurrentValue = ,
Flag = ,
Callback = (Value)
player = .Players.LocalPlayer
character = player.Character player.Character player.CharacterAdded:()
humanoid = character:()
humanoid
humanoid.WalkSpeed = Value
,
})
Toggle = Misc:({
Name = ,
CurrentValue = ,
Flag = ,
Callback = (Value)
Value
infiniteJumpConnection = :().JumpRequest:(()
player = .Players.LocalPlayer
character = player.Character player.CharacterAdded:()
humanoid = character:()
humanoid
humanoid:(.HumanoidStateType.Jumping)
)
infiniteJumpConnection
infiniteJumpConnection:()
infiniteJumpConnection =
,
})
.espFolder
.espFolder = .()
.espFolder.Name =
.espFolder.Parent = .CoreGui
.espParts = {}
.espEnabled =
.maxDistance =
.oreColors = {
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
[] = .(, , ),
}
.createESP = (part)
mineId = part:() part:() part:()
spawnedBlocks = :():()
placedOre = :():()
spawnedBlocks part.Parent == spawnedBlocks
i, child (spawnedBlocks:())
child == part i ==
mineId =
mineId mineId == mineId == mineId == mineId ==
mineId = part.Name
mineId == mineId == mineId ==
mineId =
color = .oreColors[mineId] .(, , )
box = .()
box.Adornee = part
box.Parent = .espFolder
box.AlwaysOnTop =
box.ZIndex =
box.Size = part.Size
box.Transparency =
box.Color3 = color
box.Visible =
glowBox = .()
glowBox.Adornee = part
glowBox.Parent = .espFolder
glowBox.AlwaysOnTop =
glowBox.ZIndex =
glowBox.Size = part.Size *
glowBox.Transparency =
glowBox.Color3 = color:(.(, , ), )
glowBox.Visible =
billboard = .()
billboard.Adornee = part
billboard.Parent = .espFolder
billboard.Size = .(, , , )
billboard.StudsOffset = .(, part.Size.Y/ + , )
billboard.AlwaysOnTop =
billboard.Enabled =
textLabel = .()
textLabel.Parent = billboard
textLabel.Size = .(, , , )
textLabel.BackgroundTransparency =
textLabel.Text = mineId
textLabel.TextColor3 = .(, , )
textLabel.TextStrokeTransparency =
textLabel.TextStrokeColor3 = .(, , )
textLabel.Font = .Font.GothamBold
textLabel.TextScaled =
.espParts[part] = {box = box, glowBox = glowBox, billboard = billboard}
.setupExistingBlocks = ()
placedOre = :():()
placedOre
_, block (placedOre:())
(block:() block:() block:()) .espParts[block]
.(block)
spawnedBlocks = :():()
spawnedBlocks
_, block (spawnedBlocks:())
(block:() block:() block:()) .espParts[block]
.(block)
placedOre = :():()
placedOre
.placedOreAddedConnection = placedOre.ChildAdded:((child)
child:() child:() child:()
.()
.(child)
)
.placedOreRemovedConnection = placedOre.ChildRemoved:((child)
.espParts[child]
.espParts[child].box:()
.espParts[child].glowBox .espParts[child].glowBox:()
.espParts[child].billboard:()
.espParts[child] =
)
spawnedBlocks = :():()
spawnedBlocks
.childAddedConnection = spawnedBlocks.ChildAdded:((child)
child:() child:() child:()
.()
.(child)
)
.childRemovedConnection = spawnedBlocks.ChildRemoved:((child)
.espParts[child]
.espParts[child].box:()
.espParts[child].glowBox .espParts[child].glowBox:()
.espParts[child].billboard:()
.espParts[child] =
)
.pulseTime =
.updateConnection = :().RenderStepped:((deltaTime)
player = .Players.LocalPlayer
character = player.Character
character
humanoidRootPart = character:()
humanoidRootPart
.pulseTime = .pulseTime + deltaTime
pulseValue = (.(.pulseTime * ) + ) /
part, esp (.espParts)
part part.Parent
.espEnabled
distance = (humanoidRootPart.Position - part.Position).Magnitude
isVisible = distance <= .maxDistance
esp.box.Visible = isVisible
esp.glowBox esp.glowBox.Visible = isVisible
esp.billboard.Enabled = isVisible
isVisible esp.glowBox
baseSize = part.Size *
pulseSize = baseSize * ( + pulseValue * )
esp.glowBox.Size = pulseSize
esp.glowBox.Transparency = + (pulseValue * )
isVisible esp.billboard.Enabled
textLabel = esp.billboard:()
textLabel
mineId = part:() part:() part:()
mineId mineId == mineId == mineId ==
mineId = part.Name
mineId == mineId == mineId ==
mineId =
textLabel.Text = mineId .. .. .(, distance) ..
esp.box.Visible =
esp.glowBox esp.glowBox.Visible =
esp.billboard.Enabled =
)
.characterAddedConnection = .Players.LocalPlayer.CharacterAdded:((newCharacter)
part, esp (.espParts)
esp.box esp.box:()
esp.glowBox esp.glowBox:()
esp.billboard esp.billboard:()
.espParts = {}
.espEnabled
.()
)
.()
AutoMineSection = Farm:()
OreLabel = Farm:()
autoMineEnabled =
autoMineThread
autoMineRange =
autoMineDelay =
OreIgnoreList = {}
AutoMineToggle = Farm:({
Name = ,
CurrentValue = ,
Flag = ,
Callback = (state)
autoMineEnabled = state
autoMineEnabled
autoMineThread = .(()
ReplicatedStorage = :()
Players = :()
LocalPlayer = Players.LocalPlayer
()
_,v (LocalPlayer.Character:())
v:() .(v.Name):()
v
_,v (LocalPlayer:() LocalPlayer.InnoBackpack:() {})
v:() .(v.Name):()
v
autoMineEnabled
LocalPlayer
.()
Character = LocalPlayer.Character
Character
.()
Tool = ()
Tool
.()
isPickaxe = .(Tool.Name):() ~=
Tool.Parent == LocalPlayer.InnoBackpack isPickaxe
equipRemote = Tool:()
equipRemote
equipRemote:()
.()
(Tool.Parent == LocalPlayer.Character) (Tool.Parent == LocalPlayer.InnoBackpack isPickaxe)
root = Character Character:()
root
closestBlock, closestDist = , .huge
:()
.()
_,v (.PlacedOre:())
v:() v:()
.(OreIgnoreList, v:())
dist = (root.Position - v.Position).Magnitude
dist <= autoMineRange dist < closestDist
closestBlock = v
closestDist = dist
closestBlock
gridPos = closestBlock:() closestBlock:()
gridPos
worldPos = closestBlock.Position
gridPos = Vector3int16.(
.(worldPos.X / ),
.(worldPos.Y / ),
.(worldPos.Z / )
)
args = {, gridPos}
madCommId = Tool:()
madCommId ReplicatedStorage.MadCommEvents ReplicatedStorage.MadCommEvents[madCommId]
activateRemote = ReplicatedStorage.MadCommEvents[madCommId].Activate
activateRemote
activateRemote:(.(args))
.(autoMineDelay)
.()
)
autoMineEnabled =
,
})
RangeSlider = Farm:({
Name = ,
Range = {, },
Increment = ,
Suffix = ,
CurrentValue = ,
Flag = ,
Callback = (Value)
autoMineRange = Value
,
})
DelaySlider = Farm:({
Name = ,
Range = {, },
Increment = ,
Suffix = ,
CurrentValue = ,
Flag = ,
Callback = (Value)
autoMineDelay = Value
,
})
OreIgnoreDropdown = Farm:({
Name = ,
Options = {, , , , , , , , , , , , , , , , , , , , , , , , , , , , },
CurrentOption = {},
MultipleOptions = ,
Flag = ,
Callback = (Options)
OreIgnoreList = Options
,
})
AutoSellSection = Farm:()
autoSellEnabled =
autoSellThread
autoSellThreshold =
autoSellOreCount =
AutoSellToggle = Farm:({
Name = ,
CurrentValue = ,
Flag = ,
Callback = (state)
autoSellEnabled = state
autoSellEnabled
autoSellThread
autoSellThread = .(()
autoSellEnabled
player = .Players.LocalPlayer
character = player.Character player.CharacterAdded:()
shouldSell =
currentOres =
playerWorkspace = :(player.Name)
playerWorkspace
orePackCargo = playerWorkspace:()
orePackCargo
_, child (orePackCargo:())
child:() child:()
currentOres = currentOres +
currentOres >= autoSellOreCount
shouldSell =
shouldSell
hrp = character:()
hrp
oldCFrame = hrp.CFrame
cargoPrompt =
positionCargoVolume =
factoryGridItemsServer = :():()
factoryGridItemsClient = :():()
factoryGridItemsServer
_, folder (factoryGridItemsServer:())
folder:()
cargoVolume = folder:() folder:()
cargoVolume
cargoVolume = folder:(, )
cargoVolume
foundPrompt = cargoVolume:() cargoVolume:() cargoVolume:(, )
foundPrompt
_, desc (cargoVolume:())
desc:()
foundPrompt = desc
foundPrompt
cargoPrompt = foundPrompt
factoryGridItemsClient
clientFolder = factoryGridItemsClient:(folder.Name)
clientFolder
clientSubFolder = clientFolder:(folder.Name)
clientSubFolder
positionCargoVolume = clientSubFolder:() clientSubFolder.Unloader1:() clientSubFolder:(, )
cargoPrompt positionCargoVolume
cargoPrompt positionCargoVolume
and fire the ProximityPrompt
hrp.CFrame = positionCargoVolume.CFrame * CFrame.new(0, 3, 0)
task.wait(0.3)
cargoPrompt.HoldDuration = 0
fireproximityprompt(cargoPrompt)
task.wait(0.3)
hrp.CFrame = oldCFrame
Rayfield:Notify({
Title = "Auto Sell",
Content = "Sold " .. currentOres .. " ores successfully!",
Duration = 3,
Image = "box",
})
task.wait(2)
else
Rayfield:Notify({
Title = "Auto Sell Error",
Content = "No working CargoVolume with ProximityPrompt found! Make sure someone has built an unloader.",
Duration = 3,
Image = "circle-x",
})
end
else
Rayfield:Notify({
Title = "Auto Sell Error",
Content = "FactoryGridItemsServer not found! Make sure you have built an unloader.",
Duration = 3,
Image = "circle-x",
})
end
end
end
task.wait(0.5)
end
end)
end
else
autoSellEnabled = false
autoSellThread = nil
end
end,
})
local AutoSellOreCountInput = Farm:CreateInput({
Name = "Ore Capacity (Max: 64)",
CurrentValue = "8",
PlaceholderText = "Enter ore capacity (1-64)",
RemoveTextAfterFocusLost = false,
Flag = "AutoSellOreCount",
Callback = function(Text)
local value = tonumber(Text)
if value then
if value > 64 then
value = 64
Rayfield:Notify({
Title = "Ore Capacity Limited",
Content = "Maximum capacity is 64 ores. Set to 64.",
Duration = 3,
Image = "alert-circle",
})
elseif value < 1 then
value = 1
end
autoSellOreCount = value
else
Rayfield:Notify({
Title = "Invalid Input",
Content = "Please enter a valid number between 1 and 64.",
Duration = 3,
Image = "circle-x",
})
end
end,
})
Farm:CreateLabel("💡 Sells when ore capacity reaches max (depends on backpack capacity)")
-- Move Store Ore Key input here, right after Auto Sell
local Input = Farm:CreateInput({
Name = "Sell Ore Key (Optional)",
CurrentValue = "",
PlaceholderText = "Press key to sell ore (e.g. 'F')",
RemoveTextAfterFocusLost = false,
Flag = "SellOreKey",
Callback = function(Text)
task.spawn(function()
task.wait(0.1)
end)
if Text and Text ~= "" then
if _G.sellOreKeyConnection then
_G.sellOreKeyConnection:Disconnect()
_G.sellOreKeyConnection = nil
end
_G.sellOreKeyConnection = game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
local keyName = input.KeyCode.Name
if keyName:lower() == Text:lower() then
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")
local savedCFrame = hrp.CFrame
-- Use a more robust search for the CargoVolume/Unloader
local cargoPrompt = nil
local positionCargoVolume = nil
local factoryGridItemsServer = game:GetService("Workspace"):FindFirstChild("FactoryGridItemsServer")
local factoryGridItemsClient = game:GetService("Workspace"):FindFirstChild("FactoryGridItemsClient")
if factoryGridItemsServer then
for _, folder in pairs(factoryGridItemsServer:GetChildren()) do
if folder:IsA("Folder") then
local cargoVolume = folder:FindFirstChild("CargoVolume") or folder:FindFirstChild("Unloader")
if not cargoVolume then
cargoVolume = folder:FindFirstChild("CargoVolume", true)
end
if cargoVolume then
local foundPrompt = cargoVolume:FindFirstChild("CargoPrompt") or cargoVolume:FindFirstChildOfClass("ProximityPrompt") or cargoVolume:FindFirstChild("CargoPrompt", true)
if not foundPrompt then
for _, desc in pairs(cargoVolume:GetDescendants()) do
if desc:IsA("ProximityPrompt") then
foundPrompt = desc
break
end
end
end
if foundPrompt then
cargoPrompt = foundPrompt
if factoryGridItemsClient then
local clientFolder = factoryGridItemsClient:FindFirstChild(folder.Name)
if clientFolder then
local clientSubFolder = clientFolder:FindFirstChild(folder.Name)
if clientSubFolder then
positionCargoVolume = clientSubFolder:FindFirstChild("Unloader1") and clientSubFolder.Unloader1:FindFirstChild("CargoVolume") or clientSubFolder:FindFirstChild("CargoVolume", true)
end
end
end
if cargoPrompt and positionCargoVolume then break end
end
end
end
end
if cargoPrompt and positionCargoVolume then
-- Count ores before selling
local function countOres()
local count = 0
local playerWorkspace = game:GetService("Workspace"):FindFirstChild(player.Name)
if playerWorkspace then
local orePackCargo = playerWorkspace:FindFirstChild("OrePackCargo")
if orePackCargo then
for _, child in pairs(orePackCargo:GetChildren()) do
if not child:IsA("Weld") and not child:IsA("Motor6D") and not child:IsA("Attachment") then
count = count + 1
end
end
end
end
return count
end
local oreCount = countOres()
-- Position near the CargoVolume and fire the ProximityPrompt
hrp.CFrame = positionCargoVolume.CFrame * CFrame.new(0, 3, 0)
task.wait(0.3)
cargoPrompt.HoldDuration = 0
fireproximityprompt(cargoPrompt)
task.wait(0.3)
hrp.CFrame = savedCFrame
Rayfield:Notify({
Title = "Ore Sold",
Content = "Successfully sold " .. oreCount .. " ores.",
Duration = 3,
Image = "check",
})
else
Rayfield:Notify({
Title = "Error",
Content = "No working CargoVolume with ProximityPrompt found! Make sure someone has built an unloader.",
Duration = 3,
Image = "circle-x",
})
end
else
Rayfield:Notify({
Title = "Error",
Content = "FactoryGridItemsServer not found! Make sure you have built an unloader.",
Duration = 3,
Image = "circle-x",
})
end
end
end)
Rayfield:Notify({
Title = "Key Bound",
Content = "Sell Ore key bound to: " .. Text,
Duration = 3,
Image = "box",
})
end
end,
})
-- Ore ESP section
local OreSection = Farm:CreateSection("â›°ï¸ Ore Esp Selection")
local OreLabel = Farm:CreateLabel("Reveals every type of ore found throughout mining.")
local blocksEspButton = Farm:CreateToggle({
Name = "Ore ESP",
CurrentValue = false,
Flag = nil,
Callback = function(Value)
_G.espEnabled = Value
end,
})
local distanceSlider = Farm:CreateSlider({
Name = "Ore ESP Distance",
Range = {0, 500},
Increment = 5,
Suffix = "studs",
CurrentValue = 100,
Flag = nil,
Callback = function(Value)
_G.maxDistance = Value
end,
})
local WaypointSection = Farm:CreateSection("📠Waypoint System")
local WaypointLabel = Farm:CreateLabel("Set a waypoint and teleport back to it with keybinds")
_G.savedWaypoint = nil
local SetWaypointInput = Farm:CreateInput({
Name = "Set Waypoint Key",
CurrentValue = "",
PlaceholderText = "Press key to save position (e.g. 'Z')",
RemoveTextAfterFocusLost = false,
Flag = "SetWaypointKey",
Callback = function(Text)
task.spawn(function()
task.wait(0.1)
end)
if Text and Text ~= "" then
if _G.setWaypointKeyConnection then
_G.setWaypointKeyConnection:Disconnect()
_G.setWaypointKeyConnection = nil
end
_G.setWaypointKeyConnection = game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
local keyName = input.KeyCode.Name
local keyMatches = (keyName:lower() == Text:lower())
local specialKeys = {
["space"] = Enum.KeyCode.Space,
["shift"] = Enum.KeyCode.LeftShift,
["ctrl"] = Enum.KeyCode.LeftControl,
["alt"] = Enum.KeyCode.LeftAlt,
["tab"] = Enum.KeyCode.Tab,
["capslock"] = Enum.KeyCode.CapsLock,
["backspace"] = Enum.KeyCode.Backspace,
["enter"] = Enum.KeyCode.Return,
["delete"] = Enum.KeyCode.Delete,
["insert"] = Enum.KeyCode.Insert,
["home"] = Enum.KeyCode.Home,
["end"] = Enum.KeyCode.End,
["pageup"] = Enum.KeyCode.PageUp,
["pagedown"] = Enum.KeyCode.PageDown,
["up"] = Enum.KeyCode.Up,
["down"] = Enum.KeyCode.Down,
["left"] = Enum.KeyCode.Left,
["right"] = Enum.KeyCode.Right,
}
if specialKeys[string.lower(Text)] and input.KeyCode == specialKeys[string.lower(Text)] then
keyMatches = true
end
if keyMatches then
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:FindFirstChild("HumanoidRootPart")
if hrp then
_G.savedWaypoint = hrp.CFrame
Rayfield:Notify({
Title = "Waypoint Set",
Content = "Successfully saved current position as waypoint.",
Duration = 3,
Image = "navigation",
})
else
Rayfield:Notify({
Title = "Error",
Content = "Could not save waypoint. Try again.",
Duration = 3,
Image = "circle-x",
})
end
end
end)
Rayfield:Notify({
Title = "Key Bound",
Content = "Set Waypoint key bound to: " .. Text,
Duration = 3,
Image = "navigation",
})
end
end,
})
local TeleportWaypointInput = Farm:CreateInput({
Name = "Teleport to Waypoint Key",
CurrentValue = "",
PlaceholderText = "Press key to teleport to waypoint (e.g. 'X')",
RemoveTextAfterFocusLost = false,
Flag = "TeleportWaypointKey",
Callback = function(Text)
task.spawn(function()
task.wait(0.1)
end)
if Text and Text ~= "" then
if _G.teleportToWaypointKeyConnection then
_G.teleportToWaypointKeyConnection:Disconnect()
_G.teleportToWaypointKeyConnection = nil
end
_G.teleportToWaypointKeyConnection = game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
local keyName = input.KeyCode.Name
local keyMatches = (keyName:lower() == Text:lower())
local specialKeys = {
["space"] = Enum.KeyCode.Space,
["shift"] = Enum.KeyCode.LeftShift,
["ctrl"] = Enum.KeyCode.LeftControl,
["alt"] = Enum.KeyCode.LeftAlt,
["tab"] = Enum.KeyCode.Tab,
["capslock"] = Enum.KeyCode.CapsLock,
["backspace"] = Enum.KeyCode.Backspace,
["enter"] = Enum.KeyCode.Return,
["delete"] = Enum.KeyCode.Delete,
["insert"] = Enum.KeyCode.Insert,
["home"] = Enum.KeyCode.Home,
["end"] = Enum.KeyCode.End,
["pageup"] = Enum.KeyCode.PageUp,
["pagedown"] = Enum.KeyCode.PageDown,
["up"] = Enum.KeyCode.Up,
["down"] = Enum.KeyCode.Down,
["left"] = Enum.KeyCode.Left,
["right"] = Enum.KeyCode.Right,
}
if specialKeys[string.lower(Text)] and input.KeyCode == specialKeys[string.lower(Text)] then
keyMatches = true
end
if keyMatches then
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:FindFirstChild("HumanoidRootPart")
if hrp and _G.savedWaypoint then
hrp.CFrame = _G.savedWaypoint
Rayfield:Notify({
Title = "Teleported to Waypoint",
Content = "Successfully teleported to saved waypoint.",
Duration = 3,
Image = "map",
})
else
Rayfield:Notify({
Title = "Error",
Content = "No waypoint set or character not found. Set a waypoint first.",
Duration = 3,
Image = "circle-x",
})
end
end
end)
Rayfield:Notify({
Title = "Key Bound",
Content = "Teleport to Waypoint key bound to: " .. Text,
Duration = 3,
Image = "navigation",
})
end
end,
})
-- Notification timer to thank users and promote Discord server
task.spawn(function()
task.wait(10)
Rayfield:Notify({
Title = "Thanks for Using UtilityHub!",
Content = "Join our Discord server for updates and support!",
Duration = 5,
Image = "shield-alert",
})
while true do
task.wait(500)
local messages = {
{
Title = "Thanks for Using UtilityHub!",
Content = "Join our Discord server for updates and support!",
},
{
Title = "Enjoying UtilityHub?",
Content = "Support us by joining our Discord community!",
},
{
Title = "UtilityHub Reminder",
Content = "Don't forget to join our Discord for exclusive updates!",
}
}
local randomMessage = messages[math.random(1, #messages)]
Rayfield:Notify({
Title = randomMessage.Title,
Content = randomMessage.Content,
Duration = 5,
Image = 4483362458,
})
end
end)
end
Loads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: sirius.menu.