Auto Use Tool roblox

public
vxpreen Jun 24, 2024 Never 102
Clone
Lua paste1.txt 22 lines (20 loc) | 1012 Bytes
1
-- loadstring(game:HttpGet("https://pastecode.dev/raw/dtm4phv9/paste1.txt"))()
2
3
local player = game:GetService("Players").LocalPlayer
4
local range = 25 -- Adjust the range as needed
5
6
--// Script \--
7
game:GetService("RunService").RenderStepped:Connect(function()
8
local players = game.Players:GetPlayers()
9
for i = 2, #players do
10
local otherPlayer = players[i]
11
local character = otherPlayer.Character
12
if character and character:FindFirstChild("Humanoid") and character.Humanoid.Health > 0 and character:FindFirstChild("HumanoidRootPart") then
13
if player:DistanceFromCharacter(character.HumanoidRootPart.Position) <= range then
14
local tool = player.Character and player.Character:FindFirstChildOfClass("Tool")
15
if tool and tool:FindFirstChild("Handle") then
16
tool:Activate()
17
-- Remove the firetouchinterest lines from here
18
end
19
end
20
end
21
end
22
end)