Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local auto = false
- local function autoUse()
- if not auto then return end
- local char = LocalPlayer.Character
- if not char then return end
- for _, tool in pairs(LocalPlayer.Backpack:GetChildren()) do
- if tool:IsA("Tool") then
- tool.Parent = char
- end
- end
- for _, tool in pairs(char:GetChildren()) do
- if tool:IsA("Tool") then
- pcall(function() tool:Activate() end)
- end
- end
- end
- RunService.RenderStepped:Connect(autoUse)
- local navy = Color3.fromRGB(10, 20, 40)
- local gold = Color3.fromRGB(180, 140, 30)
- local btnCol = Color3.fromRGB(25, 25, 45)
- local white = Color3.fromRGB(255, 255, 255)
- local function createGUI()
- if LocalPlayer.PlayerGui:FindFirstChild("AutoUseToolBox") then return end
- local gui = Instance.new("ScreenGui")
- gui.Name = "AutoUseToolBox"
- gui.ResetOnSpawn = false
- gui.Parent = LocalPlayer:WaitForChild("PlayerGui")
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 200, 0, 60)
- frame.Position = UDim2.new(0, 20, 0, 20)
- frame.BackgroundColor3 = navy
- frame.BorderSizePixel = 0
- frame.Active = true
- frame.Draggable = true
- frame.Parent = gui
- -- Title container with emoji and text shifted right more
- local titleContainer = Instance.new("Frame")
- titleContainer.Size = UDim2.new(1, 0, 0, 25)
- titleContainer.Position = UDim2.new(0, 0, 0, 0)
- titleContainer.BackgroundTransparency = 1
- titleContainer.Parent = frame
- local emojiLabel = Instance.new("TextLabel")
- emojiLabel.Size = UDim2.new(0, 25, 1, 0)
- emojiLabel.Position = UDim2.new(0, 25, 0, 0) -- moved more right
- emojiLabel.BackgroundTransparency = 1
- emojiLabel.Text = "🤣"
- emojiLabel.TextSize = 20
- emojiLabel.Font = Enum.Font.GothamBold
- emojiLabel.TextColor3 = gold
- emojiLabel.Parent = titleContainer
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(0, 140, 1, 0)
- title.Position = UDim2.new(0, 60, 0, 0) -- moved more right
- title.BackgroundTransparency = 1
- title.Text = "Auto use tools"
- title.TextColor3 = gold
- title.Font = Enum.Font.GothamBold
- title.TextSize = 14
- title.TextXAlignment = Enum.TextXAlignment.Left
- title.Parent = titleContainer
- titleContainer.AnchorPoint = Vector2.new(0.5, 0)
- titleContainer.Position = UDim2.new(0.5, 0, 0, 0)
- local angle = 0
- RunService.RenderStepped:Connect(function()
- angle = (angle + 6) % 360
- emojiLabel.Rotation = angle
- end)
- local btn = Instance.new("TextButton")
- btn.Size = UDim2.new(1, -20, 0, 28)
- btn.Position = UDim2.new(0, 10, 0, 30)
- btn.BackgroundColor3 = btnCol
- btn.TextColor3 = white
- btn.Font = Enum.Font.GothamBold
- btn.TextSize = 18
- btn.Text = "🤣 Turn OFF"
- btn.Parent = frame
- btn.MouseButton1Click:Connect(function()
- auto = not auto
- if auto then
- btn.Text = "☠️ Turn ON"
- btn.TextSize = 20
- btn.BackgroundColor3 = gold
- else
- btn.Text = "🤣 Turn OFF"
- btn.TextSize = 18
- btn.BackgroundColor3 = btnCol
- end
- end)
- end
- createGUI()
- local function onToolEquipped(player, tool)
- print(player.Name .. " ha equipado la herramienta: " .. tool.Name)
- end
- local function handleTools(player)
- local function connectBackpackTools()
- local backpack = player:FindFirstChild("Backpack")
- if not backpack then return end
- backpack.ChildAdded:Connect(function(child)
- if child:IsA("Tool") then
- onToolEquipped(player, child)
- end
- end)
- for _, tool in pairs(backpack:GetChildren()) do
- if tool:IsA("Tool") then
- onToolEquipped(player, tool)
- end
- end
- end
- player.CharacterAdded:Connect(function()
- connectBackpackTools()
- end)
- if player.Character then
- connectBackpackTools()
- end
- end
- handleTools(LocalPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement