killerclowe

Untitled

Sep 24th, 2017
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.86 KB | None | 0 0
  1.  
  2. ply = game.Players.LocalPlayer
  3. char = ply.Character
  4. torso = char.Torso
  5.  
  6. legpos = CFrame.new(.5,-1.5,0)
  7. armpos = CFrame.new(1.5,.5,0)
  8.  
  9. ang = CFrame.Angles
  10. cfn = CFrame.new
  11.  
  12. Arms = {char["Left Arm"],char["Right Arm"]}
  13. Legs = {char["Left Leg"],char["Right Leg"]}
  14.  
  15. track = false
  16. m = Instance.new("Model",char)
  17.  
  18. meshids = {["blast"] = "http://www.roblox.com/asset/?id=20329976", ["penguin"] = "http://www.roblox.com/asset/?id=15853464", ["ring"] = "http://www.roblox.com/asset/?id=3270017",
  19. ["spike"] = "http://www.roblox.com/asset/?id=1033714",["cone"] = "http://www.roblox.com/asset/?id=1082802",["crown"] = "http://www.roblox.com/asset/?id=20329976",["arrow"] = "http://www.roblox.com/asset/?id=15886761",
  20. ["cloud"] = "http://www.roblox.com/asset/?id=1095708",["mjolnir"] = "http://www.roblox.com/asset/?id=1279013"}
  21. textureids = {["cone"] = "http://www.roblox.com/asset/?id=1082804",["rainbow"] = "http://www.roblox.com/asset/?id=28488599"}
  22.  
  23. --TOOLS--
  24. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored)
  25. c = Instance.new("Part",m)
  26.  
  27. c.TopSurface,c.BottomSurface = 0,0
  28. c.formFactor = "Custom"
  29. c.Size = Vector3.new(x,y,z)
  30. c.BrickColor = BrickColor.new(color)
  31. c.Transparency = transparency
  32. c.CanCollide = cancollide
  33. if anchored ~= nil then c.Anchored = anchored end
  34. return c
  35. end
  36. ,
  37. ["W"] = function(part0,part1,x,y,z,rx,ry,rz)
  38. w = Instance.new("Weld",m)
  39. w.Part0,w.Part1 = part0,part1
  40. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  41. return w
  42. end
  43. ,
  44. ["F"] = function(parent,size,heat,color,secondcolor)
  45. f = Instance.new("Fire",parent)
  46. f.Size = size
  47. f.Heat = heat
  48. if color ~= nil then f.Color = BrickColor.new(color).Color end
  49. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  50. return f
  51. end
  52. ,
  53. ["BP"] = function(parent,position)
  54. local bp = Instance.new("BodyPosition",parent)
  55. bp.maxForce = Vector3.new()*math.huge
  56. bp.position = position
  57. end
  58. ,
  59. ["R"] = function(part,x,y,z)
  60. if part == "lleg" then
  61. legw[1].C1 = CFrame.new(.5,-1.5,0)*ang(x,y,z)
  62. elseif part == "rleg" then
  63. legw[2].C1 = CFrame.new(-.5,-1.5,0)*ang(x,y,z)
  64. elseif part == "larm" then
  65. armw[1].C1 = CFrame.new(1.5,.5,0)*ang(x,y,z)
  66. elseif part == "rarm" then
  67. armw[2].C1 = CFrame.new(-1.5,.5,0)*ang(x,y,z)
  68. end
  69. end
  70. ,
  71. ["Track"] = function(obj,t,lt)
  72. coroutine.resume(coroutine.create(function()
  73. while track do
  74. old = obj.Position
  75. wait()
  76. new = obj.Position
  77.  
  78. mag = (old-new).magnitude
  79. dist = (old+new)/2
  80.  
  81. ray = T.P(t,mag+.2,t,obj.Color,t)
  82. Instance.new("CylinderMesh",ray)
  83. ray.Anchored = true
  84. ray.CanCollide = false
  85. ray.CFrame = CFrame.new(dist,old)*ang(math.pi/2,0,0)
  86. game:GetService("Debris"):AddItem(ray,lt)
  87. end
  88. end)) end,
  89. ["Reset"] = function(a)
  90. if a == "all" then
  91. T.R("lleg",0,0,0) T.R("rleg",0,0,0) T.R("rarm",0,0,0) T.R("larm",0,0,0)
  92. else
  93. for i,v in pairs({"lleg","llarm","rarm","rleg"}) do T.R(v,0,0,0) end
  94. end
  95. end
  96. ,
  97. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  98. mesh = Instance.new("SpecialMesh",parent)
  99. mesh.MeshId = meshids[meshid]
  100. mesh.Scale = Vector3.new(x,y,z)
  101. if meshtexture ~= nil then
  102. mesh.TextureId = textureids[meshtexture]
  103. end
  104. return mesh
  105. end
  106. ,
  107. ["BG"] = function(parent)
  108. local c = Instance.new("BodyGyro",parent)
  109. c.P = 20e+003
  110. c.cframe = parent.CFrame
  111. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  112. return c
  113. end
  114. ,
  115. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  116. ,
  117. ["Lazor"] = function(from,to,size,color,lt,ball)
  118. mag = (from-to).magnitude
  119.  
  120. p = T.P(size,mag,size,color,.5,false,true)
  121. p.Name = "Ray"
  122. p.CFrame = (CFrame.new(from,to) * CFrame.new(0,0,-mag/2))* ang(math.pi/2,0,0)
  123. if lt > 0 then
  124. game:GetService("Debris"):AddItem(p,lt)
  125. end
  126.  
  127. if ball ~= nil then
  128. ball.Anchored = true
  129. ball.Parent = p
  130. ball.CFrame = p.CFrame * CFrame.new(0,-mag/2,0)
  131. end
  132. return p
  133. end
  134. }
  135. ---------
  136.  
  137. function damage(hit,amount)
  138. for i,v in pairs(hit.Parent:GetChildren()) do
  139. if v:IsA("Humanoid") and v.Parent ~= char then
  140.  
  141. if v.MaxHealth > 100 then v.Parent:BreakJoints() end
  142. v.Health = v.Health - amount
  143.  
  144. amo = 0
  145. for i,o in pairs(v.Parent:GetChildren()) do
  146. if o:IsA("BillboardGui") and o.Name == "satuttava" then
  147. amo = amo+1
  148. end end
  149.  
  150. local bbg = Instance.new("BillboardGui",v.Parent)
  151. bbg.Adornee = v.Torso
  152. bbg.Name = "satuttava"
  153. bbg.Size = UDim2.new(2,0,2,0)
  154. bbg.StudsOffset = Vector3.new(0,6+amo*2,0)
  155.  
  156. box = Instance.new("TextLabel",bbg)
  157. box.Size = UDim2.new(1,0,1,0)
  158. box.BackgroundColor = BrickColor.new("White")
  159. box.Text = amount
  160. box.Position = UDim2.new(0,0,0,0)
  161. box.TextScaled = true
  162. game:GetService("Debris"):AddItem(bbg,.5)
  163. end
  164. end
  165. end
  166.  
  167.  
  168. function left()
  169. T.R("rleg",math.rad(100),0,math.rad(30))
  170. T.R("lleg",math.rad(-10),0,math.rad(30))
  171. end
  172. function right()
  173. T.R("rleg",math.rad(-10),0,math.rad(-30))
  174. T.R("lleg",math.rad(100),0,math.rad(-30))
  175. end
  176.  
  177. function penguin(mouse)
  178. local orb = T.P(1,1,1,"White",0,false)
  179. msh = T.FM(orb,"penguin",1,1,1,"rainbow")
  180.  
  181. local orb2 = orb:Clone()
  182. orb2.Parent = m
  183.  
  184. w = T.W(orb,Arms[1],0,-1.45,0,0,0,0)
  185. w = T.W(orb2,Arms[2],0,-1.45,0,0,0,0)
  186.  
  187. T.R("larm",math.rad(-50),0,0)
  188. T.R("rarm",0,0,-math.pi/2)
  189. wait(0.5)
  190. local fire = T.F(orb,5,1,"Pink","Cyan")
  191. T.C(function() while true do wait(0.05) fire.Color = BrickColor:random().Color end end)
  192.  
  193. local fire2 = T.F(orb2,5,1,"Pink","Cyan")
  194. T.C(function() while true do wait(0.05) fire.Color = BrickColor:random().Color end end)
  195.  
  196. wait(0.5)
  197. T.R("larm",math.rad(70),0,0)
  198. T.R("rarm",math.rad(70),0,0)
  199.  
  200.  
  201. for i = 1,50 do
  202. wait()
  203. for i,v in pairs({orb,orb2}) do
  204. T.Lazor(v.Position,torso.Position + torso.CFrame.lookVector * 30,1,BrickColor:random().Name,.1)
  205. end
  206. end
  207.  
  208. orb:Remove() orb2:Remove()
  209.  
  210. wait(.5)
  211.  
  212. for i = 1,10 do
  213. wait()
  214. armw[1].C1 = armw[1].C1 * ang(math.rad(-7),0,0)
  215. armw[2].C1 = armw[2].C1 * ang(math.rad(-7),0,0)
  216. end
  217.  
  218. end
  219.  
  220. function punch(mouse)
  221. bg = T.BG(torso)
  222.  
  223. orbo = Instance.new("Model",m)
  224. orb = T.P(2,2,2,"Cyan",0,1)
  225. orb.Parent = orbo
  226.  
  227. Instance.new("SpecialMesh",orb).MeshType = 3
  228.  
  229. r = 3
  230. track = true
  231.  
  232. for i = 1,360,60 do
  233. local part = orb:Clone()
  234. part.Parent = orbo
  235. part.Size = Vector3.new(.5,.5,.5)
  236. local weld = T.W(part,orb,math.cos(math.rad(i))*r,0,math.sin(math.rad(i))*r,0,0,0)
  237. T.C(function()
  238. for o = 10,r,-.5 do
  239. wait()
  240. weld = T.W(part,orb,math.cos(math.rad(i))*o,0,math.sin(math.rad(i))*o,0,0,0)
  241. end
  242. end)
  243. end
  244.  
  245. needle = T.P(.4,4,.4,"Black",0,1)
  246. needle.Parent = orbo
  247. mesh = T.FM(needle,"spike",.4,5.2,.4)
  248. T.W(needle,orb,0,-3,0,math.pi,0,0)
  249.  
  250. T.W(orb,Arms[2],0,-1.5,0,0,0,0).Parent = orb
  251.  
  252. T.R("rarm",0,0,-math.pi/2)
  253. T.R("larm",0,0,math.pi/2)
  254. T.R("rleg",0,0,math.rad(-40))
  255. T.R("lleg",0,0,math.rad(40))
  256.  
  257. bp = Instance.new("BodyPosition",torso)
  258. bp.maxForce = Vector3.new() * math.huge
  259. bp.position = torso.Position + Vector3.new(0,100,0)
  260.  
  261. touch = true
  262. mouse.Button1Down:connect(function() touch = false end)
  263.  
  264. while touch == true do
  265. wait()
  266. bg.cframe = mouse.hit
  267. end
  268.  
  269. local p = mouse.hit.p
  270.  
  271. bg.cframe = cfn(torso.Position,p)*ang(-math.pi/2,0,0)
  272. T.Reset("all") T.R("rarm",math.pi,0,0)
  273.  
  274. bp:Remove()
  275. bv = Instance.new("BodyVelocity",orb)
  276. bv.maxForce = Vector3.new() * math.huge
  277. bv.velocity = (torso.Position-p).unit * -300
  278.  
  279. needle.Touched:wait()
  280. e = Instance.new("Explosion",Workspace)
  281. e.BlastRadius = 20
  282. e.BlastPressure = 0
  283. e.Position = orb.Position
  284. e.Hit:connect(function(hit) damage(hit,600) end)
  285. T.C(function()
  286. local pos = (needle.CFrame * CFrame.new(0,-2,0)).p
  287. local part = T.P(1,1,1,"Neon orange",0,0,1)
  288. part.CFrame = CFrame.new(pos)
  289.  
  290. local msh = T.FM(part,"blast",1,1,1)
  291.  
  292. for i = 1,30,.5 do
  293. wait()
  294. msh.Scale = Vector3.new(i,i*.25,i)
  295. part.Transparency = i/30
  296. end
  297.  
  298. part:Remove()
  299. end)
  300.  
  301. orbo:Remove() bg:Remove() T.Reset("all")
  302.  
  303. end
  304.  
  305. function dance()
  306.  
  307. armw[1].C1 = cfn(1,1.5,0) * ang(0,0,math.pi/2)
  308. armw[2].C1 = cfn(-1,1.5,0) * ang(0,0,-math.pi/2)
  309. legw[1].C1 = cfn(1.5,-.5,0)
  310. legw[2].C1 = cfn(-1.5,-.5,0)
  311.  
  312. motor1 = T.P(.1,.1,.1,"Cyan",1,0)
  313. motor2 = T.P(.1,.1,.1,"Cyan",1,0)
  314. T.W(motor1,Legs[1],0,-1.5,0,math.pi,0,0).Parent = motor1
  315. T.W(motor2,Legs[2],0,-1.5,0,math.pi,0,0).Parent = motor2
  316.  
  317. T.F(motor1,4,3,"Bright red","New Yeller")
  318. T.F(motor2,4,3,"Bright red","New Yeller")
  319.  
  320. backplant = T.P(.5,2.8,2,"Black",.2,0)
  321. T.W(backplant,torso,0,0,.9,0,math.pi/2,math.pi/2)
  322. Instance.new("FileMesh",backplant).MeshId = "http://www.roblox.com/asset/?id=1091940"
  323.  
  324. spike = T.P(.4,1.8,.4,"Earth green",0,0)
  325. spike.Touched:connect(function(hit) damage(hit,10) end)
  326. T.W(spike,torso,0,-2,0,math.pi,0,0)
  327. mesh = T.FM(spike,"spike",.4,4,.4)
  328. end
  329.  
  330. holding = false
  331. bp = nil
  332.  
  333. split = function() T.R("lleg",0,0,math.rad(30))
  334. T.R("rleg",0,0,math.rad(-30)) end
  335.  
  336. function levitate()
  337. if bp == nil then
  338. split()
  339. bp = Instance.new("BodyPosition",torso)
  340. bp.maxForce = Vector3.new()*math.huge
  341. bp.position = torso.Position + Vector3.new(0,3,0)
  342. elseif bp ~= nil then bp:Remove() bp = nil T.Reset("all")
  343. end
  344. end
  345.  
  346. function hopleft()
  347. if bp ~= nil then
  348.  
  349. local orb = T.P(.1,.1,.1,"Neon orange",1)
  350. T.F(orb,5,0,"Cyan","Lime green")
  351. T.W(orb,Legs[1],0,-1.45,0,0,0,0)
  352. track = true T.Track(orb,.1,.5)
  353.  
  354. left()
  355. local look = torso.CFrame.lookVector
  356. holding = true
  357.  
  358. while holding do
  359. wait()
  360. bp.position = ((torso.CFrame + look) * CFrame.new(10,0,-5)).p
  361. end
  362. track = false orb:Remove()
  363.  
  364. T.R("lleg",0,0,math.rad(30))
  365. T.R("rleg",0,0,math.rad(-30))
  366. end
  367. end
  368.  
  369. function hopright()
  370. if bp ~= nil then
  371.  
  372. local orb = T.P(.1,.1,.1,"Neon orange",1)
  373. T.W(orb,Legs[2],0,-1.45,0,0,0,0)
  374. T.F(orb,5,0,"Cyan","Lime green")
  375.  
  376. track = true T.Track(orb,.1,.5)
  377.  
  378. right()
  379. local look = torso.CFrame.lookVector
  380. holding = true
  381.  
  382. while holding do
  383. wait()
  384. bp.position = ((torso.CFrame + look) * CFrame.new(-10,0,-5)).p
  385. end
  386. track = false orb:Remove()
  387.  
  388. T.R("lleg",0,0,math.rad(30))
  389. T.R("rleg",0,0,math.rad(-30))
  390. end
  391. end
  392.  
  393. function spell()
  394. T.C(function()
  395. pose()
  396. local pos = torso.CFrame - torso.CFrame.lookVector * 10 - Vector3.new(0,2,0)
  397. old = T.P(3,3,3,"Nougat",.25,1,1)
  398. old.CFrame = pos
  399. for i = 1,22.5+1 do
  400. local new = old:Clone()
  401. new.Parent = m
  402. wait()
  403. old = new
  404. new.CFrame = (old.CFrame * cfn(0,3,0))*ang(math.rad(-8),0,0)
  405. end
  406. T.Reset("rarm") T.R("larm",0,0,0)
  407. end)
  408. end
  409.  
  410. local new,old = nil
  411. function rings(mode)
  412. if mode == 1 then
  413. for i,v in pairs(m:GetChildren()) do
  414. if v.Name =="Spere" then
  415. old = v
  416. end end
  417.  
  418.  
  419. local new = T.P(1,1,1,"Pink",0,false,false)
  420. new.Name = "Spere"
  421. T.FM(new,"cone",1.5,1.5,1.5,"cone")
  422. T.F(new,5,0,"White","Black")
  423. new.CFrame = torso.CFrame
  424. for i = 1,360,60 do
  425. p = T.P(5,.3,5,"Cyan",.2,false,false)
  426. p.Parent = new
  427. p.Position = torso.Position
  428. T.FM(p,"ring",5,5,.3)
  429.  
  430. T.W(p,new,0,0,0,math.rad(i),0,0)
  431.  
  432. end
  433. bodypos = T.BP(new,torso.Position)
  434. wait(.75)
  435. pcall(function() lazer = T.Lazor(cfn(old.Position).p,cfn(new.Position).p,.5,"Cyan",0)
  436. lazer.Touched:connect(function(hit) damage(hit,100) end)
  437. end)
  438.  
  439. elseif mode == 0 then
  440. for i,v in pairs(m:GetChildren()) do
  441. if v.Name =="Spere" or v.Name == "Ray" then
  442. v:Remove()
  443. end end
  444. old = nil new = nil
  445. end
  446. end
  447.  
  448. function spin()
  449.  
  450. local orb = T.P(.1,.1,.1,"White",1,0)
  451. T.W(orb,Arms[1],0,-2,0,0,0,0)
  452.  
  453. local connect = orb.Touched:connect(function(hit) damage(hit,1) end)
  454.  
  455. local orb2 = T.P(.1,.1,.1,"White",1,0)
  456. T.W(orb2,Arms[2],0,-2,0,0,0,0)
  457.  
  458. local connect2 = orb2.Touched:connect(function(hit) damage(hit,1) end)
  459.  
  460. T.R("rarm",0,0,-math.pi/2)
  461. T.R("larm",0,0,math.pi/2)
  462. track = true
  463. T.Track(orb,.1,.5)
  464. T.Track(orb2,.1,.5)
  465. legw[2].C1 = legw[2].C1 * cfn(0,.4,0)
  466.  
  467. bg = T.BG(torso)
  468.  
  469. holding = true
  470. while holding do
  471. for i = 1,360,60 do
  472. wait()
  473. bg.cframe = bg.cframe * ang(0,math.rad(60),0)
  474. end
  475. end
  476. connect:disconnect() connect2:disconnect()
  477. track = false
  478. bg:Remove()
  479. T.Reset("all")
  480. end
  481.  
  482. hop = Instance.new("HopperBin",ply.Backpack)
  483. hop.Name = "Tool"
  484.  
  485. pose = function()
  486. T.R("larm",math.rad(150),0,math.rad(-20))
  487. T.R("rarm",math.rad(150),0,math.rad(20))
  488. end
  489.  
  490. hop.Selected:connect(function(mouse)
  491. -------SET WELDS---------
  492. armp = {T.P(1,1,1,"White",1),T.P(1,1,1,"White",1,1)}
  493. legp = {T.P(1,1,1,"White",1),T.P(1,1,1,"White",1,1)}
  494.  
  495. armw = {T.W(armp[1],torso,1.5,.5,0,0,0,0),T.W(armp[2],torso,-1.5,.5,0,0,0,0)}
  496. legw = {T.W(legp[1],torso,.5,-1.5,0,0,0,0),T.W(legp[2],torso,-.5,-1.5,0,0,0,0)}
  497.  
  498. others = {
  499. T.W(Arms[1],armp[1],0,-.5,0,0,0,0),
  500. T.W(Arms[2],armp[2],0,-.5,0,0,0,0),
  501. T.W(Legs[1],legp[1],0,-.5,0,0,0,0),
  502. T.W(Legs[2],legp[2],0,-.5,0,0,0,0)
  503. }
  504. -------------------------
  505.  
  506.  
  507. mouse.KeyDown:connect(function(key)
  508. if key == "q" then hopleft()
  509. elseif key == "e" then hopright()
  510. elseif key == "r" then levitate()
  511. elseif key == "f" then spin()
  512. elseif key == "c" then penguin(mouse)
  513. elseif key == "t" then punch(mouse)
  514. elseif key == "y" then dance()
  515. elseif key == "h" then spell()
  516. elseif key == "v" then rings(1) elseif key == "b" then rings(0)
  517. end end)
  518. mouse.KeyUp:connect(function(key) for i,v in pairs({"e","q","r","f"}) do if key == v then holding = false end end end)
  519. end)
  520.  
  521. hop.Deselected:connect(function() pcall(function()bp:Remove() bp = nil end)
  522. armp[1]:Remove() armp[2]:Remove() legp[1]:Remove() legp[2]:Remove() end)
Add Comment
Please, Sign In to add comment