Advertisement
FloweyTheFlower

Roblox Scripts #26.2 Toy Knife

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