Advertisement
Dark_EccentricYT

Untitled

Jun 7th, 2018
2,395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.08 KB | None | 0 0
  1. -- Dirk
  2.  
  3. Player = game.Players.LocalPlayer
  4. Character = Player.Character
  5. Humanoid = Character.Humanoid
  6. HumanoidRoot = Humanoid.Torso
  7. RootJoint = HumanoidRoot.RootJoint
  8. Mouse = Player:GetMouse()
  9.  
  10. function rwait()
  11. game:service("RunService").RenderStepped:wait()
  12. end
  13.  
  14. function Weld(Part1,Part0,CFrame0,CFrame1,skippos)
  15. if not skippos then
  16. Part1.Position = Part0.Position
  17. end
  18. local we = Instance.new("Weld",Part1)
  19. we.Part1 = Part1
  20. we.Part0 = Part0
  21. we.C0 = CFrame0 or CFrame.new()
  22. we.C1 = CFrame1 or CFrame.new()
  23. Instance.new("BoolValue",we).Name = "Cancel"
  24. local c0o = Instance.new("CFrameValue",we)
  25. c0o.Name = "c0o"
  26. c0o.Value = we.C0
  27. local c1o = Instance.new("CFrameValue",we)
  28. c1o.Name = "c1o"
  29. c1o.Value = we.C1
  30. return we
  31. end
  32.  
  33. function Co(fun) Delay(0,fun) end
  34.  
  35. function CheckI(Item,Blacklist,Specific)
  36. for _,v in pairs(Item:children()) do
  37. if not Specific then
  38. if v:IsA(Blacklist) or v.Name:match(Blacklist) then
  39. v:Destroy()
  40. end
  41. else
  42. if v:IsA(Blacklist) or v.Name == Blacklist then
  43. v:Destroy()
  44. end
  45. end
  46. end
  47. end
  48.  
  49. function Tween(weld, c0, c1, dur, canc)
  50. Co(function()
  51. if not weld:FindFirstChild("Cancel") then
  52. Instance.new("BoolValue",weld).Name = "Cancel"
  53. end
  54. if canc then
  55. weld.Cancel.Value = true
  56. rwait()
  57. weld.Cancel.Value = false
  58. end
  59. local c0sp,c0sa,c0p,c0a,c1sp,c1sa,c1p,c1a
  60. if c0 then
  61. c0sp = weld.C0.p
  62. c0sa = Vector3.new(weld.C0:toEulerAnglesXYZ())
  63. c0p = c0.p - c0sp
  64. c0a = Vector3.new(c0:toEulerAnglesXYZ()) - c0sa
  65. end
  66. if c1 then
  67. c1sp = weld.C1.p
  68. c1sa = Vector3.new(weld.C1:toEulerAnglesXYZ())
  69. c1p = c1.p - c1sp
  70. c1a = Vector3.new(c1:toEulerAnglesXYZ()) - c1sa
  71. end
  72.  
  73. for ni = 0, 1, (1/60)/dur do
  74. if not weld.Cancel.Value then
  75. if c0 then
  76. weld.C0 = CFrame.new(c0sp.x + (c0p.x*ni), c0sp.y + (c0p.y*ni), c0sp.z + (c0p.z*ni)) * CFrame.Angles(c0sa.x + (c0a.x*ni), c0sa.y + (c0a.y*ni), c0sa.z + (c0a.z*ni))
  77. end
  78. if c1 then
  79. weld.C1 = CFrame.new(c1sp.x + (c1p.x*ni), c1sp.y + (c1p.y*ni), c1sp.z + (c1p.z*ni)) * CFrame.Angles(c1sa.x + (c1a.x*ni), c1sa.y + (c1a.y*ni), c1sa.z + (c1a.z*ni))
  80. end
  81. rwait()
  82. else
  83. return
  84. end
  85. end
  86. if c0 ~= nil then weld.C0 = c0 end
  87. if c1 ~= nil then weld.C1 = c1 end
  88. end)
  89. end
  90.  
  91. function Part(Parent)
  92. local part = Instance.new("Part",Parent)
  93. part.Material = "Neon"
  94. part.formFactor = 3
  95. part.Size = Vector3.new()
  96. part.TopSurface = 10
  97. part.BottomSurface = 10
  98. part.RightSurface = 10
  99. part.LeftSurface = 10
  100. part.FrontSurface = 10
  101. part.BackSurface = 10
  102. part.CanCollide = false
  103. return part
  104. end
  105.  
  106. function Sound(Parent,SoundId,Pitch,Volume)
  107. local so = Instance.new("Sound",Parent)
  108. so.SoundId = "rbxassetid://"..tostring(SoundId)
  109. so.Pitch = Pitch or 1
  110. so.Volume = Volume or 1
  111. so:Play()
  112. Co(function()
  113. repeat rwait() until not so.IsPlaying
  114. so:Destroy()
  115. end)
  116. end
  117.  
  118. --CheckI(Character,"Clothing")
  119. --CheckI(Character.Head,"Decal")
  120. --CheckI(Character,"Hat")
  121. CheckI(Character,"Dirk")
  122. --CheckI(Character,"ShirtGraphic")
  123. --CheckI(Character.Torso,"Decal")
  124. CheckI(Player.Backpack,"Katana")
  125.  
  126. OLeftS = Character.Torso["Left Shoulder"]
  127. ORightS = Character.Torso["Right Shoulder"]
  128. local LeftS
  129. local RightS
  130.  
  131. OLeftH = Character.Torso["Left Hip"]
  132. ORightH = Character.Torso["Right Hip"]
  133. local LeftH
  134. local RightH
  135.  
  136. local Neck = Character.Torso.Neck
  137. Neck.C0 = CFrame.new(0,1.45,0)
  138. Neck.C1 = CFrame.new(0,-0.05,0)
  139.  
  140. local LSC0 = OLeftS.C0
  141. local LSC1 = OLeftS.C1
  142. local RSC0 = ORightS.C0
  143. local RSC1 = ORightS.C1
  144.  
  145. function Arms(on)
  146. if on then
  147. OLeftS.Part1 = nil
  148. ORightS.Part1 = nil
  149. LeftS = Weld(Character["Left Arm"],Character.Torso,OLeftS.C0,OLeftS.C1,true)
  150. RightS = Weld(Character["Right Arm"],Character.Torso,ORightS.C0,ORightS.C1,true)
  151. else
  152. RightS:Destroy()
  153. RightS = nil
  154. LeftS:Destroy()
  155. LeftS = nil
  156. OLeftS.Part1 = Character["Left Arm"]
  157. ORightS.Part1 = Character["Right Arm"]
  158. end
  159. end
  160.  
  161. local LHC0 = OLeftH.C0
  162. local LHC1 = OLeftH.C1
  163. local RHC0 = ORightH.C0
  164. local RHC1 = ORightH.C1
  165.  
  166. function Legs(on)
  167. if on then
  168. OLeftH.Part1 = nil
  169. ORightH.Part1 = nil
  170. LeftH = Weld(Character["Left Leg"],Character.Torso,OLeftH.C0,OLeftH.C1,true)
  171. RightH = Weld(Character["Right Leg"],Character.Torso,ORightH.C0,ORightH.C1,true)
  172. else
  173. RightH:Destroy()
  174. RightH = nil
  175. LeftH:Destroy()
  176. LeftH = nil
  177. OLeftH.Part1 = Character["Left Leg"]
  178. ORightH.Part1 = Character["Right Leg"]
  179. end
  180. end
  181.  
  182. local Block = Instance.new("IntValue",Character)
  183. Block.Name = "Block"
  184. Block.Value = 0
  185.  
  186. local KatanaHop = Instance.new("HopperBin",Player.Backpack)
  187. KatanaHop.Name = "Katana"
  188.  
  189. local Model = Instance.new("Model",Character)
  190. Model.Name = "Dirk"
  191.  
  192. --[[local Shirt = Instance.new("Shirt",Character)
  193. Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=73681617"
  194.  
  195. local Pants = Instance.new("Pants",Character)
  196. Pants.PantsTemplate = "http://www.roblox.com/asset/?id=73681639"
  197.  
  198. local Face = Instance.new("Decal",Character.Head)
  199. Face.Texture = "http://www.roblox.com/asset/?id=13038247"
  200.  
  201. for i = 1,6 do
  202. local Hair = Part(Model)
  203. local HairMesh = Instance.new("SpecialMesh",Hair)
  204. HairMesh.MeshId = "http://www.roblox.com/asset/?id=12212520"
  205. Hair.BrickColor = BrickColor.new("Cool yellow")
  206. HairMesh.Scale = Vector3.new(1,1.5,1)
  207. Weld(Hair,Character.Head,CFrame.new((i-4)*0.015,0.5,0.25),CFrame.Angles(math.rad(-10*i),math.rad((i-4)*10),0))
  208. end
  209.  
  210. local Hair = Part(Model)
  211. Hair.BrickColor = BrickColor.new("Cool yellow")
  212. local HairMesh = Instance.new("SpecialMesh",Hair)
  213. HairMesh.MeshId = "http://www.roblox.com/asset/?id=15730710"
  214. HairMesh.Scale = Vector3.new(1.05,1,1)
  215. Weld(Hair,Character.Head,CFrame.new(0,0.4,0.01))
  216.  
  217. local ShadeCenter = Part(Model)
  218. ShadeCenter.Transparency = 1
  219. Weld(ShadeCenter,Character.Head,CFrame.new(0,0.3,-0.65))
  220. for i = -1,1,2 do
  221. local Shade1 = Part(Model)
  222. Shade1.Reflectance = 0.2
  223. Shade1.BrickColor = BrickColor.new("Really black")
  224. Shade1Mesh = Instance.new("SpecialMesh",Shade1)
  225. Shade1Mesh.MeshType = "Wedge"
  226. Shade1Mesh.Scale = Vector3.new(0.075,2,2.8)
  227. Weld(Shade1,ShadeCenter,CFrame.new(i*0.3,0,0),CFrame.Angles(math.rad(-45),math.rad(90*i),0))
  228. end--]]--
  229.  
  230. function create(tab)
  231. local obj = Instance.new(tab[1])
  232. for i, v in pairs(tab) do
  233. if i ~= 1 then
  234. obj[i] = v
  235. end
  236. end
  237. return obj
  238. end
  239.  
  240. function drawTriangle(p)
  241. local g, v = 0
  242. for s = 1, 3 do
  243. local l = (p[1+(s+1)%3]-p[1+s%3]).magnitude
  244. g, v = l > g and l or g, l > g and {p[1+(s-1)%3],p[1+(s)%3],p[1+(s+1)%3]} or v
  245. end
  246. local d = v[2] + (v[3] - v[2]).unit * ( (v[3] - v[2]).unit:Dot(v[1]-v[2]))
  247. local c,b = (d - v[1]).unit,(v[2]-v[3]).unit
  248. local a = b:Cross(c)
  249.  
  250. local p1 = create{"WedgePart", Transparency = 0.8, FormFactor = "Custom", Size = Vector3.new(0.2, 0.2, 0.2), CanCollide = false, Anchored = true, BrickColor = BrickColor.White()}
  251. local p2 = create{"WedgePart", Transparency = 0.8, FormFactor = "Custom", Size = Vector3.new(0.2, 0.2, 0.2), CanCollide = false, Anchored = true, BrickColor = BrickColor.White()}
  252. local m1 = create{"SpecialMesh", Parent = p1, MeshType = "Wedge", Scale = Vector3.new(0, (v[2]-d).magnitude, (v[1]-d).magnitude)/0.2}
  253. local m2 = create{"SpecialMesh", Parent = p2, MeshType = "Wedge", Scale = Vector3.new(0, (v[3]-d).magnitude, (v[1]-d).magnitude)/0.2}
  254.  
  255. p1.CFrame = CFrame.new(0,0,0,a.x,b.x,c.x,a.y,b.y,c.y,a.z,b.z,c.z)+(v[1]+v[2])/2
  256. p2.CFrame = CFrame.new(0,0,0,-a.x,-b.x,c.x,-a.y,-b.y,c.y,-a.z,-b.z,c.z)+(v[1]+v[3])/2
  257.  
  258. p1.Parent = script
  259. p2.Parent = script
  260.  
  261. return p1, p2, m1, m2
  262. end
  263.  
  264. local currentDamage = 20
  265.  
  266. function HitCounter(pos,dmg)
  267. local hitmo = Instance.new("Model")
  268. hitmo.Name = dmg
  269. local hc = Part(hitmo)
  270. hc.Name = "Head"
  271. hc.Size = Vector3.new(0.5,0.2,0.5)
  272. hc.BrickColor = BrickColor.Red()
  273. Instance.new("Humanoid",hitmo).MaxHealth = 0
  274. Co(function()
  275. for i = 0,1.5,0.05 do
  276. hc.CFrame = CFrame.new(pos)*CFrame.new(0,i,0)*CFrame.Angles(0,i,0)
  277. rwait()
  278. end
  279. hitmo:Destroy()
  280. end)
  281. hitmo.Parent = workspace
  282. game:service("Debris"):AddItem(hitmo,3)
  283. end
  284.  
  285. function CreateKatana(part,c0,c1)
  286. KatanaModel = Instance.new("Model",Model)
  287. local KatanaHandle = Part(KatanaModel)
  288. KatanaHandle.Reflectance = 0.1
  289. KatanaHandle.Size = Vector3.new(0.2,1.6,0.25)
  290. KatanaHandle.BrickColor = BrickColor.new("Really black")
  291. local KatanaWeld = Weld(KatanaHandle,part,c0,c1)
  292. for i = -1,1 do
  293. local stud = Part(KatanaModel)
  294. Instance.new("CylinderMesh",stud).Scale = Vector3.new(0.7,1,0.7)
  295. stud.Reflectance = 0.3
  296. stud.Size = Vector3.new(0.2,0.21,0.2)
  297. Weld(stud,KatanaHandle,CFrame.new(0,i*0.5,0),CFrame.Angles(math.rad(90),math.rad(90),0))
  298. end
  299. local KatanaHilt = Part(KatanaModel)
  300. Instance.new("BlockMesh",KatanaHilt).Scale = Vector3.new(1,0.3,1)
  301. KatanaHilt.Size = Vector3.new(0.3,0.2,0.7)
  302. KatanaHilt.Reflectance = 0.1
  303. KatanaHilt.BrickColor = BrickColor.new("Really black")
  304. Weld(KatanaHilt,KatanaHandle,CFrame.new(0,0.8,0))
  305. local KatanaBlade1 = Part(KatanaModel)
  306. KatanaBlade1.Name = "Blade"
  307. KatanaBlade1.BrickColor = BrickColor.White()
  308. KatanaBlade1.Reflectance = 0.3
  309. Instance.new("BlockMesh",KatanaBlade1).Scale = Vector3.new(0.08,1,0.15)
  310. KatanaBlade1.Size = Vector3.new(1,3,1)
  311. Weld(KatanaBlade1,KatanaHilt,CFrame.new(0,1.5,0.025))
  312.  
  313. local hithums = {Character.Humanoid}
  314. KatanaBlade1.Touched:connect(function(hit)
  315. if not damaging then return end
  316. local hum = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
  317. local HitPar = hit.Parent:FindFirstChild("Torso") or hit.Parent.Parent:FindFirstChild("Torso")
  318. local block = hit.Parent:FindFirstChild("Block") or hit.Parent.Parent:FindFirstChild("Block")
  319. if hum then
  320. for _,v in pairs(hithums) do
  321. if v == hum then
  322. return
  323. end
  324. end
  325. table.insert(hithums,hum)
  326. Co(function()
  327. wait(0.2)
  328. for i,v in pairs(hithums) do
  329. if v == hum then
  330. table.remove(hithums,i)
  331. end
  332. end
  333. end)
  334. print("hi ho")
  335. if block then
  336. if block:IsA("BoolValue") then
  337. if block.Value then
  338. block.Value = false
  339. return
  340. end
  341. else
  342. if block.Value > 0 then
  343. block.Value = block.Value - 1
  344. return
  345. end
  346. end
  347. end
  348. local calcdamage = currentDamage+math.random(-3,3)
  349. hum:TakeDamage(calcdamage)
  350. HitCounter(HitPar.Position+Vector3.new(0,4,0),calcdamage)
  351. end
  352. end)
  353.  
  354. local KatanaEdge1 = Part(KatanaModel)
  355. KatanaEdge1.Size = Vector3.new(0.2,3,0.2)
  356. local katedgemesh = Instance.new("SpecialMesh",KatanaEdge1)
  357. katedgemesh.MeshType = "Wedge"
  358. katedgemesh.Scale = Vector3.new(0.4,1,0.25)
  359. KatanaEdge1.BrickColor = BrickColor.White()
  360. KatanaEdge1.Reflectance = 0.3
  361. Weld(KatanaEdge1,KatanaBlade1,CFrame.new(0,0,-0.1))
  362. local KatanaEdge2 = Part(KatanaModel)
  363. KatanaEdge2.BrickColor = BrickColor.White()
  364. KatanaEdge2.Reflectance = 0.3
  365. KatanaEdge2.Size = Vector3.new(0.2,0.6,0.2)
  366. local katedgemesh = Instance.new("SpecialMesh",KatanaEdge2)
  367. katedgemesh.MeshType = "Wedge"
  368. katedgemesh.Scale = Vector3.new(0.4,1,0.75)
  369. Weld(KatanaEdge2,KatanaBlade1,CFrame.new(0,1.8,0))
  370. return KatanaWeld
  371. end
  372.  
  373. local equipped = false
  374. KatanaHop.Selected:connect(function()
  375. equipped = true
  376. Arms(true)
  377. Tween(RightS,RSC0*CFrame.new(0,0.1,-0.9),RSC1*CFrame.Angles(math.rad(-50),0,math.rad(-45)),0.2,true)
  378. Tween(LeftS,LSC0,LSC1*CFrame.Angles(math.rad(10),0,math.rad(-20)),0.2,true)
  379. wait(0.25)
  380. if equipped then
  381. KatanaModel:Destroy()
  382. KatWeld = CreateKatana(Character["Right Arm"],CFrame.new(0,-1,0.2),CFrame.Angles(math.rad(270),0,0))
  383. Tween(RightS,RSC0*CFrame.new(0,-0.25,0),RSC1*CFrame.Angles(math.rad(-20),math.rad(-45),math.rad(-70)),0.2,true)
  384. Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(20),0,math.rad(20)),0.2,true)
  385. Tween(KatWeld,nil,CFrame.Angles(math.rad(90),0,0),0.2,true)
  386. Tween(RootJoint,CFrame.new(),CFrame.new(),0.2,true)
  387. Tween(Neck,nil,CFrame.new(0,-0.05,0),0.2,true)
  388. Co(function()
  389. for i = 285,90,-15 do
  390. if not equipped then
  391. break
  392. end
  393. KatWeld.C1 = CFrame.Angles(math.rad(i),0,0)
  394. rwait()
  395. end
  396. end)
  397. end
  398. end)
  399.  
  400. RootJoint.C0 = CFrame.new()
  401. RootJoint.C1 = CFrame.new()
  402.  
  403. local alternate = 0
  404. local attacking = false
  405. Mouse.Button1Down:connect(function()
  406. if equipped and not attacking then
  407. attacking = true
  408. currentDamage = 20
  409. if alternate == 0 then
  410. alternate = 1
  411. Tween(RightS,RSC0*CFrame.new(0,-0.5,-0.2)*CFrame.Angles(math.rad(-70),0,math.rad(20)),RSC1*CFrame.new(0,0.4,0),0.2,true)
  412. Tween(LeftS,LSC0*CFrame.new(0,-0.1,0),LSC1*CFrame.Angles(math.rad(20),0,math.rad(-30)),0.2,true)
  413. Tween(KatWeld,nil,CFrame.Angles(math.rad(150),math.rad(180),0),0.2,true)
  414. Tween(RootJoint,CFrame.Angles(0,math.rad(-70),0),CFrame.new(),0.2,true)
  415. Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(0,math.rad(-60),0),0.2,true)
  416. wait(0.3)
  417. Sound(KatanaModel.Blade,45885030,1,1)
  418. damaging = true
  419. Tween(RightS,RSC0*CFrame.new(0,-0.5,-0.2)*CFrame.Angles(math.rad(-90),0,math.rad(0)),RSC1*CFrame.new(0,0.4,0),0.2,true)
  420. Tween(LeftS,LSC0*CFrame.new(0,-0.1,0),LSC1*CFrame.Angles(math.rad(20),0,math.rad(-30)),0.2,true)
  421. Tween(KatWeld,nil,CFrame.Angles(math.rad(230),math.rad(180),0),0.2,true)
  422. Tween(RootJoint,CFrame.Angles(0,math.rad(80),0),CFrame.Angles(0,math.rad(-45),0),0.2,true)
  423. Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(0,math.rad(70),0),0.2,true)
  424. wait(0.3)
  425. damaging = false
  426. Tween(RightS,RSC0*CFrame.new(0,-0.25,0),RSC1*CFrame.Angles(math.rad(-20),math.rad(-45),math.rad(-70)),0.2,true)
  427. Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(20),0,math.rad(20)),0.2,true)
  428. Tween(KatWeld,nil,CFrame.Angles(math.rad(90),0,0),0.2,true)
  429. Tween(RootJoint,CFrame.new(),CFrame.new(),0.2,true)
  430. Tween(Neck,nil,CFrame.new(0,-0.05,0),0.2,true)
  431. wait(0.2)
  432. else
  433. alternate = 0
  434. Tween(RightS,RSC0*CFrame.new(0,-0.5,-0.2)*CFrame.Angles(math.rad(-70),0,math.rad(20)),RSC1*CFrame.new(0,0.4,0),0.2,true)
  435. Tween(LeftS,LSC0*CFrame.new(0,-0.1,0),LSC1*CFrame.Angles(math.rad(20),0,math.rad(-30)),0.2,true)
  436. Tween(KatWeld,nil,CFrame.Angles(math.rad(-150),0,0),0.2,true)
  437. Tween(RootJoint,CFrame.Angles(0,math.rad(80),0),CFrame.Angles(0,math.rad(-65),0),0.2,true)
  438. Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(0,math.rad(60),0),0.2,true)
  439. wait(0.3)
  440. Sound(KatanaModel.Blade,45885030,1,1)
  441. damaging = true
  442. Tween(RightS,RSC0*CFrame.new(0,-0.5,-0.2)*CFrame.Angles(math.rad(-90),0,math.rad(0)),RSC1*CFrame.new(0,0.4,0),0.2,true)
  443. Tween(LeftS,LSC0*CFrame.new(0,-0.1,0),LSC1*CFrame.Angles(math.rad(20),0,math.rad(-30)),0.2,true)
  444. Tween(KatWeld,nil,CFrame.Angles(math.rad(-150),0,0),0.2,true)
  445. Tween(RootJoint,CFrame.Angles(0,math.rad(-80),0),CFrame.Angles(0,0,0),0.2,true)
  446. Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(0,math.rad(-70),0),0.2,true)
  447. wait(0.3)
  448. damaging = false
  449. Tween(RightS,RSC0*CFrame.new(0,-0.25,0),RSC1*CFrame.Angles(math.rad(-20),math.rad(-45),math.rad(-70)),0.2,true)
  450. Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(20),0,math.rad(20)),0.2,true)
  451. Tween(KatWeld,nil,CFrame.Angles(math.rad(90),0,0),0.2,true)
  452. Tween(RootJoint,CFrame.new(),CFrame.new(),0.2,true)
  453. Tween(Neck,nil,CFrame.new(0,-0.05,0),0.2,true)
  454. wait(0.2)
  455. end
  456. attacking = false
  457. end
  458. end)
  459.  
  460.  
  461. local fdown = false
  462. Mouse.KeyDown:connect(function(key)
  463. if key == "q" then
  464. local lastpos = Character.Torso.CFrame
  465. Character.Archivable = true
  466. local charclone = Character:clone()
  467. Character.Archivable = false
  468. charclone.Torso.CFrame = lastpos
  469. charclone.Parent = workspace
  470. for _,v in pairs(charclone:children()) do
  471. if v:IsA("Part") then
  472. if v.Name == "Head" then v.Name="" v:Destroy() end
  473. if v.Name == "HumanoidRootPart" then v:Destroy() end
  474. v.Anchored = true
  475. v.CanCollide = false
  476. Co(function()
  477. local trans = v.Transparency
  478. for i = 0,1.1,0.1 do
  479. v.Transparency = i
  480. wait()
  481. end
  482. charclone:Destroy()
  483. end)
  484. elseif v:IsA("Model") then
  485. for _,v in pairs(v:children()) do
  486. if v:IsA("Part") then
  487. Co(function()
  488. local trans = v.Transparency
  489. for i = trans,1.1,0.1 do
  490. v.Transparency = i
  491. wait()
  492. end
  493. end)
  494. else
  495. v:Destroy()
  496. end
  497. end
  498. end
  499. end
  500. local x,y,z = CFrame.new(HumanoidRoot.Position,Mouse.Hit.p):toEulerAnglesXYZ()
  501. local dir = CFrame.Angles(x,y,z).lookVector
  502. Character.Torso.CFrame = Character.Torso.CFrame+Vector3.new(dir.x*10,0,dir.z*10)
  503. elseif key == "e" then
  504. if attacking then return end
  505. if not equipped then return end
  506. currentDamage = 30
  507. attacking = true
  508. Legs(true)
  509. Humanoid.WalkSpeed = 0
  510. Tween(RightH,RHC0*CFrame.new(0,0,0),RHC1,0.2,true)
  511. Tween(LeftH,LHC0*CFrame.new(-0.4,0.4,0),LHC1*CFrame.Angles(math.rad(-3),0,math.rad(-20)),0.2,true)
  512. Tween(RightS,RSC0*CFrame.new(0,-0.1,-0.2),RSC1*CFrame.Angles(math.rad(30),0,math.rad(-50)),0.2,true)
  513. Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(30),0,math.rad(50)),0.2,true)
  514. Tween(KatWeld,nil,CFrame.Angles(math.rad(170),0,0),0.2,true)
  515. Tween(RootJoint,CFrame.new(0,5,0),CFrame.new(),0.2,true)
  516. Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(math.rad(15),0,0),0.2,true)
  517. Sound(KatanaModel.Blade,158475221,1,1)
  518. wait(0.2)
  519. Co(function()
  520. for i = 0,359,15 do
  521. RootJoint.C1 = CFrame.Angles(math.rad(i),0,0)
  522. rwait()
  523. end
  524. RootJoint.C1 = CFrame.new()
  525. end)
  526. Tween(RightH,RHC0*CFrame.new(0.5,0.7,0),RHC1*CFrame.Angles(math.rad(-3),0,math.rad(20)),0.2,true)
  527. Tween(LeftH,LHC0*CFrame.new(-0.5,0.7,0),LHC1*CFrame.Angles(math.rad(-3),0,math.rad(-20)),0.2,true)
  528. Tween(RightS,RSC0*CFrame.new(0,-0.1,-0.2),RSC1*CFrame.Angles(math.rad(-45),0,math.rad(-50)),0.2,true)
  529. Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(-45),0,math.rad(50)),0.2,true)
  530. Tween(KatWeld,nil,CFrame.Angles(math.rad(170),0,math.rad(-45)),0.2,true)
  531. Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(math.rad(15),0,0),0.2,true)
  532. wait(0.1)
  533. damaging = true
  534. wait(0.1)
  535. Tween(RootJoint,CFrame.new(),nil,0.2,true)
  536. wait(0.2)
  537. Tween(RightH,RHC0*CFrame.new(0,0,0),RHC1,0.1,true)
  538. Tween(LeftH,LHC0*CFrame.new(0,0,0),LHC1,0.1,true)
  539. Tween(RightS,RSC0*CFrame.new(0,-0.25,0),RSC1*CFrame.Angles(math.rad(-20),math.rad(-45),math.rad(-70)),0.2,true)
  540. Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(20),0,math.rad(20)),0.2,true)
  541. Tween(KatWeld,nil,CFrame.Angles(math.rad(90),0,0),0.2,true)
  542. Tween(RootJoint,CFrame.new(),CFrame.new(),0.2,true)
  543. Tween(Neck,nil,CFrame.new(0,-0.05,0),0.2,true)
  544. Humanoid.WalkSpeed = 16
  545. wait(0.1)
  546. damaging = false
  547. wait(0.1)
  548. attacking = false
  549. Legs(false)
  550. end
  551. end)
  552.  
  553. Mouse.KeyUp:connect(function(key)
  554. end)
  555. KatanaHop.Deselected:connect(function()
  556. if KatanaHop.Parent == nil then return end
  557. equipped = false
  558. Tween(RightS,RSC0*CFrame.new(-0.2,0.1,-1.2),RSC1*CFrame.Angles(math.rad(-50),0,math.rad(-45)),0.2,true)
  559. Tween(LeftS,LSC0,LSC1*CFrame.Angles(math.rad(10),0,math.rad(-20)),0.2,true)
  560. wait(0.05)
  561. for i = 90,285,15 do
  562. if equipped then
  563. break
  564. end
  565. KatWeld.C1 = CFrame.Angles(math.rad(i),0,math.rad(-50))
  566. rwait()
  567. end
  568. if equipped then return end
  569. KatanaModel:Destroy()
  570. KatWeld = CreateKatana(Character.Torso,CFrame.new(-1,-0.5,-0.5),CFrame.Angles(math.rad(-125),0,0))
  571. Tween(LeftS,LSC0,LSC1,0.2,true)
  572. Tween(RightS,RSC0,RSC1,0.2,true)
  573. wait(0.25)
  574. if equipped then return end
  575. Arms(false)
  576. end)
  577.  
  578. KatWeld = CreateKatana(Character.Torso,CFrame.new(-1,-0.5,-0.5),CFrame.Angles(math.rad(-125),0,0))
  579.  
  580. local oldpos = KatanaModel.Blade.CFrame
  581. game:service("RunService").RenderStepped:connect(function()
  582. local newpos = KatanaModel.Blade.CFrame
  583. if KatanaModel and damaging then
  584. local tri1,tri2 = drawTriangle({oldpos*CFrame.new(0,2.1,0.1).p,newpos*CFrame.new(0,2.1,0.1).p,newpos*CFrame.new(0,-1.5,0.1).p})
  585. local tri3,tri4 = drawTriangle({oldpos*CFrame.new(0,2.1,0.1).p,oldpos*CFrame.new(0,-1.5,0.1).p,newpos*CFrame.new(0,-1.5,0.1).p})
  586. Co(function()
  587. for i = 0.8,1,0.02 do
  588. tri1.Transparency = i
  589. tri2.Transparency = i
  590. tri3.Transparency = i
  591. tri4.Transparency = i
  592. wait(0.02)
  593. end
  594. tri1:Destroy()
  595. tri2:Destroy()
  596. tri3:Destroy()
  597. tri4:Destroy()
  598. end)
  599. end
  600. oldpos = newpos
  601. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement