Normal Speed: 10
And I increased the speed to 25 and for some reason it stuttered, looking forward to your support!
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local character = plr.Character
local uis = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local camera = workspace.CurrentCamera
local tweenInfo = TweenInfo.new(0.2, Enum.EasingStyle.Quad)
local use = false
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://13785447502"
local animation = character.Humanoid:LoadAnimation(anim)
--// Settings
local speed = 30
local defaultFOV = 70
local newFOV = 80
local manarun = 100
--// Creating the Tweens
local t1 = TweenService:Create(camera, tweenInfo, {FieldOfView = newFOV }) -- Zoom out FOV
local t2 = TweenService:Create(camera, tweenInfo, {FieldOfView = defaultFOV }) -- Reset FOV
local stamina = 100
local currentstamina = stamina
local uirunmana = game.ReplicatedStorage.assets.ui.uiRunMana
local runservice = game:GetService("RunService")
runservice.RenderStepped:Connect(function()
spawn(function()
if use == false and character.Humanoid.WalkSpeed <= 16 then
if stamina <= currentstamina then
stamina += .5
end
if stamina > currentstamina then
stamina = currentstamina
end
task.wait()
end
end)
end)
uis.InputBegan:Connect(function(key,gpe)
if gpe then return end
if key.KeyCode == Enum.KeyCode.LeftShift and use == false then
use = true
animation:Play()
spawn(function()
t1:Play() -- plays the first tween (zoom out)
t1.Completed:Wait()
t1:Destroy() -- destroys once the tween is completed
end)
local uiclone = uirunmana:Clone()
uiclone.Parent = character.HumanoidRootPart
uiclone.HealthBarBackground.HealthBar:TweenSize(UDim2.new(stamina/100, 0, 1, 0), "Out", "Linear",0)
repeat wait()
uiclone.HealthBarBackground.HealthBar:TweenSize(UDim2.new(stamina/100, 0, 1, 0), "Out", "Linear",0)
if stamina > 0 then
stamina -= 1
else
use = false
end
if character.Humanoid.MoveDirection == Vector3.zero then
use = false
end
character.Humanoid.WalkSpeed = 25
character.Humanoid.JumpPower = 0
until use == false
animation:Stop()
character.Humanoid.WalkSpeed = 10
character.Humanoid.JumpPower = 50
uiclone:Destroy()
t2:Play()
t2.Completed:Wait()
t2:Destroy()
end
end)
uis.InputEnded:Connect(function(key,gpe)
if gpe then return end
if use then
use = false
end
end)