Advertisement
Guest User

gggg

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