
Key Required

-- TODO: Still not finished
if _G.SCRIPT_LOADED then return end
pcall(function() _G.SCRIPT_LOADED = true end)
if not game:IsLoaded() then
game.Loaded:Wait()
end
-- ========== Configs ==========
getgenv().Config = {
AutoCollectCrypto = false;
AutoSellAllCrypto = false;
AutoCollectDelay = 10;
AutoSellAllDelay = 10;
}
-- ========== Services ==========
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")
-- ========== Variables ==========
local LocalPlayer = Players.LocalPlayer
local Bases = workspace:WaitForChild("Bases")
local Remotes = ReplicatedStorage:WaitForChild("Remotes")
local Library = ReplicatedStorage:WaitForChild("Library")
local Events = Remotes:WaitForChild("Events")
local ClaimCryptoEvent = Events:WaitForChild("ClaimCrypto")
local SellCryptoEvent = Events:WaitForChild("SellCrypto")
local MachineModulePath = Library:WaitForChild("MachineModule")
local MachineModule = require(MachineModulePath)
local MachinesList = {}
-- ========== Functions ==========
local function GetLocalBase()
for _, BASE in pairs(Bases:GetChildren()) do
if BASE:GetAttribute("Owner") == LocalPlayer.Name then
return BASE
end
end
return nil
end
local function GetMachineList()
MachinesList = {}
for UUID, TABLE in pairs(MachineModule.Machines) do
MachinesList[UUID] = TABLE["DisplayName"]
end
end
local function CollectAllCrypto()
local LocalBase = GetLocalBase()
if not LocalBase then return end
local Machines = LocalBase:FindFirstChild("Machines")
if not Machines then return end
local Server = Machines:FindFirstChild("Server")
if not Server then return end
for _, MACHINE in pairs(Server:GetChildren()) do
ClaimCryptoEvent:FireServer(MACHINE.Name)
end
end
local function SellAllCrypto()
SellCryptoEvent:FireServer("All")
end
-- ========== Loops ==========
task.spawn(function()
while true do
if getgenv().Config.AutoCollectCrypto then
pcall(function()
CollectAllCrypto()
end)
end
task.wait(getgenv().Config.AutoCollectDelay)
end
end)
task.spawn(function()
while true do
if getgenv().Config.AutoSellAllCrypto then
pcall(function()
SellAllCrypto()
end)
end
task.wait(getgenv().Config.AutoSellAllDelay)
end
end)
-- ========== Init Function ==========
GetMachineList()
-- ========== User Interface ==========
local WindUI = loadstring(game:HttpGet("https://raw.githubusercontent.com/Footagesus/WindUI/main/dist/main.lua"))()
local Window = WindUI:CreateWindow({
Title = "Grow a Crypto Farm",
Icon = "bitcoin",
Author = "bigskidder",
Folder = "bigskidder",
Size = UDim2.fromOffset(580, 490),
Theme = "Dark",
User = {
Enabled = true,
Anonymous = true,
Callback = function()
return
end
},
SideBarWidth = 200,
})
local Tabs = {
Main = Window:Section({ Title = "Main", Opened = true }),
}
local TabHandles = {
Automations = Tabs.Main:Tab({ Title = "Automations", Icon = "bot", Desc = "" }),
Webhook = Tabs.Main:Tab({ Title = "Webhook", Icon = "webhook", Desc = "" }),
}
TabHandles.Automations:Toggle({
Title = "Auto Collect Crypto",
Desc = "",
Value = false,
Callback = function(State)
getgenv().Config.AutoCollectCrypto = State
end
})
TabHandles.Automations:Toggle({
Title = "Auto Sell All Crypto",
Desc = "",
Value = false,
Callback = function(State)
getgenv().Config.AutoSellAllCrypto = State
end
})
TabHandles.Automations:Divider()
TabHandles.Automations:Slider({
Title = "Auto Collect Delay",
Desc = "",
Value = { Min = 1, Max = 30, Default = getgenv().Config.AutoCollectDelay },
Callback = function(Value)
getgenv().Config.AutoCollectDelay = Value
end
})
TabHandles.Automations:Slider({
Title = "Auto Sell All Delay",
Desc = "",
Value = { Min = 1, Max = 30, Default = getgenv().Config.AutoSellAllDelay },
Callback = function(Value)
getgenv().Config.AutoSellAllDelay = Value
end
})No comments yet for this script.