0% found this document useful (0 votes)
2K views1 page

Sword Script

This script connects to the RenderStepped event to check every frame if any other players are within a range of 7 and have a character with a Humanoid and HumanoidRootPart. If so, it finds the local player's tool and activates it, using firetouchinterest to simulate the tool touching all parts of the other player's character.

Uploaded by

LETMEDOWNLOAD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views1 page

Sword Script

This script connects to the RenderStepped event to check every frame if any other players are within a range of 7 and have a character with a Humanoid and HumanoidRootPart. If so, it finds the local player's tool and activates it, using firetouchinterest to simulate the tool touching all parts of the other player's character.

Uploaded by

LETMEDOWNLOAD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

--// Setting \\--

local range = 7

--// Variable \\--


local player = game:GetService("Players").LocalPlayer

--// Script \\--


game:GetService("RunService").RenderStepped:Connect(function()
local p = game.Players:GetPlayers()
for i = 2, #p do local v = p[i].Character
if v and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 and
v:FindFirstChild("HumanoidRootPart") and
player:DistanceFromCharacter(v.HumanoidRootPart.Position) <= range then
local tool = player.Character and
player.Character:FindFirstChildOfClass("Tool")
if tool and tool:FindFirstChild("Handle") then
tool:Activate()
for i,v in next, v:GetChildren() do
if v:IsA("BasePart") then
firetouchinterest(tool.Handle,v,0)
firetouchinterest(tool.Handle,v,1)
end
end
end
end
end
end)

You might also like