Advertisement
DustyThomas

Chara Knife [Alternate V2]

Jun 30th, 2017
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.96 KB | None | 0 0
  1. wait(0.016666666666667)
  2. Anim = nil
  3. cf = CFrame.new
  4. function c3(cz, cx, cc)
  5. return Color3.new(cz / 255, cx / 255, cc / 255)
  6. end
  7. angles = CFrame.Angles
  8. Player = game.Players.LocalPlayer
  9. Character = Player.Character
  10. Humanoid = Character.Humanoid
  11. mouse = Player:GetMouse()
  12. local LeftArm = Character["Left Arm"]
  13. RightArm = Character["Right Arm"]
  14. LeftLeg = Character["Left Leg"]
  15. RightLeg = Character["Right Leg"]
  16. Head = Character.Head
  17. Torso = Character.Torso
  18. RootPart = Character.HumanoidRootPart
  19. RootJoint = RootPart.RootJoint
  20. Humanoid.Animator:Destroy()
  21. Character:WaitForChild("Animate"):Destroy()
  22. NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  23. RootCF = angles(-1.57, 0, 3.14)
  24. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  25. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  26. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  27. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  28. RW = Instance.new("Weld")
  29. LW = Instance.new("Weld")
  30. RH = Torso["Right Hip"]
  31. LH = Torso["Left Hip"]
  32. Neck = Torso.Neck
  33. RSH = Torso["Right Shoulder"]
  34. LSH = Torso["Left Shoulder"]
  35. RSH.Parent = nil
  36. LSH.Parent = nil
  37. RW.Name = "Right Shoulder"
  38. RW.Part0 = Torso
  39. RW.C0 = cf(1.5, 0.5, 0)
  40. RW.C1 = cf(0, 0.5, 0)
  41. RW.Part1 = RightArm
  42. RW.Parent = Torso
  43. LW.Name = "Left Shoulder"
  44. LW.Part0 = Torso
  45. LW.C0 = cf(-1.5, 0.5, 0)
  46. LW.C1 = cf(0, 0.5, 0)
  47. LW.Part1 = LeftArm
  48. LW.Parent = Torso
  49. Effects = Instance.new("Folder", Character)
  50. Effects.Name = "Effects"
  51. Humanoid.WalkSpeed = 25
  52. partEffects, AttackHas, AttackNeeded, AttackCan = {}, {}, {}, {}
  53. AttackHas[1], AttackHas[2], AttackHas[3], AttackHas[4] = 1, 1, 1, 1
  54. AttackNeeded[1], AttackNeeded[2], AttackNeeded[3], AttackNeeded[4] = 1, 1, 1, 1
  55. AttackCan[1], AttackCan[2], AttackCan[3], AttackCan[4] = true, true, true, true
  56. sine = 0
  57. attackcounter = 1
  58. energyslashcounter = 1
  59. torvel = nil
  60. attacking = false
  61. hitfloor, posfloor = nil, nil
  62. tool = nil
  63. if script.Parent.ClassName == "HopperBin" then
  64. tool = script.Parent
  65. tool.Parent = Player.Backpack
  66. else
  67. tool = Instance.new("HopperBin", Player.Backpack)
  68. tool.Name = "Toy Knife"
  69. end
  70. hitbox = Instance.new("Part")
  71. hitbox.BrickColor = BrickColor.Black()
  72. hitbox.Transparency = 1
  73. hitbox.CanCollide = false
  74. hitbox.Anchored = false
  75. hitbox.Size = Vector3.new(3, 3, 4)
  76. meshes = {
  77. 3270017,
  78. 20329976,
  79. 448386996,
  80. 1095708,
  81. 1033714,
  82. 9756362
  83. }
  84. sounds = {
  85. {
  86. 437475935,
  87. 437475935,
  88. 437475935,
  89. 437475935,
  90. 437475935,
  91. 437475935,
  92. 437475935,
  93. 437475935
  94. },
  95. {
  96. 234365549,
  97. 234365573,
  98. 231917961,
  99. 231917950,
  100. 231917856,
  101. 231917863,
  102. 231917871
  103. },
  104. {
  105. 262562442,
  106. 231917806,
  107. 231917784
  108. },
  109. {
  110. 262562442,
  111. 233856048,
  112. 306247739
  113. }
  114. }
  115. ArtificialHB = Instance.new("BindableEvent", script)
  116. ArtificialHB.Name = "Heartbeat"
  117. script:WaitForChild("Heartbeat")
  118. frame = 0.025
  119. tf = 0
  120. allowframeloss = true
  121. tossremainder = false
  122. lastframe = tick()
  123. script.Heartbeat:Fire()
  124. game:GetService("RunService").Heartbeat:connect(function(s, p)
  125. tf = tf + s
  126. if tf >= frame then
  127. if allowframeloss then
  128. script.Heartbeat:Fire()
  129. lastframe = tick()
  130. else
  131. for i = 1, math.floor(tf / frame) do
  132. script.Heartbeat:Fire()
  133. end
  134. lastframe = tick()
  135. end
  136. if tossremainder then
  137. tf = 0
  138. else
  139. tf = tf - frame * math.floor(tf / frame)
  140. end
  141. end
  142. end)
  143. function swait(num)
  144. if num == 0 or num == nil then
  145. ArtificialHB.Event:wait()
  146. else
  147. for i = 0, num do
  148. ArtificialHB.Event:wait()
  149. end
  150. end
  151. end
  152. function thread(f)
  153. coroutine.resume(coroutine.create(f))
  154. end
  155. function clerp(a, b, t)
  156. local qa = {
  157. QuaternionFromCFrame(a)
  158. }
  159. local qb = {
  160. QuaternionFromCFrame(b)
  161. }
  162. local ax, ay, az = a.x, a.y, a.z
  163. local bx, by, bz = b.x, b.y, b.z
  164. local _t = 1 - t
  165. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  166. end
  167. function QuaternionFromCFrame(cf)
  168. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  169. local trace = m00 + m11 + m22
  170. if trace > 0 then
  171. local s = math.sqrt(1 + trace)
  172. local recip = 0.5 / s
  173. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  174. else
  175. local i = 0
  176. if m00 < m11 then
  177. i = 1
  178. end
  179. if m22 > (i == 0 and m00 or m11) then
  180. i = 2
  181. end
  182. if i == 0 then
  183. local s = math.sqrt(m00 - m11 - m22 + 1)
  184. local recip = 0.5 / s
  185. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  186. elseif i == 1 then
  187. local s = math.sqrt(m11 - m22 - m00 + 1)
  188. local recip = 0.5 / s
  189. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  190. elseif i == 2 then
  191. local s = math.sqrt(m22 - m00 - m11 + 1)
  192. local recip = 0.5 / s
  193. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  194. end
  195. end
  196. end
  197. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  198. local xs, ys, zs = x + x, y + y, z + z
  199. local wx, wy, wz = w * xs, w * ys, w * zs
  200. local xx = x * xs
  201. local xy = x * ys
  202. local xz = x * zs
  203. local yy = y * ys
  204. local yz = y * zs
  205. local zz = z * zs
  206. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  207. end
  208. function QuaternionSlerp(a, b, t)
  209. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  210. local startInterp, finishInterp
  211. if cosTheta >= 1.0E-4 then
  212. if 1 - cosTheta > 1.0E-4 then
  213. local theta = math.acos(cosTheta)
  214. local invSinTheta = 1 / math.sin(theta)
  215. startInterp = math.sin((1 - t) * theta) * invSinTheta
  216. finishInterp = math.sin(t * theta) * invSinTheta
  217. else
  218. startInterp = 1 - t
  219. finishInterp = t
  220. end
  221. elseif 1 + cosTheta > 1.0E-4 then
  222. local theta = math.acos(-cosTheta)
  223. local invSinTheta = 1 / math.sin(theta)
  224. startInterp = math.sin((t - 1) * theta) * invSinTheta
  225. finishInterp = math.sin(t * theta) * invSinTheta
  226. else
  227. startInterp = t - 1
  228. finishInterp = t
  229. end
  230. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  231. end
  232. function rayCast(Pos, Dir, Max, Ignore)
  233. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  234. end
  235. function newPart(par, brick, transp, anch, canc, size, name, mat, ref)
  236. local p = Instance.new("Part")
  237. p.BrickColor = brick
  238. p.Transparency = transp
  239. p.Material = mat and mat or "SmoothPlastic"
  240. p.Reflectance = ref and ref or 0
  241. p.Anchored = anch
  242. p.CanCollide = canc
  243. p.Size = size
  244. p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = 10, 10, 10, 10, 10, 10
  245. p.Name = name
  246. p.CFrame = RootPart.CFrame
  247. p.Parent = par
  248. return p
  249. end
  250. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  251. local mesh = Instance.new(Mesh)
  252. mesh.Parent = part
  253. if Mesh == "SpecialMesh" then
  254. mesh.MeshType = meshtype
  255. if meshid then
  256. mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid
  257. end
  258. end
  259. if offset then
  260. mesh.Offset = offset
  261. end
  262. mesh.Scale = scale
  263. return mesh
  264. end
  265. function weld(parent, part0, part1, c0, c1)
  266. local weld = Instance.new("Weld")
  267. weld.Parent = parent
  268. weld.Part0 = part0
  269. weld.Part1 = part1
  270. weld.C0 = c0
  271. if c1 then
  272. weld.C1 = c1
  273. end
  274. return weld
  275. end
  276. function randomangles(r)
  277. local random = math.rad((math.random() - 0.5) * 180)
  278. local randomangles = CFrame.Angles(random, random, random)
  279. if r and r == 0 then
  280. return angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  281. elseif r and r == 1 then
  282. return math.rad((math.random() - 0.5) * 180)
  283. elseif r and r == 2 then
  284. return math.random(-50, 50)
  285. else
  286. return randomangles
  287. end
  288. end
  289. function round(num)
  290. local a, b = math.modf(num)
  291. if num % 1 ~= 0 then
  292. return math.floor(num) + math.floor(b * 10 + 0.5) / 10
  293. else
  294. return math.floor(num)
  295. end
  296. end
  297. function sound(id, par, vol, dur, pit)
  298. coroutine.resume(coroutine.create(function()
  299. local sou = Instance.new("Sound", par or workspace)
  300. sou.Volume = vol
  301. sou.Pitch = pit or 1
  302. sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
  303. swait()
  304. sou:play()
  305. wait(dur)
  306. sou:Destroy()
  307. end))
  308. end
  309. function findCloseHumanoid(centre, distance)
  310. local tab = {}
  311. for _, child in pairs(game.Workspace:GetChildren()) do
  312. if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then
  313. local vtors = child.Torso
  314. local mag = math.abs((vtors.Position - centre).magnitude)
  315. if distance >= mag then
  316. table.insert(tab, child.Humanoid)
  317. end
  318. end
  319. end
  320. return tab
  321. end
  322. function basicDamage(vhum, damage, colour)
  323. if not vhum or not vhum.Parent:findFirstChild("Humanoid") or vhum.Health <= 0 then
  324. return
  325. end
  326. vhum.Health = vhum.Health - damage
  327. local damagepart = Instance.new("Part", Effects)
  328. damagepart.Transparency = 1
  329. damagepart.Anchored = true
  330. damagepart.CanCollide = false
  331. damagepart.Size = Vector3.new(1, 1, 1)
  332. damagepart.Name = "DamagePart"
  333. damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0)
  334. local g = Instance.new("BillboardGui", damagepart)
  335. g.Enabled = true
  336. g.Adornee = damagepart
  337. g.Size = UDim2.new(5, 0, 5, 0)
  338. g.ExtentsOffset = Vector3.new(0, 0, 0)
  339. g.StudsOffset = Vector3.new(0, 0, 0)
  340. local t = Instance.new("TextLabel", g)
  341. t.BackgroundTransparency = 1
  342. t.Font = "ArialBold"
  343. t.TextSize = 24
  344. t.Text = "-" .. round(damage)
  345. if round(damage) % 1 == 0 then
  346. t.Text = "-" .. round(damage) .. ".0"
  347. end
  348. t.Size = UDim2.new(1, 0, 1, 0)
  349. t.TextStrokeTransparency = 0
  350. t.TextTransparency = 0
  351. t.TextScaled = true
  352. t.TextWrapped = true
  353. t.TextXAlignment = "Center"
  354. t.TextYAlignment = "Center"
  355. t.TextColor3 = colour
  356. coroutine.resume(coroutine.create(function()
  357. for i = 1, 50 do
  358. game:GetService("RunService").Heartbeat:wait()
  359. local sinewave = math.sin(i / 500) * 4
  360. damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0))
  361. t.TextTransparency = t.TextTransparency + 0.02
  362. t.TextStrokeTransparency = t.TextTransparency + 0.02
  363. end
  364. damagepart:Destroy()
  365. end), t)
  366. end
  367. function magic(type, thing)
  368. local magicBlock = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay, t)
  369. local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
  370. prt.CFrame = cframe
  371. local msh = mesh("BlockMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  372. game:GetService("Debris"):AddItem(prt, 8)
  373. if t == 1 or t == nil then
  374. table.insert(partEffects, {
  375. prt,
  376. "Block1",
  377. delay,
  378. x3,
  379. y3,
  380. z3,
  381. msh
  382. })
  383. elseif t == 2 then
  384. table.insert(partEffects, {
  385. prt,
  386. "Block2",
  387. delay,
  388. x3,
  389. y3,
  390. z3,
  391. msh
  392. })
  393. end
  394. end
  395. local magicCylinder = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
  396. local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
  397. local msh = mesh("CylinderMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  398. game:GetService("Debris"):AddItem(prt, 8)
  399. table.insert(partEffects, {
  400. prt,
  401. "Cylinder",
  402. delay,
  403. x3,
  404. y3,
  405. z3,
  406. msh
  407. })
  408. end
  409. local magicSphere = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
  410. local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
  411. local msh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  412. game:GetService("Debris"):AddItem(prt, 8)
  413. table.insert(partEffects, {
  414. prt,
  415. "Cylinder",
  416. delay,
  417. x3,
  418. y3,
  419. z3,
  420. msh
  421. })
  422. end
  423. local magicRing = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
  424. local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
  425. prt.Anchored = true
  426. prt.CFrame = cframe
  427. local msh = mesh("SpecialMesh", prt, "FileMesh", 3270017, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  428. game:GetService("Debris"):AddItem(prt, 2)
  429. coroutine.resume(coroutine.create(function(Part, Mesh, num)
  430. for i = 0, 1, delay do
  431. swait()
  432. Part.Transparency = i
  433. Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
  434. end
  435. Part:Destroy()
  436. end), prt, msh, (math.random(0, 1) + math.random()) / 5)
  437. end
  438. local magicSlash = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
  439. local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", cframe)
  440. prt.Anchored = true
  441. prt.CFrame = cframe
  442. local msh = mesh("SpecialMesh", prt, "FileMesh", 20329976, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  443. game:GetService("Debris"):AddItem(prt, 2)
  444. coroutine.resume(coroutine.create(function(Part, Mesh, num)
  445. for i = 0, 1, delay do
  446. swait()
  447. Part.Transparency = i
  448. Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
  449. end
  450. Part:Destroy()
  451. end), prt, msh, (math.random(0, 1) + math.random()) / 5)
  452. end
  453. local par = thing[1]
  454. local brick = thing[2]
  455. local cframe = thing[3]
  456. local x1 = thing[4]
  457. local y1 = thing[5]
  458. local z1 = thing[6]
  459. local x3 = thing[7]
  460. local y3 = thing[8]
  461. local z3 = thing[9]
  462. local delay = thing[10]
  463. local t = thing[11]
  464. if type == "Block" or type == 1 then
  465. magicBlock(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  466. elseif type == "Cylinder" or type == 2 then
  467. magicCylinder(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  468. elseif type == "Sphere" or type == 3 then
  469. magicSphere(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  470. elseif type == "Ring" or type == 4 then
  471. magicRing(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  472. elseif type == "Slash" or type == 5 then
  473. magicSlash(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
  474. end
  475. end
  476. function newFrame(par, bg, transp, size, pos, name)
  477. local f = Instance.new("Frame", nil)
  478. f.BackgroundColor3 = bg
  479. f.BackgroundTransparency = transp
  480. f.BorderSizePixel = 0
  481. f.Position = pos
  482. f.Size = size
  483. f.Name = name
  484. f.Parent = par
  485. return f
  486. end
  487. function newLabel(par, size, pos, text, textsize, text3, textstroke3, scaled, name)
  488. local l = Instance.new("TextLabel", nil)
  489. l.BackgroundTransparency = 1
  490. l.Size = size
  491. l.Position = pos
  492. l.Text = text
  493. l.TextSize = textsize
  494. l.TextColor3 = text3
  495. l.TextStrokeColor3 = textstroke3
  496. if scaled then
  497. l.TextScaled = scaled
  498. else
  499. l.TextScaled = true
  500. end
  501. l.TextStrokeTransparency = 0
  502. l.Name = name
  503. l.Parent = par
  504. return l
  505. end
  506. a1t = "Anger"
  507. a2t = "Power"
  508. a3t = "Hate"
  509. a4t = "Determination"
  510. backc3 = c3(107, 107, 107)
  511. reloc3 = c3(62, 62, 62)
  512. g = Instance.new("ScreenGui")
  513. f1 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.85, 0), "")
  514. f2 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.76, 0), "")
  515. f3 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.67, 0), "")
  516. f4 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.58, 0), "")
  517. newFrame(f1, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
  518. newFrame(f2, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
  519. newFrame(f3, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
  520. newFrame(f4, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
  521. newLabel(f1, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(Z)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
  522. newLabel(f2, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(X)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
  523. newLabel(f3, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(C)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
  524. newLabel(f4, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(V)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
  525. newLabel(f1, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a1t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
  526. newLabel(f2, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a2t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
  527. newLabel(f3, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a3t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
  528. newLabel(f4, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a4t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
  529. g.Parent = Player.PlayerGui
  530. Reload = {}
  531. Reload[1] = f1.Reload
  532. Reload[2] = f2.Reload
  533. Reload[3] = f3.Reload
  534. Reload[4] = f4.Reload
  535. weapon = Instance.new("Model", Character)
  536. weapon.Name = "Toy Knife"
  537. p0 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
  538. mesh("BlockMesh", p0, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 2.39999986, 6.57500076))
  539. p1 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
  540. mesh("SpecialMesh", p1, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.425000012, 1.70000005))
  541. p1 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p1")
  542. mesh("SpecialMesh", p1, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.425000012, 1.70000005))
  543. p2 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
  544. mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.999999881, 3.02500105))
  545. p2 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p2")
  546. mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.999999881, 3.02500105))
  547. p3 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
  548. mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.974999905, 1.70000064))
  549. p3 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p3")
  550. mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.974999905, 1.70000064))
  551. p4 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
  552. mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 1.32500005))
  553. p4 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p4")
  554. mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 1.32500005))
  555. p5 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part")
  556. mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 0.350000083))
  557. p5 = newPart(weapon, BrickColor.new("Crimson"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p5")
  558. mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 0.350000083))
  559. p6 = newPart(weapon, BrickColor.new("Really black"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Handle")
  560. mesh("SpecialMesh", p6, Enum.MeshType.Cylinder, nil, Vector3.new(0, 0, 0), Vector3.new(5, 0.75, 0.800000012))
  561. p6 = newPart(weapon, BrickColor.new("Really black"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p6")
  562. mesh("SpecialMesh", p6, Enum.MeshType.Cylinder, nil, Vector3.new(0, 0, 0), Vector3.new(5, 0.75, 0.800000012))
  563. weld(p0, p0, p1, CFrame.new(-0.400014997, -2.90028477, 2.71900272, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.400014997, 2.68303514, 3.62925434, -1, 0, 0, 0, -1, 0, 0, 0, 1))
  564. weld(p1, p1, p2, CFrame.new(0.400014997, 2.68303514, 3.62925434, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(-0.400014997, -3.05428457, 3.77500391, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  565. weld(p2, p2, p3, CFrame.new(-0.400014997, -3.05428457, 3.77500391, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.400014997, -2.83703494, 3.62925434, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  566. weld(p3, p3, p4, CFrame.new(-0.400014997, -2.83703494, 3.62925434, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.400014997, 2.83703494, 3.96200418, -1, 0, 0, 0, -1, 0, 0, 0, 1))
  567. weld(p4, p4, p5, CFrame.new(0.400014997, 2.83703494, 3.96200418, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(0.400014997, 3.05703473, 4.14625359, -1, 0, 0, 0, -1, 0, 0, 0, 1))
  568. weld(p5, p5, p6, CFrame.new(0.400014997, 3.05703473, 4.14625359, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(1.48875475, 2.98278475, -0.400014997, 0, 4.37113883E-8, 1, 0, -1, 4.37113883E-8, 1, 0, 0))
  569. handleweld = Instance.new("Weld", RightArm)
  570. handleweld.Part1 = RightArm
  571. handleweld.Part0 = p6
  572. handlec0 = CFrame.new(0, -0.95, 0) * angles(0, math.pi / 2, math.pi)
  573. handleweld.C0 = handlec0
  574. function attackone()
  575. attacking = true
  576. for i = 0, 1, 0.1 do
  577. swait()
  578. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(60)), 0.4)
  579. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-60)), 0.4)
  580. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.9, 0) * CFrame.Angles(math.rad(180), 0, math.rad(10)), 0.4)
  581. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4)
  582. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  583. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  584. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4)
  585. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4)
  586. end
  587. local smp = newPart(Effects, BrickColor.new("Crimson"), 0, true, false, Vector3.new(), "Slash")
  588. mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
  589. smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(120), math.rad(0))
  590. delay(0.1, function()
  591. table.insert(partEffects, {
  592. smp,
  593. "Disappear",
  594. 0.05
  595. })
  596. end)
  597. sound(sounds[1][1], Character.Head, 1, 4, 1.5)
  598. local hitb = hitbox.Touched:connect(function(hit)
  599. if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then
  600. if hit.Parent:findFirstChild("Hit" .. Player.Name) then
  601. return
  602. end
  603. local str = Instance.new("StringValue", hit.Parent)
  604. str.Name = "Hit" .. Player.Name
  605. game.Debris:AddItem(str, 0.3)
  606. basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242))
  607. end
  608. end)
  609. for i = 0, 1, 0.1 do
  610. swait()
  611. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(80)), 0.4)
  612. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.4)
  613. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(45), math.rad(-65), math.rad(5)), 0.4)
  614. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4)
  615. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  616. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  617. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4)
  618. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4)
  619. hitbox.Parent = weapon
  620. hitbox.Size = Vector3.new(2, 5, 8)
  621. if smp then
  622. hitbox.CFrame = smp.CFrame
  623. else
  624. hitbox.Parent = nil
  625. end
  626. end
  627. hitb:disconnect()
  628. hitbox.Parent = nil
  629. attacking = false
  630. end
  631. function attacktwo()
  632. attacking = true
  633. for i = 0, 1, 0.1 do
  634. swait()
  635. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4)
  636. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.4)
  637. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.4)
  638. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4)
  639. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  640. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  641. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4)
  642. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4)
  643. end
  644. local smp = newPart(Effects, BrickColor.new("Crimson"), 0, true, false, Vector3.new(), "Slash")
  645. mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
  646. smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(80), math.rad(0))
  647. delay(0.1, function()
  648. table.insert(partEffects, {
  649. smp,
  650. "Disappear",
  651. 0.05
  652. })
  653. end)
  654. sound(sounds[1][2], Character.Head, 1, 4, 1.5)
  655. local hitb = hitbox.Touched:connect(function(hit)
  656. if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then
  657. if hit.Parent:findFirstChild("Hit" .. Player.Name) then
  658. return
  659. end
  660. local str = Instance.new("StringValue", hit.Parent)
  661. str.Name = "Hit" .. Player.Name
  662. game.Debris:AddItem(str, 0.3)
  663. basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242))
  664. end
  665. end)
  666. for i = 0, 1, 0.1 do
  667. swait()
  668. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  669. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4)
  670. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4)
  671. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4)
  672. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  673. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  674. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4)
  675. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4)
  676. hitbox.Parent = weapon
  677. hitbox.Size = Vector3.new(2, 5, 8)
  678. if smp then
  679. hitbox.CFrame = smp.CFrame
  680. else
  681. hitbox.Parent = nil
  682. end
  683. end
  684. hitb:disconnect()
  685. hitbox.Parent = nil
  686. attacking = false
  687. end
  688. function attackthree()
  689. attacking = true
  690. for i = 0, 1, 0.1 do
  691. swait()
  692. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4)
  693. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(20), 0, math.rad(80)), 0.4)
  694. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(-45)) * CFrame.Angles(math.rad(-25), 0, 0), 0.4)
  695. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4)
  696. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  697. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  698. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4)
  699. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4)
  700. end
  701. local smp = newPart(Effects, BrickColor.new("Crimson"), 0, true, false, Vector3.new(), "Slash")
  702. mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
  703. smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(-70), math.rad(0))
  704. delay(0.1, function()
  705. table.insert(partEffects, {
  706. smp,
  707. "Disappear",
  708. 0.05
  709. })
  710. end)
  711. sound(sounds[1][3], Character.Head, 1, 4, 1.5)
  712. local hitb = hitbox.Touched:connect(function(hit)
  713. if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then
  714. if hit.Parent:findFirstChild("Hit" .. Player.Name) then
  715. return
  716. end
  717. local str = Instance.new("StringValue", hit.Parent)
  718. str.Name = "Hit" .. Player.Name
  719. game.Debris:AddItem(str, 0.3)
  720. basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242))
  721. end
  722. end)
  723. for i = 0, 1, 0.1 do
  724. swait()
  725. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  726. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4)
  727. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.8, 0.4) * angles(math.rad(0), math.rad(-40), math.rad(120)), 0.4)
  728. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4)
  729. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  730. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  731. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4)
  732. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4)
  733. hitbox.Parent = weapon
  734. hitbox.Size = Vector3.new(2, 5, 8)
  735. if smp then
  736. hitbox.CFrame = smp.CFrame
  737. else
  738. hitbox.Parent = nil
  739. end
  740. end
  741. hitb:disconnect()
  742. hitbox.Parent = nil
  743. attacking = false
  744. end
  745. function rapidslash()
  746. attacking = true
  747. AttackHas[1] = 0
  748. AttackCan[1] = false
  749. for i = 1, 3 do
  750. swait()
  751. for i = 0, 1, 0.2 do
  752. swait()
  753. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(60)), 0.6)
  754. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-60)), 0.6)
  755. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.9, 0) * CFrame.Angles(math.rad(180), 0, math.rad(10)), 0.6)
  756. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6)
  757. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1)
  758. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1)
  759. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6)
  760. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6)
  761. end
  762. sound(sounds[1][1], Character.Head, 1, 7, 1.5)
  763. do
  764. local smp = newPart(Effects, BrickColor.new("Crimson"), 0, true, false, Vector3.new(), "Slash")
  765. mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
  766. smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0))
  767. delay(0.1, function()
  768. table.insert(partEffects, {
  769. smp,
  770. "Disappear",
  771. 0.05
  772. })
  773. end)
  774. for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do
  775. basicDamage(v, 6, c3(243, 242, 242))
  776. end
  777. for i = 0, 1, 0.2 do
  778. swait()
  779. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(80)), 0.6)
  780. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.6)
  781. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(45), math.rad(-65), math.rad(5)), 0.6)
  782. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6)
  783. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1)
  784. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1)
  785. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.6)
  786. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.6)
  787. end
  788. sound(sounds[1][1], Character.Head, 1, 7, 1.5)
  789. local smp = newPart(Effects, BrickColor.new("Crimson"), 0, true, false, Vector3.new(), "Slash")
  790. mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
  791. smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0))
  792. delay(0.1, function()
  793. table.insert(partEffects, {
  794. smp,
  795. "Disappear",
  796. 0.05
  797. })
  798. end)
  799. for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do
  800. basicDamage(v, 6, c3(243, 242, 242))
  801. end
  802. for i = 0, 1, 0.2 do
  803. swait()
  804. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.6)
  805. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(20), 0, math.rad(80)), 0.6)
  806. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(-45)) * CFrame.Angles(math.rad(-25), 0, 0), 1)
  807. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6)
  808. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1)
  809. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1)
  810. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6)
  811. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6)
  812. end
  813. sound(sounds[1][1], Character.Head, 1, 7, 1.5)
  814. local smp = newPart(Effects, BrickColor.new("Crimson"), 0, true, false, Vector3.new(), "Slash")
  815. mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
  816. smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0))
  817. delay(0.1, function()
  818. table.insert(partEffects, {
  819. smp,
  820. "Disappear",
  821. 0.05
  822. })
  823. end)
  824. for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do
  825. basicDamage(v, 6, c3(243, 242, 242))
  826. end
  827. for i = 0, 1, 0.2 do
  828. swait()
  829. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.6)
  830. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.6)
  831. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.6)
  832. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6)
  833. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.6)
  834. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.6)
  835. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6)
  836. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6)
  837. end
  838. sound(sounds[1][1], Character.Head, 1, 7, 1.5)
  839. local smp = newPart(Effects, BrickColor.new("Crimson"), 0, true, false, Vector3.new(), "Slash")
  840. mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
  841. smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0))
  842. delay(0.1, function()
  843. table.insert(partEffects, {
  844. smp,
  845. "Disappear",
  846. 0.05
  847. })
  848. end)
  849. for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do
  850. basicDamage(v, 6, c3(243, 242, 242))
  851. end
  852. for i = 0, 1, 0.2 do
  853. swait()
  854. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.6)
  855. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.6)
  856. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.6)
  857. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.6)
  858. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1)
  859. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1)
  860. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.6)
  861. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.6)
  862. end
  863. sound(sounds[1][1], Character.Head, 1, 7, 1.5)
  864. local smp = newPart(Effects, BrickColor.new("Crimson"), 0, true, false, Vector3.new(), "Slash")
  865. mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06))
  866. smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0))
  867. delay(0.1, function()
  868. table.insert(partEffects, {
  869. smp,
  870. "Disappear",
  871. 0.05
  872. })
  873. end)
  874. for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do
  875. basicDamage(v, 6, c3(243, 242, 242))
  876. end
  877. end
  878. end
  879. AttackCan[1] = true
  880. attacking = false
  881. end
  882. function powerslash()
  883. attacking = true
  884. AttackCan[2] = false
  885. AttackHas[2] = AttackHas[2] - 0.2
  886. local orbs = {}
  887. if energyslashcounter == 1 then
  888. energyslashcounter = 2
  889. sound(367453005, Character.Head, 1, 4, 1)
  890. do
  891. local now = RootPart.CFrame * CFrame.new(0, 0, -10)
  892. local bo = {
  893. BrickColor.new("Bright orange"),
  894. BrickColor.new("Toothpaste")
  895. }
  896. local bon = bo[math.random(1, 2)]
  897. for i = 1, 5 do
  898. local orb = newPart(Effects, bon, 0, true, false, Vector3.new(), "Orange", "SmoothPlastic", RootPart.CFrame * CFrame.new(0, 0, -15))
  899. local omesh = mesh("SpecialMesh", orb, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 5))
  900. orb.CFrame = now * CFrame.new((math.random() - 0.5) * 20, 0, (math.random() - 0.5) * 20)
  901. table.insert(orbs, orb)
  902. end
  903. for i = 0, 1, 0.05 do
  904. swait()
  905. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.15)
  906. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(80)), 0.15)
  907. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.2)
  908. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4)
  909. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15)
  910. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15)
  911. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15)
  912. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15)
  913. end
  914. for i = 1, #orbs do
  915. do
  916. local orb = orbs[i]
  917. table.insert(partEffects, {
  918. orb,
  919. "Block2",
  920. 0.05,
  921. 10,
  922. 10,
  923. 10,
  924. orb.Mesh
  925. })
  926. thread(function()
  927. for i = 1, 3 do
  928. swait(5)
  929. for i, v in pairs(findCloseHumanoid(orb.Position, 10)) do
  930. if bon == BrickColor.new("Bright orange") then
  931. if (v.Parent.Torso.Velocity * Vector3.new(1, 1, 1)).magnitude < 2 then
  932. basicDamage(v, 6, BrickColor.new("Bright orange").Color)
  933. end
  934. elseif bon == BrickColor.new("Toothpaste") and (v.Parent.Torso.Velocity * Vector3.new(1, 1, 1)).magnitude > 2 then
  935. basicDamage(v, 6, BrickColor.new("Toothpaste").Color)
  936. end
  937. end
  938. end
  939. end)
  940. end
  941. end
  942. sound(sounds[1][2], Character.Head, 1, 4, 0.8)
  943. for i = 0, 1, 0.1 do
  944. swait()
  945. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  946. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(15), math.rad(0), math.rad(-5)), 0.4)
  947. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4)
  948. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4)
  949. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  950. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  951. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4)
  952. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4)
  953. end
  954. end
  955. elseif energyslashcounter == 2 then
  956. energyslashcounter = 3
  957. sound(306247749, Character.Head, 1, 4, 1)
  958. local gparts = {}
  959. for i = 1, 9 do
  960. local gpart = newPart(Effects, BrickColor.new("Really red"), 0, true, false, Vector3.new(), "Violet", "SmoothPlastic")
  961. local gmesh = mesh("CylinderMesh", gpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(50, 10, 50))
  962. gpart.CFrame = RootPart.CFrame * CFrame.new(math.random(-20, 20), -3, -15 + math.random(-20, 20))
  963. table.insert(gparts, gpart)
  964. end
  965. for i = 0, 1, 0.05 do
  966. swait()
  967. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(80)), 0.15)
  968. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.15)
  969. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, 0.4) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(15)) * CFrame.Angles(math.rad(0), 0, 0), 0.2)
  970. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4)
  971. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15)
  972. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15)
  973. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15)
  974. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15)
  975. end
  976. for i = 1, #gparts do
  977. local gpart = gparts[i]
  978. table.insert(partEffects, {
  979. gpart,
  980. "Block2",
  981. 0.05,
  982. -1,
  983. 50,
  984. -1,
  985. gpart.Mesh
  986. })
  987. for i, v in pairs(findCloseHumanoid(gpart.Position, 10)) do
  988. basicDamage(v, 15, BrickColor.new("Dark blue").Color)
  989. local bv = Instance.new("BodyVelocity", v.Parent.Torso)
  990. game.Debris:AddItem(bv, 1)
  991. bv.Velocity = Vector3.new(0, 40, 0)
  992. bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  993. end
  994. end
  995. sound(sounds[1][3], Character.Head, 1, 4, 0.8)
  996. for i = 0, 1, 0.1 do
  997. swait()
  998. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-80)), 0.4)
  999. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(15), math.rad(0), math.rad(80)), 0.4)
  1000. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, -0.4) * angles(math.rad(125), math.rad(-40), math.rad(60)), 0.4)
  1001. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4)
  1002. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  1003. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  1004. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4)
  1005. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4)
  1006. end
  1007. elseif energyslashcounter == 3 then
  1008. energyslashcounter = 1
  1009. for i = 0, 1, 0.05 do
  1010. swait()
  1011. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(80)), 0.15)
  1012. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.15)
  1013. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.2)
  1014. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4)
  1015. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15)
  1016. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15)
  1017. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15)
  1018. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15)
  1019. end
  1020. sound(sounds[2][5], Character.Head, 1, 4, 0.8)
  1021. thread(function()
  1022. for i = 1, 6 do
  1023. swait()
  1024. sound(438149153, Character.Head, 1, 4, 0.8)
  1025. do
  1026. local prt = newPart(Effects, BrickColor.new("Bright yellow"), 0, false, false, Vector3.new(), "Yellow", "SmoothPlastic", RootPart.CFrame)
  1027. local mesh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 2.5))
  1028. prt.CFrame = RootPart.CFrame * CFrame.new(math.random(-3, 3), math.random(-1, 1), math.random(-3, 3))
  1029. local bv = Instance.new("BodyVelocity", prt)
  1030. bv.Velocity = RootPart.CFrame.lookVector * 150
  1031. bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  1032. game.Debris:AddItem(bv, 6)
  1033. local orlook = RootPart.CFrame.lookVector
  1034. thread(function()
  1035. while prt do
  1036. swait()
  1037. local hitpart, pospart = rayCast(prt.Position, orlook, 4, Character)
  1038. if hitpart and pospart then
  1039. prt:Destroy()
  1040. do
  1041. local ref = newPart(Effects, BrickColor.Black(), 1, true, false, Vector3.new(), "")
  1042. ref.CFrame = CFrame.new(pospart)
  1043. sound(142070127, ref, 1, 4, 1)
  1044. delay(4, function()
  1045. ref:Destroy()
  1046. end)
  1047. magic("Block", {
  1048. Effects,
  1049. BrickColor.new("Bright yellow"),
  1050. CFrame.new(pospart),
  1051. 0.2,
  1052. 0.2,
  1053. 0.2,
  1054. 0.9,
  1055. 0.9,
  1056. 0.9,
  1057. 0.05,
  1058. 1
  1059. })
  1060. magic("Block", {
  1061. Effects,
  1062. BrickColor.new("Bright yellow"),
  1063. CFrame.new(pospart),
  1064. 0.2,
  1065. 0.2,
  1066. 0.2,
  1067. 0.9,
  1068. 0.9,
  1069. 0.9,
  1070. 0.05,
  1071. 1
  1072. })
  1073. if hitpart.Parent:findFirstChild("Humanoid") then
  1074. basicDamage(hitpart.Parent.Humanoid, 12, BrickColor.new("Bright yellow").Color)
  1075. end
  1076. break
  1077. end
  1078. end
  1079. end
  1080. end)
  1081. end
  1082. end
  1083. end)
  1084. end
  1085. attacking = false
  1086. AttackCan[2] = true
  1087. end
  1088. function leftright()
  1089. attacking = true
  1090. AttackCan[3] = false
  1091. for i = 0, 1, 0.1 do
  1092. swait()
  1093. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4)
  1094. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.4)
  1095. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.4)
  1096. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4)
  1097. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  1098. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  1099. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4)
  1100. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4)
  1101. end
  1102. thread(function()
  1103. local laser = newPart(nil, BrickColor.new("Bright red"), 0.5, true, false, Vector3.new(), "Laser", "SmoothPlastic")
  1104. local lmsh = mesh("BlockMesh", nil, nil, nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 5))
  1105. local lasers = {}
  1106. local keypoints1, keypoints2, keypoints3, keypoints4, keypoints5, keypoints6 = {}, {}, {}, {}, {}, {}
  1107. local radius = 10
  1108. local num = 12
  1109. for i = 1, num do
  1110. table.insert(keypoints1, {
  1111. RootPart.CFrame.p,
  1112. RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num) * i), 0, math.sin(math.rad(360 / num) * i))
  1113. })
  1114. table.insert(keypoints2, {
  1115. RootPart.CFrame.p,
  1116. RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 45 * i) * i), 0, math.sin(math.rad(360 / num + 45 * i) * i))
  1117. })
  1118. table.insert(keypoints3, {
  1119. RootPart.CFrame.p,
  1120. RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 90 * i) * i), 0, math.sin(math.rad(360 / num + 90 * i) * i))
  1121. })
  1122. table.insert(keypoints4, {
  1123. RootPart.CFrame.p,
  1124. RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 135 * i) * i), 0, math.sin(math.rad(360 / num + 135 * i) * i))
  1125. })
  1126. end
  1127. local keypointstotal = {
  1128. keypoints1,
  1129. keypoints2,
  1130. keypoints3,
  1131. keypoints4
  1132. }
  1133. for ii = 1, #keypointstotal do
  1134. swait(5)
  1135. do
  1136. local currpoint = keypointstotal[ii]
  1137. for i = 1, #currpoint do
  1138. do
  1139. local start = currpoint[i][1]
  1140. local look = currpoint[i][2]
  1141. local laserc = laser:Clone()
  1142. local lmshc = lmsh:Clone()
  1143. local hit, pos = rayCast(start, look, 100000, Character)
  1144. laserc.CFrame = CFrame.new((start + pos) / 2, pos) * angles(math.rad(90), 0, 0)
  1145. local mag = (laserc.Position - pos).magnitude * 2
  1146. lmshc.Scale = Vector3.new(2, mag * 5, 2)
  1147. laserc.Parent = Effects
  1148. lmshc.Parent = laserc
  1149. thread(function()
  1150. table.insert(partEffects, {
  1151. laserc,
  1152. "Block2",
  1153. 0.025,
  1154. -0.1,
  1155. 0,
  1156. -0.1,
  1157. lmshc
  1158. })
  1159. local start = currpoint[i][1]
  1160. local look = currpoint[i][2]
  1161. look = CFrame.new(start, start + look).lookVector
  1162. local hit, pos = rayCast(start, look, 100000, Character)
  1163. repeat
  1164. swait()
  1165. until laserc.Parent == nil
  1166. local lpart = newPart(Effects, BrickColor.new("Black"), 0.5, true, false, Vector3.new(), "Cut", "SmoothPlastic")
  1167. sound(406913243, Head, 0.6, 4, 1)
  1168. local lpartm = mesh("BlockMesh", lpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(5, mag * 5, 5))
  1169. lpart.CFrame = laserc.CFrame * CFrame.new(0, 0, 0)
  1170. table.insert(partEffects, {
  1171. lpart,
  1172. "Block2",
  1173. 0.05,
  1174. 1,
  1175. 0,
  1176. 1,
  1177. lpartm
  1178. })
  1179. local lpart = newPart(Effects, BrickColor.new("Crimson"), 0.5, true, false, Vector3.new(), "Cut", "SmoothPlastic")
  1180. local lpartm = mesh("BlockMesh", lpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(8, mag * 5, 8))
  1181. lpart.CFrame = laserc.CFrame * CFrame.new(0, 0, 0)
  1182. table.insert(partEffects, {
  1183. lpart,
  1184. "Block2",
  1185. 0.05,
  1186. 1,
  1187. 0,
  1188. 1,
  1189. lpartm
  1190. })
  1191. local hit, pos = rayCast(start, look, 100000, Character)
  1192. if hit ~= nil then
  1193. if hit.Parent.ClassName == "Accessory" or hit.Parent.ClassName == "Hat" then
  1194. if hit.Parent.Parent:findFirstChild("Humanoid") then
  1195. basicDamage(hit.Parent.Parent.Humanoid, 20, BrickColor.new("Bright red").Color)
  1196. end
  1197. elseif hit.Parent:findFirstChild("Humanoid") then
  1198. basicDamage(hit.Parent.Humanoid, 20, BrickColor.new("Bright red").Color)
  1199. end
  1200. end
  1201. end)
  1202. end
  1203. end
  1204. end
  1205. end
  1206. end)
  1207. for i = 0, 1, 0.1 do
  1208. swait()
  1209. Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  1210. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4)
  1211. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4)
  1212. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4)
  1213. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  1214. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4)
  1215. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4)
  1216. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4)
  1217. end
  1218. AttackCan[3] = true
  1219. attacking = false
  1220. end
  1221. function mouse1d()
  1222. if tool.Active == false then
  1223. return
  1224. end
  1225. if attacking == false and attackcounter == 1 then
  1226. attackcounter = 2
  1227. attackone()
  1228. elseif attacking == false and attackcounter == 2 then
  1229. attackcounter = 3
  1230. attacktwo()
  1231. elseif attacking == false and attackcounter == 3 then
  1232. attackcounter = 1
  1233. attackthree()
  1234. end
  1235. end
  1236. function key(k)
  1237. if tool.Active == false then
  1238. return
  1239. end
  1240. k = k:lower()
  1241. if attacking == false and k == "z" and AttackHas[1] >= AttackNeeded[1] then
  1242. rapidslash()
  1243. elseif attacking == false and k == "x" and AttackHas[2] >= 0.2 then
  1244. powerslash()
  1245. elseif attacking == false and k == "c" and AttackHas[3] >= AttackNeeded[3] then
  1246. leftright()
  1247. elseif attacking ~= false or k ~= "v" or AttackHas[4] >= AttackNeeded[4] then
  1248. end
  1249. end
  1250. asdasd = mouse.Button1Down:connect(mouse1d)
  1251. asdasdf = mouse.KeyDown:connect(key)
  1252. Humanoid.Died:connect(function()
  1253. asdasd:disconnect()
  1254. asdasdf:disconnect()
  1255. end)
  1256. thread(function()
  1257. while true do
  1258. swait()
  1259. torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1260. hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1261. sine = sine + 1
  1262. if AttackHas[1] < AttackNeeded[1] and AttackCan[1] == true then
  1263. AttackHas[1] = AttackHas[1] + 0.005
  1264. end
  1265. if AttackHas[2] < AttackNeeded[2] and AttackCan[2] == true then
  1266. AttackHas[2] = AttackHas[2] + 0.005
  1267. end
  1268. if AttackHas[3] < AttackNeeded[3] and AttackCan[3] == true then
  1269. AttackHas[3] = AttackHas[3] + 0.005
  1270. end
  1271. if AttackHas[4] < AttackNeeded[4] and AttackCan[4] == true then
  1272. AttackHas[4] = AttackHas[4] + 0.005
  1273. end
  1274. Reload[1]:TweenSize(UDim2.new(AttackHas[1] / AttackNeeded[1], 0, 1, 0), nil, 1, 0.4)
  1275. Reload[2]:TweenSize(UDim2.new(AttackHas[2] / AttackNeeded[2], 0, 1, 0), nil, 1, 0.4)
  1276. Reload[3]:TweenSize(UDim2.new(AttackHas[3] / AttackNeeded[3], 0, 1, 0), nil, 1, 0.4)
  1277. Reload[4]:TweenSize(UDim2.new(AttackHas[4] / AttackNeeded[4], 0, 1, 0), nil, 1, 0.4)
  1278. if 1 < RootPart.Velocity.y and hitfloor == nil then
  1279. if attacking == false then
  1280. Anim = "Jump"
  1281. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1)
  1282. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
  1283. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
  1284. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
  1285. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
  1286. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
  1287. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2)
  1288. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2)
  1289. end
  1290. elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  1291. if attacking == false then
  1292. Anim = "Fall"
  1293. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(23), 0, 0), 0.2)
  1294. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
  1295. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
  1296. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
  1297. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
  1298. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
  1299. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2)
  1300. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2)
  1301. end
  1302. elseif torvel < 1 and hitfloor ~= nil then
  1303. if attacking == false then
  1304. Anim = "Idle"
  1305. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-5), 0, math.rad(15)), 0.1)
  1306. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.2 * math.cos(sine / 25)) * CFrame.Angles(math.rad(10), 0, math.rad(-15)), 0.1)
  1307. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(5), math.rad(-15), math.rad(10) + 0.1 * math.cos(sine / 25)), 0.2)
  1308. LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-10) - 0.1 * math.cos(sine / 25)), 0.2)
  1309. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  1310. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  1311. RH.C0 = clerp(RH.C0, CFrame.new(1, -1.1 - 0.2 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(10), math.rad(105), math.rad(-5)) * CFrame.Angles(math.rad(-4), 0, math.rad(-5)), 0.2)
  1312. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.2 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(10), -math.rad(75), math.rad(-2)) * CFrame.Angles(math.rad(-13), 0, 0), 0.2)
  1313. end
  1314. elseif torvel > 2 and hitfloor ~= nil and attacking == false then
  1315. Anim = "Walk"
  1316. Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-5), 0, math.rad(0)), 0.1)
  1317. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.2 * math.cos(sine / 25)) * CFrame.Angles(math.rad(10), 0, math.rad(0)), 0.1)
  1318. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(5), math.rad(-15), math.rad(10) + 0.1 * math.cos(sine / 25)), 0.2)
  1319. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-10) - 0.1 * math.cos(sine / 25)), 0.2)
  1320. RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  1321. LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
  1322. RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.cos(sine * 1.2 / 8), math.rad(90), 0), 0.3)
  1323. LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(-math.cos(sine * 1.2 / 8), -math.rad(90), 0), 0.3)
  1324. end
  1325. if 0 < #partEffects then
  1326. for e = 1, #partEffects do
  1327. if partEffects[e] ~= nil then
  1328. local Thing = partEffects[e]
  1329. if Thing ~= nil then
  1330. local Part = Thing[1]
  1331. local Mode = Thing[2]
  1332. local Delay = Thing[3]
  1333. local IncX = Thing[4]
  1334. local IncY = Thing[5]
  1335. local IncZ = Thing[6]
  1336. if 1 >= Thing[1].Transparency then
  1337. if Thing[2] == "Block1" then
  1338. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1339. local Mesh = Thing[1].Mesh
  1340. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1341. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1342. elseif Thing[2] == "Block2" then
  1343. Thing[1].CFrame = Thing[1].CFrame
  1344. local Mesh = Thing[7]
  1345. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1346. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1347. elseif Thing[2] == "Cylinder" then
  1348. local Mesh = Thing[1].Mesh
  1349. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1350. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1351. elseif Thing[2] == "Blood" then
  1352. local Mesh = Thing[7]
  1353. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1354. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1355. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1356. elseif Thing[2] == "Elec" then
  1357. local Mesh = Thing[1].Mesh
  1358. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1359. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1360. elseif Thing[2] == "Disappear" then
  1361. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1362. elseif Thing[2] == "Shatter" then
  1363. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1364. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1365. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1366. Thing[6] = Thing[6] + Thing[5]
  1367. end
  1368. else
  1369. Part:Destroy()
  1370. table.remove(partEffects, e)
  1371. end
  1372. end
  1373. end
  1374. end
  1375. end
  1376. end
  1377. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement