Advertisement
Sacki

Untitled

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