Advertisement
Xenias

Nyancat

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