WDGASTER132

Untitled

Jul 16th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.98 KB | None | 0 0
  1. --[[
  2.  
  3. ]]
  4. Player = game:GetService("Players").LocalPlayer
  5. Character = Player.Character
  6. PlayerGui = Player.PlayerGui
  7. Backpack = Player.Backpack
  8. Torso = Character.Torso
  9. Head = Character.Head
  10. Humanoid = Character.Humanoid
  11. LeftArm = Character["Left Arm"]
  12. LeftLeg = Character["Left Leg"]
  13. RightArm = Character["Right Arm"]
  14. RightLeg = Character["Right Leg"]
  15. LS = Torso["Left Shoulder"]
  16. LH = Torso["Left Hip"]
  17. RS = Torso["Right Shoulder"]
  18. RH = Torso["Right Hip"]
  19. Neck = Torso.Neck
  20. it=Instance.new
  21. vt=Vector3.new
  22. cf=CFrame.new
  23. euler=CFrame.fromEulerAnglesXYZ
  24. angles=CFrame.Angles
  25. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  26. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. attack = false
  28. attacktype = 1
  29. damage = 5
  30. oridamage = 50
  31. attackdebounce = false
  32. ssdebounce=false
  33. MMouse=nil
  34. combo=0
  35. --player
  36. player = nil
  37. --save shoulders
  38. RSH, LSH = nil, nil
  39. --welds
  40. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  41. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  42.  
  43.  
  44. if Character:findFirstChild("Sword",true) ~= nil then
  45. Character:findFirstChild("Sword",true).Parent = nil
  46. end
  47.  
  48.  
  49. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  50. local fp = it("Part")
  51. fp.formFactor = formfactor
  52. fp.Parent = parent
  53. fp.Reflectance = reflectance
  54. fp.Transparency = transparency
  55. fp.CanCollide = false
  56. fp.Locked=true
  57. fp.BrickColor = brickcolor
  58. fp.Name = name
  59. fp.Size = size
  60. fp.Position = Torso.Position
  61. fp.BottomSurface="Smooth"
  62. fp.TopSurface="Smooth"
  63. fp:BreakJoints()
  64. return fp
  65. end
  66.  
  67. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  68. local mesh = it(Mesh)
  69. mesh.Parent = part
  70. if Mesh=="SpecialMesh" then
  71. mesh.MeshType = meshtype
  72. mesh.MeshId = meshid
  73. end
  74. mesh.Offset=offset
  75. mesh.Scale=scale
  76. return mesh
  77. end
  78.  
  79. function weld(parent,part0,part1,c0)
  80. local weld = it("Weld")
  81. weld.Parent = parent
  82. weld.Part0 = part0
  83. weld.Part1 = part1
  84. weld.C0 = c0
  85. return weld
  86. end
  87.  
  88. local modelzorz = Instance.new("Model")
  89. modelzorz.Parent = Character
  90. modelzorz.Name = "Sword"
  91.  
  92. local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(1,1,1))
  93. local prt2=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Part2",vt(1,1,1))
  94. local prt3=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Part3",vt(1,1,1))
  95. local prt4=part(3,modelzorz,0,0,BrickColor.new("Really blue"),"Part4",vt(1,1,1))
  96. local prt5=part(3,modelzorz,0,0,BrickColor.new("Really blue"),"Part5",vt(1,1,1))
  97. local prt6=part(3,modelzorz,0.3,0,BrickColor.new("Royal purple"),"Part6",vt(1,2,1))
  98. local prt7=part(3,modelzorz,0.3,0,BrickColor.new("Really red"),"Part7",vt(1,2,1))
  99. local prt8=part(3,modelzorz,0.3,0,BrickColor.new("Royal purple"),"Part8",vt(1,1,1))
  100. local prt9=part(3,modelzorz,0.3,0,BrickColor.new("Really red"),"Part9",vt(1,1,1))
  101. local prt10=part(3,modelzorz,0,0.5,BrickColor.new("Royal purple"),"Part10",vt(1,1,1))
  102. coroutine.resume(coroutine.create(function()
  103. while true do
  104. wait(0)
  105. for i=0.5,0.9,0.01 do
  106. wait()
  107. prt10.Transparency=i
  108. end
  109. for i=0.9,0.5,-0.01 do
  110. wait()
  111. prt10.Transparency=i
  112. end
  113. end
  114. end))
  115.  
  116. local msh1=mesh("CylinderMesh",prt1,"","",vt(0,0,0),vt(0.3,1,0.3))
  117. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(0.1,0.5,0.1))
  118. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(0.1,0.5,0.1))
  119. local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(0.6,0.1,0.3))
  120. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(0.4,0.1,0.5))
  121. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(0.4,1.5,0.05))
  122. local msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(0.21,1.5,0.06))
  123. local msh8=mesh("SpecialMesh",prt8,"Wedge","",vt(0,0,0),vt(0.05,0.4,0.4))
  124. local msh9=mesh("SpecialMesh",prt9,"Wedge","",vt(0,0,0),vt(0.06,0.21,0.4))
  125. local msh10=mesh("SpecialMesh",prt10,"Sphere","",vt(0,0,0),vt(1.5,1.5,1.5))
  126.  
  127. local wld1=weld(prt1,prt1,Torso,euler(0,0,0)*cf(-0.5,-2,-0.5))
  128. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,-0.7,0))
  129. local wld3=weld(prt3,prt3,prt1,euler(0,0,1.57)*cf(0,-0.7,0))
  130. local wld4=weld(prt4,prt4,prt1,euler(0,0,0)*cf(0,0.5,0))
  131. local wld5=weld(prt5,prt5,prt4,euler(0,0,0)*cf(0,0,0))
  132. local wld6=weld(prt6,prt6,prt5,euler(0,0,0)*cf(0,1.5,0))
  133. local wld7=weld(prt7,prt7,prt6,euler(0,0,0)*cf(-0.1,0,0))
  134. local wld8=weld(prt8,prt8,prt6,euler(1.57,-1.57,0)*cf(0,1.7,0))
  135. local wld9=weld(prt9,prt9,prt7,euler(1.57,-1.57,0)*cf(0,1.7,0))
  136. local wld10=weld(prt10,prt10,LeftArm,euler(0,0,0)*cf(0,1,0))
  137.  
  138. derp=-0.4
  139. for i=1,5 do
  140. local prt=part(3,modelzorz,0,0,BrickColor.new("Royal purple "),"Part",vt(1,1,1))
  141. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(0.25,0.1,0.25))
  142. local wld=weld(prt,prt,prt1,euler(0,0.785,0)*cf(0,derp,0))
  143. derp=derp+0.2
  144. end
  145.  
  146. if (script.Parent.className ~= "HopperBin") then
  147. Tool = Instance.new("HopperBin")
  148. Tool.Parent = Backpack
  149. Tool.Name = "Sword"
  150. script.Parent = Tool
  151. end
  152. Bin = script.Parent
  153.  
  154. local bg = it("BodyGyro")
  155. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  156. bg.P = 20e+003
  157. bg.Parent = nil
  158.  
  159. so = function(id,par,vol,pit)
  160. coroutine.resume(coroutine.create(function()
  161. local sou = Instance.new("Sound",par or workspace)
  162. sou.Volume=vol
  163. sou.Pitch=pit or 1
  164. sou.SoundId=id
  165. wait()
  166. sou:play()
  167. wait(6)
  168. sou:Remove()
  169. end))
  170. end
  171.  
  172. function unequipweld()
  173. wld1.Part1=Torso
  174. wld1.C0=euler(0,0,0)*cf(-0.5,-2,-0.5)
  175. end
  176.  
  177. function equipweld()
  178. wld1.Part1=RightArm
  179. wld1.C0=euler(-1.57,0,-1.57)*cf(0,1,0)
  180. end
  181.  
  182. function hideanim()
  183. equipped=false
  184. wait(0.1)
  185. bg.Parent=nil
  186. unequipweld()
  187. end
  188.  
  189. function equipanim()
  190. equipped=true
  191. wait(0.1)
  192. equipweld()
  193. RW.C0=cf(1.5, 0.5, 0) * euler(1,0,0)
  194. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4,-0.2)
  195. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  196. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  197. end
  198.  
  199. function Charge()
  200. attack=true
  201. SpecialEffect()
  202. for i=0,1,0.1 do
  203. wait()
  204. eul=1*i
  205. Torso.Neck.C0=necko*euler(0,0,-1*i)
  206. RW.C0=cf(1.5-1*i, 0.5, -1*i) * euler(1+0.2*i,0,0)
  207. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4-2*i,-0.2+1.77*i)
  208. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5*i,0,-0.2-0.5*i)
  209. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  210. end
  211. wait(0.3)
  212. local vel2 = Instance.new("BodyVelocity")
  213. vel2.Parent = Torso
  214. vel2.maxForce = vt(4e+005,4e+005,4e+005)*1
  215. vel2.velocity = Head.CFrame.lookVector*100
  216. local LastPoint = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  217. con1=prt7.Touched:connect(function(hit) Damagefunc2(hit,30,10) end)
  218. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  219. for i=0,1,0.2 do
  220. wait()
  221. wld1.C0=euler(-1.57,-1.57*i,-1.57)*cf(0,1,0)
  222. RW.C0=cf(0.5+1*i, 0.5, -1+1*i) * euler(1.2,0,0)
  223. RW.C1=cf(0, 0.5, 0) * euler(0,-2.4+1.5*i,1.57-3.14*i)
  224. local Point = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  225. effect("Royal purple ",0.5,LastPoint,Point)
  226. LastPoint = Point
  227. end
  228. con1:disconnect()
  229. vel2.Parent=nil
  230. wait(1)
  231. eul=0
  232. Torso.Neck.C0=necko*euler(0,0,0)
  233. wld1.C0=euler(-1.57,0,-1.57)*cf(0,1,0)
  234. RW.C0=cf(1.5, 0.5, 0) * euler(1,0,0)
  235. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4,-0.2)
  236. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  237. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  238. attack=false
  239. end
  240.  
  241. function spintowin()
  242. attack=true
  243. SpecialEffect()
  244. for i=0,1,0.1 do
  245. wait()
  246. wld1.C0=euler(-1.57,-1.57*i,-1.57)*cf(0,1,0)
  247. RW.C0=cf(1.5-0.5*i, 0.5, -0.5*i) * euler(1,0,-0.5*i)
  248. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4-1.57*i,-0.2)
  249. LW.C0=cf(-1.5, 0.5, 0) * euler(0.3*i,0,-0.2-0.2*i)
  250. end
  251. --[[local vel2 = Instance.new("BodyVelocity")
  252. vel2.Parent = Torso
  253. vel2.maxForce = vt(4e+005,4e+005,4e+005)*1
  254. vel2.velocity = Head.CFrame.lookVector*20]]
  255. bg.Parent=Torso
  256. CF = Torso.CFrame
  257. local LastPoint = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  258. con1=prt7.Touched:connect(function(hit) Damagefunc1(hit,10,0.1) end)
  259. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1.1)
  260. for i = 0 , 1 , 0.1 do
  261. wait(0)
  262. RW.C0=cf(1.5-0.5+0.5*i, 0.5, -0.5+0.5*i) * euler(1-1*i,0,-0.5+2.07*i)
  263. RW.C1=cf(0, 0.5, 0) * euler(0,-1.97+1.97*i,-0.2+0.2*i)
  264. LW.C0=cf(-1.5, 0.5, 0) * euler(0.3+1.27*i,0,-0.4+0.4*i)
  265. bg.cframe=CF*euler(0,-6.283*i,0)
  266. local Point = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  267. effect("Royal purple ",0.5,LastPoint,Point)
  268. LastPoint = Point
  269. end
  270. for i=1,5 do
  271. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1.1)
  272. for i = 0 , 1 , 0.1 do
  273. wait(0)
  274. bg.cframe=CF*euler(0,-6.283*i,0)
  275. local Point = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  276. effect("Royal purple",0.5,LastPoint,Point)
  277. LastPoint = Point
  278. end
  279. end
  280. --vel2.Parent=nil
  281. con1:disconnect()
  282. wait(0.5)
  283. for i = 0 , 1 , 0.1 do
  284. wait(0)
  285. wld1.C0=euler(-1.57,-1.57+1.57*i,-1.57)*cf(0,1,0)
  286. RW.C0=cf(1.5, 0.5, 0) * euler(1*i,0,1.57-1.57*i)
  287. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4*i,-0.2*i)
  288. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57-1.57*i,0,-0.2*i)
  289. end
  290. attack=false
  291. end
  292.  
  293. function CombatCharge()
  294. attack=true
  295. SpecialEffect()
  296. for i=0,1,0.1 do
  297. wait()
  298. RW.C0=cf(1.5, 0.5, 0) * euler(1+2*i,0,0)
  299. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4+0.4*i,-0.2+0.2*i)
  300. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5*i,0,-0.2)
  301. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  302. end
  303. local LastPoint = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  304. con1=prt7.Touched:connect(function(hit) Damagefunc1(hit,5,10) end)
  305. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  306. for i=0,1,0.2 do
  307. wait()
  308. RW.C0=cf(1.5, 0.5, 0) * euler(3-3.5*i,0,0)
  309. RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  310. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5,0,-0.2)
  311. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  312. local Point = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  313. effect("Royal purple",0.5,LastPoint,Point)
  314. LastPoint = Point
  315. end
  316. for i=1,10 do
  317. numb=math.random(-180,180)
  318. RW.C0=cf(1.5, 0.5, 0) * euler(3,0,math.rad(numb))
  319. RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  320. local LastPoint = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  321. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  322. for i=0,1,0.2 do
  323. wait()
  324. RW.C0=cf(1.5, 0.5, 0) * euler(3,0,math.rad(numb))
  325. RW.C1=cf(0, 0.5, 0) * euler(3.5*i,0,0)
  326. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5,0,-0.2)
  327. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  328. local Point = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  329. effect("Royal purple",0.5,LastPoint,Point)
  330. LastPoint = Point
  331. end
  332. end
  333. con1:disconnect()
  334. wait(0.3)
  335. for i=0,1,0.1 do
  336. wait()
  337. RW.C0=cf(1.5, 0.5, 0) * euler(3-2*i,0,math.rad(numb)-math.rad(numb)*i)
  338. RW.C1=cf(0, 0.5, 0) * euler(3.5-3.5*i,-0.4*i,-0.2*i)
  339. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+0.5*i,0,-0.2)
  340. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  341. end
  342. attack=false
  343. end
  344.  
  345. function Despair()
  346. attack=true
  347. Humanoid.WalkSpeed=0
  348. print("Warrior SS initiated.")
  349. SpecialEffect()
  350. bg.Parent=Head
  351. CF = Head.CFrame
  352. bg.cframe=CF
  353. for i=0,1,0.2 do
  354. wait()
  355. Neck.C0=necko*euler(0,0,1.57*i)
  356. RW.C0=cf(1.5, 0.5, 0) * euler(1,0,0)
  357. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4,-0.2-1.37*i)
  358. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2-1.37*i)
  359. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  360. end
  361. wait(0.2)
  362. partCFrame=Head.CFrame*cf(0,0,-20)
  363. local hit,pos = rayCast(LeftArm.Position,Head.CFrame.lookVector,100,Character)
  364. if hit~=nil then
  365. partCFrame=hit.CFrame
  366. print("HITTED")
  367. end
  368. prt10.Parent=nil
  369. local basepart=part(3,workspace,0,0,Torso.BrickColor,"Base Part",vt(1,1,1))
  370. basepart.CFrame=partCFrame
  371. basepart.Anchored=true
  372. so("http://roblox.com/asset/?id=2101144",basepart,1,2)
  373. MagicCircle(BrickColor.new("Royal purple"),basepart.CFrame,3,3,3,0,0,0,7,7,7)
  374. MagicCircle(BrickColor.new("Royal purple"),basepart.CFrame,5,1,1,0,0,0,9,1,1)
  375. MagicCircle(BrickColor.new("Royal purple"),basepart.CFrame,1,5,1,0,0,0,1,9,1)
  376. MagicCircle(BrickColor.new("Royal purple"),basepart.CFrame,1,1,5,0,0,0,1,1,9)
  377. local c = game.Workspace:GetChildren()
  378. for i = 1, #c do
  379. local hum = c[i]:findFirstChild("Humanoid")
  380. if hum ~= nil and hum.Health ~= 0 then
  381. local head = c[i]:findFirstChild("Head")
  382. if head ~= nil then
  383. local targ = head.Position - basepart.Position
  384. local mag = targ.magnitude
  385. if mag <= 20 and c[i].Name ~= Player.Name then
  386. fb=Instance.new("BodyPosition")
  387. coroutine.resume(coroutine.create(function(Part,BodPos)
  388. Part.Parent.Humanoid.Health=Part.Parent.Humanoid.Health-5
  389. showDamage(Part.Parent,"Stunned!",10)
  390. walkspeed=Part.Parent.Humanoid.WalkSpeed
  391. Part.Parent.Humanoid.WalkSpeed=0.01
  392. BodPos.P=20000
  393. BodPos.D=1000
  394. BodPos.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  395. BodPos.position=Part.Position
  396. BodPos.Parent=Part
  397. wait(10)
  398. BodPos.Parent=nil
  399. Part.Parent.Humanoid.WalkSpeed=walkspeed
  400. end),head,fb)
  401. end
  402. end
  403. end
  404. end
  405. wait(1)
  406. Clone()
  407. Torso.CFrame=partCFrame*cf(0,15,0)
  408. basepart.Parent=nil
  409. bg.Parent=nil
  410. Neck.C0=necko
  411. RW.C0=cf(1.5, 0.5, 0) * euler(1,0,0)
  412. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4,-0.2)
  413. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  414. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  415. Humanoid.WalkSpeed=16
  416. attack=false
  417. end
  418.  
  419. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  420. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  421. end
  422.  
  423. function Clone()
  424. for _,v in pairs(Torso.Parent:children()) do
  425. if v.className=="Part" then
  426. n=v:clone()
  427. n.archivable=true
  428. n.Anchored=true
  429. n.CanCollide=false
  430. n.Name="TRAILER"
  431. n.BrickColor=v.BrickColor
  432. n.Parent=workspace
  433. coroutine.resume(coroutine.create(function(ne) for i=1, 80 do ne.Transparency=i/80 wait() end ne.Parent=nil end),n)
  434. elseif v.className=="Hat" then
  435. n=v.Handle:clone()
  436. n.archivable=true
  437. n.Anchored=true
  438. n.CanCollide=false
  439. n.Name="TRAILER"
  440. n.BrickColor=v.Handle.BrickColor
  441. n.Parent=workspace
  442. coroutine.resume(coroutine.create(function(ne) for i=1, 80 do ne.Transparency=i/80 wait() end ne.Parent=nil end),n)
  443. end
  444. end
  445. for _,v in pairs(modelzorz:children()) do
  446. if v.className=="Part" then
  447. n=v:clone()
  448. n.archivable=true
  449. n.Anchored=true
  450. n.CanCollide=false
  451. n.Name="TRAILER"
  452. n.BrickColor=v.BrickColor
  453. n.Parent=workspace
  454. coroutine.resume(coroutine.create(function(ne) for i=1, 80 do ne.Transparency=i/80 wait() end ne.Parent=nil end),n)
  455. end
  456. end
  457. end
  458.  
  459. function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  460. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  461. prt.Anchored=true
  462. prt.CFrame=cframe*cf(x2,y2,z2)
  463. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  464. coroutine.resume(coroutine.create(function()
  465. for i=0,1,0.1 do
  466. wait()
  467. prt.CFrame=prt.CFrame
  468. prt.Transparency=i
  469. msh.Scale=msh.Scale+vt(x3,y3,z3)
  470. end
  471. prt.Parent=nil
  472. end))
  473. end
  474.  
  475. function SpecialEffect()
  476. local prt=part(3,workspace,1,0,BrickColor.new("Royal purple"),"Part",vt(1,1,1))
  477. prt.Anchored=true
  478. prt.CFrame=Torso.CFrame
  479. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  480. coroutine.resume(coroutine.create(function(Part,Mesh)
  481. for i=0,1,0.2 do
  482. wait(0)
  483. Part.Transparency=i
  484. Mesh.Scale=Mesh.Scale+vt(10,10,10)
  485. end
  486. prt.Parent=nil
  487. end),prt,msh)
  488. end
  489.  
  490. function effect(Color,Ref,LP,P1,returnn)
  491. local effectsmsh = Instance.new("BlockMesh")
  492. effectsmsh.Scale = Vector3.new(1,1,1)
  493. effectsmsh.Name = "Mesh"
  494. local effectsg = Instance.new("Part")
  495. effectsg.formFactor = 3
  496. effectsg.CanCollide = false
  497. effectsg.Name = "Eff"
  498. effectsg.Locked = true
  499. effectsg.Anchored = true
  500. effectsg.Size = Vector3.new(0.2,1,0.2)
  501. effectsg.Parent = workspace
  502. effectsmsh.Parent = effectsg
  503. effectsg.BrickColor = BrickColor.new(Color)
  504. effectsg.Reflectance = Ref
  505. local point1 = P1
  506. local mg = (LP.p - point1.p).magnitude
  507. effectsg.Size = Vector3.new(0.2,mg,0.2)
  508. effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  509. if returnn then return effectsg end
  510. coroutine.resume(coroutine.create(function()
  511. if not returnn then
  512. for i = 0 , 1 , 0.05 do
  513. wait()
  514. effectsg.Transparency = 1*i
  515. effectsmsh.Scale = Vector3.new(0.5-0.5*i,1,0.5-0.5*i)
  516. end
  517. wait()
  518. effectsg.Parent = nil
  519. end
  520. end))
  521. end
  522.  
  523. Damagefunc1=function(hit,Damage,Knockback)
  524. if hit.Parent==nil then
  525. return
  526. end
  527. CPlayer=Bin
  528. h=hit.Parent:FindFirstChild("Humanoid")
  529. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  530. if attackdebounce == false then
  531. attackdebounce = true
  532. coroutine.resume(coroutine.create(function()
  533. wait(0.2)
  534. attackdebounce = false
  535. end))
  536. Damage=Damage
  537. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  538. return
  539. end]]
  540. -- hs(hit,1.2)
  541. c=Instance.new("ObjectValue")
  542. c.Name="creator"
  543. c.Value=game.Players.LocalPlayer
  544. c.Parent=h
  545. game:GetService("Debris"):AddItem(c,.5)
  546. Damage=Damage+math.random(0,10)
  547. -- h:TakeDamage(Damage)
  548. blocked=false
  549. block=hit.Parent:findFirstChild("Block")
  550. if block~=nil then
  551. print("herp")
  552. if block.Value>0 then
  553. blocked=true
  554. block.Value=block.Value-1
  555. print(block.Value)
  556. end
  557. end
  558. if blocked==false then
  559. -- h:TakeDamage(Damage)
  560. h.Health=h.Health-Damage
  561. showDamage(hit.Parent,Damage,.5)
  562. else
  563. h:TakeDamage(1)
  564. showDamage(hit.Parent,1,.5)
  565. end
  566. vp=Instance.new("BodyVelocity")
  567. vp.P=500
  568. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  569. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  570. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  571. if Knockback>0 then
  572. vp.Parent=hit.Parent.Torso
  573. end
  574. game:GetService("Debris"):AddItem(vp,.25)
  575. game:GetService("Debris"):AddItem(r,.5)
  576. c=Instance.new("ObjectValue")
  577. c.Name="creator"
  578. c.Value=Player
  579. c.Parent=h
  580. game:GetService("Debris"):AddItem(c,.5)
  581. CRIT=false
  582. hitDeb=true
  583. AttackPos=6
  584. end
  585. end
  586. end
  587.  
  588. Damagefunc2=function(hit,Damage,Knockback)
  589. if attackdebounce == false then
  590. attackdebounce = true
  591. coroutine.resume(coroutine.create(function()
  592. wait(0.1)
  593. attackdebounce = false
  594. end))
  595. if hit.Parent==nil then
  596. return
  597. end
  598. CPlayer=Bin
  599. blocked=false
  600. h=hit.Parent:FindFirstChild("Humanoid")
  601. if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  602. Damage=Damage
  603. c=it("ObjectValue")
  604. c.Name="creator"
  605. c.Value=game.Players.LocalPlayer
  606. c.Parent=h
  607. game:GetService("Debris"):AddItem(c,.5)
  608. -- print(c.Value)
  609. --[[ if math.random(0,99)+math.random()<=7.8 then
  610. CRIT=true
  611. Damage=Damage*2
  612. s=it("Sound")
  613. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  614. s.Volume=1
  615. s.Pitch=2
  616. s.Parent=hit
  617. s.PlayOnRemove=true
  618. s.Parent=nil
  619.  
  620. end]]
  621. Damage=Damage+math.random(0,10)
  622. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  623. blocked=false
  624. block=hit.Parent:findFirstChild("Block")
  625. if block~=nil then
  626. print("herp")
  627. if block.Value>0 then
  628. blocked=true
  629. block.Value=block.Value-3
  630. print(block.Value)
  631. end
  632. end
  633. if blocked==false then
  634. -- h:TakeDamage(Damage)
  635. h.Health=h.Health-Damage
  636. showDamage(hit.Parent,Damage,.5)
  637. else
  638. h:TakeDamage(1)
  639. showDamage(hit.Parent,1,.5)
  640. end
  641. --if blocked==false then
  642. local angle = (hit.Position-(Torso.Position+Vector3.new(0,0,0))).unit
  643. print(angle)
  644. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  645. rl=Instance.new("BodyAngularVelocity")
  646. rl.P=3000
  647. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  648. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  649. rl.Parent=hit
  650. coroutine.resume(coroutine.create(function(vel)
  651. wait(1)
  652. vel:Remove()
  653. end),rl)
  654. --end
  655. local bodyVelocity=Instance.new("BodyVelocity")
  656. bodyVelocity.velocity=angle*40+Vector3.new(0,0,0)
  657. bodyVelocity.P=5000
  658. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  659. bodyVelocity.Parent=hit
  660. coroutine.resume(coroutine.create(function(Vel)
  661. wait(0.7)
  662. Vel:Remove()
  663. end),bodyVelocity)
  664. game:GetService("Debris"):AddItem(vp,1)
  665. c=it("ObjectValue")
  666. c.Name="creator"
  667. c.Value=Player
  668. c.Parent=h
  669. game:GetService("Debris"):AddItem(c,.5)
  670. CRIT=false
  671. hitDeb=true
  672. AttackPos=6
  673. end
  674. end
  675. end
  676.  
  677. showDamage=function(Char,Dealt,du)
  678. m=Instance.new("Model")
  679. m.Name=tostring(Dealt)
  680. h=Instance.new("Humanoid")
  681. h.Health=0
  682. h.MaxHealth=0
  683. h.Parent=m
  684. c=Instance.new("Part")
  685. c.Transparency=0
  686. c.BrickColor=BrickColor:Red()
  687. if CRIT==true then
  688. c.BrickColor=BrickColor.new("Really red")
  689. end
  690. c.Name="Head"
  691. c.TopSurface=0
  692. c.BottomSurface=0
  693. c.formFactor="Plate"
  694. c.Size=Vector3.new(1,.4,1)
  695. ms=Instance.new("CylinderMesh")
  696. ms.Scale=Vector3.new(.8,.8,.8)
  697. if CRIT==true then
  698. ms.Scale=Vector3.new(1,1.25,1)
  699. end
  700. ms.Parent=c
  701. c.Reflectance=0
  702. Instance.new("BodyGyro").Parent=c
  703. c.Parent=m
  704. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  705. f=Instance.new("BodyPosition")
  706. f.P=2000
  707. f.D=100
  708. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  709. f.position=c.Position+Vector3.new(0,3,0)
  710. f.Parent=c
  711. game:GetService("Debris"):AddItem(m,.5+du)
  712. c.CanCollide=false
  713. m.Parent=workspace
  714. c.CanCollide=false
  715. end
  716.  
  717. function oneslash()
  718. attack=true
  719. combo=1
  720. for i=0,1,0.1 do
  721. wait(0)
  722. RW.C0=cf(1.5, 0.5, 0) * euler(1+3*i,0,0)
  723. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4+0.4*i,-0.2+0.2*i)
  724. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  725. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  726. end
  727. local LastPoint = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  728. con1=prt7.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  729. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  730. for i=0,1,0.2 do
  731. wait(0)
  732. RW.C0=cf(1.5, 0.5, 0) * euler(4-4.7*i,0,0)
  733. RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  734. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5*i,0,-0.2)
  735. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  736. local Point = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  737. effect("Royal purple",0.5,LastPoint,Point)
  738. LastPoint = Point
  739. end
  740. for i=0,1,0.2 do
  741. wait(0)
  742. RW.C0=cf(1.5, 0.5, 0) * euler(-0.7-0.2*i,0,0)
  743. RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  744. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5-0.1*i,0,-0.2)
  745. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  746. end
  747. con1:disconnect()
  748. attack=false
  749. end
  750. function twoslash()
  751. attack=true
  752. combo=2
  753. for i=0,1,0.1 do
  754. wait(0)
  755. RW.C0=cf(1.5, 0.5, 0) * euler(-0.9+2.47*i,0,0)
  756. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0)
  757. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6+0.6*i,0,-0.2-1.37*i)
  758. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  759. end
  760. bg.Parent=Torso
  761. CF = Torso.CFrame
  762. local LastPoint = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  763. con1=prt7.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  764. so("http://roblox.com/asset/?id=10209640",LeftArm,1,0.9)
  765. for i = 0 , 1 , 0.1 do
  766. wait(0)
  767. wld1.C0=euler(-1.57,-1.57*i,-1.57)*cf(0,1,0)
  768. RW.C0=cf(1.5, 0.5, 0) * euler(1.57,0,0)
  769. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57*i)
  770. bg.cframe=CF*euler(0,-6.283*i,0)
  771. local Point = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  772. effect("Royal purple",0.5,LastPoint,Point)
  773. LastPoint = Point
  774. end
  775. con1:disconnect()
  776. wait(0.1)
  777. bg.Parent=nil
  778. attack=false
  779. end
  780. function threeslash()
  781. attack=true
  782. combo=3
  783. for i = 0 , 1 , 0.1 do
  784. wait(0)
  785. wld1.C0=euler(-1.57,-1.57+1.57*i,-1.57-0.6*i)*cf(0,1,0)
  786. RW.C0=cf(1.5-0.7*i, 0.5+0.2*i, -0.5*i) * euler(1.57+0.43*i,0,0)
  787. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.57*i,-1.57+2.17*i)
  788. LW.C0=cf(-1.5+0.7*i, 0.5+0.2*i, -0.5*i) * euler(2*i,0,-1.57+1.57*i)
  789. LW.C1=cf(0, 0.5, 0) * euler(0,0,-0.6*i)
  790. end
  791. local LastPoint = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  792. con1=prt7.Touched:connect(function(hit) Damagefunc2(hit,15,10) end)
  793. so("http://roblox.com/asset/?id=10209640",LeftArm,1,0.7)
  794. for i=0,1,0.2 do
  795. wait()
  796. RW.C0=cf(1.5-0.7, 0.5+0.2-0.4*i, -0.5) * euler(2-1.8*i,0,0)
  797. RW.C1=cf(0, 0.5, 0) * euler(0,0,0.6)
  798. LW.C0=cf(-1.5+0.7, 0.5+0.2-0.4*i, -0.5) * euler(2-1.8*i,0,0)
  799. LW.C1=cf(0, 0.5, 0) * euler(0,0,-0.6)
  800. local Point = prt7.CFrame * CFrame.new(0,-prt7.Size.Y,0)
  801. effect("Royal purple",0.5,LastPoint,Point)
  802. LastPoint = Point
  803. end
  804. con1:disconnect()
  805. attack=false
  806. end
  807.  
  808. function ob1d(mouse)
  809. if attack == true then return end
  810. hold=true
  811. --attack=true
  812. if combo==0 then
  813. oneslash()
  814. elseif combo==1 then
  815. twoslash()
  816. elseif combo==2 then
  817. threeslash()
  818. end
  819. coroutine.resume(coroutine.create(function()
  820. wait(0.5)
  821. if attack==false then
  822. combo=0
  823. wld1.C0=euler(-1.57,0,-1.57)*cf(0,1,0)
  824. RW.C0=cf(1.5, 0.5, 0) * euler(1,0,0)
  825. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4,-0.2)
  826. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  827. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  828. end
  829. end))
  830. end
  831.  
  832. function ob1u(mouse)
  833. hold = false
  834. end
  835.  
  836. buttonhold = false
  837.  
  838. eul=0
  839. function key(key)
  840. if attack == true then return end
  841. if key=="x" then
  842. spintowin()
  843. end
  844. if key=="c" then
  845. CombatCharge()
  846. end
  847. if key=="v" and ssdebounce==false then
  848. ssdebounce=true
  849. coroutine.resume(coroutine.create(function()
  850. wait(30)
  851. ssdebounce=false
  852. prt10.Parent=modelzorz
  853. wld10.Parent=prt10
  854. end))
  855. Despair()
  856. end
  857. coroutine.resume(coroutine.create(function(v)
  858. wait()
  859. while attack==true do
  860. wait(0)
  861. bg.Parent = Torso
  862. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  863. bg.cframe = cf(Torso.Position,pos4) * euler(0,eul,0) * cf(0,0,0)
  864. end
  865. bg.Parent=nil
  866. end))
  867. if key=="z" then
  868. Charge()
  869. end
  870. combo=0
  871. end
  872.  
  873. function key2(key)
  874. end
  875.  
  876. function s(mouse)
  877. mouse.Button1Down:connect(function() ob1d(mouse) end)
  878. mouse.Button1Up:connect(function() ob1u(mouse) end)
  879. mouse.KeyDown:connect(key)
  880. mouse.KeyUp:connect(key2)
  881. unsheathed = true
  882. player = Player
  883. ch = Character
  884. MMouse = mouse
  885. RSH = ch.Torso["Right Shoulder"]
  886. LSH = ch.Torso["Left Shoulder"]
  887. --
  888. RSH.Parent = nil
  889. LSH.Parent = nil
  890. --
  891. RW.Part0 = ch.Torso
  892. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  893. RW.C1 = CFrame.new(0, 0.5, 0)
  894. RW.Part1 = ch["Right Arm"]
  895. RW.Parent = ch.Torso
  896. --_G.R = RW
  897. --
  898. LW.Part0 = ch.Torso
  899. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  900. LW.C1 = CFrame.new(0, 0.5, 0)
  901. LW.Part1 = ch["Left Arm"]
  902. LW.Parent = ch.Torso
  903. --_G.L = LW
  904. --
  905. equipanim()
  906. end
  907.  
  908. function ds(mouse)
  909. hideanim()
  910. wait(0)
  911. RW.Parent = nil
  912. LW.Parent = nil
  913. RSH.Parent = player.Character.Torso
  914. LSH.Parent = player.Character.Torso
  915. end
  916.  
  917. Bin.Selected:connect(s)
  918. Bin.Deselected:connect(ds)
  919. print("Basic sword loaded.")
  920. -- mediafire
  921. --[[
  922. Copyrighted (C) Fenrier 2013
  923. ]]
Add Comment
Please, Sign In to add comment