Advertisement
XskillyX

ok new fe chara

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