Advertisement
Azzz_4565

Untitled

Jun 23rd, 2025
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.18 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local LocalPlayer = Players.LocalPlayer
  4.  
  5. local auto = false
  6.  
  7. local function autoUse()
  8.     if not auto then return end
  9.     local char = LocalPlayer.Character
  10.     if not char then return end
  11.  
  12.     for _, tool in pairs(LocalPlayer.Backpack:GetChildren()) do
  13.         if tool:IsA("Tool") then
  14.             tool.Parent = char
  15.         end
  16.     end
  17.  
  18.     for _, tool in pairs(char:GetChildren()) do
  19.         if tool:IsA("Tool") then
  20.             pcall(function() tool:Activate() end)
  21.         end
  22.     end
  23. end
  24.  
  25. RunService.RenderStepped:Connect(autoUse)
  26.  
  27. local navy = Color3.fromRGB(10, 20, 40)
  28. local gold = Color3.fromRGB(180, 140, 30)
  29. local btnCol = Color3.fromRGB(25, 25, 45)
  30. local white = Color3.fromRGB(255, 255, 255)
  31.  
  32. local function createGUI()
  33.     if LocalPlayer.PlayerGui:FindFirstChild("AutoUseToolBox") then return end
  34.  
  35.     local gui = Instance.new("ScreenGui")
  36.     gui.Name = "AutoUseToolBox"
  37.     gui.ResetOnSpawn = false
  38.     gui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  39.  
  40.     local frame = Instance.new("Frame")
  41.     frame.Size = UDim2.new(0, 200, 0, 60)
  42.     frame.Position = UDim2.new(0, 20, 0, 20)
  43.     frame.BackgroundColor3 = navy
  44.     frame.BorderSizePixel = 0
  45.     frame.Active = true
  46.     frame.Draggable = true
  47.     frame.Parent = gui
  48.  
  49.     -- Title container with emoji and text shifted right more
  50.     local titleContainer = Instance.new("Frame")
  51.     titleContainer.Size = UDim2.new(1, 0, 0, 25)
  52.     titleContainer.Position = UDim2.new(0, 0, 0, 0)
  53.     titleContainer.BackgroundTransparency = 1
  54.     titleContainer.Parent = frame
  55.  
  56.     local emojiLabel = Instance.new("TextLabel")
  57.     emojiLabel.Size = UDim2.new(0, 25, 1, 0)
  58.     emojiLabel.Position = UDim2.new(0, 25, 0, 0)  -- moved more right
  59.     emojiLabel.BackgroundTransparency = 1
  60.     emojiLabel.Text = "🤣"
  61.     emojiLabel.TextSize = 20
  62.     emojiLabel.Font = Enum.Font.GothamBold
  63.     emojiLabel.TextColor3 = gold
  64.     emojiLabel.Parent = titleContainer
  65.  
  66.     local title = Instance.new("TextLabel")
  67.     title.Size = UDim2.new(0, 140, 1, 0)
  68.     title.Position = UDim2.new(0, 60, 0, 0)  -- moved more right
  69.     title.BackgroundTransparency = 1
  70.     title.Text = "Auto use tools"
  71.     title.TextColor3 = gold
  72.     title.Font = Enum.Font.GothamBold
  73.     title.TextSize = 14
  74.     title.TextXAlignment = Enum.TextXAlignment.Left
  75.     title.Parent = titleContainer
  76.  
  77.     titleContainer.AnchorPoint = Vector2.new(0.5, 0)
  78.     titleContainer.Position = UDim2.new(0.5, 0, 0, 0)
  79.  
  80.     local angle = 0
  81.     RunService.RenderStepped:Connect(function()
  82.         angle = (angle + 6) % 360
  83.         emojiLabel.Rotation = angle
  84.     end)
  85.  
  86.     local btn = Instance.new("TextButton")
  87.     btn.Size = UDim2.new(1, -20, 0, 28)
  88.     btn.Position = UDim2.new(0, 10, 0, 30)
  89.     btn.BackgroundColor3 = btnCol
  90.     btn.TextColor3 = white
  91.     btn.Font = Enum.Font.GothamBold
  92.     btn.TextSize = 18
  93.     btn.Text = "🤣 Turn OFF"
  94.     btn.Parent = frame
  95.  
  96.     btn.MouseButton1Click:Connect(function()
  97.         auto = not auto
  98.         if auto then
  99.             btn.Text = "☠️ Turn ON"
  100.             btn.TextSize = 20
  101.             btn.BackgroundColor3 = gold
  102.         else
  103.             btn.Text = "🤣 Turn OFF"
  104.             btn.TextSize = 18
  105.             btn.BackgroundColor3 = btnCol
  106.         end
  107.     end)
  108. end
  109.  
  110. createGUI()
  111.  
  112. local function onToolEquipped(player, tool)
  113.     print(player.Name .. " ha equipado la herramienta: " .. tool.Name)
  114. end
  115.  
  116. local function handleTools(player)
  117.     local function connectBackpackTools()
  118.         local backpack = player:FindFirstChild("Backpack")
  119.         if not backpack then return end
  120.  
  121.         backpack.ChildAdded:Connect(function(child)
  122.             if child:IsA("Tool") then
  123.                 onToolEquipped(player, child)
  124.             end
  125.         end)
  126.  
  127.         for _, tool in pairs(backpack:GetChildren()) do
  128.             if tool:IsA("Tool") then
  129.                 onToolEquipped(player, tool)
  130.             end
  131.         end
  132.     end
  133.  
  134.     player.CharacterAdded:Connect(function()
  135.         connectBackpackTools()
  136.     end)
  137.  
  138.     if player.Character then
  139.         connectBackpackTools()
  140.     end
  141. end
  142.  
  143. handleTools(LocalPlayer)
  144.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement