Advertisement
Okkkkk

lol

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