Dark_EccentricYT

Untitled

Jul 7th, 2018
1,841
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.68 KB | None | 0 0
  1. --[[
  2. Made by Epux_Legitness69 and Gedda206
  3. Inspired by Rufus14's Katana V2.
  4. --]]
  5. local plr = game:GetService("Players").LocalPlayer
  6. local chara = plr.Character
  7. local rightarm = chara["Right Arm"]
  8. local leftarm = chara["Left Arm"]
  9. local torso = chara.Torso
  10. local rootpart = chara.HumanoidRootPart
  11. local rootjoint=rootpart.RootJoint
  12. local rootcf = CFrame.fromEulerAnglesXYZ(-1.57,0,3.14)
  13. local anim="idle"
  14. local rw=Instance.new("Weld",torso)
  15. local lw=Instance.new("Weld",torso)
  16. local rh=torso["Right Hip"]
  17. local lh=torso["Left Hip"]
  18. local r0=rh.C0
  19. local l0=lh.C0
  20. local humanoid=chara.Humanoid
  21. chara.Animate:Destroy()
  22. humanoid.MaxHealth = math.huge
  23. humanoid.Animator:Destroy()
  24. rw.Part0=torso
  25. rw.Part1=rightarm
  26. rw.C0=CFrame.new(1.5,0.5,0)
  27. rw.C1=CFrame.new(0,0.5,0)
  28. lw.Part0=torso
  29. lw.Part1=leftarm
  30. lw.C0=CFrame.new(-1.5,0.5,0)
  31. lw.C1=CFrame.new(0,0.5,0)
  32. attack = false
  33. local mouse = plr:GetMouse()
  34. local attacktype = 1
  35.  
  36. function clerp(a,b,t)
  37. return a:lerp(b, t)
  38. end
  39.  
  40. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  41. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  42. end
  43. sine = 0
  44. change = 1
  45. neck = torso.Neck
  46. necko = torso.Neck.C0
  47. local m = Instance.new("Model",chara)
  48. m.Name="WeaponModel"
  49. local handle = Instance.new("Part",m)
  50. handle.CanCollide = false
  51. handle.Size = Vector3.new(1, 1, 1)
  52. local weld = Instance.new("Weld",rightarm)
  53. weld.Part0 = rightarm
  54. weld.Part1 = handle
  55. weld.C0 = CFrame.new(0, -1, 0)*CFrame.Angles(0,math.rad(90),0)
  56. handle.Transparency = 1
  57. local blade = Instance.new("Part",m)
  58. blade.CanCollide = false
  59. blade.Size = Vector3.new(1, 1, 5)
  60. local mesh = Instance.new("FileMesh",blade)
  61. mesh.MeshId = "http://www.roblox.com/asset/?id=11442510"
  62. mesh.TextureId = "http://www.roblox.com/asset/?id=21294180"
  63. local bladeweld = Instance.new("Weld",handle)
  64. bladeweld.Part0 = handle
  65. bladeweld.Part1 = blade
  66. bladeweld.C0 = CFrame.Angles(math.rad(90),math.rad(90),0)*CFrame.new(0,0,2)
  67. mesh.Scale = Vector3.new(2,2,2)
  68. active = false
  69. hitting = false
  70. killaura = false
  71. local bladeend=Instance.new("Part",m)
  72. bladeend.Transparency=1
  73. bladeend.Size = Vector3.new(1,1,1)
  74. local bw = Instance.new("Weld",blade)
  75. bw.Part0=blade
  76. bw.Part1=bladeend
  77. bw.C0=CFrame.new(0, 0, 3)
  78. bladeend.CanCollide = false
  79. local trail = Instance.new("Trail",m)
  80. local att1= Instance.new("Attachment",handle)
  81. local att2=Instance.new("Attachment",bladeend)
  82. trail.Attachment0=att1
  83. trail.Attachment1=att2
  84. trail.Lifetime=0.2
  85. trail.Enabled = false
  86. trail.Color = ColorSequence.new(Color3.fromRGB(0, 230, 0),Color3.fromRGB(0,176))
  87. function swait(num)
  88. if num==0 or num==nil then
  89. game:service'RunService'.Heartbeat:wait(0)
  90. else
  91. for i=0,num do
  92. game:service'RunService'.Heartbeat:wait(0)
  93. end
  94. end
  95. end
  96. function ragdoll(p)
  97. if banmode == true then
  98. repeat
  99. local ska = Instance.new("SkateboardPlatform",p)
  100. ska.Transparency = 1
  101. ska.Position = p.Head.Position
  102. wait()
  103. until p == nil
  104. end
  105. p:BreakJoints()
  106. p.Archivable = true
  107. clone = p:Clone()
  108. clone.Parent = workspace
  109. for i,v in pairs(clone:GetChildren()) do
  110. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  111. v:destroy()
  112. end
  113. for i,p in pairs(v:GetChildren()) do
  114. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  115. p:destroy()
  116. end
  117. end
  118. end
  119. for i,t in pairs(p:GetChildren()) do
  120. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  121. t:destroy()
  122. end
  123. end
  124. vel = Instance.new("BodyVelocity", clone.Torso)
  125. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  126. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  127. if clone.Head:FindFirstChild("face") then
  128. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  129. elseif clone.Head:FindFirstChild("roblox") then
  130. clone.Head.roblox.Texture = "http://www.roblox.com/asset/?id=161061608"
  131. elseif clone.Head:FindFirstChild("Face") then
  132. clone.Head.Face.Texture = "http://www.roblox.com/asset/?id=161061608"
  133. end
  134. vel:Destroy()
  135. using = false
  136. hit = Instance.new("Sound", clone.Torso)
  137. hit.SoundId = "rbxassetid://260430060"
  138. hit.Volume = 5
  139. hit1 = Instance.new("Sound", clone.Torso)
  140. hit1.SoundId = "rbxassetid://138087186"
  141. hit1.Volume = 5
  142. hit2 = Instance.new("Sound", clone.Torso)
  143. hit2.SoundId = "rbxassetid://131237241"
  144. hit2.Volume = 5
  145. hit3 = Instance.new("Sound", clone.Torso)
  146. hit3.SoundId = "rbxassetid://278062209"
  147. hit3.Volume = 5
  148. hit3.TimePosition = 0.33
  149. clone:FindFirstChildOfClass("Humanoid").PlatformStand = true
  150. if zombiemode == true then
  151. coroutine.wrap(function()
  152. wait(3)
  153. clone:FindFirstChildOfClass("Humanoid").PlatformStand = false
  154. clone:FindFirstChildOfClass("Humanoid").WalkSpeed = math.random(10, 35)
  155. bleed(clone.Head.CFrame, 10)
  156. end)()
  157. end
  158. for i, v in pairs(clone:GetChildren()) do
  159. if v.Name == "BASE" then
  160. v:Destroy()
  161. end
  162. end
  163. local leftarm = clone:findFirstChild("Left Arm")
  164. local rightrm = clone:findFirstChild("Right Arm")
  165. local leftleg = clone:findFirstChild("Left Leg")
  166. local rightleg = clone:findFirstChild("Right Leg")
  167. local head = clone:findFirstChild("Head")
  168. local welding = Instance.new("Weld", clone.Torso)
  169. welding.Part0 = clone.Torso
  170. welding.Part1 = head
  171. welding.C0 = welding.C0 * CFrame.new(0,1.5,0)
  172. for i, g in pairs(p:GetChildren()) do
  173. if g.ClassName == "Part" then
  174. g:destroy()
  175. end
  176. end
  177. for i, h in pairs(p:GetChildren()) do
  178. if h.ClassName == "Accesory" then
  179. h:destroy()
  180. end
  181. end
  182. if leftleg ~= nil then
  183. local glue = Instance.new("Glue", clone.Torso)
  184. glue.Part0 = clone.Torso
  185. glue.Part1 = leftleg
  186. glue.Name = "Left leg"
  187. local collider = Instance.new("Part", leftleg)
  188. collider.Position = Vector3.new(0,999,0)
  189. collider.Size = Vector3.new(1.7, 1, 1)
  190. collider.Shape = "Cylinder"
  191. local weld = Instance.new("Weld", collider)
  192. weld.Part0 = leftleg
  193. weld.Part1 = collider
  194. weld.C0 = CFrame.Angles(0, 0, 80)
  195. collider.TopSurface = "Smooth"
  196. collider.BottomSurface = "Smooth"
  197. collider.formFactor = "Symmetric"
  198. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  199. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  200. collider.Transparency = 1
  201. end
  202. game:GetService("Debris"):AddItem(clone,7.5)
  203. ------------
  204. if rightleg ~= nil then
  205. local glue1 = Instance.new("Glue", clone.Torso)
  206. glue1.Part0 = clone.Torso
  207. glue1.Part1 = rightleg
  208. glue1.Name = "Right leg"
  209. local collider1 = Instance.new("Part", rightleg)
  210. collider1.Position = Vector3.new(0,999,0)
  211. collider1.Size = Vector3.new(1.7, 1, 1)
  212. collider1.Shape = "Cylinder"
  213. local weld1 = Instance.new("Weld", collider1)
  214. weld1.Part0 = rightleg
  215. weld1.Part1 = collider1
  216. weld1.C0 = CFrame.Angles(0, 0, 80)
  217. collider1.TopSurface = "Smooth"
  218. collider1.BottomSurface = "Smooth"
  219. collider1.formFactor = "Symmetric"
  220. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  221. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  222. collider1.Transparency = 1
  223. end
  224. ------------
  225. if rightrm ~= nil then
  226. local glue11 = Instance.new("Glue", clone.Torso)
  227. glue11.Part0 = clone.Torso
  228. glue11.Part1 = rightrm
  229. glue11.Name = "Right shoulder"
  230. local collider11 = Instance.new("Part", rightrm)
  231. collider11.Position = Vector3.new(0,9999,0)
  232. collider11.Size = Vector3.new(1.8,1,1)
  233. collider11.Shape = "Cylinder"
  234. local weld11 = Instance.new("Weld", collider11)
  235. weld11.Part0 = rightrm
  236. weld11.Part1 = collider11
  237. weld11.C0 = CFrame.Angles(0, 0, 80)
  238. collider11.TopSurface = "Smooth"
  239. collider11.BottomSurface = "Smooth"
  240. collider11.formFactor = "Symmetric"
  241. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  242. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  243. collider11.Transparency = 1
  244. end
  245. ------------
  246. if leftarm ~= nil then
  247. local glue111 = Instance.new("Glue", clone.Torso)
  248. glue111.Part0 = clone.Torso
  249. glue111.Part1 = leftarm
  250. glue111.Name = "Left shoulder"
  251. local collider111 = Instance.new("Part", leftarm)
  252. collider111.Position = Vector3.new(0,9999,0)
  253. collider111.Size = Vector3.new(1.8,1,1)
  254. collider111.Shape = "Cylinder"
  255. local weld111 = Instance.new("Weld", collider111)
  256. weld111.Part0 = leftarm
  257. weld111.Part1 = collider111
  258. weld111.C0 = CFrame.Angles(0, 0, 80)
  259. collider111.TopSurface = "Smooth"
  260. collider111.BottomSurface = "Smooth"
  261. collider111.formFactor = "Symmetric"
  262. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  263. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  264. collider111.Transparency = 1
  265. ----------------
  266. sensoring = Instance.new("Part", clone.Torso)
  267. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  268. sensoring.CanCollide = false
  269. sensoring.Position = clone.Torso.Position
  270. local welder = Instance.new("Weld", sensoring)
  271. welder.Part0 = clone.Torso
  272. welder.Part1 = sensoring
  273. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  274. sensoring.Transparency = 1
  275. -----------------
  276. sensoring1 = Instance.new("Part", clone.Torso)
  277. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  278. sensoring1.CanCollide = false
  279. sensoring1.Position = clone.Torso.Position
  280. local welder1 = Instance.new("Weld", sensoring)
  281. welder1.Part0 = clone.Torso
  282. welder1.Part1 = sensoring1
  283. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  284. sensoring1.Transparency = 1
  285. end
  286. end
  287. function ShowDamage(dam,cf)
  288. local t=Instance.new('Part',workspace)
  289. t.Size=Vector3.new(1, 1, 1)
  290. t.Transparency=1
  291. t.CFrame = cf
  292. local bil=Instance.new('BillboardGui',t)
  293. bil.Size=UDim2.new(0, 9, 0, 9)
  294. local tex=Instance.new('TextLabel',bil)
  295. tex.Size=UDim2.new(0, 1 , 0, 1)
  296. tex.BackgroundTransparency=1
  297. tex.Text="-"..dam
  298. tex.TextSize=76
  299. tex.FontSize=Enum.FontSize.Size28
  300. tex.Font = Enum.Font.ArialBold
  301. t.Anchored=true
  302. tex.TextColor3=Color3.fromRGB(30, 30, 30)
  303. t.CanCollide=false
  304. game:GetService("Debris"):AddItem(t, 10)
  305. coroutine.wrap(function()
  306. for i=1, 100 do
  307. t.CFrame=t.CFrame*CFrame.new(0, 0.01, 0)
  308. swait(2)
  309. end
  310. t:Destroy()
  311. end)()
  312. end
  313. function dmg(hit)
  314. for i,v in pairs(hit.Parent:GetChildren()) do
  315. if v:isA("Humanoid") and hit.Parent ~= chara and active==true and hitting == false then
  316. local sound = Instance.new("Sound",hit)
  317. sound.SoundId="rbxassetid://566593606"
  318. sound:Play()
  319. hitting = true
  320. v.PlatformStand=true
  321. v.Died:connect(function()
  322. ragdoll(hit.Parent)
  323. end)
  324. local dam = math.random(20, 60)
  325. ShowDamage(dam, torso.CFrame*CFrame.new(math.random(-20, 20), 0, math.random(-20, 20)))
  326. v:TakeDamage(dam)
  327. wait(0.2)
  328. v.PlatformStand=false
  329. hitting = false
  330. end
  331. end
  332. end
  333. nosoundhitting = false
  334. createDamage = function(part,hit,minim,maxim)
  335. if hit.Parent==nil then
  336. return
  337. end
  338. local h=hit.Parent:FindFirstChild("Humanoid")
  339. for _,v in pairs(hit.Parent:children()) do
  340. if v:IsA("Humanoid") then
  341. h=v
  342. end
  343. end
  344. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  345. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  346. end
  347. if hit.Parent.className=="Hat" then
  348. hit=hit.Parent.Parent:findFirstChild("Head")
  349. end
  350. if h~=nil and hit.Parent.Name~=chara.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  351. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  352. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  353. return
  354. end]]
  355. -- hs(hit,1.2)
  356. local c=Instance.new("ObjectValue")
  357. c.Name="creator"
  358. c.Value=game:service("Players").LocalPlayer
  359. c.Parent=h
  360. game:GetService("Debris"):AddItem(c,.5)
  361. local Damage=math.random(minim,maxim)
  362. ShowDamage(Damage, hit.CFrame*CFrame.new(math.random(-20, 20),0,math.random(-20,20)))
  363. h:TakeDamage(Damage)
  364. end
  365. end
  366. MagnitudeDmg=function(part,dis)
  367. for _,c in pairs(workspace:children()) do
  368. local hum=c:findFirstChild("Humanoid")
  369. if hum~=nil then
  370. local head=c:findFirstChild("Torso")
  371. if head~=nil then
  372. local targ=head.Position-part.Position
  373. local mag=targ.magnitude
  374. if mag<=dis and c.Name~=chara.Name then
  375. createDamage(part, hum.Parent.Torso, 20, 60)
  376. end
  377. end
  378. end
  379. end
  380. end
  381. function makeShockwave(height,color,speed,range,pulse,cf)
  382. local range = range or 2000
  383. local p = Instance.new("Part")
  384. p.Anchored = true
  385. p.CanCollide = false
  386. p.FormFactor = "Custom"
  387. p.BrickColor = color
  388. p.Parent = workspace
  389. local m = Instance.new("SpecialMesh",p)
  390. m.MeshId = "rbxassetid://3270017"
  391. local estimateSurvival = math.floor(range/speed) * 0.03
  392. game:GetService("Debris"):AddItem(p,estimateSurvival)
  393. coroutine.wrap(function ()
  394. print('shock')
  395. for i = 1,range,speed do
  396. p.Transparency = 1-math.min(0.5,3-(i/500))
  397. m.Scale = Vector3.new(i,i,i*height)
  398. p.CFrame = cf
  399. wait()
  400. end
  401. p:Destroy()
  402. end)()
  403. end
  404. function attackone()
  405. if attack==false then
  406. attack = true
  407. trail.Enabled = true
  408. for i = 0,1,0.1 do
  409. swait()
  410. rw.C0 = clerp(rw.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(160),math.rad(0),math.rad(40)),.3)
  411. lw.C0 =clerp(lw.C0, CFrame.new(1.2,.99,-0.4)*CFrame.Angles(math.rad(130),math.rad(0),math.rad(40)),.3)
  412. rootjoint.C0 = clerp(rootjoint.C0, rootcf*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),.3)
  413. rh.C0=clerp(rh.C0,r0,.3)
  414. lh.C0=clerp(lh.C0,l0,.3)
  415. neck.C0=clerp(neck.C0,necko*CFrame.Angles(0,0,0),.3)
  416. end
  417. active = true
  418. local swing=Instance.new("Sound",handle)
  419. swing.SoundId="rbxassetid://1306070008"
  420. swing:Play()
  421. game:GetService("Debris"):AddItem(swing, 3)
  422. blade.Touched:connect(dmg)
  423. for i=0,1,0.1 do
  424. swait()
  425. neck.C0=clerp(neck.C0,necko*CFrame.Angles(0.4,0,0),.3)
  426. rw.C0=clerp(rw.C0, CFrame.new(0.7,0.5,-0.6)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(-40)),.3)
  427. lw.C0=clerp(lw.C0, CFrame.new(0.5,0.5,-0.4)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(-40)),.3)
  428. end
  429. wait(1/60)
  430. attack=false
  431. attacktype = 2
  432. active = false
  433. trail.Enabled = false
  434. end
  435. end
  436.  
  437. function attacktwo()
  438. if attack == false then
  439. attack=true
  440. trail.Enabled = true
  441. for i=0,1,0.1 do
  442. swait()
  443. rh.C0=clerp(rh.C0,r0,.3)
  444. lh.C0=clerp(lh.C0,l0,.3)
  445. rootjoint.C0=clerp(rootjoint.C0, rootcf*CFrame.new(0, 0, 0)*CFrame.Angles(0,0,math.rad(90)),0.3)
  446. neck.C0 = clerp(neck.C0, necko*CFrame.Angles(0,0,math.rad(-90)),.3)
  447. lw.C0=clerp(lw.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
  448. rw.C0=clerp(rw.C0,CFrame.new(-1.3,0.5,-0.3)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
  449. end
  450. local swing=Instance.new("Sound",handle)
  451. swing.SoundId="rbxassetid://1306070008"
  452. swing:Play()
  453. active = true
  454. blade.Touched:connect(dmg)
  455. for i=0,1,0.1 do
  456. swait()
  457. rootjoint.C0=clerp(rootjoint.C0, rootcf*CFrame.new(0, 0, 0)*CFrame.Angles(0,0,math.rad(-120)),0.5)
  458. neck.C0 = clerp(neck.C0, necko*CFrame.Angles(0,0,math.rad(90)),.3)
  459. rw.C0=clerp(rw.C0,CFrame.new(-1.3,0.5,-0.3)*CFrame.Angles(math.rad(0),math.rad(10),math.rad(-90)),.3)
  460. end
  461. wait(1/60)
  462. attacktype=3
  463. attack=false
  464. trail.Enabled = false
  465. active = false
  466. end
  467. end
  468. function attackthree()
  469. if attack==false then
  470. attack = true
  471. trail.Enabled=true
  472. for i =0,1,0.1 do
  473. swait()
  474. rh.C0=clerp(rh.C0,r0,.3)
  475. lh.C0=clerp(lh.C0,l0,.3)
  476. neck.C0 = clerp(neck.C0, necko*CFrame.Angles(0,0,0),.3)
  477. rootjoint.C0=clerp(rootjoint.C0, rootcf*CFrame.new(0, 0, 0),.3)
  478. rw.C0=clerp(rw.C0, CFrame.new(1,1.5,0)*CFrame.Angles(math.rad(192),math.rad(0),math.rad(-40)),.3)
  479. lw.C0=clerp(lw.C0, CFrame.new(-1,1.5,0)*CFrame.Angles(math.rad(192),math.rad(0),math.rad(40)),.3)
  480. end
  481. local swing=Instance.new("Sound",handle)
  482. swing.SoundId="rbxassetid://1306070008"
  483. swing:Play()
  484. active = true
  485. blade.Touched:connect(dmg)
  486. coroutine.wrap(function()
  487. if hitfloor~=nil then
  488. local wave = Instance.new("Part",workspace)
  489. wave.Name = "Effect"
  490. wave.CanCollide = false
  491. wave.Anchored = true
  492. wave.CFrame = torso.CFrame*CFrame.new(0, -2, 0)
  493. wave.BrickColor = hitfloor.BrickColor
  494. local mes = Instance.new("FileMesh",wave)
  495. mes.MeshId = "rbxassetid://20329976"
  496. MagnitudeDmg(torso, 20)
  497. game:GetService("Debris"):AddItem(wave,10)
  498. for i = 1, 60 do
  499. mes.Scale = mes.Scale+Vector3.new(0.8, 0.4, 0.8)
  500. wave.Transparency = wave.Transparency + 1/60
  501. swait()
  502. end
  503. wave:Destroy()
  504. end
  505. end)()
  506. for i=0,1,0.1 do
  507. swait()
  508. neck.C0=clerp(neck.C0,necko*CFrame.Angles(0.4,0,0),.3)
  509. rw.C0=clerp(rw.C0, CFrame.new(1,0.5,-0.5)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-30)),.3)
  510. lw.C0=clerp(lw.C0, CFrame.new(-1,0.5,-0.5)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(30)),.3)
  511. end
  512. end
  513. wait(1/60)
  514. attack = false
  515. active = false
  516. attacktype = 1
  517. trail.Enabled=false
  518. end
  519. function PlayAnimationFromTable(table, speed)
  520. rootjoint.C0 = clerp(rootjoint.C0, table[1], speed)
  521. torso.Neck.C0 = clerp(neck.C0, table[2], speed)
  522. rw.C0 = clerp(rw.C0, table[3], speed)
  523. lw.C0 = clerp(lw.C0, table[4], speed)
  524. rh.C0 = clerp(rh.C0, table[5], speed)
  525. lh.C0 = clerp(lh.C0, table[6], speed)
  526. end
  527. function blockEffect(cframe, amount)
  528. coroutine.wrap(function()
  529. for x = 1, amount do
  530. local block = Instance.new("Part",workspace)
  531. block.Name="Effect"
  532. block.CanCollide = false
  533. block.Anchored = true
  534. block.CFrame = cframe
  535. block.BrickColor = BrickColor.Black()
  536. block.Material="Neon"
  537. block.Size = Vector3.new(0.1, 0.1, 0.1)
  538. game:GetService("Debris"):AddItem(block, 10)
  539. coroutine.wrap(function()
  540. for i = 1, amount*2 do
  541. swait()
  542. block.Transparency = block.Transparency+1/amount
  543. block.CFrame = block.CFrame*CFrame.Angles(math.random(0, 360),math.random(0, 360),math.random(0, 360))
  544. block.Size = block.Size+Vector3.new(0.07, 0.07, 0.07)
  545. end
  546. end)()
  547. swait()
  548. end
  549. end)()
  550. end
  551. hiding = false
  552. function Hide()
  553. if attack==false and hiding ==false then
  554. hiding = true
  555. attack=true
  556. humanoid.WalkSpeed = 0
  557. humanoid.JumpPower = 0
  558. for i = 0, 5, 0.05 do
  559. swait()
  560. PlayAnimationFromTable({
  561. rootcf*CFrame.new(0, 0, -9),
  562. necko,
  563. CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),0,0),
  564. CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,0),
  565. r0,
  566. l0
  567. },0.05)
  568. coroutine.wrap(function()
  569. wait(3)
  570. humanoid.WalkSpeed = 50
  571. humanoid.JumpPower = 0
  572. end)()
  573. end
  574. else
  575. humanoid.WalkSpeed = 0
  576. humanoid.JumpPower = 0
  577. for i = 0, 5, 0.05 do
  578. swait()
  579. PlayAnimationFromTable({
  580. rootcf*CFrame.new(0, 0, 0),
  581. necko*CFrame.Angles(-0.6,0,0),
  582. CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(170),0,0),
  583. CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),0,0),
  584. r0,
  585. l0
  586. },0.05)
  587. end
  588. humanoid.WalkSpeed = 16
  589. humanoid.JumpPower = 50
  590. hiding = false
  591. attack = false
  592. end
  593. end
  594. function computeDirection(vec)
  595. local lenSquared = vec.magnitude * vec.magnitude
  596. local invSqrt = 1 / math.sqrt(lenSquared)
  597. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  598. end
  599. function EnergyExplosion()
  600. if attack==false then
  601. attack = true
  602. local dbc=Instance.new("Sound",handle)
  603. dbc.Volume=1
  604. dbc.SoundId="http://www.roblox.com/asset/?id=2101137"
  605. dbc:Play()
  606. for i=1, 70 do
  607. swait()
  608. PlayAnimationFromTable({
  609. rootcf*CFrame.new(0,0,0)*CFrame.Angles(0,0,math.rad(90)),
  610. necko*CFrame.Angles(0,0,math.rad(-90)),
  611. CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(90)),
  612. CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-10)),
  613. r0*CFrame.Angles(0,0,0),
  614. l0*CFrame.Angles(0,0,0)
  615. },.06)
  616. end
  617. local ball = Instance.new("Part",chara)
  618. ball.CanCollide=false
  619. ball.BrickColor=BrickColor.Black()
  620. ball.Size=Vector3.new(2, 2, 2)
  621. ball.Shape="Ball"
  622. ball.Material="Neon"
  623. local bweld=Instance.new("Weld",rightarm)
  624. bweld.Part0=rightarm
  625. bweld.Part1=ball
  626. bweld.C0=CFrame.new(0, -1.3, 0)
  627. blockEffect(ball.CFrame, 15)
  628. wait(0.3)
  629. for i=0,1,0.1 do
  630. swait()
  631. PlayAnimationFromTable({
  632. rootcf*CFrame.new(0,0,0)*CFrame.Angles(0,0,math.rad(90)),
  633. necko*CFrame.Angles(0,0,math.rad(-90)),
  634. CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(110)),
  635. CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-10)),
  636. r0*CFrame.Angles(0,0,0),
  637. l0*CFrame.Angles(0,0,0)
  638. },.3)
  639. end
  640. ball:BreakJoints()
  641. local Target=mouse.Hit.p
  642. local direction = Target - handle.Position
  643. direction = computeDirection(direction)
  644. local pos = handle.Position + (direction * 10.0)
  645. ball.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles(math.pi/2, 0, 0)
  646. local floatForce = Instance.new("BodyForce")
  647. floatForce.force = Vector3.new(0, ball:GetMass() * 196.1, 0.0)
  648. floatForce.Parent = ball
  649. ball.Velocity = direction * 160
  650. game:GetService("Debris"):AddItem(ball, 30)
  651. local GB1=Instance.new("Sound",torso)
  652. local GB2=Instance.new("Sound",torso)
  653. local GB3=Instance.new("Sound",torso)
  654. local GB4=Instance.new("Sound",torso)
  655. GB1.SoundId="http://www.roblox.com/asset?id=1369158"
  656. GB2.SoundId="http://www.roblox.com/asset/?id=2974000"
  657. GB3.SoundId="rbxassetid://12222124"
  658. GB4.SoundId="http://www.roblox.com/asset/?id=2974249"
  659. GB3.Volume = 5
  660. GB3.PlaybackSpeed=0.2
  661. game:GetService("Debris"):AddItem(GB1,10)
  662. game:GetService("Debris"):AddItem(GB2,10)
  663. game:GetService("Debris"):AddItem(GB3,10)
  664. game:GetService("Debris"):AddItem(GB4,10)
  665. GB1:Play()
  666. GB2:Play()
  667. GB3:Play()
  668. GB4:Play()
  669. ball.Touched:connect(function(hit)
  670. if not hit:IsDescendantOf(chara) then
  671. MagnitudeDmg(ball, 100, 50, 99)
  672. floatForce.Parent = nil
  673. ball.Anchored = true
  674. local so1=Instance.new("Sound",ball)
  675. so1.SoundId="http://www.roblox.com/asset/?id=2767090"
  676. so1.Volume = 1
  677. so1.PlaybackSpeed = 0.8
  678. so1:Play()
  679. local so2=Instance.new("Sound",ball)
  680. so2.SoundId="http://www.roblox.com/asset/?id=13775494"
  681. so2.Volume = 1
  682. so2.PlaybackSpeed = 0.4
  683. so2:Play()
  684. game:GetService("Debris"):AddItem(ball,2)
  685. local ball2=ball:Clone()
  686. ball2.Parent=workspace
  687. makeShockwave(0.5,BrickColor.new("Black"),30,1000,0,ball2.CFrame)
  688. coroutine.resume(coroutine.create(function()
  689. for i = 1, 30 do
  690. ball2.Size = ball2.Size+Vector3.new(0.8,0.8,0.8)
  691. ball2.Transparency=ball2.Transparency+1/31
  692. wait()
  693. end
  694. end))
  695. for i=1, 30 do
  696. ball2.Size=ball2.Size+Vector3.new(0.2,0.2,0.2)
  697. ball2.Transparency=ball2.Transparency+1/29
  698. swait()
  699. end
  700. ball2:Destroy()
  701. end
  702. end)
  703. wait(1/60)
  704. attack = false
  705. end
  706. end
  707. mouse.Button1Down:connect(function()
  708. if attacktype == 1 then
  709. attackone()
  710. elseif attacktype == 2 then
  711. attacktwo()
  712. elseif attacktype == 3 then
  713. attackthree()
  714. elseif attacktype == 4 then
  715. attackfour()
  716. elseif attacktype == 5 then
  717. attackfive()
  718. attacktype = 1
  719. end
  720. end)
  721. function FollowTarget(target,humanoidp)
  722. repeat
  723. humanoid:MoveTo(target.Head.Position)
  724. wait()
  725. until humanoidp.Health == 0
  726. end
  727. activate = function()
  728. local kabox = Instance.new("Part",chara)
  729. kabox.Name = "ka"
  730. kabox.Size = Vector3.new(1, 5, 5)
  731. kabox.CanCollide = false
  732. local kaboxweld=Instance.new("Weld",torso)
  733. kaboxweld.Part0=torso
  734. kaboxweld.Part1=kabox
  735. kaboxweld.C0 = CFrame.new(0, 0, -2)
  736. kabox.Transparency = 1
  737. kabox.Touched:connect(function(hit)
  738. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  739. if attacktype==1 then
  740. attackone()
  741. elseif attacktype==2 then
  742. attacktwo()
  743. elseif attacktype == 3 then
  744. attackthree()
  745. end
  746. end
  747. end)
  748. end
  749.  
  750. function findNearestTorso(pos)
  751. local list = game.Workspace:children()
  752. local torso = nil
  753. local dist = 1000
  754. local temp = nil
  755. local human = nil
  756. local temp2 = nil
  757. for x = 1, #list do
  758. temp2 = list[x]
  759. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  760. temp = temp2:findFirstChild("Torso")
  761. human = temp2:findFirstChild("Humanoid")
  762. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  763. if (temp.Position - pos).magnitude < dist then
  764. torso = temp
  765. dist = (temp.Position - pos).magnitude
  766. end
  767. end
  768. end
  769. end
  770. return torso
  771. end
  772. function deactivate()
  773. if chara:FindFirstChild("ka") then
  774. chara.ka:Destroy()
  775. else
  776. wait()
  777. end
  778. end
  779. followmode = false
  780. mouse.KeyDown:connect(function(k)
  781. k = k:lower()
  782.  
  783. if k=="v" then
  784. if killaura == false then
  785. killaura = true
  786. activate()
  787. else
  788. killaura = false
  789. deactivate()
  790. end
  791. end
  792.  
  793. if k=="f" then
  794. if mouse.Target.Parent:FindFirstChildOfClass("Humanoid")~=nil then
  795. FollowTarget(mouse.Target.Parent,mouse.Target.Parent:FindFirstChildOfClass("Humanoid"))
  796. end
  797. end
  798.  
  799. if k=="q" then
  800. if followmode == false then
  801. followmode = true
  802. coroutine.wrap(function()
  803. repeat
  804. wait(0.5)
  805. local target = findNearestTorso(script.Parent.Torso.Position)
  806. if target ~= nil then
  807. script.Parent.Humanoid:MoveTo(target.Position, target)
  808. end
  809. until followmode == false
  810. end)()
  811. else
  812. followmode = false
  813. end
  814. end
  815.  
  816. if k=="e" then
  817. EnergyExplosion()
  818. end
  819.  
  820. if k=="c" then
  821. Hide()
  822. end
  823. end)
  824. NoClipCons = {}
  825. if #NoClipCons == 0 then
  826. local con = game:service("RunService").Stepped:connect(function()
  827. pcall(function() torso.CanCollide = false end)
  828. pcall(function() chara.Head.CanCollide = false end)
  829. end)
  830. table.insert(NoClipCons, con)
  831. else
  832. for i, v in pairs(NoClipCons) do
  833. v:disconnect()
  834. table.remove(NoClipCons, i)
  835. end
  836. end
  837. while true do
  838. swait()
  839. humanoid.Health = math.huge
  840. sine = sine + change
  841. local torvel=(rootpart.Velocity*Vector3.new(1,0,1)).magnitude
  842. hitfloor,posfloor=rayCast(rootpart.Position,(CFrame.new(rootpart.Position,rootpart.Position - Vector3.new(0,1,0))).lookVector,4,chara)
  843. if torvel<1 and hitfloor~=nil and attack==false then
  844. anim="idle"
  845. rw.C0 = clerp(rw.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(0,0,0),0.03)
  846. lw.C0 = clerp(lw.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(0,0,0),.03)
  847. rootjoint.C0 = clerp(rootjoint.C0, rootcf*CFrame.new(0, 0, 0),0.3)
  848. neck.C0 = clerp(neck.C0, necko*CFrame.Angles(0,0,0),0.03)
  849. rh.C0=clerp(rh.C0,r0*CFrame.Angles(0,0,0),0.03)
  850. lh.C0=clerp(lh.C0,l0*CFrame.Angles(0,0,0),0.03)
  851. elseif torvel>1 and hitfloor~=nil and attack==false then
  852. rootjoint.C0 = clerp(rootjoint.C0, rootcf*CFrame.Angles(0.4, 0, 0)*CFrame.new(0,0,0),0.3)
  853. rw.C0=clerp(rw.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(40),0,math.rad(20)),0.03)
  854. lw.C0=clerp(lw.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-10)),0.03)
  855. neck.C0=clerp(neck.C0,necko*CFrame.Angles(-0.4,0,0),0.3)
  856. rh.C0=clerp(rh.C0,r0*CFrame.Angles(0,0,(math.rad(50)*math.cos(sine/5))),0.3)
  857. lh.C0=clerp(lh.C0,l0*CFrame.Angles(0,0,(math.rad(50)*math.cos(sine/5))),0.3)
  858. end
  859. end
Add Comment
Please, Sign In to add comment