Kirito989

bryu

Apr 1st, 2017
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.01 KB | None | 0 0
  1. for i, v in pairs(game.Players.epicikr.Backpack:children()) do
  2. if v.className == "HopperBin" and v.Name == "Spirit Sword" then
  3. v:remove()
  4. end
  5. end
  6. bin = Instance.new("HopperBin")
  7. bin.Name = "Spirit Sword"
  8. bin.Parent = game.Players.LocalPlayer.Backpack
  9. local doublesword = true
  10. local doubleclicktime = 0.3
  11. local idledmg = 5
  12. local chargedmg = 8
  13. if doublesword == true then
  14. idledmg = idledmg/1.7
  15. chargedmg = chargedmg/1.7
  16. end
  17. local character = game.Players.LocalPlayer.Character
  18. local char = game.Players.LocalPlayer.Character
  19. local HUM = game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  20. local Torsoz = game.Players.LocalPlayer.Character:findFirstChild("Torso")
  21. local RA = game.Players.LocalPlayer.Character:findFirstChild("Right Arm")
  22. local LA = game.Players.LocalPlayer.Character:findFirstChild("Left Arm")
  23. local H = game.Players.LocalPlayer.Character:findFirstChild("Head")
  24. local RS = Torsoz:findFirstChild("Right Shoulder")
  25. local LS = Torsoz:findFirstChild("Left Shoulder")
  26. local RH = Torsoz:findFirstChild("Right Hip")
  27. local LH = Torsoz:findFirstChild("Left Hip")
  28. local N = Torsoz:findFirstChild("Neck")
  29. local Joint1
  30. local Joint2
  31. local Main
  32. local j
  33. local j2
  34. local Attacking = false
  35. local Charging = false
  36. local Casting = false
  37. local clickval = false
  38. local effectz = false
  39. local rnum = Instance.new("NumberValue")
  40. rnum.Value = math.random()
  41. local efftable = {}
  42. local raytable = {}
  43. chargepitch = 1.7
  44. chargevol = 0.2
  45. local ChargeSwing = Instance.new("Sound", H)
  46. ChargeSwing.SoundId = "http://www.roblox.com/asset/?id=31758934"
  47. ChargeSwing.Pitch = chargepitch
  48. ChargeSwing.Volume = chargevol
  49. summonpitch = 1
  50. summonvol = 1
  51. local Summon = Instance.new("Sound", H)
  52. Summon.SoundId = "http://www.roblox.com/asset/?id=12229501"
  53. Summon.Pitch = summonpitch
  54. Summon.Volume = summonvol
  55. Summon.Looped = false
  56. local HitSound = Instance.new("Sound", H)
  57. HitSound.SoundId = "http://www.roblox.com/asset/?id=16950449"
  58. HitSound.Pitch = 0.6
  59. HitSound.Volume = 0.7
  60. HitSound.Looped = false
  61. local P = Instance.new("Part")
  62. P.Anchored = false
  63. P.CanCollide = false
  64. P.Name = "Part"
  65. P.formFactor = "Custom"
  66. P.Size = Vector3.new(0.5,0.5,0.5)
  67. P.Locked = true
  68. P.TopSurface = 0
  69. P.BottomSurface = 0
  70. function Build()
  71. for i, v in pairs(char:children()) do
  72. if v.className == "Model" and v.Name == "SpiritSword" then
  73. v:remove()
  74. end
  75. end
  76. local mdl = Instance.new("Model", char)
  77. mdl.Name = "SpiritSword"
  78. local h = P:Clone()
  79. h.Name = "Sword"
  80. h.Parent = mdl
  81. h.Size = Vector3.new(1,1,4.2)
  82. local mesh = Instance.new("SpecialMesh", h)
  83. mesh.Name = "Mesh"
  84. mesh.MeshId = "http://www.roblox.com/asset/?id=76448940"
  85. mesh.TextureId = "http://www.roblox.com/asset/?id=76448989"
  86. mesh.Scale = Vector3.new(0.75,0.75,0.75)
  87. j = h:Clone()
  88. j.Parent = h
  89. j.Size = Vector3.new(0.5,0.5,0.5)
  90. j.Name = "SwordEffect"
  91. j.Transparency = 0.2
  92. local w = Instance.new("Motor", j)
  93. w.Part0 = h
  94. w.Part1 = j
  95. local w = Instance.new("Motor", h)
  96. w.Part0 = Torsoz
  97. w.Part1 = h
  98. w.C0 = CFrame.new(0,0,0.55) * CFrame.Angles(math.pi/2,0,math.pi)
  99. w.C0 = w.C0 * CFrame.Angles(0,math.pi/4,0)
  100. Main = w
  101. if doublesword == true then
  102. local h2 = P:Clone()
  103. h2.Name = "Sword2"
  104. h2.Parent = h
  105. h2.Size = Vector3.new(1,1,4.2)
  106. local mesh = Instance.new("SpecialMesh", h2)
  107. mesh.MeshId = "http://www.roblox.com/asset/?id=76448940"
  108. mesh.TextureId = "http://www.roblox.com/asset/?id=76448989"
  109. mesh.Scale = Vector3.new(0.75,0.75,0.75)
  110. j2 = h2:Clone()
  111. j2.Parent = h2
  112. j2.Size = Vector3.new(0.5,0.5,0.5)
  113. j2.Name = "SwordEffect2"
  114. j2.Transparency = 0.2
  115. local w = Instance.new("Motor", j2)
  116. w.Part0 = h2
  117. w.Part1 = j2
  118. local w = Instance.new("Motor", h2)
  119. w.Part0 = h
  120. w.Part1 = h2
  121. w.C0 = CFrame.new(0,0,-3.25) * CFrame.Angles(0,-math.pi,0)
  122. end
  123. end
  124. Build()
  125. function Click(num)
  126. if clickval == true then
  127. wait()
  128. clickval = false
  129. else
  130. clickval = true
  131. wait(doubleclicktime)
  132. clickval = false
  133. end
  134. end
  135. function ChargeAttack(mouse, speed)
  136. Charging = true
  137. local p = Joint1.Parent
  138. Joint1:remove()
  139. Joint1 = Instance.new("Motor", p)
  140. Joint1.Part0 = Torsoz
  141. Joint1.Part1 = p
  142. Joint1.C0 = CFrame.new(1.5,0.5,0)
  143. local rnumz = rnum.Value
  144. local jointz = Joint1
  145. local con = Main.Parent.Touched:connect(function(hit)
  146. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent.Name ~= char.Name then
  147. HitSound:Stop()
  148. hit.Parent.Humanoid:TakeDamage(chargedmg)
  149. HitSound:Play()
  150. end
  151. end)
  152. local con2 = nil
  153. if doublesword == true then
  154. con2 = Main.Parent.Sword2.Touched:connect(function(hit)
  155. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent.Name ~= char.Name then
  156. hit.Parent.Humanoid:TakeDamage(chargedmg)
  157. end
  158. end)
  159. end
  160. wait()
  161. Attacking = true
  162. --print("Charge Activated")
  163. Torsoz.CFrame = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z))
  164. local bv = Instance.new("BodyVelocity", Torsoz)
  165. bv.maxForce = Vector3.new(math.huge,0,math.huge)
  166. bv.velocity = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z)).lookVector * speed
  167. local bg = Instance.new("BodyGyro", Torsoz)
  168. bg.maxTorque = Vector3.new(math.huge,0,math.huge)
  169. bg.cframe = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z))
  170. bg.D = 100
  171. effectz = true
  172. for _ = 1, 1 do
  173. jointz.C0 = CFrame.new(1.35,0.5,0) * CFrame.Angles(0,0,-math.pi/3)
  174. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi/1.1,0,0)
  175. ChargeSwing.Pitch = chargepitch
  176. ChargeSwing.Volume = chargevol
  177. ChargeSwing:Play()
  178. for i = 1, 13 do
  179. ChargeSwing.Pitch = ChargeSwing.Pitch - 0.045
  180. ChargeSwing.Volume = ChargeSwing.Volume + 0.1
  181. jointz.C0 = jointz.C0 * CFrame.Angles(-(math.pi/1.1)/13,0,0)
  182. wait()
  183. end
  184. jointz.C0 = CFrame.new(1.25,0.5,0) * CFrame.Angles(0,0,math.pi/3)
  185. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi/1.3,0,0)
  186. ChargeSwing.Pitch = chargepitch
  187. ChargeSwing.Volume = chargevol
  188. ChargeSwing:Play()
  189. for i = 1, 13 do
  190. ChargeSwing.Pitch = ChargeSwing.Pitch - 0.045
  191. ChargeSwing.Volume = ChargeSwing.Volume + 0.1
  192. jointz.C0 = jointz.C0 * CFrame.Angles(-(math.pi*1.15)/13,0,0)
  193. wait()
  194. end
  195. end
  196. HUM.PlatformStand = false
  197. con:disconnect()
  198. if con2 ~= nil then
  199. con2:disconnect()
  200. end
  201. bv:Destroy()
  202. bg:Destroy()
  203. jointz.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi/2.4,0,0)
  204. wait()
  205. ChargeSwing.Pitch = chargepitch
  206. ChargeSwing.Volume = chargevol
  207. Attacking = false
  208. Charging = false
  209. effectz = false
  210. end
  211. function IdleAttack()
  212. effectz = true
  213. local numz = rnum.Value
  214. local jointz = Joint1
  215. local con = Main.Parent.Touched:connect(function(hit)
  216. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent.Name ~= char.Name then
  217. HitSound:Stop()
  218. hit.Parent.Humanoid:TakeDamage(idledmg)
  219. HitSound:Play()
  220. end
  221. end)
  222. local con2 = nil
  223. if doublesword == true then
  224. con2 = Main.Parent.Sword2.Touched:connect(function(hit)
  225. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent.Name ~= char.Name then
  226. hit.Parent.Humanoid:TakeDamage(idledmg)
  227. end
  228. end)
  229. end
  230. Attacking = true
  231. --print("Attack Activated")
  232. jointz.C0 = CFrame.new(1.25,0.5,0) * CFrame.Angles(0,0,math.pi/3)
  233. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi/1.3,0,0)
  234. ChargeSwing.Pitch = chargepitch
  235. ChargeSwing.Volume = chargevol
  236. ChargeSwing:Play()
  237. for i = 1, 16 do
  238. if rnum.Value ~= numz then
  239. ChargeSwing:Stop()
  240. --print("Attack Deactivated")
  241. break
  242. end
  243. ChargeSwing.Pitch = ChargeSwing.Pitch - 0.045
  244. ChargeSwing.Volume = ChargeSwing.Volume + 0.1
  245. jointz.C0 = jointz.C0 * CFrame.Angles(-(math.pi*1.15)/16,0,0)
  246. wait()
  247. end
  248. HUM.PlatformStand = false
  249. con:disconnect()
  250. if con2 ~= nil then
  251. con2:disconnect()
  252. end
  253. jointz.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi/2.4,0,0)
  254. ChargeSwing.Pitch = chargepitch
  255. ChargeSwing.Volume = chargevol
  256. Attacking = false
  257. effectz = false
  258. end
  259. function onButton1Down(mouse)
  260. if Charging == false and Casting == false then
  261. if clickval == true then
  262. rnum.Value = math.random()
  263. coroutine.resume(coroutine.create(ChargeAttack), mouse, 40)
  264. else
  265. if Attacking == false then
  266. coroutine.resume(coroutine.create(IdleAttack))
  267. end
  268. end
  269. end
  270. coroutine.resume(coroutine.create(Click), rnum.Value)
  271. end
  272. function SwordThrow(mouse)
  273. local bp = Instance.new("BodyPosition", Torsoz)
  274. bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  275. bp.position = Torsoz.Position
  276. local bg = Instance.new("BodyGyro", Torsoz)
  277. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  278. bg.cframe = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z))
  279. HUM.WalkSpeed = 0
  280. local jointz = Joint1
  281. Casting = true
  282. Torsoz.CFrame = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z))
  283. local tab = {}
  284. for i = 1, 3 do
  285. local s = P:Clone()
  286. s.Name = "SwordSpell"
  287. s.Parent = char
  288. s.Anchored = true
  289. s.Size = Vector3.new(0.5,0.5,0.5)
  290. s.Transparency = 1
  291. if i == 1 then
  292. s.CFrame = Torsoz.CFrame * CFrame.new(-4,-4.5,0) * CFrame.Angles(-math.pi/2,0,0)
  293. elseif i == 2 then
  294. s.CFrame = Torsoz.CFrame * CFrame.new(0,-4.5,-4) * CFrame.Angles(-math.pi/2,0,-math.pi/2)
  295. elseif i == 3 then
  296. s.CFrame = Torsoz.CFrame * CFrame.new(4,-4.5,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  297. end
  298. local mesh = Instance.new("SpecialMesh", s)
  299. mesh.MeshId = "http://www.roblox.com/asset/?id=76448940"
  300. mesh.TextureId = "http://www.roblox.com/asset/?id=76448989"
  301. mesh.Scale = Vector3.new(0.55,0.55,0.75)
  302. mesh.VertexColor = Vector3.new(0.2,0.45,1)
  303. tab[i] = s
  304. end
  305. jointz.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(0,0,0)
  306. Summon.Pitch = summonpitch
  307. Summon.Volume = summonvol
  308. effectz = true
  309. Summon:Play()
  310. for i = 1, 22 do
  311. Summon.Pitch = Summon.Pitch - (1/22)
  312. for i, v in pairs(tab) do
  313. v.CFrame = v.CFrame * CFrame.new(0,0,9/22) * CFrame.Angles(0,0,math.pi*6/22)
  314. v.Transparency = v.Transparency - 0.65/22
  315. end
  316. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi/1.6/22,0,0) * CFrame.Angles(0,0,0.08)
  317. wait(0.012)
  318. end
  319. wait(0.12)
  320. Summon:Stop()
  321. Summon.Pitch = summonpitch
  322. Summon.Volume = summonvol
  323. for i = 1, 3 do
  324. jointz.C0 = jointz.C0 * CFrame.Angles(0,-math.pi/2/3,0)
  325. wait()
  326. end
  327. for i, v in pairs(tab) do
  328. v.CFrame = CFrame.new(v.Position, mouse.Hit.p) * CFrame.Angles(0,math.pi,0)
  329. end
  330. for i = 1, 5 do
  331. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.4/5,0.06,0)
  332. if i == 3 then
  333. for ii = 1, 3 do
  334. table.insert(raytable, tab[ii])
  335. game:service("Debris"):AddItem(tab[ii], 8.5)
  336. tab[ii] = nil
  337. end
  338. end
  339. wait()
  340. end
  341. effectz = false
  342. HUM.WalkSpeed = 16
  343. bp:Destroy()
  344. bg:Destroy()
  345. wait(0.45)
  346. Casting = false
  347. jointz.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi/2.4,0,0)
  348. end
  349. function Teleport(mouse)
  350. local posz = mouse.Hit.p
  351. local bp = Instance.new("BodyPosition", Torsoz)
  352. bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  353. bp.position = Torsoz.Position
  354. local bg = Instance.new("BodyGyro", Torsoz)
  355. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  356. bg.cframe = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z))
  357. HUM.WalkSpeed = 0
  358. local jointz = Joint1
  359. jointz.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(0,0,0)
  360. Casting = true
  361. effectz = true
  362. Torsoz.CFrame = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z))
  363. local por = P:Clone()
  364. por.Parent = Torsoz
  365. por.Anchored = true
  366. por.CFrame = Torsoz.CFrame + Torsoz.CFrame.lookVector*3.5
  367. por.BrickColor = BrickColor.new("Navy blue")
  368. por.Transparency = 1
  369. por.Reflectance = 1
  370. local mesh = Instance.new("SpecialMesh", por)
  371. mesh.MeshType = "Sphere"
  372. mesh.Scale = Vector3.new(0,0,0)
  373. local mar = P:Clone()
  374. mar.Parent = Torsoz
  375. mar.Anchored = true
  376. mar.CFrame = CFrame.new(posz)
  377. mar.BrickColor = BrickColor.new("Navy blue")
  378. mar.Transparency = 1
  379. mar.Reflectance = 1
  380. local mesh = Instance.new("SpecialMesh", mar)
  381. mesh.Scale = Vector3.new(0,3,0)
  382. mesh.MeshType = "Brick"
  383. --mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  384. for i = 1, 22 do
  385. por.Transparency = por.Transparency - (0.7/22)
  386. por.Reflectance = por.Reflectance - (0.9/22)
  387. por.Mesh.Scale = por.Mesh.Scale + Vector3.new(16/22,19/22,0.6/22)
  388. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi/1.6/22,0,0) * CFrame.Angles(0,0,0.08)
  389. wait(0.012)
  390. end
  391. for i = 1, 10 do
  392. mar.Transparency = mar.Transparency - (0.7/10)
  393. mar.Reflectance = mar.Reflectance - (0.9/10)
  394. mar.Mesh.Scale = mar.Mesh.Scale + Vector3.new(3/10,0,3/10)
  395. jointz.C0 = jointz.C0 * CFrame.Angles(0,-math.pi*2/10,0)
  396. wait()
  397. end
  398. HUM.WalkSpeed = 16
  399. bp:Destroy()
  400. bg:Destroy()
  401. Torsoz.CFrame = CFrame.new(posz, Torsoz.CFrame.p) * CFrame.Angles(0,math.pi,0) + Vector3.new(0,3.5,0)
  402. for i = 1, 11 do
  403. por.Transparency = por.Transparency + (0.7/11)
  404. por.Reflectance = por.Reflectance + (0.9/11)
  405. por.Mesh.Scale = por.Mesh.Scale - Vector3.new(16/11,19/11,0.6/11)
  406. mar.Transparency = mar.Transparency + (0.7/11)
  407. mar.Reflectance = mar.Reflectance + (0.9/11)
  408. mar.Mesh.Scale = mar.Mesh.Scale - Vector3.new(3/11,2/11,3/11)
  409. jointz.C0 = jointz.C0 * CFrame.Angles(-(math.pi/1.6)/11,0,0) * CFrame.Angles(0,0,-0.16)
  410. wait()
  411. end
  412. por:Destroy()
  413. mar:Destroy()
  414. effectz = false
  415. wait(0.15)
  416. Casting = false
  417. jointz.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi/2.4,0,0)
  418. end
  419. function onKeyDown(key, mouse)
  420. if Charging == false and Attacking == false and Casting == false then
  421. if key == "e" then
  422. SwordThrow(mouse)
  423. elseif key == "g" then
  424. Teleport(mouse)
  425. end
  426. end
  427. end
  428. function Equip()
  429. effectz = true
  430. Attacking = true
  431. Charging = true
  432. local p = P:Clone()
  433. p.Parent = Torsoz
  434. p.Transparency = 1
  435. local w = Instance.new("Motor", p)
  436. w.Part0 = p
  437. w.Part1 = RA
  438. w.C0 = CFrame.new(0,-0.5,0)
  439. RS.Part0 = nil
  440. Joint1 = Instance.new("Motor", p)
  441. Joint1.Part0 = Torsoz
  442. Joint1.Part1 = p
  443. Joint1.C0 = CFrame.new(1.5,0.5,0)
  444. for i = 1, 8 do
  445. Joint1.C0 = Joint1.C0 * CFrame.Angles(math.pi*1.2/8,-0.4/8,0)
  446. wait()
  447. end
  448. Main.Part0 = RA
  449. Main.C0 = CFrame.new(0,-1,-1.5) * CFrame.Angles(0,math.pi,math.pi/2)
  450. for i = 1, 9 do
  451. Joint1.C0 = Joint1.C0 * CFrame.Angles(-math.pi*1.2/14,0,0)
  452. wait()
  453. end
  454. Main.Part0 = RA
  455. Main.C0 = CFrame.new(0,-1,-1.5) * CFrame.Angles(0,math.pi,math.pi/2)
  456. Joint1.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi/2.4,0,0)
  457. Attacking = false
  458. Charging = false
  459. effectz = false
  460. end
  461. function UnEquip()
  462. effectz = true
  463. local joint = Joint1
  464. Joint1.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(math.pi/2.4,0,0)
  465. for i = 1, 9 do
  466. Joint1.C0 = Joint1.C0 * CFrame.Angles(math.pi*1.2/14,0,0)
  467. wait()
  468. end
  469. Main.Part0 = Torsoz
  470. Main.C0 = CFrame.new(0,0,0.55) * CFrame.Angles(math.pi/2,0,math.pi)
  471. Main.C0 = Main.C0 * CFrame.Angles(0,math.pi/4,0)
  472. for i = 1, 8 do
  473. Joint1.C0 = Joint1.C0 * CFrame.Angles(-math.pi*1.2/8,0,0)
  474. wait()
  475. end
  476. joint.Parent:remove()
  477. RS.Part0 = Torsoz
  478. RS.Part1 = RA
  479. effectz = false
  480. end
  481. bin.Selected:connect(function(mouse)
  482. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  483. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  484. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  485. Equip()
  486. end)
  487. bin.Deselected:connect(function()
  488. UnEquip()
  489. Build()
  490. end)
  491. wait(1)
  492. local plus = true
  493. local DDD = 1
  494. coroutine.resume(coroutine.create(function()
  495. while true do
  496. DDD = DDD + 1
  497. if DDD%1 == 0 then
  498. if effectz == true then
  499. if Main.Parent ~= nil then
  500. local gg = P:Clone()
  501. gg.Name = "SwordEffect"
  502. gg.Parent = Torsoz
  503. gg.Anchored = true
  504. gg.Size = Vector3.new(0.5,0.5,0.5)
  505. gg.CFrame = Main.Parent.CFrame
  506. local mesh = Instance.new("SpecialMesh", gg)
  507. mesh.MeshId = "http://www.roblox.com/asset/?id=76448940"
  508. mesh.TextureId = "http://www.roblox.com/asset/?id=76448989"
  509. mesh.Scale = Vector3.new(0.75,0.75,0.75)
  510. table.insert(efftable, gg)
  511. if doublesword == true then
  512. local gg2 = P:Clone()
  513. gg2.Name = "SwordEffect2"
  514. gg2.Parent = Torsoz
  515. gg2.Anchored = true
  516. gg2.Size = Vector3.new(0.5,0.5,0.5)
  517. gg2.CFrame = gg.CFrame * CFrame.new(0,0,-3.25) * CFrame.Angles(0,math.pi,0)
  518. local mesh = Instance.new("SpecialMesh", gg2)
  519. mesh.MeshId = "http://www.roblox.com/asset/?id=76448940"
  520. mesh.TextureId = "http://www.roblox.com/asset/?id=76448989"
  521. mesh.Scale = Vector3.new(0.75,0.75,0.75)
  522. table.insert(efftable, gg2)
  523. end
  524. end
  525. end
  526. end
  527. for i, v in pairs(efftable) do
  528. if v.Transparency > 0.9 then
  529. efftable[i]:remove()
  530. efftable[i] = nil
  531. end
  532. v.Transparency = v.Transparency + 0.055
  533. end
  534. if j ~= nil then
  535. if j.Transparency > 0.96 then
  536. plus = false
  537. j.Transparency = 0.25
  538. j.Mesh.Scale = Vector3.new(0.75,0.75,0.75)
  539. j.Mesh.VertexColor = Vector3.new(1,1,1)
  540. if j2 ~= nil then
  541. j2.Transparency = 0.25
  542. j2.Mesh.Scale = Vector3.new(0.75,0.75,0.75)
  543. j2.Mesh.VertexColor = Vector3.new(1,1,1)
  544. end
  545. Spawn(function() wait(0.5) plus = true end)
  546. end
  547. if plus == true then
  548. j.Transparency = j.Transparency + 0.045
  549. j.Mesh.Scale = j.Mesh.Scale + Vector3.new(0.022*2,0.028*2,0.004*2)
  550. j.Mesh.VertexColor = j.Mesh.VertexColor - Vector3.new(0.1,0.04,0)
  551. if j2 ~= nil then
  552. j2.Transparency = j2.Transparency + 0.045
  553. j2.Mesh.Scale = j2.Mesh.Scale + Vector3.new(0.022*2,0.028*2,0.004*2)
  554. j2.Mesh.VertexColor = j2.Mesh.VertexColor - Vector3.new(0.1,0.04,0)
  555. end
  556. end
  557. end
  558. ------------------------- Projectiles ------------------------
  559. for i, v in pairs(raytable) do
  560. if v ~= nil and v.className == "Part" then
  561. local posz1 = v.CFrame * CFrame.new(0,0,-2.25)
  562. local ray = Ray.new(posz1.p, posz1.lookVector*-4.5)
  563. local hitz, enz = workspace:FindPartOnRay(ray, char)
  564. if hitz ~= nil then
  565. x = Instance.new("Explosion", workspace)
  566. x.Position = enz
  567. raytable[i]:remove()
  568. raytable[i] = nil
  569. end
  570. v.CFrame = v.CFrame - v.CFrame.lookVector*4.5
  571. end
  572. end
  573. wait()
  574. end
  575. end))
  576. --Mediafire
Add Comment
Please, Sign In to add comment