CoiledTom

Script de cortar mato

Dec 29th, 2025
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. -- AUTO CORTAR GRAMA COM GUI - DELTA EXECUTOR
  2.  
  3. local Players = game:GetService("Players")
  4. local player = Players.LocalPlayer
  5. local char = player.Character or player.CharacterAdded:Wait()
  6. local hrp = char:WaitForChild("HumanoidRootPart")
  7. local backpack = player:WaitForChild("Backpack")
  8.  
  9. local ativo = false
  10. local ultimoPrompt = nil
  11.  
  12. -- ================= GUI =================
  13. local ScreenGui = Instance.new("ScreenGui", game.CoreGui)
  14.  
  15. local Frame = Instance.new("Frame", ScreenGui)
  16. Frame.Size = UDim2.new(0, 240, 0, 90)
  17. Frame.Position = UDim2.new(0.5, -120, 0.15, 0)
  18. Frame.BackgroundColor3 = Color3.fromRGB(25,25,25)
  19. Frame.Active = true
  20. Frame.Draggable = true
  21. Frame.BorderSizePixel = 0
  22. Instance.new("UICorner", Frame).CornerRadius = UDim.new(0,12)
  23.  
  24. local Button = Instance.new("TextButton", Frame)
  25. Button.Size = UDim2.new(0, 200, 0, 45)
  26. Button.Position = UDim2.new(0.5, -100, 0.5, -22)
  27. Button.Text = "🔴 DESLIGADO"
  28. Button.TextColor3 = Color3.new(1,1,1)
  29. Button.BackgroundColor3 = Color3.fromRGB(180,0,0)
  30. Button.Font = Enum.Font.GothamBold
  31. Button.TextSize = 16
  32. Instance.new("UICorner", Button).CornerRadius = UDim.new(0,10)
  33.  
  34. -- ================= FUNÇÕES =================
  35.  
  36. -- equipar a Foice
  37. local function equiparFoice()
  38. -- já está equipada?
  39. if char:FindFirstChild("Foice") then return true end
  40.  
  41. -- está na mochila?
  42. local tool = backpack:FindFirstChild("Foice")
  43. if tool then
  44. tool.Parent = char
  45. task.wait(0.2)
  46. return true
  47. end
  48.  
  49. return false
  50. end
  51.  
  52. -- achar BasePart válida
  53. local function getBasePart(obj)
  54. if not obj then return nil end
  55. if obj:IsA("BasePart") then return obj end
  56. if obj:IsA("Model") then
  57. return obj:FindFirstChildWhichIsA("BasePart")
  58. end
  59. return getBasePart(obj.Parent)
  60. end
  61.  
  62. local function teleportTo(obj)
  63. local part = getBasePart(obj)
  64. if part then
  65. hrp.CFrame = part.CFrame + Vector3.new(0,2,0)
  66. end
  67. end
  68.  
  69. -- procurar GRAMA pelo texto do prompt
  70. local function procurarGrama()
  71. for _, v in ipairs(workspace:GetDescendants()) do
  72. if v:IsA("ProximityPrompt")
  73. and v.Enabled
  74. and v ~= ultimoPrompt then
  75.  
  76. local objectText = string.lower(v.ObjectText or "")
  77. local actionText = string.lower(v.ActionText or "")
  78.  
  79. if objectText:find("grama") and actionText:find("cortar") then
  80. return v
  81. end
  82. end
  83. end
  84. return nil
  85. end
  86.  
  87. -- ================= BOTÃO =================
  88. Button.MouseButton1Click:Connect(function()
  89. ativo = not ativo
  90. if ativo then
  91. Button.Text = "🟢 LIGADO"
  92. Button.BackgroundColor3 = Color3.fromRGB(0,170,0)
  93. else
  94. Button.Text = "🔴 DESLIGADO"
  95. Button.BackgroundColor3 = Color3.fromRGB(180,0,0)
  96. ultimoPrompt = nil
  97. end
  98. end)
  99.  
  100. -- ================= LOOP PRINCIPAL =================
  101. task.spawn(function()
  102. while true do
  103. task.wait(0.3)
  104. if not ativo then continue end
  105.  
  106. pcall(function()
  107. -- garantir foice equipada
  108. if not equiparFoice() then
  109. warn("Foice não encontrada")
  110. task.wait(1)
  111. return
  112. end
  113.  
  114. local grama = procurarGrama()
  115. if not grama then return end
  116.  
  117. ultimoPrompt = grama
  118.  
  119. -- ir até a grama
  120. teleportTo(grama.Parent)
  121. task.wait(0.4)
  122.  
  123. -- cortar
  124. fireproximityprompt(grama)
  125.  
  126. -- esperar a grama sumir/desativar
  127. repeat task.wait(0.2) until not grama.Enabled or not ativo
  128.  
  129. task.wait(0.2)
  130. end)
  131. end
  132. end)
Advertisement
Add Comment
Please, Sign In to add comment