M
Description
/sellores /sellores auto /sellores stop /autofarm /autofarm stop /orelist /orevalue /selljunk /keep [ore] /upgrade pickaxe /upgrade backpack /mines /mine [location] /stats
GAME[π] Sell Ores βοΈ
UPDATEDOct 10, 2026
ACCESSKeyless
PLATFORMDesktop & Mobile
Script source Luau
-- [[ BloxScripts Risk Notice ]]
-- This script has not been verified by BloxScripts.fun. Deal with caution.
--
-- Stay safe:
-- β’ Never log in on unofficial Roblox sites or lookalike domains.
-- β’ Real Roblox links use roblox.com (check the .com ending).
-- β’ Treat fake Roblox login / "claim reward" pages as phishing.
-- [[ End BloxScripts Risk Notice ]]
--// ORE COMMAND SYSTEM
--// Put this Script inside ServerScriptService
local Players = game:GetService("Players")
local PREFIX = "/"
local SETTINGS = {
AutoSellEnabled = true,
AutoFarmEnabled = true,
-- Seconds between mining attempts
MiningCooldown = 1,
-- Maximum distance from the player to automatically mine
MiningRadius = 60,
-- Inventory capacity
InventoryCapacity = 100,
}
local playerData = {}
local function getData(player)
if not playerData[player] then
playerData[player] = {
AutoFarm = false,
AutoSell = false,
Ores = {},
Coins = 0,
TotalMined = 0,
}
end
return playerData[player]
end
local function notify(player, message)
print("[ORE SYSTEM] " .. player.Name .. ": " .. message)
-- Optional notification through Roblox's default chat
local success, err = pcall(function()
local chat = game:GetService("TextChatService")
local channel = chat.TextChannels:FindFirstChild("RBXGeneral")
if channel then
channel:DisplaySystemMessage(message)
end
end)
if not success then
warn(err)
end
end
--------------------------------------------------
-- ORE FUNCTIONS
--------------------------------------------------
local function getOresFolder()
return workspace:FindFirstChild("Ores")
end
local function getOreValue(ore)
return ore:GetAttribute("Value") or 10
end
local function getOreName(ore)
return ore:GetAttribute("OreName") or ore.Name
end
local function getNearestOre(player)
local character = player.Character
if not character then
return nil
end
local root = character:FindFirstChild("HumanoidRootPart")
if not root then
return nil
end
local folder = getOresFolder()
if not folder then
return nil
end
local nearest = nil
local nearestDistance = SETTINGS.MiningRadius
for _, ore in ipairs(folder:GetChildren()) do
local part
if ore:IsA("BasePart") then
part = ore
elseif ore:IsA("Model") then
part = ore.PrimaryPart or ore:FindFirstChildWhichIsA("BasePart")
end
if part then
local distance = (root.Position - part.Position).Magnitude
if distance <= nearestDistance then
nearest = ore
nearestDistance = distance
end
end
end
return nearest
end
local function getInventoryAmount(data)
local total = 0
for _, amount in pairs(data.Ores) do
total += amount
end
return total
end
local function mineOre(player, ore)
if not ore or not ore.Parent then
return
end
local data = getData(player)
if getInventoryAmount(data) >= SETTINGS.InventoryCapacity then
if data.AutoSell then
-- Automatically sell when full
local total = 0
for oreName, amount in pairs(data.Ores) do
local value = 10
total += amount * value
data.Ores[oreName] = 0
end
data.Coins += total
notify(player, "π° Auto-sold inventory for $" .. total)
else
notify(player, "π Inventory full!")
end
return
end
local oreName = getOreName(ore)
local value = getOreValue(ore)
data.Ores[oreName] = (data.Ores[oreName] or 0) + 1
data.TotalMined += 1
notify(
player,
"βοΈ Mined " .. oreName .. " (+$" .. value .. " value)"
)
-- Remove ore from the mine
ore:Destroy()
end
--------------------------------------------------
-- SELL ORES
--------------------------------------------------
local function sellOres(player, specificOre)
local data = getData(player)
local totalCoins = 0
local soldAmount = 0
for oreName, amount in pairs(data.Ores) do
if amount > 0 then
if not specificOre or string.lower(oreName) == string.lower(specificOre) then
-- Uses 10 as default value.
-- Change this to your own ore-value system.
local value = 10
totalCoins += amount * value
soldAmount += amount
data.Ores[oreName] = 0
end
end
end
data.Coins += totalCoins
if soldAmount > 0 then
notify(
player,
"π° Sold " .. soldAmount .. " ores for $" .. totalCoins
)
else
notify(player, "β You don't have any ores to sell.")
end
end
--------------------------------------------------
-- ORE LIST
--------------------------------------------------
local function showOreList(player)
local data = getData(player)
notify(player, "βοΈ YOUR ORES:")
for oreName, amount in pairs(data.Ores) do
if amount > 0 then
notify(
player,
"β’ " .. oreName .. " x" .. amount
)
end
end
end
--------------------------------------------------
-- STATS
--------------------------------------------------
local function showStats(player)
local data = getData(player)
local inventory = getInventoryAmount(data)
notify(player, "========== MINING STATS ==========")
notify(player, "βοΈ Total Mined: " .. data.TotalMined)
notify(player, "π Inventory: " .. inventory .. "/" .. SETTINGS.InventoryCapacity)
notify(player, "π° Coins: $" .. data.Coins)
notify(player, "π€ Auto Farm: " .. tostring(data.AutoFarm))
notify(player, "π΅ Auto Sell: " .. tostring(data.AutoSell))
notify(player, "==================================")
end
--------------------------------------------------
-- AUTO FARM
--------------------------------------------------
local function startAutoFarm(player)
local data = getData(player)
if data.AutoFarm then
notify(player, "β οΈ Auto Farm is already ON.")
return
end
data.AutoFarm = true
notify(player, "π€ Auto Farm ENABLED.")
task.spawn(function()
while data.AutoFarm and player.Parent do
local ore = getNearestOre(player)
if ore then
mineOre(player, ore)
else
task.wait(1)
end
task.wait(SETTINGS.MiningCooldown)
end
end)
end
local function stopAutoFarm(player)
local data = getData(player)
data.AutoFarm = false
notify(player, "π Auto Farm DISABLED.")
end
--------------------------------------------------
-- AUTO SELL
--------------------------------------------------
local function startAutoSell(player)
local data = getData(player)
data.AutoSell = true
notify(player, "π΅ Auto Sell ENABLED.")
end
local function stopAutoSell(player)
local data = getData(player)
data.AutoSell = false
notify(player, "π Auto Sell DISABLED.")
end
--------------------------------------------------
-- COMMAND HANDLER
--------------------------------------------------
local function handleCommand(player, message)
if string.sub(message, 1, 1) ~= PREFIX then
return
end
local args = string.split(message, " ")
local command = string.lower(args[1])
table.remove(args, 1)
--------------------------------------------------
-- SELL ORES
--------------------------------------------------
if command == "/sellores" then
local specificOre = args[1]
if specificOre == "auto" then
startAutoSell(player)
return
end
if specificOre == "stop" then
stopAutoSell(player)
return
end
sellOres(player, specificOre)
--------------------------------------------------
-- AUTO FARM
--------------------------------------------------
elseif command == "/autofarm" then
if args[1] == "stop" then
stopAutoFarm(player)
else
startAutoFarm(player)
end
--------------------------------------------------
-- ORE LIST
--------------------------------------------------
elseif command == "/orelist" then
showOreList(player)
--------------------------------------------------
-- STATS
--------------------------------------------------
elseif command == "/stats" then
showStats(player)
--------------------------------------------------
-- INVENTORY
--------------------------------------------------
elseif command == "/inventory" then
local data = getData(player)
local amount = getInventoryAmount(data)
notify(
player,
"π Inventory: " ..
amount ..
"/" ..
SETTINGS.InventoryCapacity
)
--------------------------------------------------
-- MINES
--------------------------------------------------
elseif command == "/mines" then
notify(player, "βοΈ Available mining areas:")
notify(player, "β’ Main Mine")
notify(player, "β’ Crystal Cave")
notify(player, "β’ Lava Mine")
notify(player, "β’ Diamond Cavern")
--------------------------------------------------
-- HELP
--------------------------------------------------
elseif command == "/orehelp" then
notify(player, "========== ORE COMMANDS ==========")
notify(player, "/sellores - Sell all ores")
notify(player, "/sellores [ore] - Sell specific ore")
notify(player, "/sellores auto - Enable auto sell")
notify(player, "/sellores stop - Disable auto sell")
notify(player, "/autofarm - Enable auto farming")
notify(player, "/autofarm stop - Disable auto farming")
notify(player, "/orelist - Show your ores")
notify(player, "/inventory - Show inventory")
notify(player, "/stats - Show mining stats")
notify(player, "/mines - Show mining areas")
notify(player, "==================================")
end
end
--------------------------------------------------
-- PLAYER CONNECTIONS
--------------------------------------------------
Players.PlayerAdded:Connect(function(player)
getData(player)
player.Chatted:Connect(function(message)
handleCommand(player, message)
end)
end)
Players.PlayerRemoving:Connect(function(player)
playerData[player] = nil
end)
print("βοΈ ORE COMMAND SYSTEM LOADED")
Review the source before using it. Executions count successful copies, capped at 10 per user and network per script in 24 hours.
Community discussion
0Start the conversation.


Your community, in one place