Advertisement
astronaut32

winter staff'

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