Advertisement
BabyGoatz

Untitled

Oct 1st, 2015
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.18 KB | None | 0 0
  1. me = game.Players.BabyGoatz
  2. char = me.Character
  3. selected = false
  4. selanim = false
  5. attacking = false
  6. hurt = false
  7. normaldmg = 25
  8. jumpdmg = 30
  9. jumpdist = 7
  10. flipdist = 7
  11. linedist = 30
  12. splashdmg = 15
  13. linecolors = {"Bright blue", "Light blue", "Medium blue", "Tr. Blue"}
  14. dmg = normaldmg
  15.  
  16. function getnoobs(pos,dist)
  17. local stoof = {}
  18. for _,v in pairs(workspace:children()) do
  19. local h,t = v:findFirstChild("Humanoid"), v:findFirstChild("Torso")
  20. if h ~= nil and t ~= nil and v:IsA("Model") and v ~= char then
  21. if (t.Position - pos).magnitude < dist then
  22. table.insert(stoof,v)
  23. end
  24. end
  25. end
  26. return stoof
  27. end
  28.  
  29. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  30. part.Parent = parent
  31. part.formFactor = form
  32. part.CanCollide = collide
  33. part.Transparency = tran
  34. part.Reflectance = ref
  35. part.Size = Vector3.new(x,y,z)
  36. part.BrickColor = BrickColor.new(color)
  37. part.TopSurface = 0
  38. part.BottomSurface = 0
  39. part.Anchored = anchor
  40. part.Locked = true
  41. part:BreakJoints()
  42. end
  43.  
  44. function weld(w, p, p1, a, b, c, x, y, z)
  45. w.Parent = p
  46. w.Part0 = p
  47. w.Part1 = p1
  48. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  49. end
  50.  
  51. rarm = char:findFirstChild("Right Arm")
  52. larm = char:findFirstChild("Left Arm")
  53. torso = char:findFirstChild("Torso")
  54. hum = char:findFirstChild("Humanoid")
  55.  
  56. slash = Instance.new("Sound",torso)
  57. slash.Volume = 1
  58. slash.Pitch = 1
  59. slash.SoundId = "rbxasset://sounds\\swordslash.wav"
  60.  
  61. charge = Instance.new("Sound",torso)
  62. charge.Volume = 1
  63. charge.Pitch = 0.5
  64. charge.SoundId = "http://www.roblox.com/asset/?id=146617998"
  65.  
  66. brek = Instance.new("Sound",torso)
  67. brek.Volume = 1
  68. brek.Pitch = 0.5
  69. brek.SoundId = "http://www.roblox.com/asset/?id=2974249"
  70.  
  71. uns = Instance.new("Sound",torso)
  72. uns.Volume = 1
  73. uns.Pitch = 1
  74. uns.SoundId = "rbxasset://sounds\\unsheath.wav"
  75.  
  76. absc = Instance.new("Sound",torso)
  77. absc.Volume = 1
  78. absc.Pitch = 0.34
  79. absc.SoundId = "http://www.roblox.com/asset/?id=13775494"
  80.  
  81. jump = Instance.new("Sound",torso)
  82. jump.Volume = 1
  83. jump.Pitch = 2.4
  84. jump.SoundId = "http://www.roblox.com/asset/?id=12222124"
  85.  
  86. pwns = Instance.new("Sound",torso)
  87. pwns.Volume = 1
  88. pwns.Pitch = 1.6
  89. pwns.SoundId = "http://www.roblox.com/asset/?id=2974000"
  90.  
  91. bg = Instance.new("BodyGyro",nil)
  92. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  93. bg.P = 15000
  94. bp = Instance.new("BodyPosition",nil)
  95. bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  96. bp.P = 15000
  97.  
  98. pcall(function() char.Sword:remove() end)
  99.  
  100. mod = Instance.new("Model",char)
  101. mod.Name = "Sword"
  102.  
  103. hold = Instance.new("Part")
  104. prop(hold,mod,false,1,0,0.5,0.5,0.5,1,false,"Custom")
  105. hw = Instance.new("Weld")
  106. weld(hw,rarm,hold,0,0,0,0,1,0)
  107.  
  108. main = Instance.new("Part")
  109. prop(main,mod,false,0,0.04,0.44,1.7,0.44,"Dark grey",false,"Custom")
  110. Instance.new("CylinderMesh",main)
  111. wewe = Instance.new("Weld")
  112. weld(wewe,hold,nil,math.pi/2,0,math.pi/2,0,0,0)
  113.  
  114. torsohold = Instance.new("Weld")
  115. weld(torsohold,torso,main,0,0,math.rad(36)+math.pi,-1.1,-1.65,-0.8)
  116.  
  117. sp = Instance.new("Part")
  118. prop(sp,mod,false,0,0,0.6,0.4,0.6,"Navy blue",false,"Custom")
  119. Instance.new("SpecialMesh",sp).MeshType = "Sphere"
  120. w1 = Instance.new("Weld")
  121. weld(w1,main,sp,0,0,0,0,0.8,0)
  122.  
  123. heh = Instance.new("Part")
  124. prop(heh,mod,false,0,0.12,0.9,0.3,0.5,"Navy blue",false,"Custom")
  125. w2 = Instance.new("Weld")
  126. weld(w2,main,heh,0,0,0,0,-0.9,0)
  127. Instance.new("BlockMesh",heh)
  128.  
  129. blade = Instance.new("Part")
  130. prop(blade,mod,false,0,0.1,0.65,4,0.15,"Medium grey",false,"Custom")
  131. w3 = Instance.new("Weld")
  132. weld(w3,heh,blade,0,0,0,0,-blade.Size.Y/2,0)
  133. Instance.new("BlockMesh",blade)
  134.  
  135. tip = Instance.new("Part")
  136. prop(tip,mod,false,0,0.1,0.46,0.46,0.12,"Medium grey",false,"Custom")
  137. w4 = Instance.new("Weld")
  138. weld(w4,blade,tip,0,0,math.pi/4,0,-blade.Size.Y/2,0)
  139. Instance.new("BlockMesh",tip)
  140.  
  141. lols = {}
  142. touchs = {}
  143. table.insert(lols,blade)
  144. table.insert(lols,tip)
  145. table.insert(touchs,blade)
  146. table.insert(touchs,tip)
  147.  
  148. for i=blade.Size.Y/2,-blade.Size.Y/2,-0.2 do
  149. local pf = Instance.new("Part")
  150. prop(pf,mod,false,1,0,0.65,0.1,0.15,1,false,"Custom")
  151. local wa = Instance.new("Weld")
  152. weld(wa,blade,pf,0,0,0,0,i,0)
  153. table.insert(touchs,pf)
  154. end
  155.  
  156. rb = Instance.new("Part")
  157. prop(rb,mod,false,1,0,0.5,0.5,0.5,1,false,"Custom")
  158. rbw = Instance.new("Weld")
  159. weld(rbw,torso,rb,0,0,0,-1.5,-0.5,0)
  160.  
  161. lb = Instance.new("Part")
  162. prop(lb,mod,false,1,0,0.5,0.5,0.5,1,false,"Custom")
  163. lbw = Instance.new("Weld")
  164. weld(lbw,torso,lb,0,0,0,1.5,-0.5,0)
  165.  
  166. rw = Instance.new("Weld")
  167. weld(rw,rb,nil,0,0,0,0,0.5,0)
  168.  
  169. lw = Instance.new("Weld")
  170. weld(lw,lb,nil,0,0,0,0,0.5,0)
  171.  
  172. function showdmg(d)
  173. local pa = Instance.new("Part")
  174. prop(pa,mod,false,1,0,1,1,1,1,true,"Symmetric")
  175. pa.CFrame = CFrame.new(blade.Position)
  176. local bill = Instance.new("BillboardGui",pa)
  177. bill.Size = UDim2.new(0,50,0,35)
  178. bill.Adornee = pa
  179. local tx = Instance.new("TextLabel",bill)
  180. tx.Size = bill.Size
  181. tx.Position = UDim2.new(0,0,0,-30)
  182. tx.BackgroundTransparency = 1
  183. tx.Text = d
  184. tx.FontSize = "Size24"
  185. tx.TextColor3 = Color3.new(0,0,0)
  186. local poz = pa.Position
  187. for i=0,7,0.4 do
  188. wait()
  189. pa.CFrame = CFrame.new(poz.X, poz.Y+i, poz.Z)
  190. end
  191. pa:remove()
  192. end
  193.  
  194. deb = true
  195.  
  196. function kill(h)
  197. if hurt and deb then
  198. local hu, to = h.Parent:findFirstChild("Humanoid"), h.Parent:findFirstChild("Torso")
  199. if hu ~= nil and to ~= nil and h.Parent ~= char then
  200. if hu.Health > 0 then
  201. deb = false
  202. local damg = math.random(dmg/4,dmg)
  203. local chance = math.random(1,5)
  204. if chance > 2 then
  205. hu.PlatformStand = true
  206. coroutine.resume(coroutine.create(function()
  207. wait()
  208. to.Velocity = CFrame.new(torso.Position, to.Position).lookVector * damg*2
  209. wait(0.1)
  210. hu.PlatformStand = false
  211. end))
  212. else
  213. damg = 0
  214. end
  215. hu.Health = hu.Health - damg
  216. coroutine.resume(coroutine.create(function()
  217. showdmg(damg)
  218. end))
  219. wait(0.25)
  220. deb = true
  221. end
  222. end
  223. end
  224. end
  225.  
  226. for _,v in pairs(touchs) do
  227. v.Touched:connect(kill)
  228. end
  229.  
  230. if script.Parent.className ~= "HopperBin" then
  231. h = Instance.new("HopperBin",me.Backpack)
  232. h.Name = "Sword"
  233. script.Parent = h
  234. end
  235.  
  236. bin = script.Parent
  237.  
  238. local mw = nil
  239. local meow = nil
  240. local tsah = nil
  241. battleright = nil
  242. battleleft = nil
  243. battlewep = nil
  244.  
  245. function eff()
  246. for _,v in pairs(lols) do
  247. local ah = v:clone()
  248. ah.Parent = mod
  249. ah.Anchored = true
  250. ah.CFrame = v.CFrame
  251. ah.Transparency = 0.3
  252. ah.Reflectance = 0.3
  253. coroutine.resume(coroutine.create(function()
  254. wait(0.15)
  255. for i=0.3,1,0.12 do
  256. ah.Transparency = i
  257. wait()
  258. end
  259. ah:remove()
  260. end))
  261. end
  262. end
  263.  
  264. function eff2()
  265. local pa = Instance.new("Part")
  266. prop(pa,mod,false,0.1,0,1,1,1,"Institutional white",true,"Custom")
  267. pa.CFrame = CFrame.new(torso.Position) * CFrame.new(0,-2.9,0) * CFrame.Angles(0,math.random(-320,320)/100,0)
  268. local md = Instance.new("SpecialMesh",pa)
  269. md.Scale = Vector3.new(5.5,4,5.5)
  270. md.MeshId = "http://www.roblox.com/asset/?id=20329976"
  271. coroutine.resume(coroutine.create(function()
  272. for i=5.5,0,-0.6 do
  273. md.Scale = Vector3.new(i,i/1.4,i)
  274. pa.Transparency = pa.Transparency + 0.1
  275. wait()
  276. end
  277. pa:remove()
  278. end))
  279. end
  280.  
  281. function selmot()
  282. rw.Part1 = rarm
  283. for i=0,140,14 do
  284. rw.C0 = CFrame.Angles(-math.rad(i/1.1),math.rad(i/2.5),math.rad(-i/6))
  285. wait()
  286. end
  287. lo = rw.C0
  288. meow = lo
  289. torsohold.Part1 = nil
  290. wewe.Part1 = main
  291. uns:play()
  292. for i=0,140,17 do
  293. rw.C0 = lo * CFrame.Angles(math.rad(-i),0,0)
  294. wewe.C0 = CFrame.Angles(math.rad(-i/2),0,0)
  295. wait()
  296. end
  297. lo = rw.C0
  298. mw = lo
  299. local hih = wewe.C0
  300. tsah = hih
  301. lw.Part1 = larm
  302. wait()
  303. for i=0,130,17 do
  304. rw.C0 = lo * CFrame.Angles(math.rad(i/4),math.rad(i/4),math.rad(-i/1.8)) * CFrame.new(-i/220,-i/500,0)
  305. lw.C0 = CFrame.new(i/130,-i/600,-i/160) * CFrame.Angles(math.rad(i/1.4),0,math.rad(i/2.6))
  306. wewe.C0 = hih * CFrame.Angles(math.rad(i/1.8),0,0)
  307. wait()
  308. end
  309. if battleright == nil then
  310. battleright = rw.C0
  311. battleleft = lw.C0
  312. battlewep = wewe.C0
  313. end
  314. selected = true
  315. end
  316.  
  317. function deselmot()
  318. for i=130,0,-17 do
  319. rw.C0 = mw * CFrame.Angles(math.rad(i/4),math.rad(i/4),math.rad(-i/1.8)) * CFrame.new(-i/220,-i/500,0)
  320. lw.C0 = CFrame.new(i/130,-i/600,-i/160) * CFrame.Angles(math.rad(i/1.4),0,math.rad(i/2.6))
  321. wewe.C0 = tsah * CFrame.Angles(math.rad(i/1.8),0,0)
  322. wait()
  323. end
  324. lw.Part1 = nil
  325. for i=140,0,-17 do
  326. rw.C0 = meow * CFrame.Angles(math.rad(-i),0,0)
  327. wewe.C0 = CFrame.Angles(math.rad(-i/2),0,0)
  328. wait()
  329. end
  330. wewe.Part1 = nil
  331. torsohold.Part1 = main
  332. for i=140,0,-14 do
  333. rw.C0 = CFrame.Angles(-math.rad(i/1.1),math.rad(i/2.5),math.rad(-i/6))
  334. wait()
  335. end
  336. rw.Part1 = nil
  337. rw.C0 = CFrame.new(0,0,0)
  338. lw.C0 = CFrame.new(0,0,0)
  339. selected = false
  340. end
  341.  
  342. function attack()
  343. if attacking == false then
  344. attacking = true
  345. slash.Pitch = 1
  346. slash:play()
  347. for i=0,100,18 do
  348. rw.C0 = battleright * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/1.5),0,0)
  349. lw.C0 = battleleft * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/1.5),0,0)
  350. wait()
  351. end
  352. local lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  353. hurt = true
  354. for i=0,120,20 do
  355. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i),0,0)
  356. lw.C0 = lo2 * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i/1.4),0,0)
  357. wewe.C0 = lo3 * CFrame.Angles(math.rad(-i/2.8),0,0)
  358. eff()
  359. wait()
  360. end
  361. hurt = false
  362. lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  363. for i=0,70,15 do
  364. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/1.2),0,0)
  365. lw.C0 = lo2 * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/1.9),0,0)
  366. wewe.C0 = lo3 * CFrame.Angles(math.rad(i/2),0,0)
  367. wait()
  368. end
  369. rw.C0 = battleright
  370. lw.C0 = battleleft
  371. wewe.C0 = battlewep
  372. attacking = false
  373. end
  374. end
  375.  
  376. function stab()
  377. if attacking == false then
  378. attacking = true
  379. for i=0,100,15 do
  380. rw.C0 = battleright * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i/1.1),math.rad(-i/7),math.rad(-i/2.6))
  381. lw.C0 = battleleft * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i/1.1),0,0)
  382. wewe.C0 = battlewep * CFrame.Angles(math.rad(i/2.2),0,0)
  383. wait()
  384. end
  385. local lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  386. hurt = true
  387. slash.Pitch = 1.1
  388. slash:play()
  389. for i=0,100,18 do
  390. rw.C0 = lo * CFrame.new(-i/150,0,-i/150) * CFrame.Angles(math.rad(i/1.4),0,0)
  391. lw.C0 = lo2 * CFrame.new(-i/240,0,i/400) * CFrame.Angles(math.rad(i/1.4),0,0)
  392. wewe.C0 = lo3 * CFrame.Angles(math.rad(-i*1.3),0,0)
  393. eff()
  394. wait()
  395. end
  396. hurt = false
  397. lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  398. for i=0,90,12 do
  399. rw.C0 = lo * CFrame.new(i/150,i/170,i/240) * CFrame.Angles(math.rad(i/5.4),math.rad(i/2.3),0)
  400. lw.C0 = lo2 * CFrame.new(i/240,-i/280,0) * CFrame.Angles(math.rad(i/4),0,0)
  401. wewe.C0 = lo3 * CFrame.Angles(math.rad(i/1.2),0,0)
  402. wait()
  403. end
  404. rw.C0 = battleright
  405. lw.C0 = battleleft
  406. wewe.C0 = battlewep
  407. attacking = false
  408. end
  409. end
  410.  
  411. function spin()
  412. if attacking == false then
  413. attacking = true
  414. for i=0,90,10 do
  415. rw.C0 = battleright * CFrame.new(i/140,0,0) * CFrame.Angles(math.rad(-i/4),0,math.rad(i))
  416. lw.C0 = battleleft * CFrame.new(0,i/90,0) * CFrame.Angles(0,0,math.rad(-i*1.5))
  417. wewe.C0 = battlewep * CFrame.Angles(math.rad(-i),0,math.rad(-i))
  418. wait()
  419. end
  420. local lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  421. bp.position = torso.Position
  422. bp.Parent = torso
  423. bg.Parent = torso
  424. local cf = torso.CFrame
  425. local ef = Instance.new("Part")
  426. prop(ef,mod,false,1,0,1,1,1,"Light blue",true,"Custom")
  427. ef.CFrame = cf
  428. local mc = Instance.new("SpecialMesh",ef)
  429. mc.MeshType = "Sphere"
  430. local spin = true
  431. charge:play()
  432. coroutine.resume(coroutine.create(function()
  433. while spin do
  434. local d = Instance.new("Part")
  435. prop(d,mod,false,1,0,1,1,1,"Medium blue",true,"Custom")
  436. local poa = cf * CFrame.new(0,-2.3,0)
  437. d.CFrame = poa
  438. local r = Instance.new("SpecialMesh",d)
  439. r.MeshId = "http://www.roblox.com/asset/?id=3270017"
  440. r.Scale = Vector3.new(1,1,1)
  441. coroutine.resume(coroutine.create(function()
  442. for i=3,20,1 do
  443. wait()
  444. r.Scale = Vector3.new(i,i,i/3)
  445. d.CFrame = poa * CFrame.new(0,i/4,0) * CFrame.Angles(math.pi/2,0,0)
  446. d.Transparency = (i/14)-0.5
  447. end
  448. d:remove()
  449. end))
  450. wait(0.4)
  451. end
  452. end))
  453. coroutine.resume(coroutine.create(function()
  454. for o=1,14,0.25 do
  455. wait()
  456. mc.Scale = Vector3.new(o/1.18,o,o/1.18)
  457. ef.Transparency = ef.Transparency - 0.014
  458. ef.CFrame = cf * CFrame.Angles(0,o,0)
  459. end
  460. wait(0.15)
  461. for o=12,0,-1.2 do
  462. wait()
  463. mc.Scale = Vector3.new(o/1.1,o,o/1.1)
  464. end
  465. local e = Instance.new("Part")
  466. prop(e,mod,false,0,0.05,1,1,1,"Medium blue",true,"Custom")
  467. e.CFrame = cf
  468. local ha = Instance.new("SpecialMesh",e)
  469. ha.Scale = Vector3.new(1,1,1)
  470. ha.MeshId = "http://www.roblox.com/asset/?id=20329976"
  471. local nubs = getnoobs(cf.p,10)
  472. brek:play()
  473. for _,v in pairs(nubs) do
  474. v.Humanoid.Health = v.Humanoid.Health - math.random(40,60)
  475. v.Humanoid.PlatformStand = true
  476. coroutine.resume(coroutine.create(function()
  477. wait(0.06)
  478. v.Torso.Velocity = CFrame.new(torso.Position, v.Torso.Position).lookVector * 70
  479. v.Torso.RotVelocity = Vector3.new(math.random(-25,25),math.random(-25,25),math.random(-25,25))
  480. wait(0.6)
  481. v.Humanoid.PlatformStand = false
  482. end))
  483. end
  484. for o=1,18,0.95 do
  485. ha.Scale = Vector3.new(o,o/1.4,o)
  486. e.Transparency = o/15
  487. e.CFrame = cf * CFrame.Angles(0,o/3,0)
  488. ef.Transparency = o/17
  489. mc.Scale = Vector3.new(o*1.2,o/1.4,o*1.2)
  490. wait()
  491. end
  492. spin = false
  493. ef:remove()
  494. e:remove()
  495. end))
  496. local i = 0
  497. repeat
  498. local hj = cf * CFrame.Angles(0,math.rad(i),0) * CFrame.new(0,0,-30)
  499. bg.cframe = CFrame.new(cf.p,hj.p)
  500. i = i + 40
  501. wait()
  502. until spin == false
  503. for i=90,0,-10 do
  504. rw.C0 = battleright * CFrame.new(i/140,0,0) * CFrame.Angles(math.rad(-i/4),0,math.rad(i))
  505. lw.C0 = battleleft * CFrame.new(0,i/90,0) * CFrame.Angles(0,0,math.rad(-i*1.5))
  506. wewe.C0 = battlewep * CFrame.Angles(math.rad(-i),0,math.rad(-i))
  507. wait()
  508. end
  509. bg.Parent = nil
  510. bp.Parent = nil
  511. wait()
  512. rw.C0 = battleright
  513. lw.C0 = battleleft
  514. wewe.C0 = battlewep
  515. attacking = false
  516. end
  517. end
  518.  
  519. function stoof()
  520. if attacking == false then
  521. attacking = true
  522. bg.cframe = CFrame.new(torso.Position, torso.CFrame * CFrame.new(0,0,-20).p)
  523. bg.Parent = torso
  524. bp.position = torso.Position
  525. bp.Parent = torso
  526. local norm = torso.CFrame
  527. local center = norm * CFrame.new(0,0,-jumpdist)
  528. for i=0,60,15 do
  529. rw.C0 = battleright * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  530. lw.C0 = battleleft * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  531. wewe.C0 = battlewep * CFrame.Angles(0,0,0)
  532. wait()
  533. end
  534. slash.Pitch = 1.7
  535. slash:play()
  536. local lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  537. for i=180,0,-16 do
  538. bp.position = center * CFrame.Angles(math.rad(i),0,0) * CFrame.new(0,0,-jumpdist).p
  539. wait()
  540. end
  541. hurt = true
  542. dmg = jumpdmg
  543. slash.Pitch = 1
  544. slash:play()
  545. for i=0,150,24 do
  546. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i/1.1),0,0)
  547. lw.C0 = lo2 * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i/1.2),0,0)
  548. wewe.C0 = lo3 * CFrame.Angles(math.rad(-i/2.5),0,0)
  549. eff()
  550. wait()
  551. end
  552. lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  553. slash.Pitch = 1.8
  554. slash:play()
  555. hurt = false
  556. dmg = normaldmg
  557. bp.position = norm.p
  558. for i=0,150,24 do
  559. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/1.75),0,0)
  560. lw.C0 = lo2 * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/1.9),0,0)
  561. wewe.C0 = lo3 * CFrame.Angles(math.rad(i/2.5),0,0)
  562. eff()
  563. wait()
  564. end
  565. rw.C0 = battleright
  566. lw.C0 = battleleft
  567. wewe.C0 = battlewep
  568. wait(0.15)
  569. bp.Parent = nil
  570. bg.Parent = nil
  571. wait(0.1)
  572. attacking = false
  573. end
  574. end
  575.  
  576. function flip()
  577. if attacking == false then
  578. attacking = true
  579. local c = CFrame.new(torso.Position, torso.CFrame * CFrame.new(0,0,-20).p)
  580. bg.cframe = c
  581. bg.Parent = torso
  582. bp.position = torso.Position
  583. bp.Parent = torso
  584. local norm = torso.CFrame
  585. local center = norm * CFrame.new(0,0,-flipdist)
  586. for i=0,60,15 do
  587. rw.C0 = battleright * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  588. lw.C0 = battleleft * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  589. wewe.C0 = battlewep * CFrame.Angles(0,0,0)
  590. wait()
  591. end
  592. local lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  593. hum.PlatformStand = true
  594. hurt = true
  595. jump:play()
  596. for i=180,0,-10 do
  597. bp.position = center * CFrame.Angles(math.rad(i),0,0) * CFrame.new(0,0,-flipdist).p
  598. bg.cframe = c * CFrame.Angles(math.rad(i*2),0,0)
  599. eff()
  600. wait()
  601. end
  602. hum.PlatformStand = false
  603. for i=0,120,20 do
  604. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i/1.1),0,0)
  605. lw.C0 = lo2 * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i/1.5),0,0)
  606. wewe.C0 = lo3 * CFrame.Angles(math.rad(-i/1.6),0,0)
  607. eff()
  608. wait()
  609. end
  610. lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  611. local po = torso.CFrame * CFrame.new(0,-5,0)
  612. local now = 4
  613. dmg = normaldmg*2
  614. absc:play()
  615. coroutine.resume(coroutine.create(function()
  616. repeat
  617. local pa = Instance.new("Part")
  618. prop(pa,mod,false,0.2,0,2,4,2,linecolors[math.random(1,#linecolors)],true,"Custom")
  619. pa.CFrame = po * CFrame.new(math.random(-40,40)/10,0,-now) * CFrame.Angles(math.random(-60,60)/100,math.random(-60,60)/100,math.random(-60,60)/100)
  620. local m = Instance.new("SpecialMesh",pa)
  621. m.MeshType = "Sphere"
  622. m.Scale = Vector3.new(3.5,3,3.5)
  623. local pk = pa.CFrame
  624. local nubs = getnoobs(pa.Position, 5)
  625. for _,v in pairs(nubs) do
  626. v.Humanoid.PlatformStand = true
  627. v.Humanoid.Health = v.Humanoid.Health - math.random(dmg/3,dmg)
  628. v.Torso.Velocity = CFrame.new(pa.Position, v.Torso.Position).lookVector * 60
  629. v.Torso.RotVelocity = Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  630. coroutine.resume(coroutine.create(function()
  631. wait(0.2)
  632. v.Humanoid.PlatformStand = false
  633. end))
  634. end
  635. coroutine.resume(coroutine.create(function()
  636. for i=0,12,1.5 do
  637. wait()
  638. pa.CFrame = pk * CFrame.new(0,i,0)
  639. pa.Transparency = i/10
  640. end
  641. pa:remove()
  642. end))
  643. now = now + 4
  644. wait(0.1)
  645. until now >= linedist
  646. end))
  647. dmg = normaldmg
  648. hurt = false
  649. for i=0,70,15 do
  650. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/1.2),0,0)
  651. lw.C0 = lo2 * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/2.7),0,0)
  652. wewe.C0 = lo3 * CFrame.Angles(math.rad(i*1.25),0,0)
  653. wait()
  654. end
  655. wait(0.1)
  656. rw.C0 = battleright
  657. lw.C0 = battleleft
  658. wewe.C0 = battlewep
  659. wait(0.2)
  660. bp.Parent = nil
  661. bg.Parent = nil
  662. wait(0.15)
  663. attacking = false
  664. end
  665. end
  666.  
  667. function pwn()
  668. if attacking == false then
  669. attacking = true
  670. local c = CFrame.new(torso.Position, torso.CFrame * CFrame.new(0,0,-20).p)
  671. bg.cframe = c
  672. bg.Parent = torso
  673. bp.position = torso.Position
  674. bp.Parent = torso
  675. local norm = torso.CFrame
  676. dmg = normaldmg/1.3
  677. for i=0,60,20 do
  678. rw.C0 = battleright * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  679. lw.C0 = battleleft * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  680. wewe.C0 = battlewep * CFrame.Angles(0,0,0)
  681. wait()
  682. end
  683. local lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  684. wait(0.3)
  685. pwns:play()
  686. local poz = norm * CFrame.new(0,0,-18).p
  687. local pa = Instance.new("Part")
  688. prop(pa,mod,false,0.1,0.03,0.9,0.9,(norm.p - torso.Position).magnitude,"Black",true,"Custom")
  689. pa.CFrame = CFrame.new(norm.p, poz) * CFrame.new(0,0,-(norm.p - poz).magnitude/2)
  690. coroutine.resume(coroutine.create(function()
  691. coroutine.resume(coroutine.create(function()
  692. for i=1,20 do
  693. wait()
  694. pa.Size = Vector3.new(0.9,0.9,(norm.p - torso.Position).magnitude)
  695. pa.CFrame = CFrame.new(norm.p, torso.Position) * CFrame.new(0,0,-(norm.p - torso.Position).magnitude/2)
  696. end
  697. end))
  698. wait(0.25)
  699. for i=0.1,1,0.15 do
  700. pa.Transparency = i
  701. wait()
  702. end
  703. pa:remove()
  704. end))
  705. hum.PlatformStand = true
  706. hurt = true
  707. bp.position = poz
  708. for i=60,-80,-40 do
  709. rw.C0 = battleright * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  710. lw.C0 = battleleft * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/2),0,0)
  711. wewe.C0 = battlewep * CFrame.Angles(0,0,0)
  712. eff2()
  713. wait()
  714. end
  715. wait(0.1)
  716. hurt = false
  717. hum.PlatformStand = false
  718. for i = -80,0,20 do
  719. rw.C0 = battleright * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  720. lw.C0 = battleleft * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/2),0,0)
  721. wewe.C0 = battlewep * CFrame.Angles(0,0,0)
  722. wait()
  723. end
  724. rw.C0 = battleright
  725. lw.C0 = battleleft
  726. wewe.C0 = battlewep
  727. dmg = normaldmg
  728. wait(0.2)
  729. bp.Parent = nil
  730. bg.Parent = nil
  731. wait(0.15)
  732. attacking = false
  733. end
  734. end
  735.  
  736. function spinattack()
  737. if attacking == false then
  738. attacking = true
  739. coroutine.resume(coroutine.create(function()
  740. bp.position = torso.Position
  741. bp.Parent = torso
  742. bg.Parent = torso
  743. for i=0,90,10 do
  744. rw.C0 = battleright * CFrame.new(i/140,0,0) * CFrame.Angles(math.rad(-i/4),0,math.rad(i))
  745. lw.C0 = battleleft * CFrame.new(0,i/90,0) * CFrame.Angles(0,0,math.rad(-i*1.5))
  746. wewe.C0 = battlewep * CFrame.Angles(math.rad(-i),0,math.rad(-i))
  747. wait()
  748. end
  749. end))
  750. local cf = torso.CFrame
  751. local spin = true
  752. charge:play()
  753. coroutine.resume(coroutine.create(function()
  754. while spin do
  755. local d = Instance.new("Part")
  756. prop(d,mod,false,1,0,1,1,1,"Medium blue",true,"Custom")
  757. local poa = cf
  758. d.CFrame = poa
  759. local r = Instance.new("SpecialMesh",d)
  760. r.MeshId = "http://www.roblox.com/asset/?id=3270017"
  761. r.Scale = Vector3.new(1,1,1)
  762. coroutine.resume(coroutine.create(function()
  763. for i=3,20,1 do
  764. wait()
  765. r.Scale = Vector3.new(i,i,i/3)
  766. d.CFrame = poa * CFrame.new(0,i/10,0) * CFrame.Angles(math.pi/2,0,0)
  767. d.Transparency = (i/14)-0.5
  768. end
  769. d:remove()
  770. end))
  771. wait(0.4)
  772. end
  773. end))
  774. hurt = true
  775. for i=0,360*5, 40 do
  776. local hj = cf * CFrame.Angles(0,math.rad(i),0) * CFrame.new(0,0,-30)
  777. bg.cframe = CFrame.new(cf.p,hj.p)
  778. wait()
  779. end
  780. hurt = false
  781. spin = false
  782. for i=90,0,-10 do
  783. rw.C0 = battleright * CFrame.new(i/140,0,0) * CFrame.Angles(math.rad(-i/4),0,math.rad(i))
  784. lw.C0 = battleleft * CFrame.new(0,i/90,0) * CFrame.Angles(0,0,math.rad(-i*1.5))
  785. wewe.C0 = battlewep * CFrame.Angles(math.rad(-i),0,math.rad(-i))
  786. wait()
  787. end
  788. bg.Parent = nil
  789. bp.Parent = nil
  790. wait()
  791. rw.C0 = battleright
  792. lw.C0 = battleleft
  793. wewe.C0 = battlewep
  794. attacking = false
  795. end
  796. end
  797.  
  798. function side()
  799. if attacking == false then
  800. attacking = true
  801. for i=0,90,9 do
  802. rw.C0 = battleright * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),math.rad(-i),math.rad(i))
  803. lw.C0 = battleleft * CFrame.new(i/270,i/230,0) * CFrame.Angles(0,0,math.rad(i/2.1))
  804. wewe.C0 = battlewep * CFrame.Angles(math.rad(-i/3),0,0)
  805. wait()
  806. end
  807. local lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  808. hurt = true
  809. slash.Pitch = 1.2
  810. slash:play()
  811. for i=0,90,10 do
  812. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i/1.5),0,0)
  813. lw.C0 = lo2 * CFrame.new(0,i/230,0) * CFrame.Angles(0,0,math.rad(-i*1.2))
  814. wewe.C0 = lo3 * CFrame.Angles(math.rad(-i/1.8),0,0)
  815. eff()
  816. wait()
  817. end
  818. lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  819. hurt = false
  820. for i=0,90,10 do
  821. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i/1.5),math.rad(i/1),0)
  822. lw.C0 = lo2 * CFrame.new(math.rad(i/2),math.rad(-i/6.5),0) * CFrame.Angles(0,0,math.rad(i/1.3))
  823. wewe.C0 = lo3 * CFrame.Angles(math.rad(i/1.1),0,0)
  824. wait()
  825. end
  826. rw.C0 = battleright
  827. lw.C0 = battleleft
  828. wewe.C0 = battlewep
  829. attacking = false
  830. end
  831. end
  832.  
  833. function pow()
  834. if attacking == false then
  835. attacking = true
  836. for i=0,90,15 do
  837. rw.C0 = battleright * CFrame.new(i/140,0,0) * CFrame.Angles(math.rad(-i/4),0,math.rad(i))
  838. lw.C0 = battleleft * CFrame.new(0,i/90,0) * CFrame.Angles(0,0,math.rad(-i*1.5))
  839. wewe.C0 = battlewep * CFrame.Angles(math.rad(-i),0,math.rad(-i))
  840. wait()
  841. end
  842. local lo, lo2, lo3 = rw.C0, lw.C0, wewe.C0
  843. local poz = CFrame.new(torso.Position)
  844. bp.position = poz.p
  845. bp.Parent = torso
  846. bg.cframe = CFrame.new(torso.Position, torso.CFrame * CFrame.new(0,0,-10).p)
  847. bg.Parent = torso
  848. coroutine.resume(coroutine.create(function()
  849. local ma = Instance.new("Part")
  850. prop(ma,mod,false,0,0,1,1,1,"White",true,"Custom")
  851. ma.CFrame = poz * CFrame.new(0,45,0)
  852. local mam = Instance.new("CylinderMesh",ma)
  853. mam.Scale = Vector3.new(3,1,3)
  854. for i=1,50,5 do
  855. mam.Scale = Vector3.new(i/9,i*1.3,i/9)
  856. ma.CFrame = poz * CFrame.new(0,-mam.Scale.Y/2+45,0)
  857. wait()
  858. end
  859. brek:play()
  860. local p = Instance.new("Part")
  861. prop(p,mod,false,0,0,1,1,1,"White",true,"Custom")
  862. p.CFrame = poz
  863. local a = Instance.new("SpecialMesh",p)
  864. a.MeshId = "http://www.roblox.com/asset/?id=20329976"
  865. a.Scale = Vector3.new(2,2,2)
  866. local p2 = p:clone()
  867. p2.Parent = mod
  868. local nubs = getnoobs(poz.p,7)
  869. for _,v in pairs(nubs) do
  870. v.Humanoid.PlatformStand = true
  871. v.Humanoid.Health = v.Humanoid.Health - math.random(splashdmg/2, splashdmg)
  872. v.Torso.Velocity = CFrame.new(poz.p,v.Torso.Position).lookVector * 25
  873. v.Torso.RotVelocity = Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  874. coroutine.resume(coroutine.create(function() wait(0.6) v.Humanoid.PlatformStand = false end))
  875. end
  876. for i=2,12,0.8 do
  877. wait()
  878. p.CFrame = poz * CFrame.Angles(0,math.rad(i*10),0)
  879. a.Scale = Vector3.new(i,i/1.25,i)
  880. p.Transparency = (i/10)-0.2
  881. p2.Transparency = p.Transparency
  882. p2.Mesh.Scale = Vector3.new(i/1.6,i/2.2,i/1.6)
  883. p2.CFrame = poz * CFrame.Angles(0,math.rad(-i*10),0)
  884. ma.Transparency = (i/10)-0.2
  885. end
  886. p:remove()
  887. p2:remove()
  888. ma:remove()
  889. end))
  890. for i=0,60,20 do
  891. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  892. lw.C0 = lo2 * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  893. wait()
  894. end
  895. wait(0.8)
  896. bg.Parent = nil
  897. bp.Parent = nil
  898. for i=60,0,-20 do
  899. rw.C0 = lo * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  900. lw.C0 = lo2 * CFrame.new(0,0,0) * CFrame.Angles(math.rad(i),0,0)
  901. wait()
  902. end
  903. for i=90,0,-15 do
  904. rw.C0 = battleright * CFrame.new(i/140,0,0) * CFrame.Angles(math.rad(-i/4),0,math.rad(i))
  905. lw.C0 = battleleft * CFrame.new(0,i/90,0) * CFrame.Angles(0,0,math.rad(-i*1.5))
  906. wewe.C0 = battlewep * CFrame.Angles(math.rad(-i),0,math.rad(-i))
  907. wait()
  908. end
  909. rw.C0 = battleright
  910. lw.C0 = battleleft
  911. wewe.C0 = battlewep
  912. wait(0.4)
  913. attacking = false
  914. end
  915. end
  916.  
  917. function keys(k)
  918. if hum.Health > 0 and bin.Parent ~= nil and selected then
  919. local key = k:lower()
  920. if key == "q" then
  921. stab()
  922. elseif key == "r" then
  923. spin()
  924. elseif key == "e" then
  925. stoof()
  926. elseif key == "f" then
  927. flip()
  928. elseif key == "t" then
  929. pwn()
  930. elseif key == "z" then
  931. spinattack()
  932. elseif key == "x" then
  933. pow()
  934. elseif key == "g" then
  935. side()
  936. end
  937. end
  938. end
  939.  
  940. function select(mouse)
  941. if bin.Parent ~= nil then
  942. repeat wait() until selected == false and attacking == false
  943. selmot()
  944. mouse.Button1Down:connect(function()
  945. if hum.Health > 0 and bin.Parent ~= nil then
  946. attack()
  947. end
  948. end)
  949. mouse.KeyDown:connect(function(key) keys(key) end)
  950. end
  951. end
  952.  
  953. function desel()
  954. repeat wait() until selected == true and attacking == false
  955. deselmot()
  956. end
  957.  
  958. bin.Selected:connect(select)
  959. bin.Deselected:connect(desel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement