Advertisement
Sratus

Untitled

Oct 14th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.30 KB | None | 0 0
  1. --//====================================================\\--
  2. --|| CREATED BY SHACKLUSTER
  3. --\\====================================================//--
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. wait(0.2)
  87.  
  88. Player = owner
  89. PlayerGui = Player.PlayerGui
  90. Cam = workspace.CurrentCamera
  91. Backpack = Player.Backpack
  92. Character = Player.Character
  93. Humanoid = Character.Humanoid
  94. RootPart = Character["HumanoidRootPart"]
  95. Torso = Character["Torso"]
  96. Head = Character["Head"]
  97. RightArm = Character["Right Arm"]
  98. LeftArm = Character["Left Arm"]
  99. RightLeg = Character["Right Leg"]
  100. LeftLeg = Character["Left Leg"]
  101. RootJoint = RootPart["RootJoint"]
  102. Neck = Torso["Neck"]
  103. RightShoulder = Torso["Right Shoulder"]
  104. LeftShoulder = Torso["Left Shoulder"]
  105. RightHip = Torso["Right Hip"]
  106. LeftHip = Torso["Left Hip"]
  107. local sick = Instance.new("Sound",Character)
  108. sick.SoundId = "rbxassetid://425521107"
  109. sick.Looped = true
  110. sick.Pitch = 1
  111. sick.Volume = 1
  112. sick:Play()
  113.  
  114. IT = Instance.new
  115. CF = CFrame.new
  116. VT = Vector3.new
  117. RAD = math.rad
  118. C3 = Color3.new
  119. UD2 = UDim2.new
  120. BRICKC = BrickColor.new
  121. ANGLES = CFrame.Angles
  122. EULER = CFrame.fromEulerAnglesXYZ
  123. COS = math.cos
  124. ACOS = math.acos
  125. SIN = math.sin
  126. ASIN = math.asin
  127. ABS = math.abs
  128. MRANDOM = math.random
  129. FLOOR = math.floor
  130.  
  131. --//=================================\\
  132. --|| USEFUL VALUES
  133. --\\=================================//
  134.  
  135. Animation_Speed = 3
  136. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  137. local Speed = 23
  138. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  139. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  140. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  141. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  142. local DAMAGEMULTIPLIER = 1
  143. local ANIM = "Idle"
  144. local ATTACK = false
  145. local EQUIPPED = false
  146. local HOLD = false
  147. local COMBO = 1
  148. local Rooted = false
  149. local SINE = 0
  150. local KEYHOLD = false
  151. local CHANGE = 2 / Animation_Speed
  152. local WALKINGANIM = false
  153. local VALUE1 = false
  154. local VALUE2 = false
  155. local ROBLOXIDLEANIMATION = IT("Animation")
  156. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  157. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  158. --ROBLOXIDLEANIMATION.Parent = Humanoid
  159. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  160. WEAPONGUI.Name = "Weapon GUI"
  161. local Effects = IT("Folder", Character)
  162. Effects.Name = "Effects"
  163. local ANIMATOR = Humanoid.Animator
  164. local ANIMATE = Character.Animate
  165. local UNANCHOR = true
  166.  
  167. --//=================================\\
  168. --\\=================================//
  169.  
  170.  
  171. --//=================================\\
  172. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  173. --\\=================================//
  174.  
  175. ArtificialHB = Instance.new("BindableEvent", script)
  176. ArtificialHB.Name = "ArtificialHB"
  177.  
  178. script:WaitForChild("ArtificialHB")
  179.  
  180. frame = Frame_Speed
  181. tf = 0
  182. allowframeloss = false
  183. tossremainder = false
  184. lastframe = tick()
  185. script.ArtificialHB:Fire()
  186.  
  187. game:GetService("RunService").Heartbeat:connect(function(s, p)
  188. tf = tf + s
  189. if tf >= frame then
  190. if allowframeloss then
  191. script.ArtificialHB:Fire()
  192. lastframe = tick()
  193. else
  194. for i = 1, math.floor(tf / frame) do
  195. script.ArtificialHB:Fire()
  196. end
  197. lastframe = tick()
  198. end
  199. if tossremainder then
  200. tf = 0
  201. else
  202. tf = tf - frame * math.floor(tf / frame)
  203. end
  204. end
  205. end)
  206.  
  207. --//=================================\\
  208. --\\=================================//
  209.  
  210. --//=================================\\
  211. --|| SOME FUNCTIONS
  212. --\\=================================//
  213.  
  214. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  215. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  216. end
  217.  
  218. function PositiveAngle(NUMBER)
  219. if NUMBER >= 0 then
  220. NUMBER = 0
  221. end
  222. return NUMBER
  223. end
  224.  
  225. function NegativeAngle(NUMBER)
  226. if NUMBER <= 0 then
  227. NUMBER = 0
  228. end
  229. return NUMBER
  230. end
  231.  
  232. function Swait(NUMBER)
  233. if NUMBER == 0 or NUMBER == nil then
  234. ArtificialHB.Event:wait()
  235. else
  236. for i = 1, NUMBER do
  237. ArtificialHB.Event:wait()
  238. end
  239. end
  240. end
  241.  
  242. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  243. local NEWMESH = IT(MESH)
  244. if MESH == "SpecialMesh" then
  245. NEWMESH.MeshType = MESHTYPE
  246. if MESHID ~= "nil" and MESHID ~= "" then
  247. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  248. end
  249. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  250. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  251. end
  252. end
  253. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  254. NEWMESH.Scale = SCALE
  255. NEWMESH.Parent = PARENT
  256. return NEWMESH
  257. end
  258.  
  259. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  260. local NEWPART = IT("Part")
  261. NEWPART.formFactor = FORMFACTOR
  262. NEWPART.Reflectance = REFLECTANCE
  263. NEWPART.Transparency = TRANSPARENCY
  264. NEWPART.CanCollide = false
  265. NEWPART.Locked = true
  266. NEWPART.Anchored = true
  267. if ANCHOR == false then
  268. NEWPART.Anchored = false
  269. end
  270. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  271. NEWPART.Name = NAME
  272. NEWPART.Size = SIZE
  273. NEWPART.Position = Torso.Position
  274. NEWPART.Material = MATERIAL
  275. NEWPART:BreakJoints()
  276. NEWPART.Parent = PARENT
  277. return NEWPART
  278. end
  279.  
  280. local function weldBetween(a, b)
  281. local weldd = Instance.new("ManualWeld")
  282. weldd.Part0 = a
  283. weldd.Part1 = b
  284. weldd.C0 = CFrame.new()
  285. weldd.C1 = b.CFrame:inverse() * a.CFrame
  286. weldd.Parent = a
  287. return weldd
  288. end
  289.  
  290.  
  291. function QuaternionFromCFrame(cf)
  292. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  293. local trace = m00 + m11 + m22
  294. if trace > 0 then
  295. local s = math.sqrt(1 + trace)
  296. local recip = 0.5 / s
  297. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  298. else
  299. local i = 0
  300. if m11 > m00 then
  301. i = 1
  302. end
  303. if m22 > (i == 0 and m00 or m11) then
  304. i = 2
  305. end
  306. if i == 0 then
  307. local s = math.sqrt(m00 - m11 - m22 + 1)
  308. local recip = 0.5 / s
  309. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  310. elseif i == 1 then
  311. local s = math.sqrt(m11 - m22 - m00 + 1)
  312. local recip = 0.5 / s
  313. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  314. elseif i == 2 then
  315. local s = math.sqrt(m22 - m00 - m11 + 1)
  316. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  317. end
  318. end
  319. end
  320.  
  321. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  322. local xs, ys, zs = x + x, y + y, z + z
  323. local wx, wy, wz = w * xs, w * ys, w * zs
  324. local xx = x * xs
  325. local xy = x * ys
  326. local xz = x * zs
  327. local yy = y * ys
  328. local yz = y * zs
  329. local zz = z * zs
  330. 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))
  331. end
  332.  
  333. function QuaternionSlerp(a, b, t)
  334. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  335. local startInterp, finishInterp;
  336. if cosTheta >= 0.0001 then
  337. if (1 - cosTheta) > 0.0001 then
  338. local theta = ACOS(cosTheta)
  339. local invSinTheta = 1 / SIN(theta)
  340. startInterp = SIN((1 - t) * theta) * invSinTheta
  341. finishInterp = SIN(t * theta) * invSinTheta
  342. else
  343. startInterp = 1 - t
  344. finishInterp = t
  345. end
  346. else
  347. if (1 + cosTheta) > 0.0001 then
  348. local theta = ACOS(-cosTheta)
  349. local invSinTheta = 1 / SIN(theta)
  350. startInterp = SIN((t - 1) * theta) * invSinTheta
  351. finishInterp = SIN(t * theta) * invSinTheta
  352. else
  353. startInterp = t - 1
  354. finishInterp = t
  355. end
  356. end
  357. 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
  358. end
  359.  
  360. function Clerp(a, b, t)
  361. local qa = {QuaternionFromCFrame(a)}
  362. local qb = {QuaternionFromCFrame(b)}
  363. local ax, ay, az = a.x, a.y, a.z
  364. local bx, by, bz = b.x, b.y, b.z
  365. local _t = 1 - t
  366. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  367. end
  368.  
  369. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  370. local frame = IT("Frame")
  371. frame.BackgroundTransparency = TRANSPARENCY
  372. frame.BorderSizePixel = BORDERSIZEPIXEL
  373. frame.Position = POSITION
  374. frame.Size = SIZE
  375. frame.BackgroundColor3 = COLOR
  376. frame.BorderColor3 = BORDERCOLOR
  377. frame.Name = NAME
  378. frame.Parent = PARENT
  379. return frame
  380. end
  381.  
  382. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  383. local label = IT("TextLabel")
  384. label.BackgroundTransparency = 1
  385. label.Size = UD2(1, 0, 1, 0)
  386. label.Position = UD2(0, 0, 0, 0)
  387. label.TextColor3 = TEXTCOLOR
  388. label.TextStrokeTransparency = STROKETRANSPARENCY
  389. label.TextTransparency = TRANSPARENCY
  390. label.FontSize = TEXTFONTSIZE
  391. label.Font = TEXTFONT
  392. label.BorderSizePixel = BORDERSIZEPIXEL
  393. label.TextScaled = false
  394. label.Text = TEXT
  395. label.Name = NAME
  396. label.Parent = PARENT
  397. return label
  398. end
  399.  
  400. function NoOutlines(PART)
  401. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  402. end
  403.  
  404. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  405. local NEWWELD = IT(TYPE)
  406. NEWWELD.Part0 = PART0
  407. NEWWELD.Part1 = PART1
  408. NEWWELD.C0 = C0
  409. NEWWELD.C1 = C1
  410. NEWWELD.Parent = PARENT
  411. return NEWWELD
  412. end
  413.  
  414. local S = IT("Sound")
  415. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  416. local NEWSOUND = nil
  417. coroutine.resume(coroutine.create(function()
  418. NEWSOUND = S:Clone()
  419. NEWSOUND.Parent = PARENT
  420. NEWSOUND.Volume = VOLUME
  421. NEWSOUND.Pitch = PITCH
  422. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  423. NEWSOUND:play()
  424. if DOESLOOP == true then
  425. NEWSOUND.Looped = true
  426. else
  427. repeat Swait() until NEWSOUND.Playing == false
  428. NEWSOUND:remove()
  429. end
  430. end))
  431. return NEWSOUND
  432. end
  433.  
  434. function CFrameFromTopBack(at, top, back)
  435. local right = top:Cross(back)
  436. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  437. end
  438.  
  439. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  440. function WACKYEFFECT(Table)
  441. local TYPE = (Table.EffectType or "Sphere")
  442. local SIZE = (Table.Size or VT(1,1,1))
  443. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  444. local TRANSPARENCY = (Table.Transparency or 0)
  445. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  446. local CFRAME = (Table.CFrame or Torso.CFrame)
  447. local MOVEDIRECTION = (Table.MoveToPos or nil)
  448. local ROTATION1 = (Table.RotationX or 0)
  449. local ROTATION2 = (Table.RotationY or 0)
  450. local ROTATION3 = (Table.RotationZ or 0)
  451. local MATERIAL = (Table.Material or "Neon")
  452. local COLOR = (Table.Color or C3(1,1,1))
  453. local TIME = (Table.Time or 45)
  454. local SOUNDID = (Table.SoundID or nil)
  455. local SOUNDPITCH = (Table.SoundPitch or nil)
  456. local SOUNDVOLUME = (Table.SoundVolume or nil)
  457. coroutine.resume(coroutine.create(function()
  458. local PLAYSSOUND = false
  459. local SOUND = nil
  460. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  461. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  462. PLAYSSOUND = true
  463. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  464. end
  465. EFFECT.Color = COLOR
  466. local MSH = nil
  467. if TYPE == "Sphere" then
  468. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  469. elseif TYPE == "Block" then
  470. MSH = IT("BlockMesh",EFFECT)
  471. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  472. elseif TYPE == "Wave" then
  473. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  474. elseif TYPE == "Ring" then
  475. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  476. elseif TYPE == "Slash" then
  477. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  478. elseif TYPE == "Round Slash" then
  479. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  480. elseif TYPE == "Swirl" then
  481. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  482. elseif TYPE == "Skull" then
  483. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  484. elseif TYPE == "Crystal" then
  485. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  486. end
  487. if MSH ~= nil then
  488. local MOVESPEED = nil
  489. if MOVEDIRECTION ~= nil then
  490. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  491. end
  492. local GROWTH = SIZE - ENDSIZE
  493. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  494. if TYPE == "Block" then
  495. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  496. else
  497. EFFECT.CFrame = CFRAME
  498. end
  499. for LOOP = 1, TIME do
  500. Swait()
  501. MSH.Scale = MSH.Scale - GROWTH/TIME
  502. if TYPE == "Wave" then
  503. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  504. end
  505. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  506. if TYPE == "Block" then
  507. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  508. else
  509. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  510. end
  511. if MOVEDIRECTION ~= nil then
  512. local ORI = EFFECT.Orientation
  513. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  514. EFFECT.Orientation = ORI
  515. end
  516. end
  517. if PLAYSSOUND == false then
  518. EFFECT:remove()
  519. else
  520. repeat Swait() until SOUND.Playing == false
  521. EFFECT:remove()
  522. end
  523. else
  524. if PLAYSSOUND == false then
  525. EFFECT:remove()
  526. else
  527. repeat Swait() until SOUND.Playing == false
  528. EFFECT:remove()
  529. end
  530. end
  531. end))
  532. end
  533.  
  534. function MakeForm(PART,TYPE)
  535. if TYPE == "Cyl" then
  536. local MSH = IT("CylinderMesh",PART)
  537. elseif TYPE == "Ball" then
  538. local MSH = IT("SpecialMesh",PART)
  539. MSH.MeshType = "Sphere"
  540. elseif TYPE == "Wedge" then
  541. local MSH = IT("SpecialMesh",PART)
  542. MSH.MeshType = "Wedge"
  543. end
  544. end
  545.  
  546. Debris = game:GetService("Debris")
  547.  
  548. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  549. local DIRECTION = CF(StartPos,EndPos).lookVector
  550. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  551. end
  552.  
  553. function turnto(position)
  554. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  555. end
  556.  
  557. --//=================================\\
  558. --|| WEAPON CREATION
  559. --\\=================================//
  560.  
  561. local SKILLTEXTCOLOR = BRICKC"Mulberry".Color
  562. local SKILLFONT = "Bodoni"
  563. local SKILLTEXTSIZE = 7
  564.  
  565. local naeeym2 = Instance.new("BillboardGui",Character)
  566. naeeym2.AlwaysOnTop = true
  567. naeeym2.Size = UDim2.new(5,35,2,15)
  568. naeeym2.StudsOffset = Vector3.new(0,1.2,4)
  569. naeeym2.Adornee = Character.Head
  570. naeeym2.Name = "Name"
  571. naeeym2.PlayerToHideFrom = Player
  572. local tecks2 = Instance.new("TextLabel",naeeym2)
  573. tecks2.BackgroundTransparency = 1
  574. tecks2.TextScaled = true
  575. tecks2.BorderSizePixel = 0
  576. tecks2.Text = "Darkseed"
  577. tecks2.Font = SKILLFONT
  578. tecks2.TextSize = 30
  579. tecks2.TextStrokeTransparency = 0
  580. tecks2.TextColor3 = C3(0,0,0)
  581. tecks2.TextStrokeColor3 = BRICKC"Mulberry".Color
  582. tecks2.Size = UDim2.new(1,0,0.5,0)
  583. tecks2.Parent = naeeym2
  584.  
  585. Humanoid.Died:connect(function()
  586. ATTACK = true
  587. KillChildren(Character)
  588. end)
  589.  
  590. local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  591. local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  592. local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  593.  
  594. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Darkheart Spire", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1")
  595. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Darkheart Toss", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
  596. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Darkseed Barrage", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
  597.  
  598. --//=================================\\
  599. --|| DAMAGE FUNCTIONS
  600. --\\=================================//
  601.  
  602. function StatLabel(CFRAME, TEXT, COLOR)
  603. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  604. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  605. local BODYGYRO = IT("BodyGyro", STATPART)
  606. game:GetService("Debris"):AddItem(STATPART ,5)
  607. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  608. BILLBOARDGUI.Adornee = STATPART
  609. BILLBOARDGUI.Size = UD2(1.5, 0, 1.5 ,0)
  610. BILLBOARDGUI.StudsOffset = VT(-1, 2, 0)
  611. BILLBOARDGUI.AlwaysOnTop = false
  612. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  613. TEXTLABEL.BackgroundTransparency = 1
  614. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  615. TEXTLABEL.Text = TEXT
  616. TEXTLABEL.Font = SKILLFONT
  617. TEXTLABEL.FontSize="Size42"
  618. TEXTLABEL.TextColor3 = COLOR
  619. TEXTLABEL.TextStrokeTransparency = 0
  620. TEXTLABEL.TextScaled = true
  621. TEXTLABEL.TextWrapped = true
  622. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  623. for i = 1, 50 do
  624. Swait()
  625. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  626. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  627. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  628. end
  629. THEPART.Parent = nil
  630. end),STATPART, TEXTLABEL)
  631. end
  632.  
  633. --//=================================\\
  634. --|| DAMAGING
  635. --\\=================================//
  636.  
  637. function ApplyDamage(Humanoid,Damage,CritRate,CritMultiplier)
  638. local LOWDMG = false
  639. local defence = Instance.new("BoolValue",Humanoid.Parent)
  640. defence.Name = ("HitBy"..Player.Name)
  641. game:GetService("Debris"):AddItem(defence, 0.001)
  642. Damage = Damage * DAMAGEMULTIPLIER
  643. if Damage < 1 then
  644. LOWDMG = true
  645. end
  646. if Humanoid.Health ~= 0 then
  647. local CritChance = MRANDOM(1,100)
  648. if CritChance < CritRate + 1 then
  649. Damage = Damage*CritMultiplier
  650. end
  651. if Damage > Humanoid.Health then
  652. Damage = math.ceil(Humanoid.Health)
  653. if Damage == 0 then
  654. Damage = 0.1
  655. end
  656. end
  657. Humanoid.Health = Humanoid.Health - Damage
  658. if Humanoid.Parent:FindFirstChild("Head") then
  659. if LOWDMG == false then
  660. if CritChance < CritRate + 1 then
  661. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//"..Damage, C3(1, 0, 0))
  662. else
  663. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), Damage, C3(0, 0, 0))
  664. end
  665. elseif LOWDMG == true then
  666. if CritChance < CritRate + 1 then
  667. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//".."."..Damage*10, C3(1, 0, 0))
  668. else
  669. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "."..Damage*10, C3(0, 0, 0))
  670. end
  671. end
  672. end
  673. if Humanoid.Health == 0 then
  674. KillChildren(Humanoid.Parent)
  675. end
  676. end
  677. end
  678.  
  679. function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,CanBeDodgedByJumping)
  680. local dmg = math.random(min,max)
  681. for i,v in ipairs(workspace:GetChildren()) do
  682. if v:FindFirstChild("HitBy"..Player.Name) == nil then
  683. local body = v:GetChildren()
  684. for part = 1, #body do
  685. if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  686. if(body[part].Position - position).Magnitude < radius then
  687. if v.ClassName == "Model" then
  688. if v:FindFirstChildOfClass("Humanoid") then
  689. if CanBeDodgedByJumping == true then
  690. if body[part].Position.Y < position.Y+5 then
  691. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  692. end
  693. else
  694. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  695. end
  696. if maxstrength ~= 0 then
  697. local bv = Instance.new("BodyVelocity")
  698. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  699. bv.velocity = CF(position,body[part].Position).lookVector*maxstrength
  700. bv.Parent = body[part]
  701. Debris:AddItem(bv,0.2)
  702. end
  703. end
  704. end
  705. end
  706. end
  707. end
  708. end
  709. if v:FindFirstChild("HitBy"..Player.Name) then
  710. v:FindFirstChild("HitBy"..Player.Name):remove()
  711. end
  712. end
  713. end
  714.  
  715. function KillChildren(v)
  716. local PARTS = {}
  717. coroutine.resume(coroutine.create(function()
  718. v:BreakJoints()
  719. for _, c in pairs(v:GetChildren()) do
  720. if c.ClassName == "Part" or c.ClassName == "MesPart" then
  721. if c.Transparency < 1 then
  722. if c:FindFirstChildOfClass("Decal") then
  723. c:FindFirstChildOfClass("Decal"):remove()
  724. end
  725. c.Parent = Effects
  726. c.Material = "Neon"
  727. c.Color = C3(0,0,0)
  728. c.Transparency = 0
  729. c.CanCollide = true
  730. c.Anchored = true
  731. if c:FindFirstChildOfClass("SpecialMesh") then
  732. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  733. end
  734. if c:FindFirstChildOfClass("Part") then
  735. c:FindFirstChildOfClass("Part").Anchored = true
  736. c:FindFirstChildOfClass("Part").Color = C3(0,0,0)
  737. c:FindFirstChildOfClass("Part").Material = "Neon"
  738. c:FindFirstChildOfClass("Part").Parent = Effects
  739. table.insert(PARTS,c:FindFirstChildOfClass("Part"))
  740. end
  741. table.insert(PARTS,c)
  742. end
  743. end
  744. end
  745. wait(0.25)
  746. for e = 1, #PARTS do
  747. if PARTS[e] ~= nil then
  748. local c = PARTS[e]
  749. local bv = IT("BodyVelocity")
  750. bv.maxForce = VT(1,1,1)*1e5
  751. bv.velocity = VT(math.random()-.5, 0, math.random()-.5).unit*2*40
  752. bv.Parent = c
  753. c.Anchored = false
  754. Debris:AddItem(c,5)
  755. end
  756. end
  757. end))
  758. end
  759.  
  760. --//=================================\\
  761. --|| ATTACK FUNCTIONS AND STUFF
  762. --\\=================================//
  763.  
  764. function DarkheartSpire()
  765. local HITFLOOR,HITPOS,NORMAL = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 7, Character)
  766. if HITFLOOR ~= nil then
  767. ATTACK = true
  768. Rooted = false
  769. local GYRO = IT("BodyGyro",RootPart)
  770. GYRO.D = 100
  771. GYRO.P = 2000
  772. GYRO.MaxTorque = VT(0,40000000,0)
  773. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  774. for i=0, 1, 0.1 / Animation_Speed do
  775. Swait()
  776. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  777. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(-15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  778. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  779. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(-45), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(32 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  780. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(5), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  781. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  782. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  783. end
  784. local AIMPOS = Mouse.Hit.p
  785. coroutine.resume(coroutine.create(function()
  786. local FRAME = RootPart.CFrame*CF(0,-8,-2)
  787. local SPIRE = CreatePart(3, Effects, "Neon", 0,0, "Really black", "SPIRE", VT(2,45,2))
  788. CreateSound("93724183", SPIRE, 5, 1, false)
  789. MakeForm(SPIRE,"Ball")
  790. SPIRE.Color = C3(0,0,0)
  791. for i = 1, 145 do
  792. Swait()
  793. local HITFLOOR,HITPOS,NORMAL = Raycast(SPIRE.Position+VT(0,5,0), (CF(SPIRE.Position, SPIRE.Position + VT(0, -1, 0))).lookVector, 100, Character)
  794. if HITFLOOR then
  795. SPIRE.CFrame = FRAME*CF(0,0,-i)
  796. local POS = HITPOS.Y
  797. if POS then
  798. SPIRE.CFrame = CF(VT(SPIRE.Position.X,POS-3,SPIRE.Position.Z))
  799. WACKYEFFECT({EffectType = "Block", Size = VT(3,3,3), Size2 = VT(2,2,2), Transparency = 0, Transparency2 = 1, CFrame = CF(SPIRE.Position+VT(0,3,0)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = HITFLOOR.Material, Color = HITFLOOR.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  800. end
  801. AoEDamage(SPIRE.Position,7,2,3,6,2,4,false)
  802. else
  803. --break
  804. end
  805. end
  806. for i = 1, 25 do
  807. Swait()
  808. SPIRE.CFrame = SPIRE.CFrame*CF(0,-0.75,0)
  809. end
  810. SPIRE:remove()
  811. end))
  812. for i=0, 0.15, 0.1 / Animation_Speed do
  813. Swait()
  814. GYRO.cframe = CF(RootPart.Position,AIMPOS)
  815. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(85 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  816. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-85 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  817. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(90 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  818. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(5), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  819. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  820. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  821. end
  822. for i=0, 1, 0.1 / Animation_Speed do
  823. Swait()
  824. GYRO.cframe = CF(RootPart.Position,AIMPOS)
  825. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(85 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  826. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-85 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  827. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(145), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-15 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  828. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  829. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  830. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  831. end
  832. GYRO:remove()
  833. ATTACK = false
  834. Rooted = false
  835. end
  836. end
  837.  
  838. function DarkheartToss()
  839. ATTACK = true
  840. Rooted = false
  841. local GYRO = IT("BodyGyro",RootPart)
  842. GYRO.D = 100
  843. GYRO.P = 2000
  844. GYRO.MaxTorque = VT(0,40000000,0)
  845. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  846. local Darkheart = CreatePart(3, Effects, "SmoothPlastic", 0, 0, "Really black", "Darkheart", VT(1,1,1),false)
  847. local SwordWeld = CreateWeldOrSnapOrMotor("Weld", Darkheart, RightArm, Darkheart, CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, -1.8))
  848. local MSH = IT("SpecialMesh",Darkheart)
  849. MSH.MeshId = "rbxasset://fonts/sword.mesh"
  850. Darkheart.Color = C3(0,0,0)
  851. repeat
  852. Swait()
  853. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  854. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  855. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  856. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 1 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(160), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  857. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(90), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-25 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  858. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  859. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  860. until HOLD == true
  861. Rooted = true
  862. CreateSound("1112042117", RightArm, 5, 1.2, false)
  863. SwordWeld:remove()
  864. coroutine.resume(coroutine.create(function()
  865. local DISTANCE = (RootPart.Position - Mouse.Hit.p).Magnitude
  866. local NoHit,HitPos,NORMAL = Raycast(RootPart.Position, RootPart.CFrame.lookVector, DISTANCE, workspace)
  867. local ThrowHit,HitPos2,NORMAL2 = Raycast(RootPart.Position, CF(RootPart.Position,VT(HitPos.X,Mouse.Hit.p.Y,HitPos.Z)).lookVector, 1000, Character)
  868. if ThrowHit then
  869. Darkheart.CFrame = CF(HitPos2,RootPart.Position)*ANGLES(RAD(0),RAD(0),RAD(180))
  870. weldBetween(ThrowHit,Darkheart)
  871. if ThrowHit.Parent:FindFirstChildOfClass("Humanoid") then
  872. CreateSound("1306077413", ThrowHit, 5, 1, false)
  873. local HUM = ThrowHit.Parent:FindFirstChildOfClass("Humanoid")
  874. if ThrowHit.Name ~= "Head" and ThrowHit.Name ~= "Torso" and ThrowHit.Name ~= "UpperTorso" then
  875. for i = 1, 15 do
  876. ApplyDamage(HUM,1,2,2)
  877. wait()
  878. end
  879. elseif ThrowHit.Name == "Head" then
  880. for i = 1, 15 do
  881. ApplyDamage(HUM,3,2,2)
  882. wait()
  883. end
  884. elseif ThrowHit.Name == "Torso" or ThrowHit.Name == "UpperTorso" then
  885. for i = 1, 15 do
  886. ApplyDamage(HUM,2,2,2)
  887. wait()
  888. end
  889. end
  890. wait(2)
  891. for i = 1, 10 do
  892. Swait()
  893. Darkheart.Transparency = i/10
  894. end
  895. Darkheart:remove()
  896. else
  897. wait(2)
  898. for i = 1, 10 do
  899. Swait()
  900. Darkheart.Transparency = i/10
  901. end
  902. Darkheart:remove()
  903. end
  904. else
  905. Darkheart:remove()
  906. end
  907. end))
  908. for i=0, 1, 0.1 / Animation_Speed do
  909. Swait()
  910. GYRO.cframe = CF(RootPart.Position,Darkheart.Position)
  911. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(55 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  912. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-55 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  913. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5 + 0.25 * COS(SINE / 12), -0.4) * ANGLES(RAD(90), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(55 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  914. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-5 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  915. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  916. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  917. end
  918. GYRO:remove()
  919. ATTACK = false
  920. Rooted = false
  921. end
  922.  
  923. function DarkseedBarrage()
  924. ATTACK = true
  925. Rooted = true
  926. local GYRO = IT("BodyGyro",RootPart)
  927. GYRO.D = 100
  928. GYRO.P = 2000
  929. GYRO.MaxTorque = VT(0,4000000,0)
  930. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  931. for i=1, 35 do
  932. Swait()
  933. WACKYEFFECT({Time = 5, EffectType = "Sphere", Size = VT(5,5,5), Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0.25, CFrame = RightArm.CFrame*CF(0,-2,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = 0.6, SoundVolume = 6})
  934. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  935. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 1 / Animation_Speed)
  936. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-45 - 4 * SIN(SINE / 12))), 1 / Animation_Speed)
  937. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.025 * COS(SINE / 12), -0.5) * ANGLES(RAD(90), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(45 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  938. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.025 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  939. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  940. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  941. end
  942. local BEAM = CreatePart(3, Effects, "Neon", 0, 1, "Mulberry", "Lazer", VT(0,0,0))
  943. local LOOP = CreateSound("289315275", RightArm, 5, 1.2, false)
  944. local MSH = IT("CylinderMesh",BEAM)
  945. local TOCH = BEAM.Touched:Connect(function(hit)
  946. if hit.Anchored == false and hit.Parent ~= Head and hit.Parent ~= Character and hit.Parent ~= Effects then
  947. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  948. ApplyDamage(hit.Parent:FindFirstChildOfClass("Humanoid"),0.2,2,2)
  949. end
  950. end
  951. end)
  952. local I = 0
  953. repeat
  954. Swait()
  955. I = I + 1
  956. if I <= 10 then
  957. BEAM.Transparency = BEAM.Transparency - 0.1
  958. end
  959. local STARTPOS = RightArm.CFrame*CF(0,-2,0).p
  960. local ENDHIT,ENDPOS = CastProperRay(STARTPOS,Mouse.Hit.p,650,Character)
  961. local DISTANCE = (STARTPOS - ENDPOS).Magnitude
  962. BEAM.CFrame = CF(STARTPOS,ENDPOS)*CF(0,0,-DISTANCE/2)*ANGLES(RAD(90),RAD(0),RAD(0))
  963. BEAM.Size = VT(1,DISTANCE,1)
  964. WACKYEFFECT({Time = 5, EffectType = "Sphere", Size = VT(3,3,3), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 0.25, CFrame = RightArm.CFrame*CF(0,-2,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = 0.6, SoundVolume = 6})
  965. WACKYEFFECT({Time = 5, EffectType = "Sphere", Size = VT(3,3,3), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 0.25, CFrame = CF(ENDPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = 0.6, SoundVolume = 6})
  966. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  967. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 1 / Animation_Speed)
  968. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-45 - 4 * SIN(SINE / 12))), 1 / Animation_Speed)
  969. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.025 * COS(SINE / 12), -0.5) * ANGLES(RAD(90), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(45 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  970. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.025 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  971. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  972. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  973. if ENDHIT ~= nil then
  974. if ENDHIT.Anchored == false and ENDHIT.Parent ~= Effects then
  975. if ENDHIT.Parent:FindFirstChildOfClass("Humanoid") then
  976. ApplyDamage(ENDHIT.Parent:FindFirstChildOfClass("Humanoid"),0.1,2,2)
  977. end
  978. end
  979. end
  980. until LOOP.Playing == false
  981. BEAM:remove()
  982. GYRO:remove()
  983. ATTACK = false
  984. Rooted = false
  985. end
  986.  
  987. --//=================================\\
  988. --|| ASSIGN THINGS TO KEYS
  989. --\\=================================//
  990.  
  991. function MouseDown(Mouse)
  992. HOLD = true
  993. if ATTACK == false then
  994. end
  995. end
  996.  
  997. function MouseUp(Mouse)
  998. HOLD = false
  999. end
  1000.  
  1001. function KeyDown(Key)
  1002. KEYHOLD = true
  1003. if Key == "z" and ATTACK == false then
  1004. DarkheartSpire()
  1005. end
  1006.  
  1007. if Key == "b" and ATTACK == false then
  1008. DarkheartToss()
  1009. end
  1010.  
  1011. if Key == "c" and ATTACK == false then
  1012. DarkseedBarrage()
  1013. end
  1014. end
  1015.  
  1016. function KeyUp(Key)
  1017. KEYHOLD = false
  1018. end
  1019.  
  1020. Mouse.Button1Down:connect(function(NEWKEY)
  1021. MouseDown(NEWKEY)
  1022. end)
  1023. Mouse.Button1Up:connect(function(NEWKEY)
  1024. MouseUp(NEWKEY)
  1025. end)
  1026. Mouse.KeyDown:connect(function(NEWKEY)
  1027. KeyDown(NEWKEY)
  1028. end)
  1029. Mouse.KeyUp:connect(function(NEWKEY)
  1030. KeyUp(NEWKEY)
  1031. end)
  1032.  
  1033. --//=================================\\
  1034. --\\=================================//
  1035.  
  1036.  
  1037. function unanchor()
  1038. if UNANCHOR == true then
  1039. g = Character:GetChildren()
  1040. for i = 1, #g do
  1041. if g[i].ClassName == "Part" then
  1042. g[i].Anchored = false
  1043. end
  1044. end
  1045. end
  1046. end
  1047.  
  1048.  
  1049. --//=================================\\
  1050. --|| WRAP THE WHOLE SCRIPT UP
  1051. --\\=================================//
  1052.  
  1053. Humanoid.Changed:connect(function(Jump)
  1054. if Jump == "Jump" and (Disable_Jump == true) then
  1055. Humanoid.Jump = false
  1056. end
  1057. end)
  1058.  
  1059. local top = Instance.new("Shirt")
  1060. top.ShirtTemplate = "rbxassetid://131708604"
  1061. top.Parent = Character
  1062. top.Name = "DarkseedClothes"
  1063. local bottom = Instance.new("Pants")
  1064. bottom.PantsTemplate = "rbxassetid://131708657"
  1065. bottom.Parent = Character
  1066. bottom.Name = "DarkseedClothes"
  1067.  
  1068. Humanoid.HipHeight = 1
  1069.  
  1070. while true do
  1071. Swait()
  1072. Character.Parent = workspace
  1073. Humanoid.Parent = Character
  1074. script.Parent = WEAPONGUI
  1075. ANIMATE.Parent = nil
  1076. if Humanoid then
  1077. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1078. IDLEANIMATION:Play()
  1079. end
  1080. SINE = SINE + CHANGE
  1081. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1082. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1083. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 6, Character)
  1084. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1085. if ATTACK == false then
  1086. if TORSOVELOCITY < 1 then
  1087. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 0.5 * SIN(SINE / 12)), RAD(0), RAD(5 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  1088. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-5 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  1089. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1090. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-5 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1091. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1092. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1093. elseif TORSOVELOCITY > 1 then
  1094. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(Speed/3 + 0.5 * SIN(SINE / 12)), RAD(0), RAD(5 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  1095. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-Speed/3 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-5 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  1096. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(15 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1097. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-15 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1098. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1099. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1100. end
  1101. end
  1102. unanchor()
  1103. Humanoid.MaxHealth = "inf"
  1104. Humanoid.Health = "inf"
  1105. if Rooted == false then
  1106. Disable_Jump = false
  1107. Humanoid.WalkSpeed = Speed
  1108. elseif Rooted == true then
  1109. Disable_Jump = true
  1110. Humanoid.WalkSpeed = 0
  1111. end
  1112. Humanoid.DisplayDistanceType = "None"
  1113. for _, c in pairs(Character:GetChildren()) do
  1114. if c.ClassName == "Part" and c.Name ~= "Eye" then
  1115. c.Material = "Neon"
  1116. if c:FindFirstChildOfClass("ParticleEmitter") then
  1117. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  1118. end
  1119. c.Color = C3(0,0,0)
  1120. if c == Head then
  1121. if c:FindFirstChild("Pumpkin") == nil then
  1122. local M = CreateMesh("SpecialMesh", c, "FileMesh", "1158007", "5162958", VT(1,1,1)*0.45, VT(0,0.25,0))
  1123. M.Name = "Pumpkin"
  1124. local FIRE = CreatePart(3, Head, "Neon", 0, 0, "Mulberry", "Fire", VT(1,1,1)*1.7,false)
  1125. MakeForm(FIRE,"Ball")
  1126. FIRE.CFrame = Head.CFrame*CF(0,0.1,0)
  1127. weldBetween(Head,FIRE)
  1128. end
  1129. if c:FindFirstChild("face") then
  1130. c.face:remove()
  1131. end
  1132. end
  1133. elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.Name == "Body Colors" then
  1134. c:remove()
  1135. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "DarkseedClothes" then
  1136. c:remove()
  1137. end
  1138. end
  1139. sick.Parent = Character
  1140. sick.Playing = true
  1141. AoEDamage(Torso.Position,5,1,1,0,0,2,false)
  1142. if Head:FindFirstChildOfClass("Sound") then
  1143. Head:FindFirstChildOfClass("Sound"):remove()
  1144. end
  1145. end
  1146.  
  1147. --//=================================\\
  1148. --\\=================================//
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154. --//====================================================\\--
  1155. --|| END OF SCRIPT
  1156. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement