Advertisement
mathmasterphil

Green Staff

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