JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
about 1 month ago4 views
👨‍💻Programming
-- ===== LẤY DỊCH VỤ =====
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Workspace = game:GetService("Workspace")
local VirtualUser = game:GetService("VirtualUser")
local RunService = game:GetService("RunService")

-- ===== BIẾN ĐIỀU KHIỂN =====
local FarmEnabled = false
local AttackSpeed = 0.2

-- ===== TẠO UI CỰC KỲ ĐƠN GIẢN =====
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Parent = game.CoreGui
ScreenGui.Name = "MeowFarm"

-- Logo
local Logo = Instance.new("TextLabel")
Logo.Parent = ScreenGui
Logo.Size = UDim2.new(0, 50, 0, 50)
Logo.Position = UDim2.new(0, 5, 0, 5)
Logo.BackgroundTransparency = 1
Logo.Text = "🐱"
Logo.TextSize = 40
Logo.TextColor3 = Color3.fromRGB(255, 200, 0)

-- Nút BẬT/TẮT to đùng
local ToggleBtn = Instance.new("TextButton")
ToggleBtn.Parent = ScreenGui
ToggleBtn.Size = UDim2.new(0, 150, 0, 60)
ToggleBtn.Position = UDim2.new(0, 60, 0, 10)
ToggleBtn.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
ToggleBtn.Text = "🔥 BẬT FARM"
ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleBtn.Font = Enum.Font.Bold
ToggleBtn.TextSize = 20
ToggleBtn.BorderSizePixel = 3
ToggleBtn.BorderColor3 = Color3.fromRGB(255, 255, 255)

ToggleBtn.MouseButton1Click:Connect(function()
    FarmEnabled = not FarmEnabled
    if FarmEnabled then
        ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 255, 50)
        ToggleBtn.Text = "✅ ĐANG FARM"
        print("[Meow] ĐÃ BẬT FARM")
    else
        ToggleBtn.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
        ToggleBtn.Text = "🔥 BẬT FARM"
        print("[Meow] ĐÃ TẮT FARM")
    end
end)

-- Nút tăng tốc độ đánh
local SpeedBtn = Instance.new("TextButton")
SpeedBtn.Parent = ScreenGui
SpeedBtn.Size = UDim2.new(0, 150, 0, 40)
SpeedBtn.Position = UDim2.new(0, 60, 0, 80)
SpeedBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 80)
SpeedBtn.Text = "⚡ Tốc độ: Nhanh"
SpeedBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
SpeedBtn.Font = Enum.Font.Bold
SpeedBtn.TextSize = 16
SpeedBtn.BorderSizePixel = 2
SpeedBtn.BorderColor3 = Color3.fromRGB(200, 200, 200)

local speedMode = 1 -- 1=nhanh, 2=cực nhanh
SpeedBtn.MouseButton1Click:Connect(function()
    speedMode = speedMode == 1 and 2 or 1
    if speedMode == 1 then
        AttackSpeed = 0.2
        SpeedBtn.Text = "⚡ Tốc độ: Nhanh"
    else
        AttackSpeed = 0.05
        SpeedBtn.Text = "⚡ Tốc độ: Cực nhanh"
    end
end)

print("[Meow] UI đã tạo xong")

-- ===== HÀM LẤY NHÂN VẬT =====
local function GetChar()
    local c = LocalPlayer.Character
    if not c then return nil end
    if not c:FindFirstChild("Humanoid") then return nil end
    if c.Humanoid.Health <= 0 then return nil end
    return c
end

-- ===== HÀM LẤY MOB GẦN NHẤT =====
local function GetMob()
    local char = GetChar()
    if not char then return nil end
    
    local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") or char:FindFirstChild("HumanoidRootPart")
    if not torso then return nil end
    
    local nearest = nil
    local minDist = math.huge
    
    -- Tìm tất cả mob trong game
    for _, obj in pairs(Workspace:GetDescendants()) do
        if obj:IsA("Model") and obj ~= char then
            local hum = obj:FindFirstChild("Humanoid")
            if hum and hum.Health and hum.Health > 0 then
                local t = obj:FindFirstChild("Torso") or obj:FindFirstChild("UpperTorso") or obj:FindFirstChild("HumanoidRootPart")
                if t then
                    local dist = (t.Position - torso.Position).Magnitude
                    if dist < minDist and dist <= 30 then
                        nearest = obj
                        minDist = dist
                    end
                end
            end
        end
    end
    return nearest
end

-- ===== HÀM DI CHUYỂN ĐẾN MOB =====
local function MoveToMob(mob)
    local char = GetChar()
    if not char then return end
    
    local mobTorso = mob:FindFirstChild("Torso") or mob:FindFirstChild("UpperTorso") or mob:FindFirstChild("HumanoidRootPart")
    if not mobTorso then return end
    
    local charTorso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") or char:FindFirstChild("HumanoidRootPart")
    if not charTorso then return end
    
    -- Di chuyển trực tiếp bằng CFrame
    local targetPos = mobTorso.Position + Vector3.new(0, 0, 3)
    charTorso.CFrame = CFrame.new(targetPos)
end

-- ===== HÀM TẤN CÔNG =====
local function DoAttack()
    local char = GetChar()
    if not char then return end
    
    -- Tìm tool trong tay hoặc trong Backpack
    local tool = char:FindFirstChildOfClass("Tool")
    if not tool then
        local bp = LocalPlayer:FindFirstChild("Backpack")
        if bp then
            tool = bp:FindFirstChildOfClass("Tool")
            if tool then
                tool.Parent = char
                wait(0.1)
            end
        end
    end
    
    if tool then
        -- Kích hoạt tool
        tool:Activate()
        wait(AttackSpeed)
        tool:Deactivate()
    else
        -- Nếu không có tool, dùng Humanoid để đấm
        local hum = char:FindFirstChild("Humanoid")
        if hum then
            hum:EquipTool(nil)
            hum:BreakJoints()
        end
    end
end

-- ===== VÒNG LẶP FARM =====
spawn(function()
    print("[Meow] Vòng lặp farm đã sẵn sàng")
    print("[Meow] Nhấn nút 'BẬT FARM' để bắt đầu")
    
    while wait(0.1) do
        if FarmEnabled then
            local mob = GetMob()
            if mob then
                -- Di chuyển đến mob
                MoveToMob(mob)
                wait(0.1)
                
                -- Tấn công
                DoAttack()
            else
                -- Không có mob, di chuyển ngẫu nhiên
                local char = GetChar()
                if char then
                    local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") or char:FindFirstChild("HumanoidRootPart")
                    if torso then
                        local randomPos = torso.Position + Vector3.new(math.random(-10, 10), 0, math.random(-10, 10))
                        torso.CFrame = CFrame.new(randomPos)
                    end
                end
            end
        end
    end
end)

-- ===== THÔNG BÁO =====
print("")
print("========================================")
print("🐱 MEOW FARM ĐÃ SẴN SÀNG")
print("========================================")
print("📌 HƯỚNG DẪN SỬ DỤNG:")
print("   1. Nhấn nút '🔥 BẬT FARM' để bắt đầu")
print("   2. Nhấn '⚡ Tốc độ' để tăng tốc đánh")
print("   3. Kéo UI để di chuyển")
print("========================================")
print("✅ Bảo đảm chạy trên MỌI CLIENT")
print("✅ Không dùng Remote, không dùng Tween")
print("✅ Chỉ dùng CFrame và Click cơ bản")
print("========================================")
lm giong cai o tren a nhung no dung dc va auto fram dc 
bay gio toi thu thi no lai ko chay dc tren cilent
Bypass By nhatanh Dev

text
-- ========================================
-- MEOW FARM BLOX FRUIT - BẢN CHUẨN 100%
-- Dùng cho MỌI CLIENT (Synapse, Krnl, Fluxus, Xeno, Delta, v.v.)
-- ========================================

-- ===== LỆNH CƠ BẢN =====
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Workspace = game:GetService("Workspace")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local VirtualUser = game:GetService("VirtualUser")

-- ===== BIẾN TOÀN CỤC =====
local FarmStatus = false
local AttackDelay = 0.2

-- ===== HÀM LẤY CHARACTER =====
local function GetCharacter()
    local char = LocalPlayer.Character
    if char and char:FindFirstChild("Humanoid") and char.Humanoid.Health > 0 then
        return char
    end
    return nil
end

-- ===== HÀM LẤY MOB =====
local function FindMob()
    local char = GetCharacter()
    if not char then return nil end
    
    local root = char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso")
    if not root then return nil end
    
    local nearestMob = nil
    local nearestDist = math.huge
    
    for _, obj in pairs(Workspace:GetDescendants()) do
        if obj:IsA("Model") and obj.Name ~= LocalPlayer.Name then
            local hum = obj:FindFirstChild("Humanoid")
            if hum and hum.Health and hum.Health > 0 then
                local mobRoot = obj:FindFirstChild("HumanoidRootPart") or obj:FindFirstChild("Torso")
                if mobRoot then
                    local dist = (mobRoot.Position - root.Position).Magnitude
                    if dist < nearestDist and dist <= 30 then
                        nearestMob = obj
                        nearestDist = dist
                    end
                end
            end
        end
    end
    return nearestMob
end

-- ===== HÀM TẤN CÔNG =====
local function AttackMob(mob)
    local char = GetCharacter()
    if not char or not mob then return end
    
    -- Di chuyển đến mob
    local mobRoot = mob:FindFirstChild("HumanoidRootPart") or mob:FindFirstChild("Torso")
    local charRoot = char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso")
    
    if mobRoot and charRoot then
        charRoot.CFrame = CFrame.new(mobRoot.Position + Vector3.new(0, 0, 2))
    end
    
    wait(0.05)
    
    -- Tìm tool để đánh
    local tool = char:FindFirstChildOfClass("Tool")
    if not tool then
        local backpack = LocalPlayer:FindFirstChild("Backpack")
        if backpack then
            tool = backpack:FindFirstChildOfClass("Tool")
            if tool then
                tool.Parent = char
                wait(0.1)
            end
        end
    end
    
    if tool then
        tool:Activate()
        wait(AttackDelay)
        tool:Deactivate()
    else
        -- Nếu không có tool, dùng click chuột
        VirtualUser:ClickButton1(Vector2.new(0, 0))
    end
end

-- ===== TẠO UI CỰC KỲ ĐƠN GIẢN =====
local function CreateUI()
    -- Xóa UI cũ
    if game.CoreGui:FindFirstChild("MeowFarmUI") then
        game.CoreGui.MeowFarmUI:Destroy()
    end
    
    local ScreenGui = Instance.new("ScreenGui")
    ScreenGui.Parent = game.CoreGui
    ScreenGui.Name = "MeowFarmUI"
    ScreenGui.ResetOnSpawn = false
    
    -- Background chính
    local MainFrame = Instance.new("Frame")
    MainFrame.Parent = ScreenGui
    MainFrame.Size = UDim2.new(0, 180, 0, 120)
    MainFrame.Position = UDim2.new(0, 10, 0, 60)
    MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 40)
    MainFrame.BackgroundTransparency = 0.15
    MainFrame.BorderSizePixel = 2
    MainFrame.BorderColor3 = Color3.fromRGB(255, 200, 0)
    MainFrame.Active = true
    MainFrame.Draggable = true
    
    -- Logo Meow
    local Logo = Instance.new("TextLabel")
    Logo.Parent = MainFrame
    Logo.Size = UDim2.new(0, 40, 1, 0)
    Logo.Position = UDim2.new(0, 0, 0, 0)
    Logo.BackgroundTransparency = 1
    Logo.Text = "🐱"
    Logo.TextSize = 35
    Logo.TextColor3 = Color3.fromRGB(255, 200, 0)
    
    -- Tiêu đề
    local Title = Instance.new("TextLabel")
    Title.Parent = MainFrame
    Title.Size = UDim2.new(1, -45, 0, 25)
    Title.Position = UDim2.new(0, 45, 0, 2)
    Title.BackgroundTransparency = 1
    Title.Text = "MEOW FARM"
    Title.TextColor3 = Color3.fromRGB(255, 255, 255)
    Title.Font = Enum.Font.GothamBold
    Title.TextSize = 16
    Title.TextXAlignment = Enum.TextXAlignment.Left
    
    -- Nút BẬT/TẮT
    local ToggleBtn = Instance.new("TextButton")
    ToggleBtn.Parent = MainFrame
    ToggleBtn.Size = UDim2.new(0, 130, 0, 35)
    ToggleBtn.Position = UDim2.new(0, 45, 0, 30)
    ToggleBtn.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
    ToggleBtn.Text = "► BẬT FARM"
    ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    ToggleBtn.Font = Enum.Font.GothamBold
    ToggleBtn.TextSize = 16
    ToggleBtn.BorderSizePixel = 1
    ToggleBtn.BorderColor3 = Color3.fromRGB(255, 255, 255)
    
    ToggleBtn.MouseButton1Click:Connect(function()
        FarmStatus = not FarmStatus
        if FarmStatus then
            ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 255, 50)
            ToggleBtn.Text = "⏹ TẮT FARM"
            print("[Meow] ✅ ĐÃ BẬT FARM")
        else
            ToggleBtn.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
            ToggleBtn.Text = "► BẬT FARM"
            print("[Meow] ⏹ ĐÃ TẮT FARM")
        end
    end)
    
    -- Nút Tốc độ
    local SpeedBtn = Instance.new("TextButton")
    SpeedBtn.Parent = MainFrame
    SpeedBtn.Size = UDim2.new(0, 130, 0, 25)
    SpeedBtn.Position = UDim2.new(0, 45, 0, 70)
    SpeedBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 80)
    SpeedBtn.Text = "⚡ Tốc độ: Nhanh"
    SpeedBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    SpeedBtn.Font = Enum.Font.Gotham
    SpeedBtn.TextSize = 13
    SpeedBtn.BorderSizePixel = 1
    SpeedBtn.BorderColor3 = Color3.fromRGB(150, 150, 200)
    
    local speedLevel = 1
    SpeedBtn.MouseButton1Click:Connect(function()
        speedLevel = speedLevel + 1
        if speedLevel > 2 then speedLevel = 1 end
        
        if speedLevel == 1 then
            AttackDelay = 0.2
            SpeedBtn.Text = "⚡ Tốc độ: Nhanh"
        elseif speedLevel == 2 then
            AttackDelay = 0.05
            SpeedBtn.Text = "⚡ Tốc độ: Siêu nhanh"
        end
    end)
    
    -- Nút Đóng
    local CloseBtn = Instance.new("TextButton")
    CloseBtn.Parent = MainFrame
    CloseBtn.Size = UDim2.new(0, 25, 0, 25)
    CloseBtn.Position = UDim2.new(1, -28, 0, 2)
    CloseBtn.BackgroundColor3 = Color3.fromRGB(255, 40, 40)
    CloseBtn.Text = "✕"
    CloseBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    CloseBtn.Font = Enum.Font.GothamBold
    CloseBtn.TextSize = 14
    CloseBtn.BorderSizePixel = 0
    CloseBtn.MouseButton1Click:Connect(function()
        ScreenGui:Destroy()
    end)
    
    return ScreenGui
end

-- ===== TẠO UI =====
local UI = CreateUI()
print("[Meow] UI đã tạo xong")

-- ===== VÒNG LẶP FARM =====
spawn(function()
    print("[Meow] Vòng lặp farm đã sẵn sàng")
    
    while wait(0.15) do
        if FarmStatus then
            local char = GetCharacter()
            if char then
                local mob = FindMob()
                if mob then
                    AttackMob(mob)
                else
                    -- Không có mob, di chuyển random
                    local root = char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso")
                    if root then
                        local randomPos = root.Position + Vector3.new(math.random(-15, 15), 0, math.random(-15, 15))
                        root.CFrame = CFrame.new(randomPos)
                    end
                end
            end
        end
    end
end)
← Back to timeline