local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()

local Window = Rayfield:CreateWindow({
   Name = "Rayfield Example Window",
   Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default).
   LoadingTitle = "Rayfield Interface Suite",
   LoadingSubtitle = "by Sirius",
   ShowText = "Rayfield", -- for mobile users to unhide rayfield, change if you'd like
   Theme = "Default", -- Check https://[Log in to view URL]

   ToggleUIKeybind = "K",

   DisableRayfieldPrompts = true,
   DisableBuildWarnings = true, -- Prevents Rayfield from warning when the script has a version mismatch with the interface

   ConfigurationSaving = {
      Enabled = true,
      FolderName = nil, -- Create a custom folder for your hub/game
      FileName = "Big Hub"
   },

   Discord = {
      Enabled = false, -- Prompt the user to join your Discord server if their executor supports it
      Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ ABCD would be ABCD
      RememberJoins = true -- Set this to false to make them join the discord every time they load it up
   },

   KeySystem = false, -- Set this to true to use our key system
   KeySettings = {
      Title = "Untitled",
      Subtitle = "Key System",
      Note = "No method of obtaining the key is provided", -- Use this to tell the user how to get a key
      FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
      SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
      GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
      Key = {"Hello"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
   }
})

local MainTab = Window:CreateTab("Main", "") -- Title, Icon
MainTab:CreateSection("User Info")

local RunTimeLabel = MainTab:CreateLabel("Run Time: 0s")
local CashEarnedLabel = MainTab:CreateLabel("Cash Earned: $0")
local CashPerHourLabel = MainTab:CreateLabel("Cash Per Hour: $0")

local startTime = nil
local startCash = 0
local farmingActive = false

local function formatTime(seconds)
    local hrs = math.floor(seconds / 3600)
    local mins = math.floor((seconds % 3600) / 60)
    local secs = math.floor(seconds % 60)
    return string.format("%02d:%02d:%02d", hrs, mins, secs)
end

local function updateEarnings()
    local player = game:GetService("Players").LocalPlayer
    local cashValue = player:WaitForChild("Stored"):WaitForChild("Mooney")

    while farmingActive do
        task.wait(1)
        if startTime and cashValue then
            local elapsed = os.time() - startTime
            local earned = cashValue.Value - startCash

            RunTimeLabel:Set("Run Time: " .. formatTime(elapsed))
            CashEarnedLabel:Set("Cash Earned: $" .. tostring(earned))

            local perHour = 0
            if elapsed > 0 then
                perHour = math.floor((earned / elapsed) * 3600)
            end
            CashPerHourLabel:Set("Cash Per Hour: $" .. tostring(perHour))
        end
    end
end

local function startTracking()
    local player = game:GetService("Players").LocalPlayer
    local cashValue = player:WaitForChild("Stored"):WaitForChild("Mooney")

    startTime = os.time()
    startCash = cashValue.Value
    farmingActive = true
    task.spawn(updateEarnings)
end

local function stopTracking()
    farmingActive = false
end


local function hookToggle(flag)
    Rayfield.Flags[flag]:OnChanged(function(value)
        if value then
            if not farmingActive then
                startTracking()
            end
        else
       
            if not (Rayfield.Flags.RobStudioToggle.CurrentValue
                or Rayfield.Flags.LootTrashToggle.CurrentValue
                or Rayfield.Flags.ConstructionFarmFlag.CurrentValue
                or Rayfield.Flags.RobHouseToggle.CurrentValue
                or Rayfield.Flags.AutoRobToggle.CurrentValue) then
                stopTracking()
            end
        end
    end)
end

hookToggle("RobStudioToggle")
hookToggle("LootTrashToggle")
hookToggle("ConstructionFarmFlag")
hookToggle("RobHouseToggle")
hookToggle("AutoRobToggle")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: