Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- AUTO CORTAR GRAMA COM GUI - DELTA EXECUTOR
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local char = player.Character or player.CharacterAdded:Wait()
- local hrp = char:WaitForChild("HumanoidRootPart")
- local backpack = player:WaitForChild("Backpack")
- local ativo = false
- local ultimoPrompt = nil
- -- ================= GUI =================
- local ScreenGui = Instance.new("ScreenGui", game.CoreGui)
- local Frame = Instance.new("Frame", ScreenGui)
- Frame.Size = UDim2.new(0, 240, 0, 90)
- Frame.Position = UDim2.new(0.5, -120, 0.15, 0)
- Frame.BackgroundColor3 = Color3.fromRGB(25,25,25)
- Frame.Active = true
- Frame.Draggable = true
- Frame.BorderSizePixel = 0
- Instance.new("UICorner", Frame).CornerRadius = UDim.new(0,12)
- local Button = Instance.new("TextButton", Frame)
- Button.Size = UDim2.new(0, 200, 0, 45)
- Button.Position = UDim2.new(0.5, -100, 0.5, -22)
- Button.Text = "🔴 DESLIGADO"
- Button.TextColor3 = Color3.new(1,1,1)
- Button.BackgroundColor3 = Color3.fromRGB(180,0,0)
- Button.Font = Enum.Font.GothamBold
- Button.TextSize = 16
- Instance.new("UICorner", Button).CornerRadius = UDim.new(0,10)
- -- ================= FUNÇÕES =================
- -- equipar a Foice
- local function equiparFoice()
- -- já está equipada?
- if char:FindFirstChild("Foice") then return true end
- -- está na mochila?
- local tool = backpack:FindFirstChild("Foice")
- if tool then
- tool.Parent = char
- task.wait(0.2)
- return true
- end
- return false
- end
- -- achar BasePart válida
- local function getBasePart(obj)
- if not obj then return nil end
- if obj:IsA("BasePart") then return obj end
- if obj:IsA("Model") then
- return obj:FindFirstChildWhichIsA("BasePart")
- end
- return getBasePart(obj.Parent)
- end
- local function teleportTo(obj)
- local part = getBasePart(obj)
- if part then
- hrp.CFrame = part.CFrame + Vector3.new(0,2,0)
- end
- end
- -- procurar GRAMA pelo texto do prompt
- local function procurarGrama()
- for _, v in ipairs(workspace:GetDescendants()) do
- if v:IsA("ProximityPrompt")
- and v.Enabled
- and v ~= ultimoPrompt then
- local objectText = string.lower(v.ObjectText or "")
- local actionText = string.lower(v.ActionText or "")
- if objectText:find("grama") and actionText:find("cortar") then
- return v
- end
- end
- end
- return nil
- end
- -- ================= BOTÃO =================
- Button.MouseButton1Click:Connect(function()
- ativo = not ativo
- if ativo then
- Button.Text = "🟢 LIGADO"
- Button.BackgroundColor3 = Color3.fromRGB(0,170,0)
- else
- Button.Text = "🔴 DESLIGADO"
- Button.BackgroundColor3 = Color3.fromRGB(180,0,0)
- ultimoPrompt = nil
- end
- end)
- -- ================= LOOP PRINCIPAL =================
- task.spawn(function()
- while true do
- task.wait(0.3)
- if not ativo then continue end
- pcall(function()
- -- garantir foice equipada
- if not equiparFoice() then
- warn("Foice não encontrada")
- task.wait(1)
- return
- end
- local grama = procurarGrama()
- if not grama then return end
- ultimoPrompt = grama
- -- ir até a grama
- teleportTo(grama.Parent)
- task.wait(0.4)
- -- cortar
- fireproximityprompt(grama)
- -- esperar a grama sumir/desativar
- repeat task.wait(0.2) until not grama.Enabled or not ativo
- task.wait(0.2)
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment