local V=game:GetService("\083\111\117\110\100\083\101\114\118\105\099\101")local c=game:GetService("\082\117\110\083\101\114\118\105\099\101");(script:WaitForChild("\070\111\111\116\115\116\101\112\083\111\117\110\100\115")).Parent=V local t=V:WaitForChild("\070\111\111\116\115\116\101\112\083\111\117\110\100\115")local s=game.Players.LocalPlayer repeat wait()until s.Character local h=s.Character local p=h.HumanoidRootPart local U=h.Humanoid local C U.Running:connect(function(V)if V>U.WalkSpeed/2 then C=true else C=false end end)function getMaterial()local V=U.FloorMaterial if not V then V="\065\105\114"end local c=(string.split(tostring(V),"\069\110\117\109\046\077\097\116\101\114\105\097\108\046"))[2]local t=c return t end local r c.Heartbeat:connect(function()if C then local V=getMaterial()if V~=r and r~=nil then t[r].Playing=false end local c=t[V]c.PlaybackSpeed=U.WalkSpeed/12 c.Playing=true r=V else for V,c in pairs(t:GetChildren())do c.Playing=false end end end)
--PUT THIS SCRIPT IN STARTERPACK, STOP DISLIKING IT BECAUSE YOU DIDN'T USE IT RIGHT

local sounds = game:GetService("SoundService")
local runtime = game:GetService("RunService")
script:WaitForChild("FootstepSounds").Parent = sounds
local materials = sounds:WaitForChild("FootstepSounds")
local plr = game.Players.LocalPlayer
repeat
	wait()
until plr.Character
local char = plr.Character
local hrp = char.HumanoidRootPart
local hum = char.Humanoid
local walking

hum.Running:connect(function(speed)
	if speed > hum.WalkSpeed / 2 then
		walking = true
	else
		walking = false
	end
end)

function getMaterial()
	local floormat = hum.FloorMaterial
	if not floormat then
		floormat = "Air"
	end
	local matstring = string.split(tostring(floormat), "Enum.Material.")[2]
	local material = matstring
	return material
end

local lastmat
runtime.Heartbeat:connect(function()
	if walking then
		local material = getMaterial()
		if material ~= lastmat and lastmat ~= nil then
			materials[lastmat].Playing = false
		end
		local materialSound = materials[material]
		materialSound.PlaybackSpeed = hum.WalkSpeed / 12
		materialSound.Playing = true
		lastmat = material
	else
		for _, sound in pairs(materials:GetChildren()) do
			sound.Playing = false
		end
	end
end)
