memberhero

evil nyan cat leaked

Sep 6th, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.96 KB | None | 0 0
  1. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  2.  
  3. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  4.  
  5. local p = Instance.new("Part")
  6.  
  7. p.formFactor = "Custom"
  8.  
  9. p.Anchored = Anchor
  10.  
  11. p.CanCollide = Collide
  12.  
  13. p.Transparency = Tran
  14.  
  15. p.Reflectance = Ref
  16.  
  17. p.BrickColor = BrickColor.new(Color)
  18.  
  19. for _, Surf in pairs(Surfaces) do
  20.  
  21. p[Surf] = "Smooth"
  22.  
  23. end
  24.  
  25. p.Size = Vector3.new(X, Y, Z)
  26.  
  27. if Break then
  28.  
  29. p:BreakJoints()
  30.  
  31. else p:MakeJoints() end
  32.  
  33. p.Parent = Parent
  34.  
  35. return p
  36.  
  37. end
  38.  
  39.  
  40.  
  41. function Weld(p0, p1, x, y, z, a, b, c)
  42.  
  43. local w = Instance.new("Weld")
  44.  
  45. w.Parent = p0
  46.  
  47. w.Part0 = p0
  48.  
  49. w.Part1 = p1
  50.  
  51. w.C0 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  52.  
  53. return w
  54.  
  55. end
  56.  
  57.  
  58.  
  59. function getcf(pos1, pos2)
  60.  
  61. local pos3 = Vector3.new(pos2.X, pos1.Y, pos2.Z)
  62.  
  63. return CFrame.new(pos1, pos3)
  64.  
  65. end
  66.  
  67.  
  68.  
  69. function findjelly(pos)
  70.  
  71. local t
  72.  
  73. local d = math.huge
  74.  
  75. local h
  76.  
  77. local tors
  78.  
  79. for i,v in pairs(workspace:children()) do
  80.  
  81. t, h = v:findFirstChild("Torso"), v:findFirstChild("Humanoid")
  82.  
  83. if t ~= nil and h ~= nil then
  84.  
  85. if (t.Position - pos).magnitude < d and h.Health > 0 then
  86.  
  87. d = (t.Position - pos).magnitude
  88.  
  89. tors = t
  90.  
  91. end
  92.  
  93. end
  94.  
  95. end
  96.  
  97. return tors
  98.  
  99. end
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107. function maketroll(pos)
  108.  
  109. local model = Instance.new("Model")
  110.  
  111. model.Name = "TROLLLLLLZ"
  112.  
  113. local body = Part(model, false, true, 0, 0, "Really black", 1.3, 4.5, 1.3, true)
  114.  
  115. local bg = Instance.new("BodyGyro",body)
  116.  
  117. bg.P = 6000
  118.  
  119. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  120.  
  121. local bv = Instance.new("BodyVelocity",body)
  122.  
  123. bv.P = 6000
  124.  
  125. bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  126.  
  127. bv.velocity = Vector3.new(0,0,0)
  128.  
  129. Instance.new("CylinderMesh",body)
  130.  
  131. local head = Part(model, false, true, 1, 0, "Really black", 3.5, 3.2, 0.4, true)
  132.  
  133. local neck = Weld(body, head, 0, 2.25+1.35, 0, 0, 0, 0)
  134.  
  135. local fr = Instance.new("Decal",head)
  136.  
  137. fr.Face = "Front"
  138.  
  139. fr.Texture = "http://www.roblox.com/asset/?id=29658197"
  140.  
  141. local ba = Instance.new("Decal",head)
  142.  
  143. ba.Face = "Back"
  144.  
  145. ba.Texture = "http://www.roblox.com/asset/?id=29658197"
  146.  
  147.  
  148.  
  149. local Ramodel = Instance.new("Model",model)
  150.  
  151. local rarm = Part(Ramodel, false, true, 0, 0, "Really black", 0.9, 0.7, 0.9, true)
  152.  
  153. Instance.new("CylinderMesh",rarm)
  154.  
  155. local rb = Part(model, false, true, 1, 0, "Really black", 0.1, 0.1, 0.1, true)
  156.  
  157. local rah = Weld(body, rb, 1, 1.8, 0, 0, 0, 0)
  158.  
  159. local rw = Weld(rb, rarm, 0, 0, 0, 0, 0, math.pi/2.8)
  160.  
  161.  
  162.  
  163. for i=0, -70, -10 do
  164.  
  165. local rarm2 = Part(Ramodel, false, true, 0, 0, "Really black", 0.9, 0.7, 0.9, true)
  166.  
  167. Instance.new("CylinderMesh",rarm2)
  168.  
  169. local w = Weld(rarm, rarm2, -3, 0, 0, 0, 0, math.rad(i))
  170.  
  171. w.C1 = CFrame.new(-3,0,0)
  172.  
  173. end
  174.  
  175.  
  176.  
  177. local Lamodel = Instance.new("Model",model)
  178.  
  179. local larm = Part(Lamodel, false, true, 0, 0, "Really black", 0.9, 0.7, 0.9, true)
  180.  
  181. Instance.new("CylinderMesh",larm)
  182.  
  183. local lb = Part(model, false, true, 1, 0, "Really black", 0.1, 0.1, 0.1, true)
  184.  
  185. local lah = Weld(body, lb, -1, 1.8, 0, 0, 0, 0)
  186.  
  187. local lw = Weld(lb, larm, 0, 0, 0, 0, math.pi, math.pi/2.8)
  188.  
  189.  
  190.  
  191. for i=0, -70, -10 do
  192.  
  193. local larm2 = Part(Lamodel, false, true, 0, 0, "Really black", 0.9, 0.7, 0.9, true)
  194.  
  195. Instance.new("CylinderMesh",larm2)
  196.  
  197. local w = Weld(larm, larm2, -3, 0, 0, 0, 0, math.rad(i))
  198.  
  199. w.C1 = CFrame.new(-3,0,0)
  200.  
  201. end
  202.  
  203.  
  204.  
  205. local Rlmodel = Instance.new("Model",model)
  206.  
  207. local rleg = Part(Rlmodel, false, true, 0, 0, "Really black", 0.9, 0.7, 0.9, true)
  208.  
  209. Instance.new("CylinderMesh",rleg)
  210.  
  211. local rlb = Part(model, false, true, 1, 0, "Really black", 0.1, 0.1, 0.1, true)
  212.  
  213. local rlh = Weld(body, rlb, 0, -1.9, 0, 0, 0, 0)
  214.  
  215. local rlw = Weld(rlb, rleg, 0, 0, 0, 0, 0, math.pi/2.8)
  216.  
  217.  
  218.  
  219. for i=0, -70, -10 do
  220.  
  221. local rleg2 = Part(Rlmodel, false, true, 0, 0, "Really black", 0.9, 0.7, 0.9, true)
  222.  
  223. Instance.new("CylinderMesh",rleg2)
  224.  
  225. local w = Weld(rleg, rleg2, -3, 0, 0, 0, 0, math.rad(i))
  226.  
  227. w.C1 = CFrame.new(-3,0,0)
  228.  
  229. end
  230.  
  231.  
  232.  
  233. local Llmodel = Instance.new("Model",model)
  234.  
  235. local lleg = Part(Llmodel, false, true, 0, 0, "Really black", 0.9, 0.7, 0.9, true)
  236.  
  237. Instance.new("CylinderMesh",lleg)
  238.  
  239. local llb = Part(model, false, true, 1, 0, "Really black", 0.1, 0.1, 0.1, true)
  240.  
  241. local llh = Weld(body, llb, 0, -1.9, 0, 0, 0, 0)
  242.  
  243. local llw = Weld(llb, lleg, 0, 0, 0, 0, math.pi, math.pi/2.8)
  244.  
  245.  
  246.  
  247. for i=0, -70, -10 do
  248.  
  249. local lleg2 = Part(Llmodel, false, true, 0, 0, "Really black", 0.9, 0.7, 0.9, true)
  250.  
  251. Instance.new("CylinderMesh",lleg2)
  252.  
  253. local w = Weld(lleg, lleg2, -3, 0, 0, 0, 0, math.rad(i))
  254.  
  255. w.C1 = CFrame.new(-3,0,0)
  256.  
  257. end
  258.  
  259. model.Parent = workspace
  260.  
  261. model:MakeJoints()
  262.  
  263. model:MoveTo(pos)
  264.  
  265. coroutine.resume(coroutine.create(function()
  266.  
  267. while true do
  268.  
  269. wait()
  270.  
  271. if body.Velocity.magnitude > 2 then
  272.  
  273. coroutine.resume(coroutine.create(function()
  274.  
  275. for i=0,40,5 do
  276.  
  277. rw.C1 = CFrame.Angles(math.rad(i),0,0)
  278.  
  279. lw.C1 = CFrame.Angles(math.rad(i),0,0)
  280.  
  281. llw.C1 = CFrame.Angles(math.rad(-i),0,0)
  282.  
  283. rlw.C1 = CFrame.Angles(math.rad(-i),0,0)
  284.  
  285. wait()
  286.  
  287. end
  288.  
  289. for i=40,-40,-5 do
  290.  
  291. rw.C1 = CFrame.Angles(math.rad(i),0,0)
  292.  
  293. lw.C1 = CFrame.Angles(math.rad(i),0,0)
  294.  
  295. llw.C1 = CFrame.Angles(math.rad(-i),0,0)
  296.  
  297. rlw.C1 = CFrame.Angles(math.rad(-i),0,0)
  298.  
  299. wait()
  300.  
  301. end
  302.  
  303. for i=-40,0,5 do
  304.  
  305. rw.C1 = CFrame.Angles(math.rad(i),0,0)
  306.  
  307. lw.C1 = CFrame.Angles(math.rad(i),0,0)
  308.  
  309. llw.C1 = CFrame.Angles(math.rad(-i),0,0)
  310.  
  311. rlw.C1 = CFrame.Angles(math.rad(-i),0,0)
  312.  
  313. wait()
  314.  
  315. end
  316.  
  317. end))
  318.  
  319. end
  320.  
  321. local jelly = findjelly(body.Position)
  322.  
  323. if jelly ~= nil then
  324.  
  325. bg.cframe = getcf(body.Position, jelly.Position)
  326.  
  327. bv.velocity = bg.cframe.lookVector * 25
  328.  
  329. else
  330.  
  331. bv.velocity = Vector3.new(0,0,0)
  332.  
  333. end
  334.  
  335. end
  336.  
  337. end))
  338.  
  339. end
  340.  
  341.  
  342.  
  343. maketroll(Vector3.new(0,5,0))
Add Comment
Please, Sign In to add comment