Advertisement
samuelrichter66

revenge

Sep 2nd, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.75 KB | None | 0 0
  1.  
  2. local plr = owner
  3. local char = plr.Character
  4. local hum = char.Humanoid
  5. local rarm = char["Right Arm"]
  6. local larm = char["Left Arm"]
  7. local rleg = char["Right Leg"]
  8. local lleg = char["Left Leg"]
  9. local root = char.HumanoidRootPart
  10. local tors = char.Torso
  11. local head = char.Head
  12. local action = ""
  13. local t = tick()
  14. local RunS = game:GetService("RunService")
  15. local playback = 0
  16.  
  17. hum.HipHeight = 0.5
  18. hum.WalkSpeed = 20
  19.  
  20. head.Size = Vector3.new(2, 2, 2)
  21. rarm.Size = Vector3.new(1, 3, 1)
  22. larm.Size = Vector3.new(1, 3, 1)
  23. tors.Size = Vector3.new(2, 3, 1)
  24. rleg.Size = Vector3.new(1, 3, 1)
  25. lleg.Size = Vector3.new(1, 3, 1)
  26.  
  27. local f = Instance.new("Decal", head)
  28. f.Name = "Texture"
  29. f.Texture = "rbxassetid://3755253739"
  30. f.Face = "Front"
  31. local fc = f:Clone()
  32. fc.Parent = head
  33. fc.Texture = "rbxassetid://3755175019"
  34. fc.Face = "Back"
  35. local fc = f:Clone()
  36. fc.Parent = head
  37. fc.Texture = "rbxassetid://3755174443"
  38. fc.Face = "Left"
  39. local fc = f:Clone()
  40. fc.Parent = head
  41. fc.Texture = "rbxassetid://3755252237"
  42. fc.Face = "Right"
  43. local fc = f:Clone()
  44. fc.Parent = head
  45. fc.Texture = "rbxassetid://3755175626"
  46. fc.Face = "Top"
  47.  
  48. local glasses = Instance.new("Part", char)
  49. glasses.Anchored = false
  50. glasses.CanCollide = false
  51. glasses.Material = "Neon"
  52. glasses.Transparency = 1
  53. glasses.Size = Vector3.new(2.25, 2.25, 2.25)
  54. glasses.CastShadow = false
  55. local g = Instance.new("Decal", glasses)
  56. g.Name = "Texture"
  57. g.Texture = "rbxassetid://3755176276"
  58. g.Face = "Front"
  59. local gc = g:Clone()
  60. gc.Parent = glasses
  61. gc.Texture = "rbxassetid://3755177267"
  62. gc.Face = "Right"
  63. local gc = g:Clone()
  64. gc.Parent = glasses
  65. gc.Texture = "rbxassetid://3755176850"
  66. gc.Face = "Left"
  67. local glassesw = Instance.new("Weld", glasses)
  68. glassesw.Part0 = head
  69. glassesw.Part1 = glasses
  70.  
  71. local mouth = Instance.new("Part", char)
  72. mouth.Name = "Mouth"
  73. mouth.BrickColor = BrickColor.new(Color3.new(0, 0, 0))
  74. mouth.Size = Vector3.new(1, 0.5, 2)
  75. local mouthm = Instance.new("Weld", mouth)
  76. mouthm.Part0 = head
  77. mouthm.Part1 = mouth
  78. mouthm.C0 = CFrame.new(0, -0.6, -0.01)
  79. local mouthsize = Instance.new("BlockMesh", mouth)
  80.  
  81. for i,stuff in pairs(char:GetChildren()) do
  82. if stuff:IsA("Shirt") or stuff:IsA("Pants") or stuff:IsA("BodyColors") or stuff:IsA("Hat") or stuff:IsA("Accessory") or stuff:IsA("Accoutrement") or stuff:IsA("CharacterMesh") then
  83. stuff:Destroy()
  84. end
  85. end
  86.  
  87. local music = Instance.new("Sound", head)
  88. music.SoundId = "rbxassetid://3295654382"
  89. music.Name = "Music"
  90. music.Volume = 3
  91. music.Looped = true
  92. music:Play()
  93.  
  94. if head:FindFirstChild("Mesh") then head.Mesh:Destroy() end
  95. if head:FindFirstChild("face") then head.face:Destroy() end
  96.  
  97. local shirt = Instance.new("Shirt", char)
  98. shirt.ShirtTemplate = "rbxassetid://3516317543"
  99. local pants = Instance.new("Pants", char)
  100. pants.PantsTemplate = "rbxassetid://3516314876"
  101.  
  102.  
  103. local colors = Instance.new("BodyColors", char)
  104. colors.HeadColor = BrickColor.new("Brick yellow")
  105. colors.LeftArmColor = BrickColor.new("Brick yellow")
  106. colors.RightArmColor = BrickColor.new("Brick yellow")
  107. colors.TorsoColor = BrickColor.new("Brick yellow")
  108. colors.LeftLegColor = BrickColor.new("Brick yellow")
  109. colors.RightLegColor = BrickColor.new("Brick yellow")
  110.  
  111. function createJoint(wp0, wp1, wc0x, wc0y, wc0z, wc1x, wc1y, wc1z, name)
  112. local joint = Instance.new("Weld", wp0)
  113. joint.Part0 = wp0
  114. joint.Part1 = wp1
  115. joint.C0 = CFrame.new(wc0x, wc0y, wc0z)
  116. joint.C1 = CFrame.new(wc1x, wc1y, wc1z)
  117. joint.Name = name
  118. return joint
  119. end
  120.  
  121. local RS = createJoint(char.Torso, char["Right Arm"], 1.5, 1, 0, 0, 1, 0, "Right Shoulder")
  122. local TS = createJoint(char.HumanoidRootPart, char.Torso, 0, 0, 0, 0, 0, 0, "RootJoint")
  123. local LS = createJoint(char.Torso, char["Left Arm"], -1.5, 1, 0, 0, 1, 0, "Left Shoulder")
  124. local RH = createJoint(char.Torso, char["Right Leg"], 0.5, -1.5, 0, 0, 1.5, 0, "Right Hip")
  125. local LH = createJoint(char.Torso, char["Left Leg"], -0.5, -1.5, 0, 0, 1.5, 0, "Left Hip")
  126. local NK = createJoint(char.Torso, char.Head, 0, 2, 0, 0, -1/2, 0, "Neck")
  127.  
  128. local rsc0 = RS.C0
  129. local lsc0 = LS.C0
  130. local tsc0 = TS.C0
  131. local rhc0 = RH.C0
  132. local lhc0 = LH.C0
  133. local nkc0 = NK.C0
  134.  
  135. local remote = Instance.new("RemoteFunction", char)
  136. remote.Name = "MouthRemote"
  137.  
  138. function recieveInfo(player, info, n, t, ls, rs, lh, rh)
  139. playback = info
  140. NK.C0 = n
  141. TS.C0 = t
  142. LS.C0 = ls
  143. RS.C0 = rs
  144. LH.C0 = lh
  145. RH.C0 = rh
  146. return info
  147. end
  148. remote.OnServerInvoke = recieveInfo
  149.  
  150. NLS([[
  151. local plr = owner
  152. local cam = workspace.CurrentCamera
  153. local char = plr.Character
  154. local NK = char.Torso:WaitForChild("Neck")
  155. local RS = char.Torso:WaitForChild("Right Shoulder")
  156. local LS = char.Torso:WaitForChild("Left Shoulder")
  157. local RH = char.Torso:WaitForChild("Right Hip")
  158. local LH = char.Torso:WaitForChild("Left Hip")
  159. local TS = char.HumanoidRootPart:WaitForChild("RootJoint")
  160. local hum = char.Humanoid
  161.  
  162. local rsc0 = CFrame.new(1.5, 1, 0)
  163. local lsc0 = CFrame.new(-1.5, 1, 0)
  164. local tsc0 = CFrame.new()
  165. local rhc0 = CFrame.new(0.5, -1.5, 0)
  166. local lhc0 =CFrame.new(-0.5, -1.5, 0)
  167. local nkc0 = CFrame.new(0, 2, 0)
  168.  
  169. local music = owner.Character.Head:WaitForChild("Music")
  170. local mouth = char:WaitForChild("Mouth")
  171. local mouthsize = mouth:WaitForChild("Mesh")
  172. local t = tick()
  173. local root = char.HumanoidRootPart
  174. local action = ""
  175.  
  176. function lerp(a, b, t)
  177. return a * (1-t) + (b*t)
  178. end
  179.  
  180. game:GetService("RunService").RenderStepped:connect(function()
  181. t = t + 0.5
  182.  
  183. local playback = music.PlaybackLoudness
  184. local a = playback - 350
  185. a = a * 3
  186. if a < 0 then
  187. a = 0
  188. elseif a > 45 then
  189. a = 45
  190. end
  191. cam.FieldOfView = lerp(cam.FieldOfView, 70 + playback/20, 0.3)
  192. NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
  193. mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
  194.  
  195.  
  196. if not hum.Sit then
  197. if math.abs(root.Velocity.x) > 1 or math.abs(root.Velocity.z) > 1 and hum:GetState() ~= Enum.HumanoidStateType.Freefall then
  198. action = "Walk"
  199. elseif math.abs(root.Velocity.x) < 1 or math.abs(root.Velocity.z) < 1 then
  200. action = "Idle"
  201. end
  202. else
  203. action = "Sit"
  204. end
  205.  
  206. NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
  207. mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
  208.  
  209. if action == "Idle" then
  210. speed = 0.5
  211.  
  212. TS.C0 = TS.C0:lerp(tsc0, speed)
  213. LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(0, 0, math.rad(-2) + -math.sin(t/20)/10/2), speed)
  214. RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(0, 0, math.rad(2) + math.sin(t/20)/10/2), speed)
  215. LH.C0 = LH.C0:lerp(lhc0, speed)
  216. RH.C0 = RH.C0:lerp(rhc0, speed)
  217. elseif action == "Walk" then
  218. speed = 0.5
  219.  
  220. TS.C0 = TS.C0:lerp(tsc0, speed)
  221. LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(math.sin(t/3)/1.5, 0, 0), speed)
  222. RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(-math.sin(t/3)/1.5, 0, 0), speed)
  223. LH.C0 = LH.C0:lerp(lhc0 * CFrame.Angles(-math.sin(t/3)/1.5, 0, 0), speed)
  224. RH.C0 = RH.C0:lerp(rhc0 * CFrame.Angles(math.sin(t/3)/1.5, 0, 0), speed)
  225. elseif action == "Sit" then
  226. speed = 0.5
  227.  
  228. TS.C0 = TS.C0:lerp(tsc0 * CFrame.new(0, 0.5, 0), speed)
  229. LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(math.rad(15), 0, math.rad(-2) + -math.sin(t/20)/10/2), speed)
  230. RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(math.rad(15), 0, math.rad(2) + math.sin(t/20)/10/2), speed)
  231. LH.C0 = LH.C0:lerp(lhc0 * CFrame.Angles(math.rad(90), 0, -math.rad(15)), speed)
  232. RH.C0 = RH.C0:lerp(rhc0 * CFrame.Angles(math.rad(90), 0, math.rad(15)), speed)
  233. end
  234.  
  235.  
  236. if owner.Character:WaitForChild("MouthRemote") then
  237. owner.Character.MouthRemote:InvokeServer(music.PlaybackLoudness, NK.C0, TS.C0, LS.C0, RS.C0, LH.C0, RH.C0)
  238. end
  239.  
  240.  
  241.  
  242. end)
  243. ]], char)
  244.  
  245.  
  246.  
  247. RunS.Stepped:connect(function()
  248. t = t + 0.5
  249. local a = playback - 350
  250. a = a * 3
  251. if a < 0 then
  252. a = 0
  253. elseif a > 45 then
  254. a = 45
  255. end
  256.  
  257. NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
  258. mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
  259.  
  260.  
  261. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement