
Brixborg cane
Gear · by Brixborg
The Brixborg gentleman's walking cane: black lacquer and green. Click to give someone a smart rap (1 damage).
Use it in your games: in the studio, open View > Archive, go to the Gear shelf and pick "Brixborg cane".
To wear it, get it in the Shop: 50 Brixrods in the Shop
The script
-- THE BRIXBORG CANE: a gentleman's walking cane.
-- Click while holding it to swing. Anyone in front of you and within
-- reach takes 1 damage (and if that finishes them, you get the kill
-- on the player list).
local DAMAGE = 1
local REACH = 6 -- how far it reaches, in studs from your middle
local TIME_BETWEEN = 0.6 -- seconds between swings
local tool = script.Parent
local handle = tool:WaitForChild("Handle")
local debris = game:GetService("Debris")
local lastSwing = 0
local function playSound(name, where)
local sound = Instance.new("Sound", where)
sound.SoundId = "brixborg:" .. name
sound:Play()
debris:AddItem(sound, 2)
end
tool.Activated:connect(function()
if tick() - lastSwing < TIME_BETWEEN then return end
lastSwing = tick()
local character = tool.Parent
local torso = character and character:FindFirstChild("Torso")
if not torso then return end
-- The swing itself: the classic way of asking for it.
local swing = Instance.new("StringValue")
swing.Name = "toolanim"
swing.Value = "Slash"
swing.Parent = tool
playSound("swoosh", handle)
wait(0.15) -- (it lands half way through the swing)
local ahead = torso.CFrame.lookVector
local player = game.Players:GetPlayerFromCharacter(character)
for _, other in ipairs(workspace:GetChildren()) do
local humanoid = other:FindFirstChild("Humanoid")
local theirTorso = other:FindFirstChild("Torso")
if other ~= character and humanoid and theirTorso and humanoid.Health > 0 then
local toThem = theirTorso.Position - torso.Position
if toThem.magnitude < REACH and toThem.unit:Dot(ahead) > 0.3 then
-- Say who did it, for the kill board.
local old = humanoid:FindFirstChild("creator")
if old then old:Destroy() end
local tag = Instance.new("ObjectValue")
tag.Name = "creator"
tag.Value = player
tag.Parent = humanoid
debris:AddItem(tag, 2)
humanoid:TakeDamage(DAMAGE)
playSound("thud", theirTorso)
end
end
end
end)