Shift To Sprint Script

Oh, hopefully, someone did, have a great day sir.

1 Like

Hey there!

I know it’s been a while, but would it be possible to add a limit to how much you can script, in other words some sort of “sprint bar” that can be refilled after a few seconds or so, and prompted to refill via gamepass?

2 Likes

This doesn’t explain much, and I’m going to put this here for the sake of people visiting this (yes, 3 years later) because it’s still the top result. It can easily be remapped using this code in a LocalScript under either scripts in StarterPlayer.

local Players = game:GetService("Players")

local KEYS = "LeftControl,RightControl"

local MLC = Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule"):WaitForChild("CameraModule"):WaitForChild("MouseLockController"):FindFirstChild("BoundKeys")
local BoundKeysScript = MLC:FindFirstChild("BoundKeys")

if BoundKeysScript then
	BoundKeysScript.Value = KEYS
else
	BoundKeysScript = Instance.new("StringValue")
	BoundKeysScript.Name = "BoundKeys"
	BoundKeysScript.Value = KEYS
	BoundKeysScript.Parent = MLC
end
1 Like

Thanks for this, this is a very outdated script. If I am getting this correctly this connects both keys together to work as one?

1 Like

Nope. The way BoundKeysScript in the module works is it takes a StringValue in the script and updates the keys to that value. This would override it.

1 Like