Advertisement
Void_scripter0

Storm magician

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