Загрузка данных
local vim = game:GetService("VirtualInputManager")
local running = false
-- Создание перемещаемого меню
local screenGui = Instance.new("ScreenGui")
local success, _ = pcall(function() screenGui.Parent = game:GetService("CoreGui") end)
if not success then screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") end
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 90)
frame.Position = UDim2.new(0.5, -100, 0.5, -45)
frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
frame.Active = true
frame.Draggable = true
frame.Parent = screenGui
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 30)
title.Text = "TSB AFK Farm (Перетащить)"
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.BackgroundTransparency = 1
title.Font = Enum.Font.SourceSansBold
title.TextSize = 16
title.Parent = frame
local toggleBtn = Instance.new("TextButton")
toggleBtn.Size = UDim2.new(0, 120, 0, 40)
toggleBtn.Position = UDim2.new(0.5, -60, 0.5, -5)
toggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
toggleBtn.Text = "OFF"
toggleBtn.TextColor3 = Color3.fromRGB(255, 100, 100)
toggleBtn.Font = Enum.Font.SourceSansBold
toggleBtn.TextSize = 20
toggleBtn.Parent = frame
-- Вспомогательные функции для нажатий
local function mouse(state) vim:SendMouseButtonEvent(0, 0, 0, state, game, 1) end
local function key(k, state) vim:SendKeyEvent(state, Enum.KeyCode[k], false, game) end
-- Логика кнопки и макроса
toggleBtn.MouseButton1Click:Connect(function()
running = not running
if running then
toggleBtn.Text = "ON"
toggleBtn.TextColor3 = Color3.fromRGB(100, 255, 100)
task.spawn(function()
while running do
mouse(true); task.wait(0.09)
mouse(false); task.wait(0.02)
key("E", true); task.wait(0.22)
key("E", false); task.wait(0.65)
key("E", true); task.wait(0.05)
key("E", false); task.wait(0.16)
mouse(true); mouse(false); task.wait(0.02)
key("E", true); task.wait(0.05)
key("E", false); task.wait(0.14)
key("S", false); task.wait(0.60)
key("E", true); task.wait(0.08)
key("E", false); task.wait(0.31)
key("Four", true); task.wait(0.13)
key("Four", false); task.wait(7.50)
key("E", true); task.wait(0.08)
key("E", false); task.wait(0.49)
mouse(true); task.wait(0.09)
mouse(false); task.wait(0.47)
mouse(true); task.wait(0.11)
mouse(false); task.wait(0.12)
key("S", true); task.wait(0.11)
key("S", false); task.wait(0.52)
mouse(true); task.wait(0.12); task.wait(0.12)
mouse(false); task.wait(0.37)
key("E", true); task.wait(0.11)
key("E", false); task.wait(1.03)
key("One", true); task.wait(0.11)
key("One", false); task.wait(1.77)
key("E", true); task.wait(0.09)
key("E", false); task.wait(5.04)
key("E", true); task.wait(0.12)
key("E", false); key("E", false); task.wait(0.23)
mouse(true); task.wait(0.11)
mouse(false); task.wait(0.72)
mouse(true); task.wait(0.09)
mouse(false); task.wait(0.12)
key("S", true); task.wait(0.13)
key("S", false); task.wait(0.42)
mouse(true); task.wait(0.11)
mouse(false); task.wait(0.13); task.wait(0.13)
key("S", true); task.wait(0.12)
key("S", false); task.wait(0.35)
key("E", true); task.wait(0.13)
key("E", false); task.wait(1.16)
key("Three", true); task.wait(0.11)
key("Three", false); task.wait(3.90)
key("E", true); task.wait(0.06)
key("E", false); task.wait(1.71)
mouse(true); mouse(false); task.wait(0.02)
key("E", true); task.wait(0.05)
key("E", false); task.wait(0.14)
key("S", false); task.wait(0.60)
key("E", true); task.wait(0.08)
key("E", false); task.wait(0.31)
key("Four", true); task.wait(0.13)
key("Four", false); task.wait(7.50)
end
end)
else
toggleBtn.Text = "OFF"
toggleBtn.TextColor3 = Color3.fromRGB(255, 100, 100)
end
end)