Reactor4

yeet

Mar 1st, 2021
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. local eMat = Enum.Material
  2.  
  3. local materialSounds = {
  4. [eMat.Grass]="rbxassetid://510933218";
  5. [eMat.Metal]="rbxassetid://1263161138";
  6. [eMat.CorrodedMetal]="6214569720";
  7. [eMat.DiamondPlate]="rbxassetid://481216891";
  8. [eMat.Wood]="rbxassetid://481218268";
  9. [eMat.WoodPlanks]="rbxassetid://481218268";
  10. [eMat.Sand]="rbxassetid://265653329";
  11. [eMat.Snow]="rbxassetid://151760062";
  12. [eMat.Fabric]="rbxassetid://151760062";
  13. [eMat.Foil]="rbxassetid://2812418291";
  14. [eMat.Glass]="rbxassetid://145180170";
  15. [eMat.Brick]="rbxassetid://142548009";
  16. [eMat.Cobblestone]="rbxassetid://168786259";
  17. [eMat.Concrete]="rbxassetid://481215525";
  18. [eMat.Granite]="rbxassetid://134464013";
  19. [eMat.Ice]="rbxassetid://19326880";
  20. [eMat.Marble]="rbxassetid://134464111";
  21. [eMat.Plastic]="rbxassetid://267454199";
  22. [eMat.Pebble]="rbxassetid://180239547";
  23. [Enum.Material.LeafyGrass]="rbxassetid://510933218";
  24. [Enum.Material.Asphalt]="rbxassetid://481215525";
  25. [Enum.Material.Basalt]="rbxassetid://481215525";
  26. [Enum.Material.CrackedLava]="rbxassetid://481215525";
  27. [Enum.Material.ForceField]="rbxassetid://5855427142";
  28. [Enum.Material.Glacier]="rbxassetid://168786259";
  29. [Enum.Material.Ground]="rbxassetid://131436155";
  30. [Enum.Material.Limestone]="rbxassetid://619156934";
  31. [Enum.Material.Mud]="rbxassetid://6441160246";
  32. [Enum.Material.Pavement]="rbxassetid://481215525";
  33. [Enum.Material.Rock]="rbxassetid://619156934";
  34. [Enum.Material.Salt]="rbxassetid://131436155";
  35. [Enum.Material.Sandstone]="rbxassetid://619156934";
  36. [Enum.Material.Slate]="rbxassetid://619156934";
  37. [Enum.Material.SmoothPlastic]="rbxassetid://4516570901";
  38. }
  39.  
  40.  
  41. local char = script.Parent
  42.  
  43. local humanoid = char:WaitForChild("Humanoid")
  44. local hrp = char:WaitForChild("HumanoidRootPart")
  45.  
  46. local footstepsSound = hrp:WaitForChild("Running")
  47.  
  48. humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function()
  49.  
  50. local floorMat = humanoid.FloorMaterial
  51. local soundOfMat = materialSounds[floorMat]
  52.  
  53. if soundOfMat then
  54. wait(1)
  55. footstepsSound.SoundId = soundOfMat
  56. end
  57. end)
Advertisement
Add Comment
Please, Sign In to add comment