Advertisement
Fik_1221

Some Gun

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