R6 Animated Linked Sword Server-Sided
Key RequiredUniversal

R6 Animated Linked Sword Server-Sided

Universal ScriptXxLemon_WolfyxXXxLemon_WolfyxX 3.9K views 504 executesUpdated May 3, 2026
5.0/ 5(2 votes)
20100% Positive
Lua Script•98 lines (2370 chars)
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

local function createTrack(id)
    local anim = Instance.new("Animation")
    anim.AnimationId = "rbxassetid://" .. id
    return humanoid:LoadAnimation(anim)
end

local equipTrack   = createTrack(94160581)
local unequipTrack = createTrack(94095929)
local idleTrack    = createTrack(94108418)
idleTrack.Looped = true

local comboTracks = { -- sword combos lol
    createTrack(94161088),
    createTrack(94161333),
    createTrack(94160738)
}

local currentStage = 0
local lastPressTime = 0
local cooldown = 0.3
local isActive = true

local connections = {}

local function activate()
    isActive = true
    equipTrack:Play()
    task.wait(equipTrack.Length)
    equipTrack:Stop()
    idleTrack:Play()
end

local function deactivate()
    isActive = false
    idleTrack:Stop()
    for _, track in ipairs(comboTracks) do
        track:Stop()
    end
end

activate()

local zConnection = game:GetService("UserInputService").InputBegan:Connect(function(input, gp)
    if gp then return end
    if input.KeyCode ~= Enum.KeyCode.Z then return end
    
    local now = tick()
    if now - lastPressTime < cooldown then return end
    lastPressTime = now
    
    if not isActive then
        activate()
        return
    end
    
    idleTrack:Stop()
    for _, track in ipairs(comboTracks) do
        track:Stop()
    end
    
    currentStage = currentStage + 1
    if currentStage > 3 then currentStage = 1 end
    
    local track = comboTracks[currentStage]
    track:Play()
    
    task.delay(track.Length + 0.1, function()
        if track.IsPlaying then track:Stop() end
        if isActive then
            idleTrack:Play()
        end
    end)
end)

local qConnection = game:GetService("UserInputService").InputBegan:Connect(function(input, gp)
    if gp then return end
    if input.KeyCode == Enum.KeyCode.Q then
        if not isActive then return end
        
        idleTrack:Stop()
        for _, track in ipairs(comboTracks) do
            track:Stop()
        end
        
        unequipTrack:Play()
        task.wait(unequipTrack.Length + 0.2)
        unequipTrack:Stop()
        
        deactivate()
    end
end)

table.insert(connections, zConnection)
table.insert(connections, qConnection)

Features & Information

woah, now we have a very ironic sword made INSIDE THE SCRIPT?! (THE SWORD WON'T BE APART OF THIS SCRIPT) Z = Attack (Equip after pressing Q) Q = Unequip

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts