Ghosite

Storm mage

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