Advertisement
JasonLion

Unstable Matter (E d i t)

Jun 2nd, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 74.44 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 = owner
  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, EDIT BY XXUNORIBOASXX
  89. --\\====================================================//--
  90.  
  91.  
  92.  
  93. wait(0.2)
  94.  
  95.  
  96.  
  97. Player = owner
  98. PlayerGui = Player.PlayerGui
  99. Cam = workspace.CurrentCamera
  100. Backpack = Player.Backpack
  101. Character = Player.Character
  102. Humanoid = Character.Humanoid
  103. RootPart = Character["HumanoidRootPart"]
  104. Torso = Character["Torso"]
  105. Head = Character["Head"]
  106. RightArm = Character["Right Arm"]
  107. LeftArm = Character["Left Arm"]
  108. RightLeg = Character["Right Leg"]
  109. LeftLeg = Character["Left Leg"]
  110. RootJoint = RootPart["RootJoint"]
  111. Neck = Torso["Neck"]
  112. RightShoulder = Torso["Right Shoulder"]
  113. LeftShoulder = Torso["Left Shoulder"]
  114. RightHip = Torso["Right Hip"]
  115. LeftHip = Torso["Left Hip"]
  116. local sick = Instance.new("Sound",Character)
  117. sick.SoundId = "rbxassetid://1837061495"
  118. sick.Looped = true
  119. sick.Pitch = 1
  120. sick.Volume = 1
  121. sick:Play()
  122.  
  123. local naeeym2 = Instance.new("BillboardGui",Character)
  124. naeeym2.AlwaysOnTop = true
  125. naeeym2.Size = UDim2.new(5,35,2,35)
  126. naeeym2.StudsOffset = Vector3.new(0,3,0)
  127. naeeym2.Adornee = Character.Head
  128. naeeym2.Name = "Name"
  129. --naeeym2.PlayerToHideFrom = Player
  130. naeeym2.MaxDistance = 200
  131. local tecks2 = Instance.new("TextLabel",naeeym2)
  132. tecks2.BackgroundTransparency = 1
  133. tecks2.TextScaled = true
  134. tecks2.BorderSizePixel = 0
  135. tecks2.Text = "Unstable Matter"
  136. tecks2.Font = "SciFi"
  137. tecks2.TextSize = 30
  138. tecks2.TextStrokeTransparency = 1
  139. tecks2.TextColor3 = Color3.new(255,255,255)
  140. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  141. tecks2.Size = UDim2.new(1,0,0.5,0)
  142. tecks2.Parent = naeeym2
  143.  
  144. IT = Instance.new
  145. CF = CFrame.new
  146. VT = Vector3.new
  147. RAD = math.rad
  148. C3 = Color3.new
  149. UD2 = UDim2.new
  150. BRICKC = BrickColor.new
  151. ANGLES = CFrame.Angles
  152. EULER = CFrame.fromEulerAnglesXYZ
  153. COS = math.cos
  154. ACOS = math.acos
  155. SIN = math.sin
  156. ASIN = math.asin
  157. ABS = math.abs
  158. MRANDOM = math.random
  159. FLOOR = math.floor
  160.  
  161. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  162. local NEWMESH = IT(MESH)
  163. if MESH == "SpecialMesh" then
  164. NEWMESH.MeshType = MESHTYPE
  165. if MESHID ~= "nil" and MESHID ~= "" then
  166. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  167. end
  168. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  169. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  170. end
  171. end
  172. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  173. NEWMESH.Scale = SCALE
  174. NEWMESH.Parent = PARENT
  175. return NEWMESH
  176. end
  177.  
  178. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  179. local NEWPART = IT("Part")
  180. NEWPART.formFactor = FORMFACTOR
  181. NEWPART.Reflectance = REFLECTANCE
  182. NEWPART.Transparency = TRANSPARENCY
  183. NEWPART.CanCollide = false
  184. NEWPART.Locked = true
  185. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  186. NEWPART.Name = NAME
  187. NEWPART.Size = SIZE
  188. NEWPART.Position = Torso.Position
  189. NEWPART.Material = MATERIAL
  190. NEWPART:BreakJoints()
  191. NEWPART.Parent = PARENT
  192. return NEWPART
  193. end
  194.  
  195.  
  196. --//=================================\\
  197. --|| CUSTOMIZATION
  198. --\\=================================//
  199.  
  200. Class_Name = "Unstable.Matter"
  201. Weapon_Name = "Add-ons"
  202.  
  203. Custom_Colors = {
  204. Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
  205. Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
  206.  
  207. Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
  208. Custom_Color_4 = BRICKC("Really black"); --Color for the secondary bar.
  209. Custom_Color_5 = BRICKC("Blue"); --Color for the mana bar.
  210. Custom_Color_6 = BRICKC("Red"); --Color for the health bar.
  211. Custom_Color_7 = BRICKC("Really blue"); --Color for the stun bar.
  212.  
  213. Custom_Color_8 = BRICKC("Really black"); --Background for the mana bar.
  214. Custom_Color_9 = BRICKC("Really black"); --Background for the secondary mana bar.
  215. Custom_Color_10 = BRICKC("Really black"); --Background for the stun bar.
  216. Custom_Color_11 = BRICKC("Really black"); --Background for the health bar.
  217. Custom_Color_12 = BRICKC("Really black"); --Background for the abilities.
  218. }
  219.  
  220.  
  221. Player_Size = 1 --Size of the player.
  222. Animation_Speed = 8
  223. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  224.  
  225. local Speed = 16
  226. local Effects2 = {}
  227.  
  228. p.Chatted:connect(function(msg)
  229.  
  230. if msg:lower():sub(1,#Prefix+#'color r ')==Prefix..'color r ' then
  231. local v = tonumber(msg:sub(#Prefix+#'color r '+1))
  232. main.r = v
  233. elseif msg:lower():sub(1,#Prefix+#'color g ')==Prefix..'color g ' then
  234. local v = tonumber(msg:sub(#Prefix+#'color g '+1))
  235. main.g = v
  236. elseif msg:lower():sub(1,#Prefix+#'color b ')==Prefix..'color b ' then
  237. local v = tonumber(msg:sub(#Prefix+#'color b '+1))
  238. main.b = v
  239. elseif msg:lower():sub(1,#Prefix+#'color v ')==Prefix..'color v ' then
  240. local v = tonumber(msg:sub(#Prefix+#'color v '+1))
  241. if v > 1 then main.v = 1 elseif v < -1 then main.v = -1 else main.v = v end
  242.  
  243. elseif msg:lower():sub(1,#Prefix+#'theme ')==Prefix..'theme ' then
  244. local v = tonumber(msg:sub(#Prefix+#'theme '+1))
  245. themeid = v
  246. music(themeid,themepitch)
  247.  
  248. elseif msg:lower():sub(1,#Prefix+#'pitch ')==Prefix..'pitch ' then
  249. local v = tonumber(msg:sub(#Prefix+#'pitch '+1))
  250. themepitch = v
  251. music(themeid,themepitch)
  252.  
  253. elseif msg:lower():sub(1,#Prefix+#'prefix ')==Prefix..'prefix ' then
  254. local v = msg:sub(#Prefix+#'prefix '+1)
  255. Prefix = v
  256.  
  257. elseif msg:lower():sub(1,#Prefix+#'reset')==Prefix..'reset' then
  258. main.r = 0
  259. main.g = 100
  260. main.b = 255
  261. main.v = 1
  262. themeid = 175635113
  263. themepitch = 1
  264. music(themeid,themepitch)
  265.  
  266. end
  267.  
  268. end)
  269. ----------------------------------------------------------------------------
  270.  
  271. --//=================================\\
  272. --|| END OF CUSTOMIZATION
  273. --\\=================================//
  274.  
  275. local function weldBetween(a, b)
  276. local weldd = Instance.new("ManualWeld")
  277. weldd.Part0 = a
  278. weldd.Part1 = b
  279. weldd.C0 = CFrame.new()
  280. weldd.C1 = b.CFrame:inverse() * a.CFrame
  281. weldd.Parent = a
  282. return weldd
  283. end
  284.  
  285. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  286. local acs = Instance.new("Part")
  287. acs.CanCollide = false
  288. acs.Anchored = false
  289. acs.Size = Vector3.new(0,0,0)
  290. acs.CFrame = attachmentpart.CFrame
  291. acs.Parent = Character
  292. acs.BrickColor = color
  293. local meshs = Instance.new("SpecialMesh")
  294. meshs.MeshId = mesh
  295. meshs.TextureId = texture
  296. meshs.Parent = acs
  297. meshs.Scale = scale
  298. meshs.Offset = offset
  299. weldBetween(attachmentpart,acs)
  300. end
  301.  
  302. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  303. if TYPE == "Gem" then
  304. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  305. acs.Anchored = false
  306. acs.CanCollide = false
  307. acs.CFrame = PART.CFrame
  308. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  309. weldBetween(PART,acs)
  310. elseif TYPE == "Skull" then
  311. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  312. acs.Anchored = false
  313. acs.CanCollide = false
  314. acs.CFrame = PART.CFrame
  315. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  316. weldBetween(PART,acs)
  317. elseif TYPE == "Eye" then
  318. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  319. acs.Anchored = false
  320. acs.CanCollide = false
  321. acs.CFrame = PART.CFrame
  322. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  323. weldBetween(PART,acs)
  324. end
  325. end
  326.  
  327. --//=================================\\
  328. --|| USEFUL VALUES
  329. --\\=================================//
  330.  
  331. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  332. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  333. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  334. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  335. local CO1 = 0
  336. local CO2 = 0
  337. local CO3 = 0
  338. local CO4 = 0
  339. local CHANGEDEFENSE = 0
  340. local CHANGEDAMAGE = 0
  341. local CHANGEMOVEMENT = 0
  342. local ANIM = "Idle"
  343. local ATTACK = false
  344. local EQUIPPED = false
  345. local HOLD = false
  346. local COMBO = 1
  347. local LASTPOINT = nil
  348. local BLCF = nil
  349. local SCFR = nil
  350. local STAGGERHITANIM = false
  351. local STAGGERANIM = false
  352. local STUNANIM = false
  353. local CRITCHANCENUMBER = 0
  354. local IDLENUMBER = 0
  355. local DONUMBER = 0
  356. local HANDIDLE = false
  357. local SINE = 0
  358. local CHANGE = 2 / Animation_Speed
  359. local WALKINGANIM = false
  360. local WALK = 0
  361. local KEYHOLD = false
  362. local DISABLEJUMPING = false
  363. local HASBEENBLOCKED = false
  364. local STUNDELAYNUMBER = 0
  365. local MANADELAYNUMBER = 0
  366. local SECONDARYMANADELAYNUMBER = 0
  367. local ROBLOXIDLEANIMATION = IT("Animation")
  368. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  369. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  370. --ROBLOXIDLEANIMATION.Parent = Humanoid
  371. local WEAPONGUI = IT("ScreenGui", nil)
  372. WEAPONGUI.Name = "Weapon GUI"
  373. local WEAPONTOOL = IT("HopperBin", nil)
  374. WEAPONTOOL.Name = Weapon_Name
  375. local Weapon = IT("Model")
  376. Weapon.Name = Weapon_Name
  377. local Effects = IT("Folder", Weapon)
  378. Effects.Name = "Effects"
  379. local ANIMATOR = Humanoid.Animator
  380. local ANIMATE = Character.Animate
  381. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  382. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  383. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  384. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  385. local CUTSOUNDS = {"645750958","645747150"}
  386. local VICIOUSWOOSH = "658941933"
  387. local RELEASESOUND = "565538688"
  388. local CHARGESOUND = "565538601"
  389. local UNANCHOR = true
  390. local MAGICPARTICLE = "1229782954"
  391.  
  392. --//=================================\\
  393. --\\=================================//
  394.  
  395. --//=================================\\
  396. --|| STATS
  397. --\\=================================//
  398.  
  399. if Character:FindFirstChild("Stats") ~= nil then
  400. Character:FindFirstChild("Stats").Parent = nil
  401. end
  402.  
  403. local Stats = IT("Folder", nil)
  404. Stats.Name = "Stats"
  405. local ChangeStat = IT("Folder", Stats)
  406. ChangeStat.Name = "ChangeStat"
  407. local Defense = IT("NumberValue", Stats)
  408. Defense.Name = "Defense"
  409. Defense.Value = 1
  410. local Movement = IT("NumberValue", Stats)
  411. Movement.Name = "Movement"
  412. Movement.Value = 1
  413. local Damage = IT("NumberValue", Stats)
  414. Damage.Name = "Damage"
  415. Damage.Value = 1
  416. local Mana = IT("NumberValue", Stats)
  417. Mana.Name = "Mana"
  418. Mana.Value = 0
  419. local SecondaryMana = IT("NumberValue", Stats)
  420. SecondaryMana.Name = "SecondaryMana"
  421. SecondaryMana.Value = 0
  422. local CanCrit = IT("BoolValue", Stats)
  423. CanCrit.Name = "CanCrit"
  424. CanCrit.Value = false
  425. local CritChance = IT("NumberValue", Stats)
  426. CritChance.Name = "CritChance"
  427. CritChance.Value = 20
  428. local CanPenetrateArmor = IT("BoolValue", Stats)
  429. CanPenetrateArmor.Name = "CanPenetrateArmor"
  430. CanPenetrateArmor.Value = false
  431. local AntiTeamKill = IT("BoolValue", Stats)
  432. AntiTeamKill.Name = "AntiTeamKill"
  433. AntiTeamKill.Value = false
  434. local Rooted = IT("BoolValue", Stats)
  435. Rooted.Name = "Rooted"
  436. Rooted.Value = false
  437. local Block = IT("BoolValue", Stats)
  438. Block.Name = "Block"
  439. Block.Value = false
  440. local RecentEnemy = IT("ObjectValue", Stats)
  441. RecentEnemy.Name = "RecentEnemy"
  442. RecentEnemy.Value = nil
  443. local StaggerHit = IT("BoolValue", Stats)
  444. StaggerHit.Name = "StaggerHit"
  445. StaggerHit.Value = false
  446. local Stagger = IT("BoolValue", Stats)
  447. Stagger.Name = "Stagger"
  448. Stagger.Value = false
  449. local Stun = IT("BoolValue", Stats)
  450. Stun.Name = "Stun"
  451. Stun.Value = false
  452. local StunValue = IT("NumberValue", Stats)
  453. StunValue.Name = "StunValue"
  454. StunValue.Value = 0
  455.  
  456.  
  457. --//=================================\\
  458. --\\=================================//
  459.  
  460.  
  461.  
  462.  
  463.  
  464. --//=================================\\
  465. --|| DEBUFFS / BUFFS
  466. --\\=================================//
  467.  
  468. local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
  469. DEFENSECHANGE1.Name = "ChangeDefense"
  470. DEFENSECHANGE1.Value = 0
  471.  
  472. local MOVEMENTCHANGE1 = IT("NumberValue", nil)
  473. MOVEMENTCHANGE1.Name = "ChangeMovement"
  474. MOVEMENTCHANGE1.Value = 0
  475.  
  476. --//=================================\\
  477. --\\=================================//
  478.  
  479.  
  480.  
  481.  
  482.  
  483. --//=================================\\
  484. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  485. --\\=================================//
  486.  
  487. ArtificialHB = Instance.new("BindableEvent", script)
  488. ArtificialHB.Name = "ArtificialHB"
  489.  
  490. script:WaitForChild("ArtificialHB")
  491.  
  492. frame = Frame_Speed
  493. tf = 0
  494. allowframeloss = false
  495. tossremainder = false
  496. lastframe = tick()
  497. script.ArtificialHB:Fire()
  498.  
  499. game:GetService("RunService").Heartbeat:connect(function(s, p)
  500. tf = tf + s
  501. if tf >= frame then
  502. if allowframeloss then
  503. script.ArtificialHB:Fire()
  504. lastframe = tick()
  505. else
  506. for i = 1, math.floor(tf / frame) do
  507. script.ArtificialHB:Fire()
  508. end
  509. lastframe = tick()
  510. end
  511. if tossremainder then
  512. tf = 0
  513. else
  514. tf = tf - frame * math.floor(tf / frame)
  515. end
  516. end
  517. end)
  518.  
  519. --//=================================\\
  520. --\\=================================//
  521.  
  522.  
  523.  
  524.  
  525.  
  526. --//=================================\\
  527. --|| SOME FUNCTIONS
  528. --\\=================================//
  529.  
  530. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  531. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  532. end
  533.  
  534. function PositiveAngle(NUMBER)
  535. if NUMBER >= 0 then
  536. NUMBER = 0
  537. end
  538. return NUMBER
  539. end
  540.  
  541. function NegativeAngle(NUMBER)
  542. if NUMBER <= 0 then
  543. NUMBER = 0
  544. end
  545. return NUMBER
  546. end
  547.  
  548. function Swait(NUMBER)
  549. if NUMBER == 0 or NUMBER == nil then
  550. ArtificialHB.Event:wait()
  551. else
  552. for i = 1, NUMBER do
  553. ArtificialHB.Event:wait()
  554. end
  555. end
  556. end
  557.  
  558. function QuaternionFromCFrame(cf)
  559. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  560. local trace = m00 + m11 + m22
  561. if trace > 0 then
  562. local s = math.sqrt(1 + trace)
  563. local recip = 0.5 / s
  564. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  565. else
  566. local i = 0
  567. if m11 > m00 then
  568. i = 1
  569. end
  570. if m22 > (i == 0 and m00 or m11) then
  571. i = 2
  572. end
  573. if i == 0 then
  574. local s = math.sqrt(m00 - m11 - m22 + 1)
  575. local recip = 0.5 / s
  576. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  577. elseif i == 1 then
  578. local s = math.sqrt(m11 - m22 - m00 + 1)
  579. local recip = 0.5 / s
  580. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  581. elseif i == 2 then
  582. local s = math.sqrt(m22 - m00 - m11 + 1)
  583. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  584. end
  585. end
  586. end
  587.  
  588. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  589. local xs, ys, zs = x + x, y + y, z + z
  590. local wx, wy, wz = w * xs, w * ys, w * zs
  591. local xx = x * xs
  592. local xy = x * ys
  593. local xz = x * zs
  594. local yy = y * ys
  595. local yz = y * zs
  596. local zz = z * zs
  597. 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))
  598. end
  599.  
  600. function QuaternionSlerp(a, b, t)
  601. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  602. local startInterp, finishInterp;
  603. if cosTheta >= 0.0001 then
  604. if (1 - cosTheta) > 0.0001 then
  605. local theta = ACOS(cosTheta)
  606. local invSinTheta = 1 / SIN(theta)
  607. startInterp = SIN((1 - t) * theta) * invSinTheta
  608. finishInterp = SIN(t * theta) * invSinTheta
  609. else
  610. startInterp = 1 - t
  611. finishInterp = t
  612. end
  613. else
  614. if (1 + cosTheta) > 0.0001 then
  615. local theta = ACOS(-cosTheta)
  616. local invSinTheta = 1 / SIN(theta)
  617. startInterp = SIN((t - 1) * theta) * invSinTheta
  618. finishInterp = SIN(t * theta) * invSinTheta
  619. else
  620. startInterp = t - 1
  621. finishInterp = t
  622. end
  623. end
  624. 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
  625. end
  626.  
  627. function Clerp(a, b, t)
  628. local qa = {QuaternionFromCFrame(a)}
  629. local qb = {QuaternionFromCFrame(b)}
  630. local ax, ay, az = a.x, a.y, a.z
  631. local bx, by, bz = b.x, b.y, b.z
  632. local _t = 1 - t
  633. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  634. end
  635.  
  636. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  637. local frame = IT("Frame")
  638. frame.BackgroundTransparency = TRANSPARENCY
  639. frame.BorderSizePixel = BORDERSIZEPIXEL
  640. frame.Position = POSITION
  641. frame.Size = SIZE
  642. frame.BackgroundColor3 = COLOR
  643. frame.BorderColor3 = BORDERCOLOR
  644. frame.Name = NAME
  645. frame.Parent = PARENT
  646. return frame
  647. end
  648.  
  649. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  650. local label = IT("TextLabel")
  651. label.BackgroundTransparency = 1
  652. label.Size = UD2(1, 0, 1, 0)
  653. label.Position = UD2(0, 0, 0, 0)
  654. label.TextColor3 = C3(255, 255, 255)
  655. label.TextStrokeTransparency = STROKETRANSPARENCY
  656. label.TextTransparency = TRANSPARENCY
  657. label.FontSize = TEXTFONTSIZE
  658. label.Font = TEXTFONT
  659. label.BorderSizePixel = BORDERSIZEPIXEL
  660. label.TextScaled = true
  661. label.Text = TEXT
  662. label.Name = NAME
  663. label.Parent = PARENT
  664. return label
  665. end
  666.  
  667. function NoOutlines(PART)
  668. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  669. end
  670.  
  671.  
  672. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  673. local NEWWELD = IT(TYPE)
  674. NEWWELD.Part0 = PART0
  675. NEWWELD.Part1 = PART1
  676. NEWWELD.C0 = C0
  677. NEWWELD.C1 = C1
  678. NEWWELD.Parent = PARENT
  679. return NEWWELD
  680. end
  681.  
  682. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  683. local NEWSOUND = nil
  684. coroutine.resume(coroutine.create(function()
  685. NEWSOUND = IT("Sound", PARENT)
  686. NEWSOUND.Volume = VOLUME
  687. NEWSOUND.Pitch = PITCH
  688. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  689. --Swait()
  690. NEWSOUND:play()
  691. if DOESLOOP == false then
  692. repeat Swait() until NEWSOUND.Playing == false
  693. NEWSOUND:remove()
  694. elseif DOESLOOP == true then
  695. NEWSOUND.Looped = true
  696. end
  697. end))
  698. return NEWSOUND
  699. end
  700.  
  701. function CFrameFromTopBack(at, top, back)
  702. local right = top:Cross(back)
  703. 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)
  704. end
  705.  
  706. function CreateWave(inair,size,doesrotate,rotatedirection,waitt,part,offset,color)
  707. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
  708. local mesh = IT("SpecialMesh",wave)
  709. mesh.MeshType = "FileMesh"
  710. wave.Anchored = true
  711. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  712. mesh.Scale = VT(size,size,size)
  713. mesh.Offset = VT(0,0,-size/8)
  714. wave.CFrame = CF(part.p) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0))
  715. coroutine.resume(coroutine.create(function(PART)
  716. for i = 1, waitt do
  717. Swait()
  718. mesh.Scale = mesh.Scale + VT(size/5,0,size/5)
  719. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  720. if doesrotate == true then
  721. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
  722. end
  723. wave.Transparency = wave.Transparency + (0.5/waitt)
  724. if wave.Transparency > 0.99 then
  725. wave:remove()
  726. end
  727. end
  728. end))
  729. end
  730.  
  731. function CreateSwirl(inair,size,doesrotate,rotatedirection,waitt,part,offset,color)
  732. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
  733. local mesh = IT("SpecialMesh",wave)
  734. mesh.MeshType = "FileMesh"
  735. wave.Anchored = true
  736. mesh.MeshId = "http://www.roblox.com/asset/?id=1051557"
  737. mesh.Scale = VT(size,size,size)
  738. wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0))
  739. coroutine.resume(coroutine.create(function(PART)
  740. for i = 1, waitt do
  741. Swait()
  742. mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
  743. if doesrotate == true then
  744. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
  745. end
  746. wave.Transparency = wave.Transparency + (0.5/waitt)
  747. if wave.Transparency > 0.99 then
  748. wave:remove()
  749. end
  750. end
  751. end))
  752. end
  753.  
  754. function CreateTornado(inair,size,doesrotate,rotatedirection,waitt,part,offset,color)
  755. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
  756. local mesh = IT("SpecialMesh",wave)
  757. mesh.MeshType = "FileMesh"
  758. wave.Anchored = true
  759. mesh.MeshId = "http://www.roblox.com/asset/?id=102638417"
  760. mesh.Scale = VT(size,size,size)
  761. wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0))
  762. coroutine.resume(coroutine.create(function(PART)
  763. for i = 1, waitt do
  764. Swait()
  765. mesh.Scale = mesh.Scale + VT(size/5,0,size/5)
  766. if doesrotate == true then
  767. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
  768. end
  769. wave.Transparency = wave.Transparency + (0.5/waitt)
  770. if wave.Transparency > 0.99 then
  771. wave:remove()
  772. end
  773. end
  774. end))
  775. end
  776.  
  777. function CreateRing(inair,size,doesrotate,rotatedirection,waitt,part,offset,spin1,spin2,color)
  778. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
  779. local mesh = IT("SpecialMesh",wave)
  780. mesh.MeshType = "FileMesh"
  781. mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  782. mesh.Scale = VT(size,size,size)
  783. wave.Anchored = true
  784. mesh.Offset = VT(0,0,0)
  785. wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0))
  786. coroutine.resume(coroutine.create(function(PART)
  787. for i = 1, waitt do
  788. Swait()
  789. mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
  790. if doesrotate == true then
  791. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(spin2, rotatedirection, spin1)
  792. end
  793. wave.Transparency = wave.Transparency + (0.5/waitt)
  794. if wave.Transparency > 0.99 then
  795. wave:remove()
  796. end
  797. end
  798. end))
  799. end
  800.  
  801. function MagicSphere(size,waitt,part,color)
  802. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(0,0,0))
  803. local mesh = IT("SpecialMesh",wave)
  804. mesh.MeshType = "Sphere"
  805. wave.Anchored = true
  806. mesh.Scale = VT(size,size,size)
  807. mesh.Offset = VT(0,0,0)
  808. wave.CFrame = part * ANGLES(RAD(0),RAD(0),RAD(0))
  809. coroutine.resume(coroutine.create(function(PART)
  810. for i = 1, waitt do
  811. Swait()
  812. mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
  813. wave.Transparency = wave.Transparency + (1/waitt)
  814. if wave.Transparency > 0.99 then
  815. wave:remove()
  816. end
  817. end
  818. end))
  819. end
  820.  
  821. function MagicBlock(size,waitt,part,offset,color)
  822. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(size,size,size))
  823. local mesh = IT("BlockMesh",wave)
  824. wave.Anchored = true
  825. wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(0),RAD(0),RAD(0))
  826. coroutine.resume(coroutine.create(function(PART)
  827. for i = 1, waitt do
  828. Swait()
  829. mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
  830. wave.CFrame = CF(wave.Position) * ANGLES(RAD(math(-360,360)),RAD(math(-360,360)),RAD(math(-360,360)))
  831. wave.Transparency = wave.Transparency + (1/waitt)
  832. if wave.Transparency > 0.99 then
  833. wave:remove()
  834. end
  835. end
  836. end))
  837. end
  838.  
  839. local EyeSizes={
  840. NumberSequenceKeypoint.new(0,0.5,0),
  841. NumberSequenceKeypoint.new(1,0.2,0)
  842. }
  843. local EyeTrans={
  844. NumberSequenceKeypoint.new(0,0,0),
  845. NumberSequenceKeypoint.new(1,1,0)
  846. }
  847. local PE=Instance.new("ParticleEmitter")
  848. PE.LightEmission=0.3
  849. PE.Size=NumberSequence.new(EyeSizes)
  850. PE.Transparency=NumberSequence.new(EyeTrans)
  851. PE.Rotation=NumberRange.new(0,360)
  852. PE.LockedToPart = false
  853. PE.Speed = NumberRange.new(0,0,0)
  854. PE.ZOffset = 0.3
  855. PE.Rate = 999
  856. PE.Name = "Particles"
  857.  
  858. function CreateParticles(art,text,accel,drag,lifetime,type,isenabledbydefault,locked)
  859. local particle = nil
  860. coroutine.resume(coroutine.create(function(PART)
  861. particle = PE:Clone()
  862. Swait()
  863. particle.Rate = 999
  864. particle.Parent = art
  865. particle.Acceleration = accel
  866. if type == "Fire" then
  867. local EyeSizes={
  868. NumberSequenceKeypoint.new(0,0.5,0.3),
  869. NumberSequenceKeypoint.new(1,0.2,0.2)
  870. }
  871. particle.Size = NumberSequence.new(EyeSizes)
  872. elseif type == "Smoke" then
  873. local EyeSizes={
  874. NumberSequenceKeypoint.new(0,0.5,0),
  875. NumberSequenceKeypoint.new(1,5,0.5)
  876. }
  877. particle.Size = NumberSequence.new(EyeSizes)
  878. elseif type == "Solid" then
  879. local EyeSizes={
  880. NumberSequenceKeypoint.new(0,0.5,0),
  881. NumberSequenceKeypoint.new(1,0.5,0)
  882. }
  883. particle.Size = NumberSequence.new(EyeSizes)
  884. end
  885. particle.Lifetime=NumberRange.new(lifetime)
  886. particle.Drag = drag
  887. if locked == true then
  888. particle.LockedToPart = true
  889. end
  890. particle.Texture = "http://www.roblox.com/asset/?id="..text
  891. particle.Enabled = isenabledbydefault
  892. end))
  893. return particle
  894. end
  895.  
  896. local EyeSizes={
  897. NumberSequenceKeypoint.new(0,0.5,0),
  898. NumberSequenceKeypoint.new(1,0.2,0)
  899. }
  900. local EyeTrans={
  901. NumberSequenceKeypoint.new(0,0,0),
  902. NumberSequenceKeypoint.new(1,1,0)
  903. }
  904. local PE2=Instance.new("ParticleEmitter")
  905. PE2.LightEmission=0.8
  906. PE2.Size=NumberSequence.new(EyeSizes)
  907. PE2.Transparency=NumberSequence.new(EyeTrans)
  908. PE2.Rotation=NumberRange.new(0,360)
  909. PE2.LockedToPart = false
  910. PE2.Speed = NumberRange.new(0,0,0)
  911. PE2.ZOffset = 0.3
  912. PE2.Rate = 999
  913. PE2.VelocitySpread = 90000
  914. PE2.Name = "Particles"
  915.  
  916. function CreateParticles2(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
  917. local particle = nil
  918. coroutine.resume(coroutine.create(function(PART)
  919. particle = PE2:Clone()
  920. Swait()
  921. particle.Rate = 999
  922. particle.Parent = art
  923. particle.Acceleration = accel
  924. if type == "Fire" then
  925. local EyeSizes={
  926. NumberSequenceKeypoint.new(0,size,size/2),
  927. NumberSequenceKeypoint.new(1,size/4,size/8)
  928. }
  929. particle.Size = NumberSequence.new(EyeSizes)
  930. elseif type == "Smoke" then
  931. local EyeSizes={
  932. NumberSequenceKeypoint.new(0,0.5,0),
  933. NumberSequenceKeypoint.new(1,5,0.5)
  934. }
  935. particle.Size = NumberSequence.new(EyeSizes)
  936. elseif type == "Solid" then
  937. local EyeSizes={
  938. NumberSequenceKeypoint.new(0,0.5,0),
  939. NumberSequenceKeypoint.new(1,0.5,0)
  940. }
  941. particle.Size = NumberSequence.new(EyeSizes)
  942. end
  943. particle.Lifetime=NumberRange.new(lifetime)
  944. particle.Drag = drag
  945. if locked == true then
  946. particle.LockedToPart = true
  947. end
  948. particle.Speed = NumberRange.new(speed,speed,speed)
  949. particle.Texture = "http://www.roblox.com/asset/?id="..MAGICPARTICLE
  950. particle.Enabled = isenabledbydefault
  951. --particle.Color = ColorSequence.new(Color3.new(255, 255, 255))
  952. end))
  953. return particle
  954. end
  955.  
  956. local Decal = IT("Decal")
  957.  
  958. function CreateMagicCircle(size,doesrotate,rotatedirection,waitt,cframe,alwaysfade)
  959. local sinkhole = IT("Part")
  960. sinkhole.Size = VT(size,0,size)
  961. sinkhole.CFrame = cframe
  962. --sinkhole.Orientation = VT(0,0,0)
  963. sinkhole.Parent = Effects
  964. sinkhole.Material = "Neon"
  965. sinkhole.Color = C3(255, 255, 255)
  966. sinkhole.Anchored = true
  967. sinkhole.CanCollide = false
  968. sinkhole.Transparency = 1
  969. local decal = Decal:Clone()
  970. decal.Parent = sinkhole
  971. decal.Face = "Top"
  972. decal.Texture = "http://www.roblox.com/asset/?id=1226241606"
  973. local decal2 = Decal:Clone()
  974. decal2.Parent = sinkhole
  975. decal2.Face = "Bottom"
  976. decal2.Texture = "http://www.roblox.com/asset/?id=1226241606"
  977. coroutine.resume(coroutine.create(function(PART)
  978. for i = 1, waitt do
  979. Swait()
  980. if doesrotate == true then
  981. sinkhole.CFrame = sinkhole.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
  982. end
  983. if alwaysfade == true then
  984. decal.Transparency = decal.Transparency + (1/waitt)
  985. decal2.Transparency = decal.Transparency + (1/waitt)
  986. end
  987. if i > waitt-11 and (alwaysfade ~= true) then
  988. decal.Transparency = decal.Transparency + 0.1
  989. decal2.Transparency = decal.Transparency + 0.1
  990. end
  991. end
  992. sinkhole.Parent = nil
  993. end))
  994. return sinkhole
  995. end
  996.  
  997. --//=================================\\
  998. --\\=================================//
  999.  
  1000.  
  1001. --//=================================\\
  1002. --|| WEAPON CREATION
  1003. --\\=================================//
  1004.  
  1005. if Player_Size ~= 1 then
  1006. for _, v in pairs (Weapon:GetChildren()) do
  1007. if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
  1008. local p1 = v.Part1
  1009. v.Part1 = nil
  1010. local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
  1011. v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
  1012. v.Part1 = p1
  1013. elseif v.ClassName == "Part" then
  1014. for _, b in pairs (v:GetChildren()) do
  1015. if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
  1016. b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
  1017. end
  1018. end
  1019. end
  1020. end
  1021. end
  1022.  
  1023. Swait()
  1024.  
  1025. local Plate = IT("Part",Weapon)
  1026. Plate.Size = VT(1,0.1,1)
  1027. Plate.Transparency = 1
  1028. Plate.CanCollide = false
  1029. Plate.CFrame = LeftLeg.CFrame * CF(0,-1.1,0)
  1030. CreateParticles(Plate,MAGICPARTICLE,VT(0,2,0),2,2,"Fire",true,true)
  1031. weldBetween(LeftLeg,Plate)
  1032.  
  1033. local Plate = IT("Part",Weapon)
  1034. Plate.Size = VT(1,0.1,1)
  1035. Plate.Transparency = 1
  1036. Plate.CanCollide = false
  1037. Plate.CFrame = RightLeg.CFrame * CF(0,-1.1,0)
  1038. CreateParticles(Plate,MAGICPARTICLE,VT(0,2,0),2,2,"Fire",true,true)
  1039. weldBetween(RightLeg,Plate)
  1040.  
  1041. local Plate = IT("Part",Weapon)
  1042. Plate.Size = VT(1,0.1,1)
  1043. Plate.Transparency = 1
  1044. Plate.CanCollide = false
  1045. Plate.CFrame = RightArm.CFrame * CF(0,-1.1,0)
  1046. CreateParticles(Plate,MAGICPARTICLE,VT(0,2,0),2,2,"Fire",true,true)
  1047. weldBetween(RightArm,Plate)
  1048.  
  1049. local Plate = IT("Part",Weapon)
  1050. Plate.Size = VT(1,0.1,1)
  1051. Plate.Transparency = 1
  1052. Plate.CanCollide = false
  1053. Plate.CFrame = LeftArm.CFrame * CF(0,-1.1,0)
  1054. CreateParticles(Plate,MAGICPARTICLE,VT(0,2,0),2,2,"Fire",true,true)
  1055. weldBetween(LeftArm,Plate)
  1056.  
  1057. local eye = IT("Part",Weapon)
  1058. eye.Size = VT(0.2,0.2,0.2)
  1059. eye.Shape = "Ball"
  1060. eye.CFrame = Head.CFrame * CF(0.125,0.2,-0.55)
  1061. eye.Material = "Neon"
  1062. eye.BrickColor = BRICKC("Really black")
  1063. weldBetween(Head,eye)
  1064.  
  1065.  
  1066.  
  1067. for _, c in pairs(Weapon:GetChildren()) do
  1068. if c.ClassName == "Part" then
  1069. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1070. end
  1071. end
  1072.  
  1073. Weapon.Parent = Character
  1074.  
  1075. Humanoid.Died:connect(function()
  1076. ATTACK = true
  1077. end)
  1078.  
  1079. print(Class_Name.." loaded.")
  1080.  
  1081. --//=================================\\
  1082. --\\=================================//
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088. --//=================================\\
  1089. --|| DAMAGE FUNCTIONS
  1090. --\\=================================//
  1091.  
  1092. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
  1093. local STATPART = CreatePart(3, Effects, "Neon", 0, 1, "Institutional white", "Effect", VT())
  1094. STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
  1095. local BODYGYRO = IT("BodyGyro", STATPART)
  1096. local BODYPOSITION = IT("BodyPosition", STATPART)
  1097. BODYPOSITION.P = 2000
  1098. BODYPOSITION.D = 100
  1099. BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
  1100. if LABELTYPE == "Normal" then
  1101. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
  1102. elseif LABELTYPE == "Debuff" then
  1103. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2))
  1104. elseif LABELTYPE == "Interruption" then
  1105. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2))
  1106. end
  1107. game:GetService("Debris"):AddItem(STATPART ,5)
  1108. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  1109. BILLBOARDGUI.Adornee = STATPART
  1110. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  1111. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  1112. BILLBOARDGUI.AlwaysOnTop = false
  1113. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  1114. TEXTLABEL.BackgroundTransparency = 1
  1115. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  1116. TEXTLABEL.Text = TEXT
  1117. TEXTLABEL.Font = "SciFi"
  1118. TEXTLABEL.FontSize="Size42"
  1119. TEXTLABEL.TextColor3 = COLOR
  1120. TEXTLABEL.TextStrokeTransparency = 1
  1121. TEXTLABEL.TextScaled = true
  1122. TEXTLABEL.TextWrapped = true
  1123. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  1124. wait(0.2)
  1125. for i=1, 5 do
  1126. wait()
  1127. THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0)
  1128. end
  1129. wait(1.2)
  1130. for i=1, 5 do
  1131. wait()
  1132. THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
  1133. THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
  1134. THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0)
  1135. end
  1136. THEPART.Parent = nil
  1137. end),STATPART, BODYPOSITION, TEXTLABEL)
  1138. end
  1139.  
  1140.  
  1141. --//=================================\\
  1142. --|| DAMAGING
  1143. --\\=================================//
  1144.  
  1145. function dealdamage(hit,min,max,maxstrength,beserk,critrate,critmultiplier)
  1146. if hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("HitBy"..Player.Name) == nil then
  1147. local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
  1148. local dmg = math.random(min,max)
  1149. if humanoid.Health > 0 then
  1150. if beserk == true then
  1151. humanoid.Health = 0
  1152. else
  1153. CreateSound("260430060", hit, 1.2, MRANDOM(7, 12) / 10)
  1154. hit.Velocity = CFrame.new(Torso.Position,hit.Position).lookVector*5*maxstrength
  1155. if math.random(1,100) < critrate+1 then
  1156. humanoid.Health = humanoid.Health - dmg*critmultiplier
  1157. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
  1158. else
  1159. humanoid.Health = humanoid.Health - dmg
  1160. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), dmg, C3(0, 0, 0))
  1161. end
  1162. local defence = Instance.new("BoolValue",hit.Parent)
  1163. defence.Name = ("HitBy"..Player.Name)
  1164. game:GetService("Debris"):AddItem(defence, 0.5)
  1165. end
  1166. end
  1167. end
  1168. end
  1169.  
  1170. function AoEDamage(position,radius,min,max,maxstrength,beserk,critrate,critmultiplier,CanBeDodgedByJumping)
  1171. local dmg = math.random(min,max)
  1172. for i,v in ipairs(workspace:GetChildren()) do
  1173. if v:FindFirstChild("HitBy"..Player.Name) == nil then
  1174. local body = v:GetChildren()
  1175. for part = 1, #body do
  1176. if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  1177. if(body[part].Position - position).Magnitude < radius then
  1178. if v.ClassName == "Model" then
  1179. if v:FindFirstChild("Humanoid") then
  1180. if v.Humanoid.Health ~= 0 then
  1181. if CanBeDodgedByJumping == true then
  1182. if body[part].Position.Y < position.Y+5 then
  1183. if math.random(1,100) < critrate+1 then
  1184. v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier
  1185. StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
  1186. else
  1187. v.Humanoid.Health = v.Humanoid.Health - dmg
  1188. StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0))
  1189. end
  1190. local defence = Instance.new("BoolValue",v)
  1191. defence.Name = ("HitBy"..Player.Name)
  1192. game:GetService("Debris"):AddItem(defence, 0.5)
  1193. end
  1194. else
  1195. if beserk == true then
  1196. v.Humanoid.Health = 0
  1197. end
  1198. if math.random(1,100) < critrate+1 then
  1199. v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier
  1200. StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
  1201. else
  1202. v.Humanoid.Health = v.Humanoid.Health - dmg
  1203. StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0))
  1204. end
  1205. local defence = Instance.new("BoolValue",v)
  1206. defence.Name = ("HitBy"..Player.Name)
  1207. game:GetService("Debris"):AddItem(defence, 0.5)
  1208. end
  1209. end
  1210. end
  1211. end
  1212. body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
  1213. end
  1214. end
  1215. end
  1216. if v.ClassName == "Part" then
  1217. if v.Anchored == false and (v.Position - position).Magnitude < radius then
  1218. v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
  1219. end
  1220. end
  1221. end
  1222. end
  1223. end
  1224.  
  1225. function attractnearest(postype,position,range,maxstrength,last)
  1226. if postype == "Vector" then
  1227. for i,v in ipairs(workspace:GetChildren()) do
  1228. local body = v:GetChildren()
  1229. for part = 1, #body do
  1230. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  1231. if(body[part].Position - position).Magnitude < range then
  1232. if body[part]:FindFirstChild("ATTRACT") == nil then
  1233. local bv = Instance.new("BodyVelocity")
  1234. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1235. bv.velocity = CF(body[part].Position,position).lookVector*maxstrength
  1236. bv.Parent = body[part]
  1237. bv.Name = "ATTRACT"
  1238. else
  1239. coroutine.resume(coroutine.create(function()
  1240. for i = 1, last/5 do
  1241. Swait(5)
  1242. body[part].ATTRACT.velocity = CF(body[part].Position,position).lookVector*maxstrength
  1243. end
  1244. body[part].ATTRACT:remove()
  1245. end))
  1246. end
  1247. end
  1248. end
  1249. end
  1250. if v.ClassName == "Part" then
  1251. if v.Anchored == false and (v.Position - position).Magnitude < range then
  1252. if v:FindFirstChild("ATTRACT") == nil then
  1253. local bv = Instance.new("BodyVelocity")
  1254. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1255. bv.velocity = CF(v.Position,position).lookVector*maxstrength
  1256. bv.Parent = v
  1257. bv.Name = "ATTRACT"
  1258. else
  1259. coroutine.resume(coroutine.create(function()
  1260. for i = 1, last/5 do
  1261. Swait(5)
  1262. v.ATTRACT.velocity = CF(v.Position,position).lookVector*maxstrength
  1263. end
  1264. v.ATTRACT:remove()
  1265. end))
  1266. end
  1267. end
  1268. end
  1269. end
  1270. elseif postype == "Part" then
  1271. for i,v in ipairs(workspace:GetChildren()) do
  1272. local body = v:GetChildren()
  1273. for part = 1, #body do
  1274. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  1275. if(body[part].Position - position.Position).Magnitude < range then
  1276. if body[part]:FindFirstChild("ATTRACT") == nil then
  1277. local bv = Instance.new("BodyVelocity")
  1278. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1279. bv.velocity = CF(body[part].Position,position.Position).lookVector*maxstrength
  1280. bv.Parent = body[part]
  1281. bv.Name = "ATTRACT"
  1282. else
  1283. coroutine.resume(coroutine.create(function()
  1284. for i = 1, last/5 do
  1285. Swait(5)
  1286. body[part].ATTRACT.velocity = CF(body[part].Position,position.Position).lookVector*maxstrength
  1287. end
  1288. body[part].ATTRACT:remove()
  1289. end))
  1290. end
  1291. end
  1292. end
  1293. end
  1294. if v.ClassName == "Part" then
  1295. if v.Anchored == false and (v.Position - position.Position).Magnitude < range then
  1296. if v:FindFirstChild("ATTRACT") == nil then
  1297. local bv = Instance.new("BodyVelocity")
  1298. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1299. bv.velocity = CF(v.Position,position.Position).lookVector*maxstrength
  1300. bv.Parent = v
  1301. bv.Name = "ATTRACT"
  1302. else
  1303. coroutine.resume(coroutine.create(function()
  1304. for i = 1, last/5 do
  1305. Swait(5)
  1306. v.ATTRACT.velocity = CF(v.Position,position.Position).lookVector*maxstrength
  1307. end
  1308. v.ATTRACT:remove()
  1309. end))
  1310. end
  1311. end
  1312. end
  1313. end
  1314. end
  1315. end
  1316.  
  1317. function killnearest(position,range,maxstrength,candestroy)
  1318. for i,v in ipairs(workspace:GetChildren()) do
  1319. local body = v:GetChildren()
  1320. for part = 1, #body do
  1321. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  1322. if(body[part].Position - position).Magnitude < range then
  1323. if v.ClassName == "Model" then
  1324. v:BreakJoints()
  1325. end
  1326. if candestroy == true then
  1327. table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
  1328. end
  1329. body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
  1330. end
  1331. end
  1332. end
  1333. if v.ClassName == "Part" then
  1334. if v.Anchored == false and (v.Position - position).Magnitude < range then
  1335. if candestroy == true then
  1336. table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
  1337. end
  1338. v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
  1339. end
  1340. end
  1341. end
  1342. end
  1343.  
  1344. --//=================================\\
  1345. --|| ATTACK FUNCTIONS AND STUFF
  1346. --\\=================================//
  1347.  
  1348. function CheckTableForString(Table, String)
  1349. for i, v in pairs(Table) do
  1350. if string.find(string.lower(String), string.lower(v)) then
  1351. return true
  1352. end
  1353. end
  1354. return false
  1355. end
  1356.  
  1357. function CheckIntangible(Hit)
  1358. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  1359. if Hit and Hit.Parent then
  1360. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  1361. return true
  1362. end
  1363. end
  1364. return false
  1365. end
  1366.  
  1367. Debris = game:GetService("Debris")
  1368.  
  1369. function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  1370. local Direction = CFrame.new(StartPos, Vec).lookVector
  1371. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  1372. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  1373. if RayHit and CheckIntangible(RayHit) then
  1374. if DelayIfHit then
  1375. wait()
  1376. end
  1377. RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  1378. end
  1379. return RayHit, RayPos, RayNormal
  1380. end
  1381.  
  1382. function turnto(pos)
  1383. RootPart.CFrame = CF(RootPart.Position,VT(pos.X,RootPart.Position.Y,pos.Z))
  1384. end
  1385.  
  1386. function GraviBomb()
  1387. ATTACK = true
  1388. for i=0, 1, 0.1 / Animation_Speed do
  1389. Swait()
  1390. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-40)), 0.4 / Animation_Speed)
  1391. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(35)) * ANGLES(RAD(2.5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1392. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1393. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.75 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(80), RAD(-20), RAD(-30)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
  1394. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1395. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1396. end
  1397. MagicSphere(25,25,LeftArm.CFrame*CF(0,-1,0),"Institutional white")
  1398. MagicSphere(20,25,LeftArm.CFrame*CF(0,-1,0),"Institutional white")
  1399. coroutine.resume(coroutine.create(function()
  1400. local cframe = CF(Mouse.Hit.p)
  1401. local circle = CreateMagicCircle(75,true,0.05,120,cframe,false)
  1402. for i = 1, 5 do
  1403. CreateSound(CUTSOUNDS[MRANDOM(1, #CUTSOUNDS)], Effects, 2, 1)
  1404. local sphere = IT("Part",Effects)
  1405. sphere.Shape = "Ball"
  1406. sphere.Size = VT(50,50,50)
  1407. sphere.Anchored = true
  1408. sphere.CanCollide = false
  1409. sphere.Material = "Neon"
  1410. sphere.BrickColor = BRICKC("Institutional white")
  1411. sphere.Transparency = 0
  1412. sphere.CFrame = cframe
  1413. for i = 1, 10 do
  1414. Swait(2)
  1415. attractnearest("Vector",cframe.p,75,50,10)
  1416. sphere.CFrame = cframe
  1417. sphere.Size = sphere.Size - VT(5,5,5)
  1418. sphere.CFrame = cframe
  1419. end
  1420. sphere:remove()
  1421. end
  1422. local scale = 5
  1423. coroutine.resume(coroutine.create(function()
  1424. CreateSound(RELEASESOUND, Effects, 2, 1)
  1425. MagicSphere(100,125,cframe,"Institutional white")
  1426. MagicSphere(75,125,cframe,"Institutional white")
  1427. CreateSwirl(180,6,true,0.3,225,circle,0,"Institutional white")
  1428. CreateSwirl(180,4,true,0.3,225,circle,0,"Institutional white")
  1429. CreateSwirl(180,2,true,0.3,225,circle,0,"Institutional white")
  1430. for i = 1, 15 do
  1431. Swait()
  1432. killnearest(cframe.p,25,150)
  1433. end
  1434. end))
  1435. end))
  1436. for i=0, 1, 0.1 / Animation_Speed do
  1437. Swait()
  1438. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.4 / Animation_Speed)
  1439. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(25)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1440. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1441. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.25 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-20 + MRANDOM(-2.5, 2.5))) * ANGLES(RAD(70 + MRANDOM(-2.5, 2.5)), RAD(40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
  1442. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1443. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1444. end
  1445. ATTACK = false
  1446. end
  1447.  
  1448. function GraviSpear()
  1449. ATTACK = true
  1450. for i=0, 1.5, 0.1 / Animation_Speed do
  1451. Swait()
  1452. turnto(Mouse.Hit.p)
  1453. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.4 / Animation_Speed)
  1454. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.2 / Animation_Speed)
  1455. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1456. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(25), RAD(-25)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1457. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1458. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1459. end
  1460. local spear = IT("Part",Effects)
  1461. spear.Anchored = true
  1462. spear.CanCollide = false
  1463. spear.Shape = "Ball"
  1464. spear.Size = VT(0,0,0)
  1465. spear.Material = "Neon"
  1466. spear.Transparency = 0.2
  1467. spear.BrickColor = BRICKC("Institutional white")
  1468. spear.CFrame = RightArm.CFrame * CF(0,-4,0)
  1469. local inner = spear:Clone()
  1470. inner.Parent = spear
  1471. inner.Size = VT(0,0,0)
  1472. inner.BrickColor = BRICKC("Institutional white")
  1473. inner.CFrame = spear.CFrame
  1474. for i = 1, 10 do
  1475. Swait()
  1476. turnto(Mouse.Hit.p)
  1477. spear.CFrame = RightArm.CFrame * CF(0,-4,0)
  1478. inner.CFrame = spear.CFrame
  1479. spear.Size = spear.Size + VT(0.4,0.4,0.4)
  1480. inner.Size = inner.Size + VT(0.35,0.35,0.35)
  1481. end
  1482. CreateParticles2(inner,VT(0,0,0),5,1,"Smoke",true,true,1,8)
  1483. MagicSphere(25,25,RightArm.CFrame*CF(0,-1,0),"Institutional white")
  1484. MagicSphere(20,25,RightArm.CFrame*CF(0,-1,0),"Institutional white")
  1485. CreateSound(CUTSOUNDS[MRANDOM(1, #CUTSOUNDS)], RightArm, 6, 1)
  1486. local bv = Instance.new("BodyVelocity")
  1487. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1488. bv.velocity = CF(spear.Position,Mouse.Hit.p).lookVector*65
  1489. bv.Parent = spear
  1490. bv.Name = "MOVE"
  1491. weldBetween(spear,inner)
  1492. spear.Anchored = false
  1493. inner.Anchored = false
  1494. local harm = spear.Touched:Connect(function(hit)
  1495. if hit.Parent ~= Character and hit.Parent ~= Weapon and hit.Parent ~= Effects then
  1496. local cframe = spear.CFrame
  1497. coroutine.resume(coroutine.create(function()
  1498. spear.Parent = nil
  1499. coroutine.resume(coroutine.create(function()
  1500. CreateSound(RELEASESOUND, Effects, 2, 1)
  1501. MagicSphere(60,125,cframe,"Institutional white")
  1502. MagicSphere(50,125,cframe,"Institutional white")
  1503. CreateSwirl(0,6,true,0.3,125,spear,0,"Institutional white")
  1504. CreateSwirl(0,4,true,0.3,125,spear,0,"Institutional white")
  1505. CreateSwirl(0,2,true,0.3,125,spear,0,"Institutional white")
  1506. for i = 1, 15 do
  1507. Swait()
  1508. killnearest(cframe.p,15,150)
  1509. end
  1510. end))
  1511. end))
  1512. end
  1513. end)
  1514. coroutine.resume(coroutine.create(function()
  1515. repeat
  1516. Swait()
  1517. CreateSwirl(0,2,true,0.3,25,spear,0,"Institutional white")
  1518. attractnearest("Part",spear,65,70,5)
  1519. until spear.Parent == nil
  1520. end))
  1521. ATTACK = false
  1522. end
  1523.  
  1524. function WarpSpear()
  1525. ATTACK = true
  1526. for i=0, 1.5, 0.1 / Animation_Speed do
  1527. Swait()
  1528. turnto(Mouse.Hit.p)
  1529. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.4 / Animation_Speed)
  1530. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.2 / Animation_Speed)
  1531. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1532. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(25), RAD(-25)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1533. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1534. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1535. end
  1536. local spear = IT("Part",Effects)
  1537. spear.Anchored = true
  1538. spear.CanCollide = false
  1539. spear.Shape = "Ball"
  1540. spear.Size = VT(0,0,0)
  1541. spear.Material = "Neon"
  1542. spear.Transparency = 0.2
  1543. spear.BrickColor = BRICKC("Institutional white")
  1544. spear.CFrame = RightArm.CFrame * CF(0,-4,0)
  1545. local inner = spear:Clone()
  1546. inner.Parent = spear
  1547. inner.Size = VT(0,0,0)
  1548. inner.BrickColor = BRICKC("Institutional white")
  1549. inner.CFrame = spear.CFrame
  1550. for i = 1, 5 do
  1551. Swait()
  1552. turnto(Mouse.Hit.p)
  1553. spear.CFrame = RightArm.CFrame * CF(0,-4,0)
  1554. inner.CFrame = spear.CFrame
  1555. spear.Size = spear.Size + VT(0.4,0.4,0.4)
  1556. inner.Size = inner.Size + VT(0.35,0.35,0.35)
  1557. end
  1558. MagicSphere(25,25,RightArm.CFrame*CF(0,-1,0),"Institutional white")
  1559. MagicSphere(20,25,RightArm.CFrame*CF(0,-1,0),"Institutional white")
  1560. CreateSound(CUTSOUNDS[MRANDOM(1, #CUTSOUNDS)], RightArm, 6, 1)
  1561. local bv = Instance.new("BodyVelocity")
  1562. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1563. bv.velocity = CF(spear.Position,Mouse.Hit.p).lookVector*100
  1564. bv.Parent = spear
  1565. bv.Name = "MOVE"
  1566. weldBetween(spear,inner)
  1567. spear.Anchored = false
  1568. inner.Anchored = false
  1569. local HIT = false
  1570. local harm = spear.Touched:Connect(function(hit)
  1571. if HIT == false and hit.Parent ~= Character and hit.Parent ~= Weapon and hit.Parent ~= Effects then
  1572. local cframe = spear.CFrame
  1573. HIT = true
  1574. coroutine.resume(coroutine.create(function()
  1575. spear.Parent = nil
  1576. RootPart.CFrame = CF(spear.Position,Mouse.Hit.p)
  1577. coroutine.resume(coroutine.create(function()
  1578. CreateSound(RELEASESOUND, Effects, 2, 1.5)
  1579. MagicSphere(30,105,cframe,"Institutional white")
  1580. MagicSphere(25,105,cframe,"Institutional white")
  1581. for i = 1, 15 do
  1582. Swait()
  1583. killnearest(cframe.p,7.5,150)
  1584. end
  1585. end))
  1586. end))
  1587. end
  1588. end)
  1589. coroutine.resume(coroutine.create(function()
  1590. Swait(75)
  1591. if HIT == false then
  1592. local cframe = spear.CFrame
  1593. HIT = true
  1594. coroutine.resume(coroutine.create(function()
  1595. spear.Parent = nil
  1596. RootPart.CFrame = CF(spear.Position,Mouse.Hit.p)
  1597. coroutine.resume(coroutine.create(function()
  1598. CreateSound(RELEASESOUND, Effects, 2, 1.5)
  1599. MagicSphere(30,105,cframe,"Institutional white")
  1600. MagicSphere(25,105,cframe,"Institutional white")
  1601. for i = 1, 15 do
  1602. Swait()
  1603. killnearest(cframe.p,7.5,150)
  1604. end
  1605. end))
  1606. end))
  1607. end
  1608. end))
  1609. coroutine.resume(coroutine.create(function()
  1610. local loop = 0
  1611. repeat
  1612. Swait()
  1613. loop = loop + 1
  1614. if loop == 4 then
  1615. MagicSphere(25,15,spear.CFrame,"Institutional white")
  1616. end
  1617. if loop == 7 then
  1618. loop = 0
  1619. MagicSphere(25,15,spear.CFrame,"Institutional white")
  1620. end
  1621. attractnearest("Part",spear,12.5,50,5)
  1622. until spear.Parent == nil
  1623. end))
  1624. ATTACK = false
  1625. end
  1626.  
  1627. function GravityGlobe()
  1628. ATTACK = true
  1629. Rooted = true
  1630. for i=0, 1, 0.1 / Animation_Speed do
  1631. Swait()
  1632. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-40)), 0.4 / Animation_Speed)
  1633. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(35)) * ANGLES(RAD(2.5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1634. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1635. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.75 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(80), RAD(-20), RAD(-30)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
  1636. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1637. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1638. end
  1639. coroutine.resume(coroutine.create(function()
  1640. CreateMagicCircle(100,true,0.02,50,CF(RootPart.Position) * CF(0,-2.8,0),true)
  1641. local cframe = RootPart.CFrame
  1642. CreateSound(RELEASESOUND, Effects, 2, 1)
  1643. local sphere = IT("Part",Effects)
  1644. sphere.Shape = "Ball"
  1645. sphere.Size = VT(0,0,0)
  1646. sphere.Anchored = true
  1647. sphere.CanCollide = false
  1648. sphere.Material = "Neon"
  1649. sphere.Transparency = 0.5
  1650. sphere.BrickColor = BRICKC("Institutional white")
  1651. sphere.CFrame = cframe
  1652. local sphere2 = IT("Part",Effects)
  1653. sphere2.Shape = "Ball"
  1654. sphere2.Size = VT(0,0,0)
  1655. sphere2.Anchored = true
  1656. sphere2.CanCollide = false
  1657. sphere2.Material = "Neon"
  1658. sphere2.Transparency = 0.3
  1659. sphere2.BrickColor = BRICKC("Institutional white")
  1660. sphere2.CFrame = cframe
  1661. for i = 1, 10 do
  1662. Swait(2)
  1663. attractnearest("Vector",cframe.p,50,50,10)
  1664. sphere.CFrame = cframe
  1665. sphere.Size = sphere.Size + VT(4,4,4)
  1666. sphere2.CFrame = cframe
  1667. sphere2.Size = sphere2.Size + VT(3.5,3.5,3.5)
  1668. killnearest(cframe.p,15,0)
  1669. end
  1670. local scale = 0.2
  1671. local mode = "shrink"
  1672. for i = 1, 350 do
  1673. Swait()
  1674. if mode == "shrink" then
  1675. scale = scale + scale
  1676. if scale >= - 65 then
  1677. mode = "grow"
  1678. end
  1679. elseif mode == "grow" then
  1680. scale = scale + -scale*2
  1681. if scale <= - 65 then
  1682. mode = "shrink"
  1683. end
  1684. end
  1685. CreateRing(180,5,true,0,50,sphere,0,scale,scale,"Institutional white")
  1686. sphere.Size = sphere.Size + VT(scale,scale,scale)
  1687. attractnearest("Vector",cframe.p,50,50,5)
  1688. killnearest(cframe.p,15,0)
  1689. end
  1690. for i = 1, 10 do
  1691. Swait(2)
  1692. sphere.CFrame = cframe
  1693. sphere.Size = sphere.Size - VT(5,5,5)
  1694. sphere.CFrame = cframe
  1695. sphere2.CFrame = cframe
  1696. sphere2.Size = sphere2.Size - VT(3.5,3.5,3.5)
  1697. end
  1698. sphere:remove()
  1699. sphere2:remove()
  1700. end))
  1701. for i=0, 1, 0.1 / Animation_Speed do
  1702. Swait()
  1703. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.4 / Animation_Speed)
  1704. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(25)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1705. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
  1706. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.25 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-20 + MRANDOM(-2.5, 2.5))) * ANGLES(RAD(70 + MRANDOM(-2.5, 2.5)), RAD(40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
  1707. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1708. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1709. end
  1710. Rooted = false
  1711. ATTACK = false
  1712. end
  1713.  
  1714. function GravityBeam()
  1715. ATTACK = true
  1716. Rooted = true
  1717. for i=0, 1.5, 0.1 / Animation_Speed do
  1718. Swait()
  1719. turnto(Mouse.Hit.p)
  1720. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.4 / Animation_Speed)
  1721. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.2 / Animation_Speed)
  1722. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1723. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(25), RAD(-25)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1724. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1725. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1726. end
  1727. local startpos = RightArm.CFrame*CF(0,-1.5,0).p
  1728. local loop = 0
  1729. local loopsound = CreateSound(CHARGESOUND, RightArm, 10, 1, true)
  1730. local loopsound2 = CreateSound("487214658", Effects, 1, 0, true)
  1731. local pos = nil
  1732. repeat
  1733. if loop < 150 then
  1734. Swait()
  1735. loop = loop + 1
  1736. turnto(Mouse.Hit.p)
  1737. MagicSphere(15,25,RightArm.CFrame*CF(0,-1,0),"Institutional white")
  1738. MagicSphere(12,25,RightArm.CFrame*CF(0,-1,0),"Institutional white")
  1739. else
  1740. loopsound2.Pitch = 1
  1741. loopsound:Stop()
  1742. startpos = RightArm.CFrame*CF(0,-1.5,0).p
  1743. turnto(Mouse.Hit.p)
  1744. MagicSphere(35,25,CF(startpos),"Institutional white")
  1745. MagicSphere(32,25,CF(startpos),"Institutional white")
  1746. local RayHit, RayPos, RayNormal = CastZapRay(startpos, Mouse.Hit.p, 150, Character, false)
  1747. local distance = (startpos - RayPos).magnitude
  1748. local laser = Instance.new("Part",Effects)
  1749. laser.Transparency = 0.5
  1750. laser.CanCollide = false
  1751. laser.Anchored = true
  1752. laser.BrickColor = BrickColor.new("Institutional white")
  1753. laser.Material = "Neon"
  1754. laser.formFactor = Enum.FormFactor.Custom
  1755. laser.Size = Vector3.new(2.5, 2.5, distance)
  1756. laser.CFrame = CFrame.new(startpos, RayPos) * CFrame.new(0, 0, -distance/2)
  1757. local laser2 = Instance.new("Part",Effects)
  1758. laser2.Transparency = 0
  1759. laser2.CanCollide = false
  1760. laser2.Anchored = true
  1761. laser2.BrickColor = BrickColor.new("Institutional white")
  1762. laser2.Material = "Neon"
  1763. laser2.formFactor = Enum.FormFactor.Custom
  1764. laser2.Size = Vector3.new(2, 2, distance)
  1765. laser2.CFrame = CFrame.new(startpos, RayPos) * CFrame.new(0, 0, -distance/2)
  1766. killnearest(RayPos,5,150,true)
  1767. MagicSphere(350,2,CF(RayPos),"Institutional white")
  1768. MagicSphere(320,2,CF(RayPos),"Institutional white")
  1769. if RayHit ~= nil then
  1770. CreateWave(0,5,false,0,25,CF(RayPos),0,"Institutional white")
  1771. end
  1772. attractnearest("Vector",RayPos,40,50,10)
  1773. pos = RayPos
  1774. Swait()
  1775. laser2:remove()
  1776. laser:remove()
  1777. end
  1778. until KEYHOLD == false
  1779. if loop == 150 then
  1780. local cframe = CF(pos)
  1781. coroutine.resume(coroutine.create(function()
  1782. coroutine.resume(coroutine.create(function()
  1783. CreateSound(RELEASESOUND, Effects, 2, 1)
  1784. MagicSphere(500,55,cframe,"Institutional white")
  1785. MagicSphere(450,55,cframe,"Institutional white")
  1786. for i = 1, 15 do
  1787. Swait()
  1788. killnearest(cframe.p,75,150)
  1789. end
  1790. end))
  1791. end))
  1792. end
  1793. loopsound2:remove()
  1794. loopsound:remove()
  1795. Rooted = false
  1796. ATTACK = false
  1797. end
  1798.  
  1799. --//=================================\\
  1800. --|| ASSIGN THINGS TO KEYS
  1801. --\\=================================//
  1802.  
  1803. Humanoid.Changed:connect(function(Jump)
  1804. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1805. Humanoid.Jump = false
  1806. end
  1807. end)
  1808.  
  1809. function MouseDown(Mouse)
  1810. if ATTACK == false then
  1811. end
  1812. end
  1813.  
  1814. function MouseUp(Mouse)
  1815. HOLD = false
  1816. end
  1817.  
  1818. function KeyDown(Key)
  1819. KEYHOLD = true
  1820. if Key == "q" and ATTACK == false then
  1821. GraviBomb()
  1822. end
  1823.  
  1824. if Key == "e" and ATTACK == false then
  1825. GraviSpear()
  1826. end
  1827.  
  1828. if Key == "r" and ATTACK == false then
  1829. GravityGlobe()
  1830. end
  1831.  
  1832. if Key == "g" and ATTACK == false then
  1833. GravityBeam()
  1834. end
  1835.  
  1836. if Key == "x" and ATTACK == false then
  1837. end
  1838.  
  1839. if Key == "c" and ATTACK == false then
  1840. WarpSpear()
  1841. end
  1842.  
  1843. if Key == "t" and ATTACK == false then
  1844. CreateSound("305685800", Head, 10, 1 ,false)
  1845. end
  1846. end
  1847.  
  1848. function KeyUp(Key)
  1849. KEYHOLD = false
  1850. end
  1851.  
  1852. Mouse.Button1Down:connect(function(NEWKEY)
  1853. MouseDown(NEWKEY)
  1854. end)
  1855. Mouse.Button1Up:connect(function(NEWKEY)
  1856. MouseUp(NEWKEY)
  1857. end)
  1858. Mouse.KeyDown:connect(function(NEWKEY)
  1859. KeyDown(NEWKEY)
  1860. end)
  1861. Mouse.KeyUp:connect(function(NEWKEY)
  1862. KeyUp(NEWKEY)
  1863. end)
  1864.  
  1865. --//=================================\\
  1866. --\\=================================//
  1867.  
  1868.  
  1869. function unanchor()
  1870. if UNANCHOR == true then
  1871. g = Character:GetChildren()
  1872. for i = 1, #g do
  1873. if g[i].ClassName == "Part" then
  1874. g[i].Anchored = false
  1875. end
  1876. end
  1877. end
  1878. end
  1879.  
  1880.  
  1881. --//=================================\\
  1882. --|| WRAP THE WHOLE SCRIPT UP
  1883. --\\=================================//
  1884.  
  1885. Humanoid.Changed:connect(function(Jump)
  1886. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1887. Humanoid.Jump = false
  1888. end
  1889. end)
  1890.  
  1891. ANIMATE.Parent = nil
  1892. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1893. IDLEANIMATION:Play()
  1894.  
  1895. while true do
  1896. Swait()
  1897. SINE = SINE + CHANGE
  1898. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1899. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1900. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  1901. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  1902. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1903. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1904. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1905. Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1906. --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1907. --LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1908. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1909. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1910. Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1911. --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1912. ----LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1913. end
  1914. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1915. ANIM = "Jump"
  1916. if ATTACK == false then
  1917. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1918. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1919. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1920. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1921. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1922. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1923. end
  1924. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1925. ANIM = "Fall"
  1926. if ATTACK == false then
  1927. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1928. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1929. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1930. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1931. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1932. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1933. end
  1934. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1935. ANIM = "Idle"
  1936. if ATTACK == false then
  1937. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1938. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1939. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1940. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1941. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size - 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1942. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.2 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1943. end
  1944. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1945. ANIM = "Walk"
  1946. WALK = WALK + 1 / Animation_Speed
  1947. if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
  1948. WALK = 0
  1949. if WALKINGANIM == true then
  1950. WALKINGANIM = false
  1951. elseif WALKINGANIM == false then
  1952. WALKINGANIM = true
  1953. end
  1954. end
  1955. --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1956. --LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1957. if ATTACK == false then
  1958. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(0)), 0.15 / Animation_Speed*3)
  1959. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-5 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1960. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1961. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1962. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size - 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1963. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.2 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1964. end
  1965. end
  1966. if #Effects2>0 then
  1967. for e=1,#Effects2 do
  1968. if Effects2[e]~=nil then
  1969. local Thing=Effects2[e]
  1970. if Thing~=nil then
  1971. local Part=Thing[1]
  1972. local Mode=Thing[2]
  1973. local Delay=Thing[3]
  1974. local IncX=Thing[4]
  1975. local IncY=Thing[5]
  1976. local IncZ=Thing[6]
  1977. local Part2=Thing[8]
  1978. if Thing[1].Transparency<=1 then
  1979. if Thing[2]=="Block1" then
  1980. Thing[1].CFrame=Thing[1].CFrame
  1981. Mesh=Thing[1].Mesh
  1982. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1983. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1984. elseif Thing[2]=="Cylinder" then
  1985. Mesh=Thing[1].Mesh
  1986. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1987. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1988. elseif Thing[2]=="Blood" then
  1989. Mesh=Thing[7]
  1990. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  1991. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1992. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1993. elseif Thing[2]=="Elec" then
  1994. Mesh=Thing[1].Mesh
  1995. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  1996. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1997. elseif Thing[2]=="Disappear" then
  1998. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1999. end
  2000. else
  2001. Part.Parent=nil
  2002. table.remove(Effects2,e)
  2003. end
  2004. end
  2005. end
  2006. end
  2007. end
  2008. unanchor()
  2009. Humanoid.MaxHealth = "inf"
  2010. Humanoid.Health = "inf"
  2011. if Rooted == false then
  2012. Disable_Jump = false
  2013. Humanoid.WalkSpeed = Speed
  2014. elseif Rooted == true then
  2015. Disable_Jump = true
  2016. Humanoid.WalkSpeed = 0
  2017. end
  2018. --CreateMagicCircle(2 ,false,0,3,LeftLeg.CFrame * CF(0,-1.2,0),true)
  2019. end
  2020.  
  2021. --//=================================\\
  2022. --\\=================================//
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028. --//====================================================\\--
  2029. --|| END OF SCRIPT
  2030. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement