carlosname

Untitled

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