TSB RUN ON  LCTRL
Key Required

TSB RUN ON LCTRL

The Strongest BattlegroundsRain5200Rain5200 8.1K views 17 executesUpdated Jan 28, 2025
0.0/ 5(1 votes)
010% Positive
Lua Script•42 lines (1442 chars)
local moving = false
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
local runService = game:GetService("RunService")
local userInputService = game:GetService("UserInputService")
local movementSpeed = 125

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://18897115785"
local animator = humanoid:FindFirstChildOfClass("Animator") or humanoid:WaitForChild("Animator")
local animationTrack

local function moveForward()
    while moving do
        local forwardDirection = humanoidRootPart.CFrame.LookVector
        humanoidRootPart.Velocity = forwardDirection * movementSpeed
        runService.Stepped:Wait()
    end
end

local function onInputBegan(input, gameProcessed)
    if input.KeyCode == Enum.KeyCode.LeftControl and not gameProcessed then
        moving = true
        animationTrack = animator:LoadAnimation(animation)
        animationTrack:Play()
        moveForward()
    end
end

local function onInputEnded(input, gameProcessed)
    if input.KeyCode == Enum.KeyCode.LeftControl and not gameProcessed then
        moving = false
        if animationTrack then
            animationTrack:Stop()
        end
    end
end

userInputService.InputBegan:Connect(onInputBegan)
userInputService.InputEnded:Connect(onInputEnded)

Features & Information

i dont know owner of the script!

Community Comments (0)

No comments yet for this script.

More Scripts for The Strongest Battlegrounds