local s=playerService.LocalPlayer local m=script.Settings local h function getSetting(s)return m and(m:FindFirstChild(s)and m[s].Value)end local f=getSetting("\087\097\108\107\105\110\103 \115\112\101\101\100")or 18 local S=getSetting("\082\117\110\110\105\110\103 \115\112\101\101\100")or 26 local I=false inputService.InputBegan:Connect(function(m)if m.KeyCode==Enum.KeyCode.LeftShift or m.KeyCode==Enum.KeyCode.RightShift then h=true local m=s.Character or s.CharacterAdded:wait()if m:FindFirstChild("\072\117\109\097\110\111\105\100")then m.Humanoid.WalkSpeed=S end end end)inputService.InputEnded:Connect(function(m)if m.KeyCode==Enum.KeyCode.LeftShift or m.KeyCode==Enum.KeyCode.RightShift then h=false local m=s.Character or s.CharacterAdded:wait()if m:FindFirstChild("\072\117\109\097\110\111\105\100")then m.Humanoid.WalkSpeed=f end end end)

local plr = playerService.LocalPlayer
local settingsDir = script.Settings
local running
function getSetting (name)
	return settingsDir and settingsDir:FindFirstChild(name) and settingsDir[name].Value
end

local normalSpeed = getSetting("Walking speed") or 18 -- The player's walking speed (Roblox default is 16)
local sprintSpeed = getSetting("Running speed") or 26 -- The player's speed while sprinting
local sprinting = false

inputService.InputBegan:Connect(function (key)
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
        running = true
        local char = plr.Character or plr.CharacterAdded:wait()
		if char:FindFirstChild("Humanoid") then	
			char.Humanoid.WalkSpeed = sprintSpeed
		end
	end
end)

inputService.InputEnded:Connect(function (key)
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
        running = false
        local char = plr.Character or plr.CharacterAdded:wait()
		if char:FindFirstChild("Humanoid") then	
			char.Humanoid.WalkSpeed = normalSpeed
		end
	end
end)
