local userinput = game:GetService("UserInputService")
local players = game:GetService("Players")

local SprintSpeed = 26
local Walkspeed = 16

local Player = players.LocalPlayer

local function BeginSprint(input , gameProcessed)
	if not game.gameProcessed then
		if input.UserInPutType == Enum.UserInputType.Keyboard then
			local key = input.KeyCode
			if key == Enum.KeyCode.LeftShift then
				Player.Character.Humanoid.Walkspeed = SprintSpeed
			end
		end
	end
end

local function StopedSprint(input , gameProcessed)
	if not game.gameProcessed then
		if input.UserInPutType == Enum.UserInputType.Keyboard then
			local key = input.KeyCode
			if key == Enum.KeyCode.LeftShift then
				Player.Character.Humanoid.Walkspeed = Walkspeed
			end
		end
	end
end

userinput.InputBegan:Connect(BeginSprint)
userinput.InputEnded:Connect(StopedSprint)

2 comments

0

What is game.gameProcessed? Shouldn't it just be || if not gameProcessed then

0

Yeah, it's just GameProcessed lol.