Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a run bar? For my game (the script is in the desc) [closed]

Asked by 3 years ago

well this is the script

game:GetService("UserInputService").InputBegan:connect(function(input,gameprocesed)
    if input.KeyCode == Enum.KeyCode.LeftShift then
        for i = 1,16 do
            wait()
            game.Workspace.Camera.FieldOfView = game.Workspace.Camera.FieldOfView + 1.6
            game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed + 1
        end
    end
end)

game:GetService("UserInputService").InputEnded:connect(function(input,gameprocesed)
    if input.KeyCode == Enum.KeyCode.LeftShift then
        for i = 1,16 do
            wait()
            game.Workspace.Camera.FieldOfView = game.Workspace.Camera.FieldOfView - 1.6
            game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed - 1
        end
    end
end)

game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:connect(function()
    game.Workspace.Camera.FieldOfView = 70
    game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
    script.Disabled = true
end)

Closed as Not Constructive by JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?