Advertisement
SmokeDelsin

nyan cat

May 17th, 2015
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Rainbow = {"Bright red", "Neon orange", "Bright yellow", "Lime green", "Deep blue", "Bright violet"}
  2.  
  3. me = game.Players.SmokeDelsin
  4.  
  5. function Part(P, Anch, Coll, Tran, Ref, Col, Size, Name)
  6. local p = Instance.new("Part")
  7. p.TopSurface = 0
  8. p.BottomSurface = 0
  9. p.Transparency = Tran
  10. p.Reflectance = Ref
  11. p.CanCollide = Coll
  12. p.Anchored = Anch
  13. p.BrickColor = BrickColor.new(Col)
  14. p.formFactor = "Custom"
  15. p.Size = Size
  16. if Name then p.Name = Name end
  17. p.Parent = P
  18. p.Locked = true
  19. p:BreakJoints()
  20. return p
  21. end
  22.  
  23.  
  24. V3 = Vector3.new
  25. CN = CFrame.new
  26. CA = CFrame.Angles
  27. MR = math.rad
  28. MRA = math.random
  29.  
  30. function Weld(P0, P1, CF1, CF2, Name)
  31. local w = Instance.new("Motor6D")
  32. w.Part0 = P0
  33. w.Part1 = P1
  34. w.C0 = CF1
  35. w.C1 = CF2
  36. if Name then w.Name = Name end
  37. w.Parent = P0
  38. return w
  39. end
  40.  
  41. function MakeNyan(Player, S)
  42. local Naim = "Nyan "..Player.Name:sub(1,5)
  43. if S >= 5 then Naim = "Giant Nyan "..Player.Name:sub(1,5) end
  44. local Model = Instance.new("Model")
  45. Model.Name = Naim
  46. local Torso = Part(Model, false, false, 0, 0, "Brick yellow", V3(0.5*S, 1.5*S, 2*S), "Torso")
  47. local Head = Part(Model, false, false, 0, 0, "Dark grey", V3(0.6*S, 0.8*S, 1.2*S), "Head")
  48. Instance.new("BlockMesh",Head)
  49. local Neck = Weld(Torso, Head, CN(0, -0.35*S, -0.9*S), CN(), "Neck")
  50. local Tart = Part(Model, false, false, 0, 0, "Pink", V3(0.5*S+0.05, 1.2*S, 1.7*S), "Torso")
  51. Instance.new("BlockMesh",Tart)
  52. Weld(Torso, Tart, CN(), CN())
  53. local RFL = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.6*S, 0.4*S), "Right Arm")
  54. Instance.new("SpecialMesh",RFL).MeshType = "Sphere"
  55. local LFL = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.6*S, 0.4*S), "Left Arm")
  56. Instance.new("SpecialMesh",LFL).MeshType = "Sphere"
  57. local RBL = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.6*S, 0.4*S), "Right Leg")
  58. Instance.new("SpecialMesh",RBL).MeshType = "Sphere"
  59. local LBL = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.6*S, 0.4*S), "Left Leg")
  60. Instance.new("SpecialMesh",LBL).MeshType = "Sphere"
  61. local RSH = Weld(Torso, RFL, CN(), CN(-0.1*S, 0.8*S, 0.8*S), "Right Shoulder")
  62. local LSH = Weld(Torso, LFL, CN(), CN(0.1*S, 0.8*S, 0.6*S), "Left Shoulder")
  63. local RH = Weld(Torso, RBL, CN(), CN(-0.1*S, 0.8*S, -0.8*S), "Right Hip")
  64. local LH = Weld(Torso, LBL, CN(), CN(0.1*S, 0.8*S, -1*S), "Left Hip")
  65. local Mouth = Part(Model, false, false, 0, 0, "Really black", V3(0.6*S+0.05, 0.2*S, 0.6*S))
  66. Weld(Head, Mouth, CN(0, -0.25*S, -0.1), CN())
  67. Instance.new("BlockMesh",Mouth).Scale = V3(1, 0.6, 0.8)
  68. for i = -0.25, 0.25, 0.25 do
  69. local Mouth2 = Part(Model, false, false, 0, 0, "Really black", V3(0.6*S+0.05, 0.3*S, 0.2*S))
  70. Weld(Mouth, Mouth2, CN(0, 0.1*S, i*S), CN())
  71. Instance.new("BlockMesh",Mouth2).Scale = V3(1, 0.6, 0.6)
  72. end
  73. local Nose = Part(Model, false, false, 0, 0, "Really black", V3(0.6*S+0.05, 0.2*S, 0.2*S))
  74. Weld(Head, Nose, CN(0, 0.05*S, -0.1*S), CN())
  75. Instance.new("BlockMesh",Nose).Scale = V3(1, 0.6, 0.6)
  76. for i = -0.3, 0.31, 0.6 do
  77. local Eye = Part(Model, false, false, 0, 0, "Really black", V3(0.6*S+0.05, 0.3*S, 0.3*S))
  78. Weld(Head, Eye, CN(0, 0.15*S, (i-0.1)*S), CN())
  79. local Eye2 = Part(Model, false, false, 0, 0, "Institutional white", V3(0.6*S+0.1, 0.2*S, 0.2*S))
  80. Weld(Eye, Eye2, CN(0, 0.04*S, 0.04*S), CN())
  81. Instance.new("BlockMesh",Eye).Scale = V3(1, 0.6, 0.6)
  82. Instance.new("BlockMesh",Eye2).Scale = V3(1, 0.4, 0.4)
  83. end
  84. for i = -0.4, 0.5, 0.9 do
  85. local Cheek = Part(Model, false, false, 0, 0, "Medium red", V3(0.6*S+0.05, 0.2*S, 0.2*S))
  86. Instance.new("BlockMesh",Cheek).Scale = V3(1, 0.8, 0.8)
  87. Weld(Head, Cheek, CN(0, -0.05*S, (i-0.1)*S), CN())
  88. end
  89. for i = -80, -140, -20 do
  90. local tail = Part(Model, false, false, 0, 0, "Dark grey", V3(0.4*S, 0.25*S, 0.3*S))
  91. Weld(Torso, tail, CN(0, 0.2*S, 1.15*S) * CA(MR(i), 0, 0), CN(0, 0, 0.5*S))
  92. Instance.new("BlockMesh",tail)
  93. end
  94. for i = 0, 180, 180 do
  95. local ear = Part(Model, false, false, 0, 0, "Dark grey", V3(0.6*S, 0.4*S, 0.5*S))
  96. Instance.new("SpecialMesh",ear).MeshType = "Wedge"
  97. Weld(Head, ear, CN(0, 0.45*S, 0) * CA(0, MR(i), 0), CN(0, 0, -0.32*S) * CA(MR(15), 0, 0))
  98. end
  99. local Hum = Instance.new("Humanoid")
  100. Hum.Name = "Humanoid"
  101. Hum.MaxHealth = 100
  102. Hum.Health = 100
  103. Hum.WalkSpeed = 11+(5*S)
  104. Hum.Parent = Model
  105. Model.Parent = workspace
  106. Model:MakeJoints()
  107. Model:MoveTo(V3(0, 2*S, 0))
  108. Player.Character = Model
  109. local lastP = (Torso.CFrame * CN(0, 0, 0.9*S)).p
  110. local function runn()
  111. for i = 0.5, 1, 0.5 do
  112. RSH.C0 = CN(0, -(0.2*S)*i, 0)
  113. LSH.C0 = CN(0, -(0.2*S)*i, 0)
  114. RH.C0 = CN(0, -(0.2*S)*i, 0)
  115. LH.C0 = CN(0, -(0.2*S)*i, 0)
  116. wait()
  117. end
  118. for i = 0.5, 1, 0.5 do
  119. RSH.C0 = CN(0, -(0.2*S), (0.2*S)*i)
  120. LSH.C0 = CN(0, -(0.2*S), (0.2*S)*i)
  121. RH.C0 = CN(0, -(0.2*S), (0.2*S)*i)
  122. LH.C0 = CN(0, -(0.2*S), (0.2*S)*i)
  123. wait()
  124. end
  125. for i = 0.5, 1, 0.5 do
  126. RSH.C0 = CN(0, -(0.2*S)+(0.2*S)*i, (0.2*S))
  127. LSH.C0 = CN(0, -(0.2*S)+(0.2*S)*i, (0.2*S))
  128. RH.C0 = CN(0, -(0.2*S)+(0.2*S)*i, (0.2*S))
  129. LH.C0 = CN(0, -(0.2*S)+(0.2*S)*i, (0.2*S))
  130. wait()
  131. end
  132. for i = 0.5, 1, 0.5 do
  133. RSH.C0 = CN(0, 0, (0.2*S)-(0.2*S)*i)
  134. LSH.C0 = CN(0, 0, (0.2*S)-(0.2*S)*i)
  135. RH.C0 = CN(0, 0, (0.2*S)-(0.2*S)*i)
  136. LH.C0 = CN(0, 0, (0.2*S)-(0.2*S)*i)
  137. wait()
  138. end
  139. end
  140. local poss = "Standing"
  141. coroutine.resume(coroutine.create(function()
  142. while Player.Character == Model do
  143. wait(0.1)
  144. if poss == "Running" then
  145. runn()
  146. end
  147. end
  148. end))
  149. coroutine.resume(coroutine.create(function()
  150. while Player.Character == Model do
  151. wait(0.1)
  152. local speed = Torso.Velocity.magnitude
  153. local posnow = (Torso.CFrame * CN(0, 0, 0.9*S)).p
  154. coroutine.resume(coroutine.create(function()
  155. if speed > 2 then
  156. poss = "Running"
  157. local ps = {}
  158. for i,v in pairs(Rainbow) do
  159. local a = (#Rainbow-i)
  160. a = ((a-(a/2))/2.5)*S
  161. local pp = Part(Model, true, false, 0, 0, v, V3(0.2, 0.2, 0.2), "Rainbow")
  162. local dist = (posnow - lastP).magnitude
  163. Instance.new("BlockMesh",pp).Scale = V3(1, ((1.4*S)/#Rainbow)*5, dist*5)
  164. pp.CFrame = CN(lastP, posnow) * CN(0, a, -dist/2)
  165. table.insert(ps, pp)
  166. end
  167. coroutine.resume(coroutine.create(function()
  168. wait(10)
  169. for i = 0, 1, 0.2 do
  170. wait()
  171. for _,v in pairs(ps) do
  172. v.Transparency = i
  173. end
  174. end
  175. for _,v in pairs(ps) do
  176. v:remove()
  177. end
  178. end))
  179. else poss = "Standing" end
  180. end))
  181. lastP = posnow
  182. end
  183. end))
  184. end
  185.  
  186. --for i,v in pairs(game.Players:GetPlayers()) do
  187. -- MakeNyan(v, MRA(10,120)/10)
  188. --end
  189. MakeNyan(me, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement