Advertisement
Diep8328Paster

Untitled

Jun 24th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. local p = game:GetService("Players").LocalPlayer
  2. local char = p.Character
  3. char.Animate:Destroy()
  4. char.Sound:Destroy()
  5. function sm(part)
  6. part.BackSurface = "SmoothNoOutlines"
  7. part.FrontSurface = "SmoothNoOutlines"
  8. part.RightSurface = "SmoothNoOutlines"
  9. part.LeftSurface = "SmoothNoOutlines"
  10. part.TopSurface = "SmoothNoOutlines"
  11. part.BottomSurface = "SmoothNoOutlines"
  12. if part.Name ~= "Head" then
  13. local mesh = Instance.new("SpecialMesh",part)
  14. part.Material = "SmoothPlastic"
  15. mesh.MeshType = "Brick"
  16. end
  17. end
  18. wait(0.1)
  19. for i,v in pairs(char:GetChildren()) do
  20. if v.Name == "Shirt Graphic" then
  21. v:Destroy()
  22. end
  23. if v.ClassName == "Part" then
  24. local o = Instance.new("Texture",v)
  25. o.StudsPerTileV = 1
  26. o.StudsPerTileU = 1
  27. o.Face = "Top"
  28. o.Texture = "https://www.roblox.com/asset/?id=443151721"
  29. local o2 = Instance.new("Texture",v)
  30. o2.StudsPerTileV = 1
  31. o2.StudsPerTileU = 1
  32. o2.Face = "Bottom"
  33. o2.Texture = "https://www.roblox.com/asset?id=443154232"
  34. sm(v)
  35. end
  36. end
  37. local roblox = Instance.new("Decal",char.Torso)
  38. roblox.Name = "roblox"
  39. roblox.Texture = "http://www.roblox.com/asset/?version=1&id=1221846"
  40. function waitForChild(parent, childName)
  41. local child = parent:findFirstChild(childName)
  42. if child then return child end
  43. while true do
  44. child = parent.ChildAdded:wait()
  45. if child.Name==childName then return child end
  46. end
  47. end
  48.  
  49. function newSound(id)
  50. local sound = Instance.new("Sound")
  51. sound.SoundId = id
  52. sound.archivable = false
  53. sound.Parent = char.Head
  54. return sound
  55. end
  56.  
  57. -- declarations
  58.  
  59. local sDied = newSound("rbxasset://sounds/uuhhh.wav")
  60. local sOuch = newSound("rbxasset://sounds/splat.wav")
  61. local sFallingDown = newSound("rbxasset://sounds/splat.wav")
  62. local sFreeFalling = newSound("rbxasset://sounds/button.wav")
  63. local sGettingUp = newSound("rbxasset://sounds/hit.wav")
  64. local sJumping = newSound("rbxasset://sounds/button.wav")
  65. local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
  66. sRunning.Looped = true
  67.  
  68. local Figure = char
  69. local Head = waitForChild(Figure, "Head")
  70. local Humanoid = waitForChild(Figure, "Humanoid")
  71.  
  72. -- functions
  73.  
  74. function onDied()
  75. sDied:Play()
  76. sOuch:Play()
  77. end
  78.  
  79. function onState(state, sound)
  80. if state then
  81. sound:Play()
  82. else
  83. sound:Pause()
  84. end
  85. end
  86.  
  87. function onRunning(speed)
  88. if speed>0 then
  89. sRunning:Play()
  90. else
  91. sRunning:Pause()
  92. end
  93. end
  94.  
  95. -- connect up
  96.  
  97. Humanoid.Died:connect(onDied)
  98. Humanoid.Running:connect(onRunning)
  99. Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
  100. Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
  101. Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
  102. Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement