Advertisement
Guest User

void staff

a guest
Aug 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.64 KB | None | 0 0
  1. -Player Settings
  2. local modelName="Void Staff" --Name here
  3. repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character
  4. local player=game.Players.LocalPlayer
  5. local char=player.Character
  6.  
  7. --CharacterParts
  8. local humanoid=char.Humanoid
  9. local head=char.Head
  10. local torso=char.Torso
  11. local LA=char:findFirstChild("Left Arm")
  12. local RA=char:findFirstChild("Right Arm")
  13. local LL=char:findFirstChild("Left Leg")
  14. local RL=char:findFirstChild("Right Leg")
  15.  
  16. --Joints
  17. local LS=torso:findFirstChild("Left Shoulder")
  18. local RS=torso:findFirstChild("Right Shoulder")
  19. local LH=torso:findFirstChild("Left Hip")
  20. local RH=torso:findFirstChild("Right Hip")
  21. LS.Part0=torso RS.Part0=torso LH.Part0=torso RH.Part0=torso
  22.  
  23. --Local Functions
  24. local s=function(f) Spawn(f) end
  25. local c=function(f) coroutine.resume(coroutine.create(f)) end
  26. pcall(function() player.Backpack[modelName]:remove() end)
  27. pcall(function() char["CharacterParts"]:remove() end)
  28. pcall(function() char[modelName]:remove() end)
  29. pcall(function() player.PlayerGui[modelName]:remove() end)
  30. pcall(function() for i, v in pairs(char:children()) do if v:isA("BasePart") then v.Transparency=0 end end end)
  31. --Settings
  32. local model=Instance.new("Model", char) model.Name="CharacterParts"
  33. local model2=Instance.new("Model", char) model2.Name=modelName
  34. local bin=Instance.new("HopperBin", player.Backpack) bin.Name=modelName
  35. local gui=Instance.new("ScreenGui") gui.Name=modelName
  36. local skincolor="Really black"
  37. local body={}
  38. local animate={}
  39. local obj={}
  40. local onTrail=false
  41. local onKey=false
  42. local onHit=false
  43. local onBlock=false
  44. local onHold=false
  45. local colorSet={
  46. Handle="Brown";
  47. Blade="Mid gray";
  48. Extra="Reddish brown";
  49. }
  50. local combo=0
  51. local dmg=math.random(10, 15)
  52. local mouse
  53.  
  54. local add={
  55. Part=function(par, a, c, col, t, s, cf, ms)
  56. local p=Instance.new("Part", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new() end)
  57. local m=Instance.new("BlockMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end)
  58. return p
  59. end;
  60. Wedge=function(par, a, c, col, t, s, cf, ms)
  61. local p=Instance.new("WedgePart", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new() end)
  62. local m=Instance.new("SpecialMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) m.MeshType="Wedge" end)
  63. return p
  64. end;
  65. Gui=function(ins, par, bc, bg, tc, fs, text, t, s, pos)
  66. local g=Instance.new(ins, par) pcall(function() g.BorderColor=BrickColor.new(bc) g.BackgroundColor=BrickColor.new(bg) g.TextColor=BrickColor.new(tc) g.FontSize=fs g.Font="ArialBold" g.Text=text g.BackgroundTransparency=t g.Size=s g.Position=pos end)
  67. return g
  68. end;
  69. Weld=function(par, p1, cf)
  70. local w=Instance.new("Weld", par) pcall(function() w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or CFrame.new() end)
  71. return w
  72. end;
  73. Mesh=function(ins, par, s, of, t, id, tid)
  74. local m=Instance.new(ins, par) pcall(function() m.Scale=s or Vector3.new(1, 1, 1) m.Offset=of or Vector3.new() m.MeshId=id or "" m.TextureId=tid or "" m.MeshType=t end)
  75. return m
  76. end;
  77. Sound=function(parent, id, pitch, volume)
  78. local s=Instance.new("Sound", parent) pcall(function() s.SoundId=id s.Volume=volume s.Pitch=pitch end)
  79. return s
  80. end;
  81. }
  82.  
  83. --Sounds
  84. local Sounds={
  85. Slash="rbxasset://sounds//swordslash.wav";
  86. Hit="http://www.roblox.com/asset/?id=11113679 ";
  87. Equip="rbxasset://sounds/unsheath.wav";
  88. Charge="http://www.roblox.com/asset/?id=2101137";
  89. ElectricShortage="http://roblox.com/asset/?id=10209481";
  90. ElectricSound="http://www.roblox.com/asset/?id=10756118";
  91. Electric="http://www.roblox.com/asset/?id=2800815";
  92. Abscond="http://www.roblox.com/asset/?id=2767090";
  93. Cannon="http://www.roblox.com/asset/?id=2920959";
  94. Bash="http://www.roblox.com/asset/?id=25270310";
  95. Suirize="http://roblox.com/asset/?id=10209605";
  96. Heli="http://www.roblox.com/asset/?id=27112125";
  97. }
  98.  
  99. --Decals
  100. local Decals={
  101. Slash="http://www.roblox.com/asset/?id=25539335";
  102. }
  103.  
  104. --MeshIds
  105. local Meshes={
  106. Charge="http://www.roblox.com/asset/?id=21057543";
  107. Noob="http://www.roblox.com/asset/?id=29515710";
  108. Ring="http://www.roblox.com/asset/?id=3270017";
  109. Crown="http://www.roblox.com/asset/?id=92588061";
  110. Spring="http://www.roblox.com/Asset/?id=9753878";
  111. Sword="rbxasset://fonts/sword.mesh";
  112. Shield="http://www.roblox.com/asset/?id=19106648";
  113. }
  114.  
  115. ------------------------CreateParts------------------------
  116. body.Torso=add.Part(model2, false, false, skincolor, 1, Vector3.new(2, 2, 1), nil)
  117. body.TorsoW=add.Weld(body.Torso, torso, nil)
  118. function createParts()
  119. for i, v in pairs(char:children()) do if v:isA("CharacterMesh") then v:remove() end end
  120. torso.Transparency=1 body.Torso.Transparency=0
  121. --Parts--
  122. gui.Parent=player.PlayerGui
  123. body.Head=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  124. body.LA, body.RA=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  125. body.LL, body.RL=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  126.  
  127. --Welds--
  128. body.HeadW=add.Weld(body.Head, body.Torso, CFrame.new(0, 1.5, 0))
  129. body.LAW, body.RAW=add.Weld(body.LA, body.Torso, CFrame.new(-1.5, .5, 0)), add.Weld(body.RA, body.Torso, CFrame.new(1.5, .5, 0))
  130. body.LLW, body.RLW=add.Weld(body.LL, body.Torso, CFrame.new(-.5, -1.5, 0)), add.Weld(body.RL, body.Torso, CFrame.new(.5, -1.5, 0))
  131.  
  132. --Welds2--
  133. add.Weld(body.Head, head, nil)
  134. add.Weld(LA, body.LA, CFrame.new(0, -.5, 0))
  135. add.Weld(RA, body.RA, CFrame.new(0, -.5, 0))
  136. LH.Part0=body.Torso
  137. RH.Part0=body.Torso
  138.  
  139. --Sign--
  140. body.Part=add.Part(model, false, false, "White", 0, Vector3.new(.2, 1, .2))
  141. add.Weld(body.Part, body.Torso, CFrame.new(.25, 0, -.45))
  142. body.Part=add.Part(model, false, false, "White", 0, Vector3.new(.7, .2, .2))
  143. add.Weld(body.Part, body.Torso, CFrame.new(0, -.5, -.45))
  144.  
  145. --Animation--
  146. animate={
  147. ["Head"]=function(cf)
  148. body.HeadW.C1=CFrame.new(0, 1.5, 0)*cf
  149. end;
  150. ["Torso"]=function(cf)
  151. body.TorsoW.C1=(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  152. end;
  153. ["LA"]=function(cf)
  154. body.LAW.C1=CFrame.new(-1.5, .5, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  155. end;
  156. ["RA"]=function(cf)
  157. body.RAW.C1=CFrame.new(1.5, .5, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  158. end;
  159. ["LL"]=function(cf)
  160. LLW=add.Weld(LL, body.LL, CFrame.new(0, -1, 0))
  161. body.LLW.C1=CFrame.new(-.5, -1, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  162. c(function()
  163. wait()
  164. LLW:remove()
  165. end)
  166. end;
  167. ["RL"]=function(cf)
  168. RLW=add.Weld(RL, body.RL, CFrame.new(0, -1, 0))
  169. body.RLW.C1=CFrame.new(.5, -1, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  170. c(function()
  171. wait()
  172. RLW:remove()
  173. end)
  174. end;
  175. }
  176. --GuiLabels--
  177. obj.AL=add.Gui("TextLabel", gui, "Really black", "Really black", "White", "Size18", "Attack(Click)", 0, UDim2.new(0, 150, 0, 50), UDim2.new(0, 0, 0, 150))
  178. obj.AL2=add.Gui("TextLabel", obj.AL, "Really black", "Really black", "White", "Size18", "Block(F)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  179. obj.AL3=add.Gui("TextLabel", obj.AL2, "Really black", "Really black", "White", "Size18", "Smash(Q)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  180. obj.AL4=add.Gui("TextLabel", obj.AL3, "Really black", "Really black", "White", "Size18", "WinterSpike(E)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  181. obj.AL5=add.Gui("TextLabel", obj.AL4, "Really black", "Really black", "White", "Size18", "Blast(R)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  182. obj.AL6=add.Gui("TextLabel", obj.AL5, "Really black", "Really black", "White", "Size18", "WinterBoard(Z)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  183. --WeaponDesgin--
  184. for i, v in pairs(model2:children()) do
  185. if i~=1 then return end
  186. end
  187. obj.H=add.Part(model2, false, false, colorSet.Handle, 0, Vector3.new(.2, 5, .2))
  188. obj.HM=add.Mesh("CylinderMesh", obj.H)
  189. obj.HW=add.Weld(obj.H, torso, CFrame.new(0, 0, .5)*CFrame.Angles(0, 0, -math.rad(45)))
  190.  
  191. obj.Extra=add.Part(model2, false, false, colorSet.Handle, 0, Vector3.new(.2, 1.5, .2))
  192. obj.ExtraM=add.Mesh("CylinderMesh", obj.Extra)
  193. obj.ExtraW=add.Weld(obj.Extra, obj.H, CFrame.new(0, 2.6, .5)*CFrame.Angles(math.rad(45), 0, 0))
  194. obj.Con=add.Part(model2, false, false, colorSet.Handle, 0, Vector3.new(.25, .25, .25))
  195. obj.ConM=add.Mesh("SpecialMesh", obj.Con, nil, nil, "Sphere")
  196. obj.ConW=add.Weld(obj.Con, obj.Extra, CFrame.new(0, .75, 0))
  197.  
  198. obj.Extra=add.Part(model2, false, false, colorSet.Handle, 0, Vector3.new(.2, 1.5, .2))
  199. obj.ExtraM=add.Mesh("CylinderMesh", obj.Extra)
  200. obj.ExtraW=add.Weld(obj.Extra, obj.H, CFrame.new(0, 3.8, 1))
  201. obj.Con=add.Part(model2, false, false, colorSet.Handle, 0, Vector3.new(.25, .25, .25))
  202. obj.ConM=add.Mesh("SpecialMesh", obj.Con, nil, nil, "Sphere")
  203. obj.ConW=add.Weld(obj.Con, obj.Extra, CFrame.new(0, .75, 0))
  204.  
  205. obj.Extra=add.Part(model2, false, false, colorSet.Handle, 0, Vector3.new(.2, 1.5, .2))
  206. obj.ExtraM=add.Mesh("CylinderMesh", obj.Extra)
  207. obj.ExtraW=add.Weld(obj.Extra, obj.H, CFrame.new(0, 5, .5)*CFrame.Angles(-math.rad(45), 0, 0))
  208. obj.Con=add.Part(model2, false, false, colorSet.Handle, 0, Vector3.new(.25, .25, .25))
  209. obj.ConM=add.Mesh("SpecialMesh", obj.Con, nil, nil, "Sphere")
  210. obj.ConW=add.Weld(obj.Con, obj.Extra, CFrame.new(0, .75, 0))
  211.  
  212. obj.Extra=add.Part(model2, false, false, colorSet.Handle, 0, Vector3.new(.2, 1.5, .2))
  213. obj.ExtraM=add.Mesh("CylinderMesh", obj.Extra)
  214. obj.ExtraW=add.Weld(obj.Extra, obj.H, CFrame.new(0, 5, -.5)*CFrame.Angles(math.rad(45), 0, 0))
  215.  
  216. obj.H2=add.Part(model2, false, false, colorSet.Extra, 0, Vector3.new(.2, 5, .2))
  217. obj.H2M=add.Mesh("SpecialMesh", obj.H2, Vector3.new(.5, 5, .5), nil, "File", Meshes.Spring)
  218. obj.H2W=add.Weld(obj.H2, obj.H)
  219. end
  220.  
  221. ------------------------Functions------------------------
  222. function removeParts()
  223. pcall(function()
  224. if torso then
  225. LS.Part0=torso
  226. RS.Part0=torso LH.Part0=torso
  227. RH.Part0=torso
  228. torso.Transparency=0
  229. body.Torso.Transparency=1
  230. end
  231. player.PlayerGui[modelName]:remove()
  232. for i, v in pairs(model:children()) do
  233. v:remove()
  234. end
  235. end)
  236. end
  237. function play(soundid, pitch, vol)
  238. local sound=add.Sound(workspace, soundid, pitch or 1, volume or 1)
  239. sound:play()
  240. s(function() wait(5) sound:remove() end)
  241. end
  242. function fade(part, incr)
  243. if part:isA("BasePart") then
  244. for i=part.Transparency, 1, incr do wait() part.Transparency=i end
  245. elseif part:isA("Model") then
  246. for i, v in pairs(part:children() or part) do
  247. if v:isA("BasePart") then
  248. for i=part.Transparency, 1, incr do wait() v.Transparency=i end
  249. end
  250. end
  251. end
  252. end
  253. function appear(part, incr)
  254. if part:isA("BasePart") then
  255. for i=part.Transparency, 0, -incr do wait() part.Transparency=i end
  256. elseif part:isA("Model") then
  257. for i, v in pairs(part:children() or part) do
  258. if v:isA("BasePart") then
  259. for i=part.Transparency, 0, -incr do wait() v.Transparency=i end
  260. end
  261. end
  262. end
  263. end
  264. function computePos(pos, pos2)
  265. local pos3=Vector3.new(pos2.x, pos.y, pos2.z)
  266. return CFrame.new(pos, pos3)
  267. end
  268. function rayCast(pos, dir, max, ingore)
  269. return workspace:findPartOnRay(Ray.new(pos, dir.unit*(max or 9999)), ignore)
  270. end
  271. function nearPos(pos, dis)
  272. local temp
  273. local distance=dis
  274. for i, v in pairs(workspace:children()) do
  275. if v:isA("Model") then
  276. temp=v:findFirstChild("Torso")
  277. local humanoid=v:findFirstChild("Humanoid")
  278. if temp and humanoid and v~=char and (temp.CFrame.p-pos).magnitude<distance then
  279. distance=(temp.CFrame.p-pos).magnitude
  280. return temp.Parent
  281. end
  282. end
  283. end
  284. end
  285. function lightningGen(startPos, endPos, col)
  286. local magnitude=(startPos-endPos).magnitude
  287. local distance=(startPos+endPos)/2
  288. local pattern=add.Part(workspace, true, false, "White", 1, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPos))
  289. local startPosProx=startPos
  290. for i=1, 9 do
  291. local startPosProx2=startPosProx local random=Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1))
  292. local findSize=pattern.Size.z/10 local findOffSet=pattern.CFrame.lookVector*-1
  293. local compute=i*findSize*findOffSet local newStartPos=startPos
  294. local newEndPos=CFrame.new(random+compute+newStartPos).p
  295. local magnitude=(startPosProx2-newEndPos).magnitude
  296. local distance=(startPosProx2+newEndPos)/2
  297. local lightning=add.Part(workspace, true, false, col or "Bright yellow", 0, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPosProx2))
  298. s(function()
  299. fade(lightning, .1) lightning:remove()
  300. end)
  301. startPosProx=newEndPos
  302. end
  303. pattern:remove()
  304. end
  305. function trail(pos, cf, col, thick)
  306. onTrail=true
  307. s(function()
  308. local old=(pos.CFrame*(cf or CFrame.new())).p
  309. while onTrail do wait()
  310. local new=(pos.CFrame*(cf or CFrame.new())).p
  311. local mag=(old-new).magnitude
  312. local dis=(old+new)/2 local trail=add.Part(char, true, false, col or "White", 0, Vector3.new(1, mag, 1), CFrame.new(dis, new)*CFrame.Angles(math.pi/2, 0, 0))
  313. trail.Name="Effect" local tMesh=add.Mesh("CylinderMesh", trail, Vector3.new(thick or 1, 1, thick or 1), nil, nil)
  314. old=new
  315. s(function()
  316. for i=1, 0, -.1 do wait() tMesh.Scale=tMesh.Scale*Vector3.new(i, 1, i) end trail:remove()
  317. end)
  318. s(function()
  319. fade(trail, .1)
  320. end)
  321. end
  322. end)
  323. end
  324. function stickHit(from, to)
  325. local stickW=add.Weld(from, to, to.CFrame:inverse()*from.CFrame)
  326. stickW.C0=from.CFrame:inverse()*from.CFrame
  327. return stickW
  328. end
  329. function glowMesh(prt, size, speed)
  330. local glow=prt:clone() add.Weld(prt, glow)
  331. glow.Parent=workspace
  332. glow.Anchored=false
  333. glow.CanCollide=false
  334. for i, v in pairs(glow:children()) do
  335. if v:isA("SpecialMesh") or v:isA("BlockMesh") or v:isA("CylinderMesh") then
  336. s(function()
  337. for i=0, size, speed do wait() v.Scale=v.Scale+Vector3.new(i, i, i) end
  338. end)
  339. s(function()
  340. fade(glow, .1) glow:remove()
  341. end)
  342. end
  343. end
  344. end
  345. function charge(prt, cf, col, start, endval, incr)
  346. local aura=add.Part(workspace, false, false, col or "Bright yellow", 0, Vector3.new(1, 1, 1), cf or torso.CFrame)
  347. local auraM=add.Mesh("SpecialMesh", aura, Vector3.new(start, .5, start), nil, "File") auraM.MeshId=Meshes.Charge
  348. add.Weld(aura, prt or torso, cf*CFrame.Angles(0, math.rad(math.random(-45, 45)), 0))
  349. s(function()
  350. for i=start, endval, incr do wait()
  351. auraM.Scale=Vector3.new(i, auraM.Scale.y, i)
  352. end
  353. aura:remove()
  354. end)
  355. s(function()
  356. fade(aura, .1)
  357. end)
  358. end
  359. function makeCircle(prt, prts, dis, incr)
  360. local radius=dis+(prts+incr)
  361. for i=1, prts do
  362. local prt2=prt:clone()
  363. prt2.Parent=model
  364. local x = math.sin((360/prts + 360/prts*i)/(180/math.pi))*radius
  365. local y = 0
  366. local z = math.cos((360/prts + 360/prts*i)/(180/math.pi))*radius
  367. prt2.CFrame=prt.CFrame:toWorldSpace(CFrame.new(x,y,z))
  368. prt:remove()
  369. return prt2
  370. end
  371. end
  372. function antiExplosion(model)
  373. local ffs={}
  374. for i, v in pairs(model:children()) do
  375. pcall(function()
  376. local ff2=Instance.new("ForceField", v.Handle)
  377. table.insert(ffs, ff2) end)
  378. if v:isA("BasePart") then
  379. local ff=Instance.new("ForceField", v)
  380. table.insert(ffs, ff)
  381. end
  382. end
  383. return ffs
  384. end
  385. function dmgHit(prt)
  386. prt.Touched:connect(function(h)
  387. if onKey==true and h.Parent:findFirstChild("Humanoid") and onHit==false and h.Parent~=char then
  388. onHit=true
  389. local fakeM=Instance.new("Model", workspace)
  390. fakeM.Name=-dmg
  391. local hHuman=h.Parent:findFirstChild("Humanoid")
  392. hHuman.Health=hHuman.Health-dmg
  393. local hTorso=h.Parent:findFirstChild("Torso")
  394. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  395. local label=add.Part(fakeM, true, false, "Teal", 0, Vector3.new(.5, .5, .5), h.CFrame*CFrame.new(math.random(-4, 4), 4, math.random(-4, 4))) label.Name="Head"
  396. --Freeze
  397. play(Sounds.Abscond, 1, 1)
  398. local f=add.Part(workspace, true, false, "Teal", .5, Vector3.new(6, 6, 6), hTorso.CFrame) hTorso.Anchored=true
  399. s(function() for i=.5, 1, .01 do wait() f.Transparency=i end f:remove() hTorso.Anchored=false end)
  400. game.Debris:addItem(fakeM, 1)
  401. wait(.1)
  402. onHit=false
  403. end
  404. end)
  405. end
  406. function blockHit(prt)
  407. prt.Touched:connect(function(h)
  408. if onKey==true and not h.Parent:findFirstChild("Humanoid") and onHit==false and h.Parent~=char then
  409. onHit=true
  410. play(Sounds.Hit, 1, 1)
  411. print'Blocked'
  412. local bp=Instance.new("BodyPosition", h) bp.maxForce=Vector3.new(math.huge, math.huge, math.huge) bp.position=(CFrame.new(torso.CFrame.p, h.CFrame.p)*CFrame.new(0, 0, -math.random(100, 200))).p
  413. local bg=Instance.new("BodyGyro", h) bg.maxTorque=Vector3.new(math.huge, math.huge, math.huge) bg.cframe=CFrame.new(h.CFrame.p, torso.CFrame.p)
  414. game.Debris:addItem(bp, .2) game.Debris:addItem(bg, .2)
  415. wait(.1)
  416. onHit=false
  417. end
  418. end)
  419. end
  420. function idle()
  421. animate.LA(CFrame.Angles(-math.rad(15), 0, -math.rad(15)))
  422. animate.RA(CFrame.Angles(math.rad(15), 0, math.rad(15)))
  423. end
  424. function Smash()
  425. humanoid.WalkSpeed=0
  426. for i=0, 1, .1 do wait()
  427. animate.Torso(CFrame.new(0, 5*i, 0))
  428. animate.LA(CFrame.new(.5*i, 1*i, -.5*i)*CFrame.Angles(math.rad(135)*i, 0, math.rad(45)*i))
  429. animate.RA(CFrame.new(-.5*i, 1*i, -.5*i)*CFrame.Angles(math.rad(135)*i, 0, -math.rad(45)*i))
  430. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.pi/2, -math.rad(45)*i, 0)
  431. end
  432. play(Sounds.Cannon, .3, 1)
  433. for i=0, 1, .2 do wait()
  434. animate.Torso(CFrame.new(0, 5-6*i, 0))
  435. animate.LA(CFrame.new(.5, 1-1.5*i, -.5)*CFrame.Angles(math.rad(135-45*i), 0, math.rad(45)))
  436. animate.RA(CFrame.new(-.5, 1-1.5*i, -.5)*CFrame.Angles(math.rad(135-45*i), 0, -math.rad(45)))
  437. animate.LL(CFrame.Angles(-math.rad(90)*i, 0, 0))
  438. animate.RL(CFrame.new(0, 1*i, -1*i))
  439. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.pi/2, -math.rad(45), 0)
  440. end
  441. local b=add.Part(workspace, true, false, "Teal", .5, Vector3.new(80, 80, 80), torso.CFrame*CFrame.new(0, -3, 0)*CFrame.Angles(-math.rad(90), 0, 0)+torso.CFrame.lookVector*1.5)
  442. local bM=add.Mesh("SpecialMesh", b, Vector3.new(1, 1, 1), nil, nil, Meshes.Ring)
  443. local b2=add.Part(workspace, true, false, "Teal", .5, Vector3.new(80, 80, 80), torso.CFrame*CFrame.new(0, -3, 0)+torso.CFrame.lookVector*1.5)
  444. local b2M=add.Mesh("SpecialMesh", b2, Vector3.new(1, 4, 1), nil, nil, Meshes.Crown)
  445. dmgHit(b) dmgHit(b2)
  446. s(function()
  447. for i=1, 80, 2 do wait()
  448. bM.Scale=Vector3.new(i, i, i)
  449. b2M.Scale=Vector3.new(i, 2, i)
  450. end
  451. b:remove() b2:remove()
  452. end)
  453. for i=1, 0, -.1 do wait()
  454. animate.Torso(CFrame.new(0, -1*i, 0))
  455. animate.LA(CFrame.new(.5*i, -.5*i, -.5*i)*CFrame.Angles(math.rad(90*i), 0, math.rad(45)*i))
  456. animate.RA(CFrame.new(-.5*i, -.5*i, -.5*i)*CFrame.Angles(math.rad(90*i), 0, -math.rad(45)*i))
  457. animate.LL(CFrame.Angles(-math.rad(90)*i, 0, 0))
  458. animate.RL(CFrame.new(0, 1*i, -1*i))
  459. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.pi/2, -math.rad(45)*i, 0)
  460. end
  461. humanoid.WalkSpeed=16
  462. idle()
  463. end
  464. function WinterSpike()
  465. humanoid.WalkSpeed=0
  466. local bg=Instance.new("BodyGyro", torso) bg.maxTorque=Vector3.new(math.huge, math.huge, math.huge) bg.D=100
  467. for i=0, 1, .05 do wait()
  468. play(Sounds.Suirize, 1, 1)
  469. bg.cframe=computePos(torso.CFrame.p, mouse.Hit.p)
  470. animate.RA(CFrame.Angles(math.rad(180)*i, 0, 0))
  471. local b=add.Part(workspace, true, false, "Teal", .5, Vector3.new(10, 10, 10), torso.CFrame*CFrame.new(0, -3, 0)*CFrame.Angles(-math.rad(90), 0, 0)+torso.CFrame.lookVector*(120*i))
  472. local bM=add.Mesh("SpecialMesh", b, Vector3.new(10, 10, 10), nil, nil, Meshes.Ring)
  473. local b2=add.Part(workspace, true, false, "Teal", .5, Vector3.new(10, 10, 10), torso.CFrame*CFrame.new(0, -3, 0)+torso.CFrame.lookVector*(120*i))
  474. local b2M=add.Mesh("SpecialMesh", b2, Vector3.new(1, 2, 1), nil, nil, Meshes.Crown)
  475. local b3=add.Part(workspace, true, false, "Teal", .5, Vector3.new(1, .8, 4), torso.CFrame*CFrame.new(0, -3, 0)*CFrame.Angles(-math.rad(90), 0, 0)+torso.CFrame.lookVector*(120*i))
  476. local b3M=add.Mesh("SpecialMesh", b3, Vector3.new(1, 1, 1), nil, nil, Meshes.Sword)
  477. dmgHit(b) dmgHit(b2) dmgHit(b3)
  478. s(function()
  479. for i=1, 10, .5 do wait()
  480. b2M.Scale=Vector3.new(i, 2, i)
  481. b3.CFrame=b3.CFrame*CFrame.new(0, 0, i/20)
  482. end
  483. b:remove() b2:remove() b3:remove()
  484. end)
  485. end
  486. bg:remove()
  487. for i=1, 0, -.1 do wait()
  488. animate.RA(CFrame.Angles(math.rad(180)*i, 0, 0))
  489. end
  490. humanoid.WalkSpeed=16
  491. idle()
  492. end
  493. function Blast()
  494. humanoid.WalkSpeed=20
  495. local bg=Instance.new("BodyGyro", torso) bg.maxTorque=Vector3.new(math.huge, math.huge, math.huge) bg.D=100
  496. for i=0, 1, .1 do wait()
  497. animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0))
  498. animate.Head(CFrame.Angles(0, -math.rad(45)*i, 0))
  499. animate.RA(CFrame.Angles(math.rad(45)*i, 0, math.rad(45)*i))
  500. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.rad(90+45*i), 0, 0)
  501. end
  502. local pressure=0
  503. play(Sounds.Heli, .5, 1)
  504. if pressure>500 then onHold=false end
  505. while onHold do wait(.1)
  506. pressure=pressure+.1
  507. dmg=dmg+.5
  508. local ss=add.Part(workspace, true, false, "Teal", 0, Vector3.new(pressure, pressure, pressure), torso.CFrame+torso.CFrame.lookVector*10)
  509. local ssM=add.Mesh("SpecialMesh", ss, nil, nil, "Sphere")
  510. local e=add.Part(workspace, false, false, "Teal", 0, Vector3.new(2, 2, 2), ss.CFrame*CFrame.new(math.random(-pressure-10, pressure+10), math.random(-pressure-10, pressure+10), math.random(-pressure-10, pressure+10))*CFrame.Angles(math.rad(math.random(-45, 45)), math.rad(math.random(-45, 45)), math.rad(math.random(-45, 45))))
  511. local bp=Instance.new("BodyPosition", e) bp.maxForce=Vector3.new(math.huge, math.huge, math.huge) bp.position=ss.Position
  512. s(function()
  513. for i=0, 1, .1 do wait()
  514. ss.Transparency=i
  515. e.Transparency=i
  516. end
  517. ss:remove() e:remove()
  518. end)
  519. bg.cframe=computePos(torso.CFrame.p, mouse.Hit.p)
  520. end
  521. local ss=add.Part(workspace, false, false, "Teal", .5, Vector3.new(pressure, pressure, pressure), torso.CFrame+torso.CFrame.lookVector*10)
  522. local ssM=add.Mesh("SpecialMesh", ss, nil, nil, "Sphere")
  523. trail(ss, nil, "Teal", pressure)
  524. local bf=Instance.new("BodyForce", ss) bf.force=Vector3.new(0, ss:getMass()*196.25, 0)
  525. local bv=Instance.new("BodyVelocity", ss) bv.maxForce=bv.maxForce*math.huge bv.velocity=ss.CFrame.lookVector*100
  526. ss.Touched:connect(function(h)
  527. if h.Parent:findFirstChild("Humanoid") and onHit==false and h.Parent~=char then
  528. onHit=true
  529. local fakeM=Instance.new("Model", workspace)
  530. fakeM.Name=-dmg
  531. local hHuman=h.Parent:findFirstChild("Humanoid")
  532. hHuman.Health=hHuman.Health-dmg
  533. local hTorso=h.Parent:findFirstChild("Torso")
  534. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  535. local label=add.Part(fakeM, true, false, "Teal", 0, Vector3.new(.5, .5, .5), h.CFrame*CFrame.new(math.random(-4, 4), 4, math.random(-4, 4))) label.Name="Head"
  536. --Freeze
  537. play(Sounds.Abscond, 1, 1)
  538. local f=add.Part(workspace, true, false, "Teal", .5, Vector3.new(6, 6, 6), hTorso.CFrame) hTorso.Anchored=true
  539. s(function() for i=.5, 1, .01 do wait() f.Transparency=i end f:remove() hTorso.Anchored=false end)
  540. game.Debris:addItem(fakeM, 1)
  541. wait(.1)
  542. onHit=false
  543. end
  544. end)
  545. s(function() wait(5) onTrail=false ss:remove() dmg=math.random(10, 15) end)
  546. bg:remove()
  547. for i=1, 0, -.1 do wait()
  548. animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0))
  549. animate.Head(CFrame.Angles(0, -math.rad(45)*i, 0))
  550. animate.RA(CFrame.Angles(math.rad(45)*i, 0, math.rad(45)*i))
  551. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.rad(90+45*i), 0, 0)
  552. end
  553. humanoid.WalkSpeed=16
  554. idle()
  555. end
  556. function Block()
  557. for i=0, 1, .1 do wait()
  558. animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0))
  559. animate.Head(CFrame.Angles(0, -math.rad(45)*i, 0))
  560. animate.RA(CFrame.Angles(math.rad(45)*i, 0, math.rad(45)*i))
  561. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.rad(90+45*i), 0, 0)
  562. end
  563. local bg=Instance.new("BodyGyro", torso) bg.maxTorque=Vector3.new(math.huge, math.huge, math.huge) bg.D=100
  564. local cf=torso.CFrame*CFrame.Angles(-math.rad(90), 0, 0)+torso.CFrame.lookVector*8
  565. local shield=add.Part(workspace, false, true, "Teal", .2, Vector3.new(4, 4, 4.5), cf)
  566. local shieldM=add.Mesh("SpecialMesh", shield, shield.Size, nil, nil, Meshes.Shield)
  567. local shieldW=add.Weld(shield, torso, CFrame.Angles(-math.rad(90), 0, 0)*CFrame.new(0, 8, 0))
  568. blockHit(shield)
  569. s(function()
  570. while onBlock do wait()
  571. bg.cframe=computePos(torso.CFrame.p, mouse.Hit.p)
  572. end
  573. end)
  574. while onBlock do wait(.5)
  575. glowMesh(shield, 1, .1)
  576. end
  577. wait(.5)
  578. shield:remove()
  579. bg:remove()
  580. for i=1, 0, -.1 do wait()
  581. animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0))
  582. animate.Head(CFrame.Angles(0, -math.rad(45)*i, 0))
  583. animate.RA(CFrame.Angles(math.rad(45)*i, 0, math.rad(45)*i))
  584. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.rad(90+45*i), 0, 0)
  585. end
  586. idle()
  587. end
  588. function WinterBoard()
  589. for i=0, 1, .1 do wait()
  590. animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0))
  591. animate.Head(CFrame.Angles(0, -math.rad(45)*i, 0))
  592. animate.RA(CFrame.Angles(math.rad(45)*i, 0, math.rad(45)*i))
  593. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.rad(90+45*i), 0, 0)
  594. end
  595. local flyboard=Instance.new("Model", char) flyboard.Name="WinterBoard"
  596. obj.Board=add.Part(flyboard, false, false, "Teal", 0, Vector3.new(2, .5, 4))
  597. obj.BoardW=add.Weld(obj.Board, torso, CFrame.new(0, -3, 0))
  598. obj.W=add.Wedge(flyboard, false, false, "Teal", 0, Vector3.new(.5, 4, 1))
  599. obj.WW=add.Weld(obj.W, obj.Board, CFrame.new(-1.5, 0, 0)*CFrame.Angles(0, math.pi/2, -math.pi/2))
  600. obj.W=add.Wedge(flyboard, false, false, "Teal", 0, Vector3.new(.5, 4, 1))
  601. obj.WW=add.Weld(obj.W, obj.Board, CFrame.new(1.5, 0, 0)*CFrame.Angles(0, -math.pi/2, math.pi/2))
  602. obj.W=add.Wedge(flyboard, false, false, "Teal", 0, Vector3.new(.5, 2, 1))
  603. obj.WW=add.Weld(obj.W, obj.Board, CFrame.new(-1, 0, 2.5)*CFrame.Angles(0, math.pi, -math.pi/2))
  604. obj.W=add.Wedge(flyboard, false, false, "Teal", 0, Vector3.new(.5, 2, 1))
  605. obj.WW=add.Weld(obj.W, obj.Board, CFrame.new(1, 0, 2.5)*CFrame.Angles(0, math.pi, math.pi/2))
  606. obj.S=add.Part(flyboard, false, false, "Teal", 0, Vector3.new(.5, .5, .5))
  607. obj.SM=add.Mesh("CylinderMesh", obj.S)
  608. obj.SW=add.Weld(obj.S, obj.Board, CFrame.new(1, 0, 2.5)*CFrame.Angles(math.pi/2, 0, 0))
  609. obj.S2=add.Part(flyboard, false, false, "Teal", 0, Vector3.new(.5, .5, .5))
  610. obj.S2M=add.Mesh("CylinderMesh", obj.S2)
  611. obj.S2W=add.Weld(obj.S2, obj.Board, CFrame.new(-1, 0, 2.5)*CFrame.Angles(math.pi/2, 0, 0))
  612. obj.sS=add.Part(flyboard, false, false, "White", 0, Vector3.new(.45, .55, .45))
  613. obj.sSM=add.Mesh("CylinderMesh", obj.sS)
  614. obj.sSW=add.Weld(obj.sS, obj.Board, CFrame.new(1, 0, 2.5)*CFrame.Angles(math.pi/2, 0, 0))
  615. obj.sS2=add.Part(flyboard, false, false, "White", 0, Vector3.new(.45, .55, .45))
  616. obj.sS2M=add.Mesh("CylinderMesh", obj.sS2)
  617. obj.sS2W=add.Weld(obj.sS2, obj.Board, CFrame.new(-1, 0, 2.5)*CFrame.Angles(math.pi/2, 0, 0))
  618. trail(obj.S, nil, "Teal", .5)
  619. trail(obj.S2, nil, "Teal", .5)
  620. local bg=Instance.new("BodyGyro", torso) bg.maxTorque=Vector3.new(math.huge, math.huge, math.huge) bg.D=500
  621. local bv=Instance.new("BodyVelocity", torso) bv.maxForce=bv.maxForce*math.huge
  622. while onHold do wait()
  623. bv.velocity=torso.CFrame.lookVector*50
  624. bg.cframe=mouse.Hit*CFrame.Angles(0, 0, torso.RotVelocity.y*.5)
  625. end
  626. bg:remove() bv:remove()
  627. flyboard:remove()
  628. onTrail=false
  629. for i=1, 0, -.1 do wait()
  630. animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0))
  631. animate.Head(CFrame.Angles(0, -math.rad(45)*i, 0))
  632. animate.RA(CFrame.Angles(math.rad(45)*i, 0, math.rad(45)*i))
  633. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.rad(90+45*i), 0, 0)
  634. end
  635. idle()
  636. end
  637. function keyDown(key)
  638. local key=key:lower()
  639. if key=="q" and not onKey then
  640. onKey=true
  641. Smash()
  642. onKey=false
  643. end
  644. if key=="e" and not onKey then
  645. onKey=true
  646. WinterSpike()
  647. onKey=false
  648. end
  649. if key=="r" and not onKey then
  650. onKey=true onHold=true
  651. Blast()
  652. onKey=false
  653. end
  654. if key=="f" and not onKey then
  655. onKey=true onBlock=true
  656. Block()
  657. onKey=false
  658. end
  659. if key=="z" and not onKey then
  660. onKey=true onHold=true
  661. WinterBoard()
  662. onKey=false
  663. end
  664. end
  665. function keyUp(key)
  666. local key=key:lower()
  667. if key=="r" and onKey and onHold then onHold=false end
  668. if key=="f" and onKey and onBlock then onBlock=false end
  669. if key=="z" and onKey and onHold then onHold=false end
  670. end
  671. bin.Selected:connect(function(m)
  672. onKey=false
  673. mouse=m
  674. createParts()
  675. for i=0, 1, .1 do wait()
  676. animate.RA(CFrame.Angles(-math.rad(25)*i, 0, -math.rad(45)*i))
  677. end
  678. obj.HW.Part1=RA
  679. obj.HW.C1=CFrame.new(0, -1, 0)*CFrame.Angles(-math.pi/2, 0, 0)
  680. for i=1, 0, -.1 do wait()
  681. animate.RA(CFrame.Angles(-math.rad(25)*i, 0, -math.rad(45)*i))
  682. end
  683. mouse.KeyDown:connect(keyDown)
  684. mouse.KeyUp:connect(keyUp)
  685. idle()
  686. end)
  687. bin.Deselected:connect(function()
  688. for i=0, 1, .1 do wait()
  689. animate.RA(CFrame.Angles(-math.rad(25)*i, 0, -math.rad(45)*i))
  690. end
  691. obj.HW.Part1=torso
  692. obj.HW.C1=CFrame.new(0, 0, .5)*CFrame.Angles(0, 0, -math.rad(45))
  693. for i=1, 0, -.1 do wait()
  694. animate.RA(CFrame.Angles(-math.rad(25)*i, 0, -math.rad(45)*i))
  695. end
  696. removeParts()
  697. end)
  698. --mediafire?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement