Advertisement
NextFlamePB

ROBLOX Military Sword

Sep 6th, 2015
1,569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.09 KB | None | 0 0
  1. --Made by NextFlame[L]--
  2. --Military Sword--
  3.  
  4. wait(.1)
  5. repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character:findFirstChild("Torso")
  6. local modelName="Military Sword" --Name here
  7. local player=game.Players.LocalPlayer
  8. local char=player.Character
  9. local torso=char.Torso
  10. local head=char.Head
  11. local human=char.Humanoid
  12. local arm={Left=char["Left Arm"], Right=char["Right Arm"]}
  13. local leg={Left=char["Left Leg"], Right=char["Right Leg"]}
  14. local joints={LeftShoulder=torso["Left Shoulder"], RightShoulder=torso["Right Shoulder"], LeftHip=torso["Left Hip"], RightHip=torso["Right Hip"]}
  15. joints.LeftShoulder.Part0=torso joints.RightShoulder.Part0=torso joints.LeftHip.Part0=torso joints.RightHip.Part0=torso
  16. local s=function(f) Spawn(f) end
  17. local c=function(f) coroutine.resume(coroutine.create(f)) end
  18. local add={
  19. Part=function(par, a, c, col, t, s, cf, ms)
  20. 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)
  21. local m=Instance.new("BlockMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end)
  22. return p
  23. end,
  24. Wedge=function(par, a, c, col, t, s, cf, ms)
  25. 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)
  26. local m=Instance.new("SpecialMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) m.MeshType="Wedge" end)
  27. return p
  28. end,
  29. Gui=function(ins, par, bc, bg, tc, fs, text, t, s, pos)
  30. 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)
  31. return g
  32. end,
  33. Weld=function(par, p1, cf)
  34. local w=Instance.new("Weld", par) pcall(function() w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or CFrame.new() end)
  35. return w
  36. end,
  37. Mesh=function(ins, par, s, of, t, id, tid)
  38. local m=Instance.new(ins, par) pcall(function() m.Scale=s or Vector3.new() m.Offset=of or Vector3.new() m.MeshId=id or "" m.TextureId=tid or "" m.MeshType=t end)
  39. return m
  40. end,
  41. Sound=function(parent, id, volume, pitch)
  42. local s=Instance.new("Sound", parent) pcall(function() s.SoundId=id s.Volume=volume s.Pitch=pitch end)
  43. return s
  44. end,
  45. }
  46. pcall(function() player.Backpack[modelName]:remove() char["CharacterParts"]:remove() char[modelName]:remove() player.PlayerGui[modelName]:remove() end)
  47. for i, v in pairs(char:children()) do if v:isA("BasePart") then v.Transparency=0 end end
  48. --Settings--
  49. local model=Instance.new("Model", char) model.Name="CharacterParts"
  50. local modelB=Instance.new("Model", char) modelB.Name=modelName
  51. local bin=Instance.new("HopperBin", player.Backpack) bin.Name=modelName
  52. local skincolor="Really black"
  53. local gui=Instance.new("ScreenGui")
  54. local body={}
  55. local animate={}
  56. local obj={}
  57. local deb={}
  58. deb.trail=false
  59. deb.key=false
  60. deb.hit=false
  61. local loop=false
  62. local speed=16
  63. local dmg=math.random(5, 10)
  64. local combo=0
  65. local shielding=false
  66. local selected=false
  67. local rage=100
  68.  
  69. --SwordColor--
  70. local color={
  71. Handle="Deep orange";
  72. Blade="Medium stone grey";
  73. }
  74.  
  75. --Sounds--
  76. local Slash=add.Sound(torso, "rbxasset://sounds//swordslash.wav", 1, 1)
  77. local Hit=add.Sound(torso, "http://www.roblox.com/asset/?id=11113679 ", 1, 1)
  78. local Equipping=add.Sound(torso, "rbxasset://sounds/unsheath.wav", 1, 1)
  79. local SlashDecal="http://www.roblox.com/asset/?id=25539335"
  80. local Charge=add.Sound(torso, "http://www.roblox.com/asset/?id=2101137", .5, 1)
  81. body.Torso=add.Part(modelB, false, false, skincolor, 0, Vector3.new(2, 2, 1), nil)
  82. function createParts()
  83. for i, v in pairs(char:children()) do if v:isA("CharacterMesh") then v:remove() end end
  84. torso.Transparency=1 body.Torso.Transparency=0
  85. --Parts--
  86. gui.Parent=player.PlayerGui gui.Name=modelName
  87. body.Head=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  88. 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)
  89. body.LL, body.LR=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)
  90.  
  91. --Welds--
  92. body.HeadW=add.Weld(body.Head, torso, CFrame.new(0, 1.5, 0))
  93. body.TorsoW=add.Weld(body.Torso, torso, nil)
  94. 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))
  95. body.LLW, body.LRW=add.Weld(body.LL, body.Torso, CFrame.new(-.5, -1.5, 0)), add.Weld(body.LR, body.Torso, CFrame.new(.5, -1.5, 0))
  96.  
  97. --Welds2--
  98. add.Weld(body.Head, head, nil)
  99. add.Weld(arm.Left, body.LA, CFrame.new(0, -.5, 0))
  100. add.Weld(arm.Right, body.RA, CFrame.new(0, -.5, 0))
  101. joints.LeftHip.Part0=body.Torso
  102. joints.RightHip.Part0=body.Torso
  103.  
  104. --Sign--
  105. body.Part=add.Part(model, false, false, "White", 0, Vector3.new(.2, 1, .2))
  106. add.Weld(body.Part, body.Torso, CFrame.new(.25, 0, -.45))
  107. body.Part=add.Part(model, false, false, "White", 0, Vector3.new(.7, .2, .2))
  108. add.Weld(body.Part, body.Torso, CFrame.new(0, -.5, -.45))
  109.  
  110. --Animation--
  111. animate={
  112. ["Head"]=function(cf)
  113. body.HeadW.C1=CFrame.new(0, 1.5, 0)*cf
  114. end;
  115. ["Torso"]=function(cf)
  116. body.TorsoW.C1=(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  117. end;
  118. ["LA"]=function(cf)
  119. body.LAW.C1=CFrame.new(-1.5, .5, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  120. end;
  121. ["RA"]=function(cf)
  122. body.RAW.C1=CFrame.new(1.5, .5, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  123. end;
  124. ["LL"]=function(cf)
  125. LLW=add.Weld(leg.Left, body.LL, CFrame.new(0, -1, 0))
  126. body.LLW.C1=CFrame.new(-.5, -1, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  127. c(function()
  128. wait()
  129. LLW:remove()
  130. end)
  131. end;
  132. ["LR"]=function(cf)
  133. LRW=add.Weld(leg.Right, body.LR, CFrame.new(0, -1, 0))
  134. body.LRW.C1=CFrame.new(.5, -1, 0)*(cf or CFrame.new()*CFrame.Angles(0, 0, 0))
  135. c(function()
  136. wait()
  137. LRW:remove()
  138. end)
  139. end;
  140. }
  141.  
  142. --GuiLabels--
  143. 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))
  144. obj.AL2=add.Gui("TextLabel", obj.AL, "Really black", "Really black", "White", "Size18", "Block(C)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  145. obj.AL3=add.Gui("TextLabel", obj.AL2, "Really black", "Really black", "White", "Size18", "ChargeAttack(F)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  146. obj.AL4=add.Gui("TextLabel", obj.AL3, "Really black", "Really black", "White", "Size18", "Ambush(Q)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  147. obj.ShowDMG=add.Gui("TextLabel", obj.AL4, "Really black", "Really black", "White", "Size18", "Damage: "..dmg, 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  148. obj.RageMeter=add.Gui("TextLabel", gui, "Really black", "White", "White", "Size18", "", 0, UDim2.new(0, 600, 0, 30), UDim2.new(.3, 0, 0, 0))
  149. obj.Meter=add.Gui("TextLabel", obj.RageMeter, "Really black", "Bright red", "White", "Size18", "", 0, UDim2.new(rage/100, 0, 1, 0), UDim2.new(0, 0, 0, 0))
  150. obj.MeterLabel=add.Gui("TextLabel", obj.RageMeter, "Really black", "Bright red", "Really black", "Size36", rage, 1, UDim2.new(.25, 0, .5, 0), UDim2.new(.4, 0, .2, 0))
  151. --WeaponDesgin--
  152. for i, v in pairs(modelB:children()) do
  153. if i~=1 then return end
  154. end
  155. --Case--
  156. obj.Case=add.Part(modelB, false, false, color.Handle, 0, Vector3.new(.4, .4, 3), nil, Vector3.new(.5, .5, 1))
  157. obj.CaseW=add.Weld(obj.Case, body.Torso, CFrame.new(-1, -1.5, .5)*CFrame.Angles(math.rad(45), 0, 0))
  158. obj.P=add.Part(modelB, false, false, "Black", 0, Vector3.new(.3, .3, 3), nil, Vector3.new(.5, .5, 1))
  159. obj.PW=add.Weld(obj.P, obj.Case, CFrame.new(0, 0, -.005))
  160. obj.Pointb=add.Wedge(modelB, false, false, color.Handle, 0, Vector3.new(.2, 1, .2), nil, Vector3.new(1, 1, .5))
  161. obj.PointbW=add.Weld(obj.Pointb, obj.Case, CFrame.new(0, .05, 2)*CFrame.Angles(math.pi/2, 0, 0))
  162. obj.Pointb=add.Wedge(modelB, false, false, color.Handle, 0, Vector3.new(.2, 1, .2), nil, Vector3.new(1, 1, .5))
  163. obj.PointbW=add.Weld(obj.Pointb, obj.Case, CFrame.new(0, -.05, 2)*CFrame.Angles(math.pi/2, math.pi, 0))
  164.  
  165. obj.P=add.Part(modelB, false, false, color.Handle, 0, Vector3.new(2.1, .2, 1.1))
  166. obj.PW=add.Weld(obj.P, body.Torso, CFrame.new(0, -1, 0))
  167.  
  168. --Militar Sword--
  169.  
  170. obj.Handle=add.Part(modelB, false, false, color.Handle, 0, Vector3.new(.2, .2, 1), nil, Vector3.new(.7, .7, 1))
  171. obj.HandleW=add.Weld(obj.Handle, obj.Case, CFrame.new(0, 0, -2)*CFrame.Angles(0, math.pi, 0))
  172.  
  173. obj.Guard=add.Part(modelB, false, false, color.Handle, 0, Vector3.new(.2, .5, .2), nil, Vector3.new(1, 1, .5))
  174. obj.GuardW=add.Weld(obj.Guard, obj.Handle, CFrame.new(0, 0, -.5))
  175.  
  176. obj.P=add.Part(modelB, false, false, color.Handle, 0, Vector3.new(.3, .3, .3))
  177. obj.PW=add.Weld(obj.P, obj.Handle, CFrame.new(0, 0, .6))
  178. obj.PM=add.Mesh("SpecialMesh", obj.P, Vector3.new(1, 1, 1), nil, "Sphere")
  179.  
  180. --Hilt--
  181. obj.P=add.Part(modelB, false, false, color.Handle, 0, Vector3.new(.2, .2, .45), nil, Vector3.new(1, .5, 1))
  182. obj.PW=add.Weld(obj.P, obj.Handle, CFrame.new(0, -.5, 0))
  183. obj.P=add.Part(modelB, false, false, color.Handle, 0, Vector3.new(.2, .2, .45), nil, Vector3.new(1, .5, 1))
  184. obj.PW=add.Weld(obj.P, obj.Handle, CFrame.new(0, -.35, -.35)*CFrame.Angles(math.rad(45), 0, 0))
  185. obj.P=add.Part(modelB, false, false, color.Handle, 0, Vector3.new(.2, .2, .6), nil, Vector3.new(1, .5, 1))
  186. obj.PW=add.Weld(obj.P, obj.Handle, CFrame.new(0, -.28, .38)*CFrame.Angles(-math.rad(50), 0, 0))
  187.  
  188. obj.Blade=add.Part(modelB, false, false, color.Blade, 0, Vector3.new(.2, .2 , 3), nil, Vector3.new(.3, .8, 1))
  189. obj.BladeW=add.Weld(obj.Blade, obj.Handle, CFrame.new(0, 0, -2))
  190.  
  191. obj.Point=add.Wedge(modelB, false, false, color.Blade, 0, Vector3.new(.2, 1, .2), nil, Vector3.new(.3, 1, .4))
  192. obj.PointW=add.Weld(obj.Point, obj.Blade, CFrame.new(0, -.04, -2)*CFrame.Angles(-math.pi/2, 0, 0))
  193.  
  194. obj.Point=add.Wedge(modelB, false, false, color.Blade, 0, Vector3.new(.2, 1, .2), nil, Vector3.new(.3, 1, .4))
  195. obj.PointW=add.Weld(obj.Point, obj.Blade, CFrame.new(0, .04, -2)*CFrame.Angles(-math.pi/2, -math.pi, 0))
  196. end
  197. function removeParts() pcall(function() if torso then joints.LeftShoulder.Part0=torso joints.RightShoulder.Part0=torso joints.LeftHip.Part0=torso joints.RightHip.Part0=torso torso.Transparency=0 body.Torso.Transparency=1 end player.PlayerGui[modelName]:remove() for i, v in pairs(model:children()) do v:remove() end end) end
  198. function fade(part, incr) for i=part.Transparency, 1, incr do wait() part.Transparency=i end end
  199. function appear(part, incr) for i=part.Transparency, 0, -incr do wait() part.Transparency=i end end
  200. function computePos(pos, pos2) local pos3=Vector3.new(pos2.x, pos.y, pos2.z) return CFrame.new(pos, pos3) end
  201. function laser(pos, dir, col) local magnitude=(pos-dir).magnitude local distance=(pos+dir)/2 local ray=add.Part(workspace, true, false, col, 0, Vector3.new(.2, magnitude, .2), CFrame.new(distance, pos)*CFrame.Angles(-math.pi/2, 0, 0)) return ray end
  202. function nearPos(pos, dis) local temp local distance=dis for i, v in pairs(workspace:children()) do if v:isA("Model") then temp=v:findFirstChild("Torso") local humanoid=v:findFirstChild("Humanoid") if temp and humanoid and v~=char and (temp.CFrame.p-pos).magnitude<distance then distance=(temp.CFrame.p-pos).magnitude return temp.Parent end end end end
  203. function lightningGen(startPos, endPos, col) local magnitude=(startPos-endPos).magnitude local distance=(startPos+endPos)/2 local pattern=add.Part(workspace, true, false, "White", 1, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPos)) local startPosProx=startPos for i=1, 9 do local startPosProx2=startPosProx local random=Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)) local findSize=pattern.Size.z/10 local findOffSet=pattern.CFrame.lookVector*-1 local compute=i*findSize*findOffSet local newStartPos=startPos local newEndPos=CFrame.new(random+compute+newStartPos).p local magnitude=(startPosProx2-newEndPos).magnitude local distance=(startPosProx2+newEndPos)/2 local lightning=add.Part(workspace, true, false, col or "Bright yellow", 0, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPosProx2)) s(function() for i=0, 1, .1 do wait() lightning.Transparency=i end lightning:remove() end) startPosProx=newEndPos end pattern:remove() end
  204. function trail(pos, cf, col, size) s(function() local old=(pos.CFrame*cf).p while deb.trail==true do wait() local new=(pos.CFrame*cf).p local mag=(old-new).magnitude 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)) trail.Name="Effect" local tMesh=add.Mesh("CylinderMesh", trail, Vector3.new(size or 1, 1, size or 1), nil, nil) old=new s(function() for i=1, 0, -.1 do wait() tMesh.Scale=tMesh.Scale*Vector3.new(i, 1, i) end trail:remove() end) s(function() for i=0, 1, .1 do wait() trail.Transparency=i end end) end end) end
  205. function stickHit(from, to) local stickW=add.Weld(from, to, to.CFrame:inverse()*from.CFrame) stickW.C0=from.CFrame:inverse()*from.CFrame return stickW end
  206. function glowMesh(prt, size, speed) local glow=prt:clone() add.Weld(prt, glow) glow.Parent=workspace glow.Anchored=false glow.CanCollide=false for i, v in pairs(glow:children()) do if v:isA("SpecialMesh") or v:isA("BlockMesh") or v:isA("CylinderMesh") then s(function() for i=0, size, speed do wait() v.Scale=v.Scale+Vector3.new(i, i, i) end end) s(function() fade(glow, .1) glow:remove() end) end end end
  207. function makeCircle(prt, prts, dis, incr) local radius=dis+(prts*incr) local tb={} for i=1, prts do local prt2=prt:clone() prt2.Parent=model local x = math.sin((360/prts + 360/prts*i)/(180/math.pi))*radius local y = 0 local z = math.cos((360/prts + 360/prts*i)/(180/math.pi))*radius prt2.CFrame=prt.CFrame:toWorldSpace(CFrame.new(x,y,z)) prt:remove() table.insert(tb, prt2) end return tb end
  208. function antiExplosion(model) local ffs={} for i, v in pairs(model:children()) do pcall(function() local ff2=Instance.new("ForceField", v.Handle) table.insert(ffs, ff2) end) if v:isA("BasePart") then local ff=Instance.new("ForceField", v) table.insert(ffs, ff) end end return ffs end
  209. function dmgHit(h)
  210. local critical=math.random(1, 10)
  211. if deb.key==true and h.Parent:findFirstChild("Humanoid") and deb.hit==false and h.Parent~=char then
  212. deb.hit=true
  213. if rage<100 then rage=rage+1 end
  214. local fakeM=Instance.new("Model", workspace)
  215. if critical==5 then
  216. dmg=50
  217. fakeM.Name=-dmg.." Critical!"
  218. else
  219. fakeM.Name=-dmg
  220. end
  221. local hHuman=h.Parent:findFirstChild("Humanoid")
  222. local hTorso=h.Parent:findFirstChild("Torso")
  223. hHuman.Health=hHuman.Health-dmg
  224. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  225. local effect=add.Part(fakeM, true, false, "Bright red", 0, Vector3.new(1, .5, 1), h.CFrame*CFrame.new(0, 4, 0)) effect.Name="Head"
  226. game.Debris:addItem(fakeM, 1)
  227. wait(.1)
  228. deb.hit=false
  229. --[[elseif deb.key==true and deb.hit==false and h.Parent~=char then
  230. deb.hit=true
  231. pcall(function()
  232. print("found")
  233. local pYPos=h.Position.y-(h.Size.y/2)
  234. local sYPos=obj.Blade.Position.y
  235. if sYPos<=pYPos or sYPos>=(pYPos+h.Size.y) then return end
  236. local p=h:clone() p.Parent=workspace p.Anchored=false p.CanCollide=true --p.Name="Effect"
  237. local p2=h:clone() p2.Parent=workspace p2.Anchored=false p2.CanCollide=true --p2.Name="Effect"
  238. h:remove()
  239. p.formFactor="Custom"
  240. p2.formFactor="Custom"
  241. p.Friction=0
  242. p2.Friction=0
  243. p.Size=Vector3.new(h.Size.x, sYPos-pYPos, h.Size.z)
  244. p2.Size=Vector3.new(h.Size.x, p2.Size.y-(sYPos-pYPos), h.Size.z)
  245. p.CFrame=h.CFrame*CFrame.new(0, -p2.Size.y/2, 0)
  246. p2.CFrame=h.CFrame*CFrame.new(0, p.Size.y/2, 0)
  247. s(function()
  248. wait(5)
  249. p:remove() p2:remove()
  250. end)
  251. end)
  252. wait(.2)
  253. deb.hit=false]]
  254. end wait(1)
  255. dmg=math.random(5, 10)
  256. end
  257. function Attack() combo=combo+1 loop=true
  258. for i, v in pairs(modelB:children()) do v.Touched:connect(dmgHit) end
  259. if deb.key==false and shielding==false then
  260. deb.key=true
  261. if combo>0 then Slash:play()
  262. for i=0, 1, .2 do wait()
  263. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(0, 0, 0)
  264. animate.RA(CFrame.Angles(math.rad(135)*i, 0, math.rad(45)*i))
  265. end
  266. deb.trail=true trail(obj.Blade, CFrame.new(0, 0, -3), "White", .2)
  267. for i=0, 1, .2 do wait()
  268. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(75)*i, 0, 0)
  269. animate.RA(CFrame.Angles(math.rad(135)-math.rad(90)*i, 0, math.rad(45)-math.rad(90)*i))
  270. end
  271. deb.trail=false
  272. for i=1, 0, -.2 do wait()
  273. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(75)*i, 0, 0)
  274. animate.RA(CFrame.Angles(math.rad(45)*i, 0, -math.rad(45)*i))
  275. end
  276. end
  277. if combo>1 then Slash:play()
  278. for i=0, 1, .2 do wait()
  279. animate.RA(CFrame.Angles(0, 0, math.rad(90)*i))
  280. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90)*i, 0, 0)
  281. end
  282. deb.trail=true trail(obj.Blade, CFrame.new(0, 0, -3), "White", .2)
  283. for i=0, 1, .2 do wait()
  284. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90)+math.rad(70)*i, 0, 0)
  285. animate.Torso(CFrame.Angles(0, math.rad(135)*i, 0))
  286. animate.RA(CFrame.Angles(0, math.rad(45)*i, math.rad(90)))
  287. end
  288. if combo>2 then Slash:play()
  289. for i=1, 0, -.2 do wait()
  290. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90)+math.rad(70)*i, 0, 0)
  291. animate.Torso(CFrame.Angles(0, math.rad(135)*i, 0))
  292. animate.RA(CFrame.Angles(0, math.rad(45)*i, math.rad(90)))
  293. end
  294. deb.trail=false
  295. for i=1, 0, -.2 do wait()
  296. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90)*i, 0, 0)
  297. animate.Torso(CFrame.Angles(0, 0, 0))
  298. animate.RA(CFrame.Angles(0, 0, math.rad(90)*i))
  299. end
  300. running()
  301. combo=0
  302. deb.key=false
  303. return
  304. end
  305. deb.trail=false
  306. for i=1, 0, -.2 do wait()
  307. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(20)*i, 0, 0)
  308. animate.Torso(CFrame.Angles(0, math.rad(135)*i, 0))
  309. animate.RA(CFrame.Angles(0, math.rad(45)*i, math.rad(90)*i))
  310. end
  311. end
  312. if loop then
  313. for i=0, 1, .2 do wait()
  314. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90)*i, 0, 0)
  315. animate.Torso(CFrame.Angles(0, math.rad(90)*i, 0))
  316. animate.LA(CFrame.Angles(0, 0, -math.rad(135)*i))
  317. animate.RA(CFrame.Angles(0, 0, math.rad(90)*i))
  318. end
  319. deb.trail=true trail(obj.Blade, CFrame.new(0, 0, -3), "White", .2)
  320. while loop and rage>0 do wait(.05) Slash:play() rage=rage-1
  321. animate.RA(CFrame.new(math.random(0, 1)*.5, math.random(-1, 1)*.5, math.random(-1, 1)*.5)*CFrame.Angles(0, 0, math.rad(90)))
  322. end
  323. deb.trail=false
  324. for i=1, 0, -.2 do wait()
  325. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90)*i, 0, 0)
  326. animate.Torso(CFrame.Angles(0, math.rad(90)*i, 0))
  327. animate.LA(CFrame.Angles(0, 0, -math.rad(135)*i))
  328. animate.RA(CFrame.Angles(0, 0, math.rad(90)*i))
  329. end
  330. end
  331. running()
  332. combo=0
  333. deb.key=false
  334. end
  335. end
  336. function running()
  337. animate.LA(CFrame.Angles(-math.rad(15), 0, -math.rad(15)))
  338. animate.RA(CFrame.Angles(math.rad(15), 0, math.rad(15)))
  339. end
  340. function Block(mouse)
  341. for i=0, 1, .2 do wait()
  342. --obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(0, math.rad(90)*i, 0)
  343. animate.Torso(CFrame.Angles(0, -math.rad(90)*i, 0))
  344. animate.LA(CFrame.Angles(0, 0, -math.rad(165)*i))
  345. animate.RA(CFrame.Angles(0, 0, math.rad(25)*i))
  346. end
  347. Hit:play()
  348. local ff=antiExplosion(char)
  349. local shield=add.Part(char, false, true, "Deep orange", 0, Vector3.new(5.5, 5.5, 3), torso.CFrame*CFrame.new(0, 1, 0)*CFrame.Angles(0, 0, math.rad(90)))
  350. local ff2=Instance.new("ForceField", shield)
  351. local shieldM=add.Mesh("SpecialMesh", shield, Vector3.new(1*shield.Size.x, 1*shield.Size.y, 4), nil, nil, "http://www.roblox.com/asset/?id=96670147")
  352. local shieldW=add.Weld(shield, torso, CFrame.new(0, 1, -2)*CFrame.Angles(0, 0, math.rad(90)))
  353. shield.Touched:connect(function(h)
  354. if h~=shield and h.Parent~=char and not h.Parent:findFirstChild("Humanoid") and h.Parent~=modelB and h.Parent~=model and h.Name~="Base" and deb.hit==false then
  355. deb.hit=true
  356. 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, -50)).p bp.D=500
  357. 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)
  358. game.Debris:addItem(bp, .2) game.Debris:addItem(bg, .2)
  359. deb.hit=false
  360. end
  361. end)
  362. local bg=Instance.new("BodyGyro", torso) bg.maxTorque=Vector3.new(0, math.huge, 0) bg.D=100
  363. s(function()
  364. while loop do wait(.5)
  365. glowMesh(shield, 1, .2)
  366. end
  367. end)
  368. while loop do wait()
  369. bg.cframe=computePos(torso.CFrame.p, mouse.Hit.p)
  370. end
  371. for i, v in pairs(ff) do v:remove() end ff2:remove()
  372. wait(.5)
  373. shield:remove()
  374. bg:remove()
  375. for i=1, 0, -.2 do wait()
  376. animate.Torso(CFrame.Angles(0, -math.rad(90)*i, 0))
  377. animate.LA(CFrame.Angles(0, 0, -math.rad(165)*i))
  378. animate.RA(CFrame.Angles(0, 0, math.rad(25)*i))
  379. end
  380. running()
  381. end
  382. function AttackHold(mouse)
  383. human.WalkSpeed=10
  384. for i=0, 1, .2 do wait()
  385. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(0, 0, math.rad(45)*i)
  386. animate.LA(CFrame.new(.5*i, .5*i, -.5*i)*CFrame.Angles(math.rad(135)*i, 0, math.rad(45)*i))
  387. animate.RA(CFrame.new(-.5*i, .5*i, -.5*i)*CFrame.Angles(math.rad(135)*i, 0, -math.rad(45)*i))
  388. end
  389. Charge:play()
  390. local bg=Instance.new("BodyGyro", torso) bg.maxTorque=Vector3.new(0, math.huge, 0) bg.D=100
  391. while loop do wait()
  392. bg.cframe=computePos(torso.CFrame.p, mouse.Hit.p)
  393. dmg=dmg+2
  394. local aura=add.Part(workspace, false, false, "Bright yellow", 0, Vector3.new(1, 1, 1), body.Torso.CFrame*CFrame.new(0, -3, 0))
  395. local auraM=add.Mesh("SpecialMesh", aura, Vector3.new(2, .5, 2), nil, "File") auraM.MeshId="http://www.roblox.com/asset/?id=20329976"
  396. add.Weld(aura, body.Torso, CFrame.new(0, -3, 0)*CFrame.Angles(0, math.rad(math.random(-45, 45)), 0))
  397. s(function()
  398. for i=2, 6, .2 do wait()
  399. auraM.Scale=Vector3.new(i, auraM.Scale.y, i)
  400. end
  401. aura:remove()
  402. end)
  403. s(function()
  404. for i=0, 1, .05 do wait()
  405. aura.Transparency=i
  406. end
  407. end)
  408. end
  409. local p=add.Part(workspace, false, false, "Bright yellow", 0, Vector3.new(2, 2, 2), body.Torso.CFrame)
  410. local pM=add.Mesh("SpecialMesh", p, nil, nil, "Sphere")
  411. add.Weld(p, body.Torso)
  412. for i=0, 1, .1 do wait()
  413. p.Transparency=i
  414. pM.Scale=pM.Scale+Vector3.new(i*2, i*2, i*2)
  415. end
  416. bg:remove()
  417. deb.trail=true trail(obj.Blade, CFrame.new(0, 0, -3), "White", .2)
  418. Slash:play()
  419. for i, v in pairs(modelB:children()) do v.Touched:connect(dmgHit) end
  420. for i, v in pairs(char:children()) do if v:isA("BasePart") then v.Touched:connect(dmgHit) end end
  421. for i=0, 1, .2 do wait()
  422. torso.CFrame=torso.CFrame+torso.CFrame.lookVector*2*i
  423. animate.Torso(CFrame.Angles(0, -math.rad(45)+math.rad(45), 0))
  424. animate.LA(CFrame.new(.5, .5-.5*i, -.5)*CFrame.Angles(math.rad(135)-math.rad(135)*i, 0, math.rad(45)))
  425. animate.RA(CFrame.new(-.5, .5-.5*i, -.5)*CFrame.Angles(math.rad(135)-math.rad(135)*i, 0, -math.rad(45)))
  426. end
  427. deb.trail=false
  428. for i=1, 0, -.2 do wait()
  429. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(0, 0, math.rad(45)*i)
  430. animate.LA(CFrame.new(.5*i, 0, -.5*i)*CFrame.Angles(0, 0, math.rad(45)*i))
  431. animate.RA(CFrame.new(-.5*i, 0, -.5*i)*CFrame.Angles(0, 0, -math.rad(45)*i))
  432. end
  433. p:remove()
  434. dmg=math.random(5, 10)
  435. human.WalkSpeed=speed
  436. running()
  437. end
  438. function Ambush()
  439. local nChar=nearPos(torso.CFrame.p, 20)
  440. if nChar then
  441. for i, v in pairs(char:children()) do
  442. if v:isA("BasePart") then
  443. s(function()
  444. pcall(function() s(function() fade(v:findFirstChild("Handle"), .2)end) end)
  445. pcall(function() s(function() fade(v:findFirstChild("face"), .2)end) end)
  446. pcall(function() s(function() fade(v:findFirstChild("roblox"), .2)end) end)
  447. fade(v, .2)
  448. end)
  449. end
  450. end
  451. for i, v in pairs(modelB:children()) do
  452. if v:isA("BasePart") then
  453. s(function() fade(v, .2) end)
  454. end
  455. end
  456. wait(.5)
  457. for i, v in pairs(modelB:children()) do v.Touched:connect(dmgHit) end
  458. for i, v in pairs(char:children()) do if v:isA("BasePart") then v.Touched:connect(dmgHit) end end
  459. local torsoW=add.Weld(torso, nChar.Torso, CFrame.new(0, 0, 5))
  460. for i, v in pairs(char:children()) do
  461. if v:isA("BasePart") then
  462. s(function()
  463. pcall(function() s(function() appear(v:findFirstChild("Handle"), .2)end) end)
  464. pcall(function() s(function() appear(v:findFirstChild("face"), .2)end) end)
  465. pcall(function() s(function() appear(v:findFirstChild("roblox"), .2)end) end)
  466. appear(v, .2)
  467. end)
  468. end
  469. end
  470. for i, v in pairs(modelB:children()) do
  471. if v:isA("BasePart") then
  472. s(function() appear(v, .2) end)
  473. end
  474. end
  475. for i=0, 1, .2 do wait()
  476. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90)*i, 0, 0)
  477. animate.Torso(CFrame.Angles(0, math.rad(90)*i, 0))
  478. animate.LA(CFrame.Angles(0, 0, -math.rad(135)*i))
  479. animate.RA(CFrame.Angles(0, 0, math.rad(90)*i))
  480. end
  481. deb.trail=true trail(obj.Blade, CFrame.new(0, 0, -3), "White", .2)
  482. for i=1, 50 do wait() Slash:play()
  483. animate.RA(CFrame.new(math.random(0, 1)*.5, math.random(-1, 1)*.5, math.random(-1, 1)*.5)*CFrame.Angles(0, 0, math.rad(90)))
  484. end
  485. deb.trail=false
  486. torsoW:remove()
  487. for i=1, 0, -.2 do wait()
  488. obj.HandleW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90)*i, 0, 0)
  489. animate.Torso(CFrame.Angles(0, math.rad(90)*i, 0))
  490. animate.LA(CFrame.Angles(0, 0, -math.rad(135)*i))
  491. animate.RA(CFrame.Angles(0, 0, math.rad(90)*i))
  492. end
  493. end
  494. end
  495. bin.Selected:connect(function(mouse) createParts()
  496. Equipping:play()
  497. for i=0, 1, .1 do wait()
  498. animate.Head(CFrame.Angles(-math.rad(25)*i, math.rad(45)*i, 0))
  499. animate.LA(CFrame.Angles(-math.rad(15)*i, 0, -math.rad(15)*i))
  500. animate.RA(CFrame.new(-1*i, 0, -.5*i)*CFrame.Angles(math.rad(65)*i, 0, -math.rad(45)*i))
  501. obj.HandleW.C1=CFrame.new(0, 0, -2-i/2)*CFrame.Angles(0, math.pi, 0)
  502. end
  503. obj.HandleW.Part1=body.RA
  504. obj.HandleW.C1=CFrame.new(0, -1.5, 0)
  505. for i=1, 0, -.1 do wait()
  506. animate.Head(CFrame.Angles(-math.rad(25)*i, math.rad(45)*i, 0))
  507. animate.LA(CFrame.Angles(-math.rad(15)*i, 0, -math.rad(15)*i))
  508. animate.RA(CFrame.new(-1*i, 0, -.5*i)*CFrame.Angles(math.rad(65)*i, 0, -math.rad(45)*i))
  509. end
  510. running()
  511. mouse.Button1Down:connect(Attack)
  512. mouse.Button1Up:connect(function() loop=false end)
  513. mouse.KeyDown:connect(function(key)
  514. local key=key:lower()
  515. if key=="c" and deb.key==false and shielding==false then
  516. shielding=true loop=true
  517. Block(mouse)
  518. shielding=false
  519. end
  520. if key=="f" and deb.key==false and shielding==false then
  521. deb.key=true loop=true
  522. AttackHold(mouse)
  523. deb.key=false
  524. end
  525. if key=="q" and deb.key==false and shielding==false then
  526. deb.key=true
  527. Ambush()
  528. deb.key=false
  529. end
  530. end)
  531. mouse.KeyUp:connect(function(key)
  532. local key=key:lower()
  533. if key=="c" then loop=false end
  534. if key=="f" then loop=false end
  535. end)
  536. selected=true
  537. s(function()
  538. while selected do wait()
  539. obj.ShowDMG.Text="Damage: "..dmg
  540. obj.Meter.Size=UDim2.new(rage/100, 0, 1, 0)
  541. obj.MeterLabel.Text=rage
  542. end
  543. end)
  544. end)
  545. bin.Deselected:connect(function()
  546. selected=false loop=false
  547. for i=0, 1, .1 do wait()
  548. animate.Head(CFrame.Angles(-math.rad(25)*i, math.rad(45)*i, 0))
  549. animate.LA(CFrame.Angles(-math.rad(15)*i, 0, -math.rad(15)*i))
  550. animate.RA(CFrame.new(-1*i, 0, -.5*i)*CFrame.Angles(math.rad(65)*i, 0, -math.rad(45)*i))
  551. end
  552. obj.HandleW.Part1=obj.Case
  553. obj.HandleW.C1=CFrame.new(0, 0, -2.5)*CFrame.Angles(0, math.pi, 0)
  554. for i=0, .5, .05 do wait()
  555. obj.HandleW.C1=CFrame.new(0, 0, -2.5+i)*CFrame.Angles(0, math.pi, 0)
  556. end
  557. for i=1, 0, -.1 do wait()
  558. animate.Head(CFrame.Angles(-math.rad(25)*i, math.rad(45)*i, 0))
  559. animate.LA(CFrame.Angles(-math.rad(15)*i, 0, -math.rad(15)*i))
  560. animate.RA(CFrame.new(-1*i, 0, -.5*i)*CFrame.Angles(math.rad(65)*i, 0, -math.rad(45)*i))
  561. end
  562. removeParts()
  563. end)
  564. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement