antgame11

Untitled

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