local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Window = Rayfield:CreateWindow({ Name = "MADE BY MAPSLOVER", LoadingTitle = "Loading Automation...", LoadingSubtitle = "by MapsLover", ConfigurationSaving = { Enabled = true, FolderName = "MapsLoverConfigs", FileName = "MainGui" } }) local MainTab = Window:CreateTab("Auto Farm", 4483362458) -- Icon ID local farming = false local rep = game:GetService("ReplicatedStorage") local l = 0 local function giveLevel() rep.GiveLevel:FireServer() end MainTab:CreateToggle({ Name = "Auto Level & Money", CurrentValue = false, Flag = "FarmToggle", Callback = function(Value) farming = Value if farming then task.spawn(function() while farming do -- Your original logic inside the loop for i = 1, 20 do if not farming then break end l = l + 1 task.delay(l, giveLevel) rep.GiveMoney:FireServer(i * math.random(2, 3)) end task.wait(1) -- Added a small delay to prevent frame drops end end) end end, }) Rayfield:LoadConfiguration()