Dogeking

icey void staff

Jun 4th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.19 KB | None | 0 0
  1. pl = game.Players.LocalPlayer
  2. local mouse = pl:GetMouse()
  3. char = pl.Character
  4. torso = char.Torso
  5. rarm,larm = char['Right Arm'],char['Left Arm']
  6. Debris = game:GetService("Debris")
  7. pcall(function() char.Sole:Destroy() end)
  8. Weapon = Instance.new("Model",char) Weapon.Name = 'Sole'
  9. cfn = CFrame.new
  10. ang = CFrame.Angles
  11.  
  12. Colors = {}
  13. Colors.Fire = 'Alder'
  14. Colors.Handle = 'Magenta'
  15. Colors.Handle2 = 'Alder'
  16. Colors.Ball = 'Magenta'
  17. Colors.Ball2 = 'Alder'
  18. Colors.Ring = 'Magenta'
  19.  
  20. Meshes = {Diamond = 'rbxassetid://9756362'}
  21.  
  22. tw = function(Weld, Stop, Step,a)
  23. local func = function()
  24. local Start = Weld.C0
  25. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  26. local Stop = Stop
  27. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  28.  
  29. for i = 0, 1, Step or .1 do
  30. Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  31. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  32. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  33. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  34. (Z1 * (1 - i)) + (Z2 * i) )
  35. wait()
  36. end
  37.  
  38. Weld.C0 = Stop
  39. end
  40. if a then coroutine.wrap(function() func() end)() else func() end
  41. end
  42.  
  43. Part = function(x,y,z,color,tr,cc,an,parent)
  44. local p = Instance.new('Part',parent or Weapon)
  45. p.formFactor = 'Custom'
  46. p.Size = Vector3.new(x,y,z)
  47. p.BrickColor = BrickColor.new(color)
  48. p.CanCollide = cc
  49. p.Transparency = tr
  50. p.Anchored = an
  51. p.TopSurface,p.BottomSurface = 0,0
  52. return p
  53. end
  54. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  55. p0.Position = p1.Position
  56. local w = Instance.new('Motor',par or p0)
  57. w.Part0 = p0
  58. w.Part1 = p1
  59. w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz)
  60. return w
  61. end
  62. Mesh = function(par,num,x,y,z)
  63. local msh = _
  64. if num == 1 then msh = Instance.new("CylinderMesh",par)
  65. elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
  66. elseif num == 3 then msh = Instance.new("BlockMesh",par)
  67. elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par) msh.MeshId = num
  68. end
  69. msh.Scale = Vector3.new(x,y,z)
  70. return msh
  71. end
  72.  
  73. function FindHumanoid(a)
  74. local hum = _
  75. for i,v in pairs(a:children()) do
  76. if v:IsA("Humanoid") then hum = v end
  77. end
  78. return hum
  79. end
  80.  
  81. function calcp(a,b) --- Direction CFrame
  82. return cfn(a,Vector3.new(b.x,a.y,b.z))
  83. end
  84.  
  85. Sound = {}
  86. Sound.new = function(id,pitch)
  87. snd = Instance.new("Sound",Weapon)
  88. snd.SoundId = id
  89. snd.Pitch = pitch
  90. return snd
  91. end
  92. rw,lw = _,_
  93. function Lock(which)
  94. if which == 'R' then
  95. if not rw then
  96. rabr = Part(1,1,1,'Alder',1,false,false)
  97. rabr.Position = torso.Position
  98. rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = Weapon
  99. w = Instance.new("Weld",Weapon)
  100. w.Part0,w.Part1 = char['Right Arm'],rabr
  101. w.C1 = CFrame.new(0,-.5,0)
  102. else
  103. rabr:Destroy()
  104. rw = _
  105. end
  106. elseif which == 'L' then
  107. if not lw then
  108. labr = Part(1,1,1,'Alder',1,false,false)
  109. labr.Position = torso.Position
  110. lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = Weapon
  111. w = Instance.new("Weld",Weapon)
  112. w.Part0,w.Part1 = char['Left Arm'],labr
  113. w.C1 = CFrame.new(0,-.5,0)
  114. else
  115. labr:Destroy()
  116. lw = _
  117. end
  118. end
  119. end
  120.  
  121. --Sounds
  122. Growl = Sound.new("http://www.roblox.com/Asset/?id=25954372",1)
  123. Beam = Sound.new("http://www.roblox.com/Asset/?id=1369158",1)
  124.  
  125. hdl = Part(.25,4,.25,Colors.Handle,0,false,false)
  126. hw = Weld(hdl,rarm,0,-1,0,math.pi/2,0,0)
  127. Mesh(hdl,1,1,1,1)
  128. hdl2 = Part(.3,1,.3,Colors.Handle2,0,false,false)
  129. Weld(hdl2,hdl,0,0,0,0,0,0)
  130. Mesh(hdl2,1,1,1,1)
  131.  
  132. r = .5
  133.  
  134. ball = Part(1,1,1,Colors.Ball,0,false,false)
  135. Mesh(ball,2,1,1,1)
  136. Weld(ball,hdl,0,2,0,0,0,0)
  137. mball = Part(.5,.5,.5,Colors.Ball2,0,false,false)
  138. Mesh(mball,Meshes.Diamond,.5,1,.5)
  139. Weld(mball,ball,0,.5,0,0,0,0)
  140.  
  141. ball2 = Part(1,1,1,Colors.Ball,0,false,false)
  142. Mesh(ball2,2,1,1,1)
  143. Weld(ball2,hdl,0,-2,0,math.pi,0,0)
  144. mball2 = mball:Clone() mball2.Parent = Weapon
  145. Weld(mball2,ball2,0,.5,0,0,0,0)
  146. fire = Instance.new("Fire",ball) fire.Enabled = false
  147. fire.Size = 5
  148. fire.Color = BrickColor.new(Colors.Fire).Color
  149. fire2 = fire:Clone() fire2.Parent = ball2
  150.  
  151. ball1p,ball2p = {},{}
  152. for i = 1,360,30 do
  153. p = Part(.3,.3,.3,Colors.Ring,0,false,false)
  154. w = Weld(p,ball,math.cos(math.rad(i))*r,0,math.sin(math.rad(i))*r,math.pi/2,0,math.pi/2+math.rad(i))
  155. table.insert(ball1p,w)
  156. p = Part(.3,.3,.3,Colors.Ring,0,false,false)
  157. w = Weld(p,ball2,math.cos(math.rad(i))*r,0,math.sin(math.rad(i))*r,math.pi/2,0,math.pi/2+math.rad(i))
  158. table.insert(ball2p,w)
  159. end
  160.  
  161. function hurt(hit,amount,bp) local found = _
  162. local hum = FindHumanoid(hit.Parent)
  163. if hum then
  164. if hum.Parent ~= char then
  165. if bp then
  166. if hum:FindFirstChild'lol' == nil then
  167. local a = Instance.new("StringValue",hum)
  168. a.Name = 'lol'
  169. hum.Health = hum.Health - amount found = hum
  170. Debris:AddItem(a,bp)
  171. end
  172. else hum.Health = hum.Health - amount found = hum
  173. end end end
  174. return hum
  175. end
  176.  
  177. Swing = Sound.new("http://www.roblox.com/Asset/?id=12555594",3)
  178. function wave()
  179. Lock'L'
  180. tw(lw,cfn()*ang(-math.pi/2,math.rad(-70),0))
  181. local p = Part(3,3,3,'Royal purple',0,true,true)
  182. p.CFrame = torso.CFrame*cfn(-8,0,-5)
  183. p.Material = 'Ice' stopped = false
  184.  
  185. p.Touched:connect(function(hit) if hit.Parent == char then return end
  186. local h = FindHumanoid(hit.Parent)
  187. if h then h.Sit = true end
  188. end)
  189. tw(lw,cfn()*ang(-math.pi/2,math.rad(40),0),.15,'') Swing:Play()
  190. st,en = torso.CFrame*cfn(-8,0,-6),torso.CFrame*cfn(5,0,-6)
  191. for i = 0,1,.15 do
  192. wait()
  193. st,en = torso.CFrame*cfn(-8,0,-6),torso.CFrame*cfn(5,0,-6)
  194. p.CFrame = CFrame.new(st.X*(1-i)+en.X*i,st.Y*(1-i)+en.Y*i,st.Z*(1-i)+en.Z*i)
  195. p.CFrame = calcp(p.Position,torso.Position)
  196. local cl = Part(3,3,3,'Royal purple',0,true,true)
  197. cl.CFrame = p.CFrame local cf = cl.CFrame
  198. delay(.1,function()
  199. for i = 0,1,.1 do wait()
  200. cl.Size = Vector3.new(3-(i*2.5),3-(i*2.5),3-(i*2.5))
  201. cl.CFrame = cf
  202. cl.Transparency = i
  203. end cl:Destroy()
  204. end)
  205. end
  206. stopped = true
  207. local cf = p.CFrame
  208. coroutine.wrap(function()
  209. for i = 3,.1,-.1 do
  210. wait()
  211. p.Size = Vector3.new(i,i,i) p.CFrame = cf
  212. end
  213. p:Destroy()
  214. end)()
  215. tw(lw,cfn())
  216. Lock'L'
  217. end
  218. Grind = Sound.new("http://www.roblox.com/Asset/?id=18426149",1)
  219. Spin = Sound.new("http://www.roblox.com/asset/?id=45885547",1)
  220. Hit = Sound.new("http://www.roblox.com/Asset/?id=3931318",2)
  221. Charge = Sound.new("http://www.roblox.com/asset/?id=32656713",1)
  222. function spin()
  223. Lock'R'
  224. Lock'L'
  225. tw(rw,cfn(.3,.7,0)*ang(-math.pi/2,math.rad(-40),0),.1,'')
  226. tw(lw,cfn(-.3,.7,0)*ang(-math.pi/2,math.rad(40),0),.1)
  227. hw.Part1 = torso
  228. hw.C1 = CFrame.new(0,.5,-1.75)
  229. bb = Part(.1,.1,.1,'Alder',0,false,false)
  230. msh = Mesh(bb,2,1,1,1)
  231. Weld(bb,ball,0,0,0,0,0,0)
  232. bb2 = Part(.1,.1,.1,'Alder',0,false,false)
  233. msh2 = Mesh(bb2,2,1,1,1)
  234. Weld(bb2,ball2,0,0,0,0,0,0) Grind:Play()
  235. local con = ball.Touched:connect(function(hit) hurt(hit,1) Hit:Play() end)
  236. local con2 = ball2.Touched:connect(function(hit) hurt(hit,1) Hit:Play() end)
  237. for i = .5,1,.1 do wait()
  238. for o,v in pairs(ball1p) do
  239. v.C1 = cfn(math.cos(math.rad(o*30))*i,0,math.sin(math.rad(o*30))*i)*ang(math.pi/2,0,math.pi/2+math.rad(o*30))
  240. end
  241. for o,v in pairs(ball2p) do
  242. v.C1 = cfn(math.cos(math.rad(o*30))*i,0,math.sin(math.rad(o*30))*i)*ang(math.pi/2,0,math.pi/2+math.rad(o*30))
  243. end
  244. msh.Scale = Vector3.new(1,1,1)*(i*10)
  245. msh2.Scale = Vector3.new(1,1,1)*(i*10)
  246. end Spin:Play()
  247. for i = 1,360*3,30 do
  248. wait()
  249. hw.C0 = cfn()*ang(0,0,math.rad(i))
  250. end
  251. tw(hw,cfn())
  252. Grind:Play()
  253. for i = 1,.5,-.1 do wait()
  254. for o,v in pairs(ball1p) do
  255. v.C1 = cfn(math.cos(math.rad(o*30))*i,0,math.sin(math.rad(o*30))*i)*ang(math.pi/2,0,math.pi/2+math.rad(o*30))
  256. end
  257. for o,v in pairs(ball2p) do
  258. v.C1 = cfn(math.cos(math.rad(o*30))*i,0,math.sin(math.rad(o*30))*i)*ang(math.pi/2,0,math.pi/2+math.rad(o*30))
  259. end
  260. msh.Scale = Vector3.new(1,1,1)*(i*10)
  261. msh2.Scale = Vector3.new(1,1,1)*(i*10)
  262. end
  263. hw.Part1 = char['Right Arm']
  264. hw.C1 = CFrame.new(0,-1,0)*CFrame.Angles(math.pi/2,0,0)
  265. bb:Destroy() bb2:Destroy()
  266. tw(rw,cfn(),.1,'')
  267. tw(lw,cfn())
  268. con:disconnect() con2:disconnect()
  269. Lock'R' Lock'L'
  270. end
  271. Lift = Sound.new("http://www.roblox.com/Asset/?id=3931318",1)
  272. Grow = Sound.new("http://www.roblox.com/Asset/?id=2974249",1)
  273. Ignite = Sound.new("http://www.roblox.com/Asset/?id=14863866",1)
  274. Tele = Sound.new("http://www.roblox.com/Asset/?id=13114759",1)
  275. function teleport()
  276. p = Part(1,1,1,'Royal purple',.5,false,false)
  277. Mesh(p,Meshes.Diamond,9,9,9)
  278. w = Weld(p,torso,0,0,0,math.pi/2,0,0)
  279. for i = .5,0,-.05 do wait() p.Transparency = i end
  280. Tele:Play()
  281. char:MoveTo(mouse.hit.p) Tele:Play()
  282. for i = 0,1,.05 do wait() p.Transparency = i end
  283. p:Destroy()
  284. end
  285.  
  286. function beam()
  287. Lock'R' Lock'L'
  288. tw(rw,cfn()*ang(math.rad(-30),0,0),.1,'')
  289. tw(lw,cfn()*ang(math.rad(-30),0,0),.1)
  290. hw.C1 = CFrame.new(0,-1,0)*ang(0,0,math.pi/2)
  291. hw.C0 = cfn(0,-1.435,0)
  292. wait(.2) Lift:Play()
  293. tw(rw,cfn()*ang(math.rad(-150),0,0),.3,'')
  294. tw(lw,cfn()*ang(math.rad(-150),0,0),.3)
  295.  
  296. fire.Enabled,fire2.Enabled = true,true
  297. Grow:Play()
  298. for o = 1,10 do wait()
  299. local spike = Part(5,1,5,'Royal purple',.5,true,true)
  300. spike.CFrame = torso.CFrame*cfn(0,-2,-5-o*5)
  301. local cf = spike.CFrame
  302. coroutine.wrap(function()
  303. for i = 1,20,2.5 do wait()
  304. spike.Size = Vector3.new(spike.Size.x,i,spike.Size.z)
  305. spike.CFrame = cf*cfn(0,i/2,0)
  306. end
  307. for i = 20,1,-2.5 do wait()
  308. spike.Size = Vector3.new(spike.Size.x,i,spike.Size.z)
  309. spike.CFrame = cf*cfn(0,i/2,0)
  310. end
  311. spike:Destroy()
  312. end)()
  313. end
  314. fire.Enabled,fire2.Enabled = false,false
  315. tw(rw,cfn()*ang(math.rad(-30),0,0),.1,'')
  316. tw(lw,cfn()*ang(math.rad(-30),0,0))
  317. hw.C1 = CFrame.new(0,-1,0)*ang(math.pi/2,0,0)
  318. hw.C0 = cfn()
  319. tw(rw,cfn(),.1,'')
  320. tw(lw,cfn())
  321. Lock'R' Lock'L'
  322. end
  323. Crkl = Sound.new("http://www.roblox.com/Asset/?id=15933756",1)
  324.  
  325. function ignite()
  326.  
  327. Lock'R'
  328. tw(rw,cfn()*ang(-math.rad(90),math.rad(20),0))
  329. Ignite:Play()
  330. fire2.Enabled = true,true
  331. wait(1)
  332. local con = ball2.Touched:connect(function(hit) if hurt(hit,30,1) then Crkl:Play() end end)
  333. tw(rw,cfn()*ang(-math.rad(130),math.rad(40),0),.1,'')
  334. tw(hw,cfn(0,1,0))
  335. tw(rw,cfn()*ang(math.rad(20),math.rad(-20),0),.3)
  336. tw(rw,cfn(),.3,'') Ignite:Play() con:disconnect()
  337. tw(hw,cfn(),.3)
  338. fire2.Enabled = false,false
  339. Lock'R'
  340. end
  341.  
  342. function clone()
  343. char.archivable = true
  344. local cl = char:Clone()
  345. cl.Parent = Workspace
  346. cl.Torso.CFrame = torso.CFrame*cfn(0,0,-4)
  347. cl.Humanoid.Died:connect(function() cl:Destroy() end)
  348. end
  349.  
  350. function shoot()
  351. Lock'R'
  352. tw(rw,cfn()*ang(-math.pi/2,0,0),.1)
  353. mag = (hdl.Position-mouse.hit.p).magnitude
  354. local p = Part(3,mag,3,'Alder',0,false,true)
  355. p.CFrame = (CFrame.new(hdl.Position,mouse.hit.p)*CFrame.new(0,0,-mag/2))*CFrame.Angles(math.pi/2,0,0)
  356. cf = p.CFrame
  357. Beam:Play()
  358. hole = Part(30,.5,30,'Royal purple',0,true,true)
  359. hole.CFrame = CFrame.new(mouse.hit.p)
  360. Mesh(hole,1,1,1,1)
  361. for i = 1,0,-.1 do wait()
  362. p.Size = Vector3.new(i*3,mag,i*3)
  363. p.CFrame = cf
  364. end
  365. coroutine.wrap(function()
  366. for i = 0,1,.1 do
  367. wait()
  368. p.Transparency = i
  369. end
  370. p:Destroy()
  371. end)()
  372. tw(rw,cfn()*ang(-math.pi/2,math.rad(60),0),.2,'')
  373. tw(hw,cfn()*ang(0,0,math.pi/2),.2)
  374. r = 15 walls = {}
  375. for i = 1,360,30 do
  376. po = Part(((r*2)*math.pi/(360/30)),10,3,'Royal purple',0,true,true)
  377. po.CFrame = hole.CFrame*CFrame.new(math.cos(math.rad(i))*r,5,math.sin(math.rad(i))*r)
  378. po.CFrame = calcp(po.Position,hole.Position)
  379. po.Material = 'Ice'
  380. table.insert(walls,po)
  381. po.Touched:connect(function(hit) hurt(hit,1) end)
  382. end
  383. for i = r,-r,-1 do
  384. wait()
  385. for o,v in pairs(walls) do
  386. --v.Size = Vector3.new(((math.abs(i)*2)*math.pi/(360/30)),10,3)
  387. v.CFrame = hole.CFrame*CFrame.new(math.cos(math.rad(o*30))*i,5,math.sin(math.rad(o*30))*i)
  388. v.CFrame = calcp(v.Position,hole.Position)
  389. end
  390. end
  391. for _,v in pairs(walls) do v:Destroy() end hole:Destroy()
  392. tw(hw,cfn(),.1,'')
  393. tw(rw,cfn())
  394.  
  395. Lock'R'
  396. end
  397. Tide = Sound.new("http://www.roblox.com/Asset/?id=2704340",1.3)
  398. function tidal()
  399. Lock'L'
  400. tw(lw,cfn()*ang(math.rad(50),0,math.rad(80)))
  401. Charge:Play()
  402. for i = 1,20 do wait()
  403. p = Part(3,3,3,'Royal purple',.7,false,true)
  404. p.CFrame = (larm.CFrame*cfn(0,-1,0))*CFrame.Angles(math.random(-3,3),math.random(-3,3),math.random(-3,3))
  405. Debris:AddItem(p,.1)
  406. end
  407. tw(lw,cfn()*ang(math.rad(-140),0,0))
  408. Tide:Play()
  409. mp = Part(20,10,1,'Royal purple',0,false,true)
  410. stopped = false
  411. coroutine.wrap(function()
  412. while wait() and not stopped do
  413. local cl = Part(20,10,1,'Royal purple',0,false,true)
  414. cl.CFrame = mp.CFrame*cfn(0,0,-1)
  415. local cf = cl.CFrame
  416. delay(0,function()
  417. for i = 10,0,-1 do
  418. wait()
  419. cl.Size = Vector3.new(20,i,1)
  420. cl.CFrame = cf-Vector3.new(0,10-(i),0)
  421. cl.Transparency = 1-i/10
  422. end
  423. cl:Destroy()
  424. end)
  425. end
  426. end)()
  427. mp.CFrame = torso.CFrame*cfn(0,2,-5)
  428. mp.Touched:connect(function(hit)
  429. local h = FindHumanoid(hit.Parent)
  430. if h then
  431. h.Sit = true
  432. h.Torso.Velocity = CFrame.new(mp.Position,h.Torso.Position).lookVector*-300
  433. end
  434. end)
  435. cf = mp.CFrame
  436. for i = 1,60 do
  437. wait()
  438. mp.CFrame = cf*cfn(0,0,-i)
  439. Tide.Volume = .5-(i/60/2)
  440. end
  441. stopped = true
  442. tw(lw,cfn())
  443. mp:Destroy()
  444. Lock'L'
  445. end
  446.  
  447. klist = {
  448. f = shoot;
  449. q = wave;
  450. e = spin;
  451. c = tidal;
  452. r = beam;
  453. v = ignite;
  454. [string.char(48)] = teleport;
  455. }
  456.  
  457. mouse.KeyUp:connect(function(key) for i,v in pairs(klist) do if key == i:sub(1,1) and i:sub(2,2) == 'q' then holding = false end end end)
  458. mouse.KeyDown:connect(function(key)
  459. if attacking then return end
  460. for i,v in pairs(klist) do
  461. if key == i:sub(1,1) then attacking = true v() attacking = false end
  462. end
  463. end)
Add Comment
Please, Sign In to add comment