Advertisement
Zebula_The_Scripter

Untitled

May 28th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.15 KB | None | 0 0
  1. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  2. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  3. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  4. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  5. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
  6. local R3 = {N=Region3.new}
  7. local De = S.Debris
  8. local WS = workspace
  9. local Lght = S.Lighting
  10. local RepS = S.ReplicatedStorage
  11. local IN = Instance.new
  12. local Plrs = S.Players
  13.  
  14. local Emit = IN("ParticleEmitter").Emit;
  15.  
  16. --// Initializing \\--
  17. local Plr = Plrs.LocalPlayer
  18. local Char = Plr.Character
  19. local Hum = Char:FindFirstChildOfClass'Humanoid'
  20. local RArm = Char["Right Arm"]
  21. local LArm = Char["Left Arm"]
  22. local RLeg = Char["Right Leg"]
  23. local LLeg = Char["Left Leg"]
  24. local Root = Char:FindFirstChild'HumanoidRootPart'
  25. local Torso = Char.Torso
  26. local Head = Char.Head
  27. local NeutralAnims = true
  28. local Attack = false
  29. local Debounces = {Debounces={}}
  30. local Mouse = Plr:GetMouse()
  31. local Hit = {}
  32. local Sine = 0
  33. local Change = 1
  34.  
  35. local Effects = IN("Folder",Char)
  36. Effects.Name = "Effects"
  37.  
  38.  
  39. --// Debounce System \\--
  40.  
  41.  
  42. function Debounces:New(name,cooldown)
  43. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  44. setmetatable(aaaaa,{__index = Debounces})
  45. Debounces.Debounces[name] = aaaaa
  46. return aaaaa
  47. end
  48.  
  49. function Debounces:Use(overrideUsable)
  50. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  51. if(self.Usable or overrideUsable)then
  52. self.Usable = false
  53. self.CoolingDown = true
  54. local LastUse = time()
  55. self.LastUse = LastUse
  56. delay(self.Cooldown or 2,function()
  57. if(self.LastUse == LastUse)then
  58. self.CoolingDown = false
  59. self.Usable = true
  60. end
  61. end)
  62. end
  63. end
  64.  
  65. function Debounces:Get(name)
  66. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  67. for i,v in next, Debounces.Debounces do
  68. if(i == name)then
  69. return v;
  70. end
  71. end
  72. end
  73.  
  74. function Debounces:GetProgressPercentage()
  75. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  76. if(self.CoolingDown and not self.Usable)then
  77. return math.max(
  78. math.floor(
  79. (
  80. (time()-self.LastUse)/self.Cooldown or 2
  81. )*100
  82. )
  83. )
  84. else
  85. return 100
  86. end
  87. end
  88.  
  89. --// Instance Creation Functions \\--
  90.  
  91. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  92. local Sound = IN("Sound")
  93. Sound.SoundId = "rbxassetid://707651340".. tostring(id or 0)
  94. Sound.Pitch = pitch or 1
  95. Sound.Volume = volume or 1
  96. Sound.Looped = looped or false
  97. if(autoPlay)then
  98. coroutine.wrap(function()
  99. repeat wait() until Sound.IsLoaded
  100. Sound.Playing = autoPlay or false
  101. end)()
  102. end
  103. if(not looped and effect)then
  104. Sound.Stopped:connect(function()
  105. Sound.Volume = 0
  106. Sound:destroy()
  107. end)
  108. elseif(effect)then
  109. warn("Sound can't be looped and a sound effect!")
  110. end
  111. Sound.Parent =parent or Torso
  112. return Sound
  113. end
  114. function Part(parent,color,material,size,cframe,anchored,cancollide)
  115. local part = IN("Part")
  116. part.Parent = parent or Char
  117. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  118. part.Material = material or Enum.Material.SmoothPlastic
  119. part.TopSurface,part.BottomSurface=10,10
  120. part.Size = size or V3.N(1,1,1)
  121. part.CFrame = cframe or CF.N(0,0,0)
  122. part.CanCollide = cancollide or false
  123. part.Anchored = anchored or false
  124. return part
  125. end
  126.  
  127. function Weld(part0,part1,c0,c1)
  128. local weld = IN("Weld")
  129. weld.Parent = part0
  130. weld.Part0 = part0
  131. weld.Part1 = part1
  132. weld.C0 = c0 or CF.N()
  133. weld.C1 = c1 or CF.N()
  134. return weld
  135. end
  136.  
  137. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  138. local part = IN("SpecialMesh")
  139. part.MeshId = meshid or ""
  140. part.TextureId = textid or ""
  141. part.Scale = scale or V3.N(1,1,1)
  142. part.Offset = offset or V3.N(0,0,0)
  143. part.MeshType = meshtype or Enum.MeshType.Sphere
  144. part.Parent = parent
  145. return part
  146. end
  147.  
  148. NewInstance = function(instance,parent,properties)
  149. local inst = Instance.new(instance)
  150. inst.Parent = parent
  151. if(properties)then
  152. for i,v in next, properties do
  153. pcall(function() inst[i] = v end)
  154. end
  155. end
  156. return inst;
  157. end
  158.  
  159. function Clone(instance,parent,properties)
  160. local inst = instance:Clone()
  161. inst.Parent = parent
  162. if(properties)then
  163. for i,v in next, properties do
  164. pcall(function() inst[i] = v end)
  165. end
  166. end
  167. return inst;
  168. end
  169.  
  170. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  171. local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
  172. local Sound = IN("Sound")
  173. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  174. Sound.Pitch = pitch or 1
  175. Sound.Volume = volume or 1
  176. Sound.Looped = looped or false
  177. if(autoPlay)then
  178. coroutine.wrap(function()
  179. repeat wait() until Sound.IsLoaded
  180. Sound.Playing = autoPlay or false
  181. end)()
  182. end
  183. if(not looped and effect)then
  184. Sound.Stopped:connect(function()
  185. Sound.Volume = 0
  186. soundPart:destroy()
  187. end)
  188. elseif(effect)then
  189. warn("Sound can't be looped and a sound effect!")
  190. end
  191. Sound.Parent = soundPart
  192. return Sound
  193. end
  194.  
  195.  
  196. --// Extended ROBLOX tables \\--
  197. local Instance = setmetatable({ClearChildrenOfClass = function(where,class,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do if(v:IsA(class))then v:destroy();end;end;end},{__index = Instance})
  198. --// Require stuff \\--
  199. function CamShake(who,times,intense,origin)
  200. coroutine.wrap(function()
  201. if(script:FindFirstChild'CamShake')then
  202. local cam = script.CamShake:Clone()
  203. cam:WaitForChild'intensity'.Value = intense
  204. cam:WaitForChild'times'.Value = times
  205.  
  206. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  207. cam.Parent = who
  208. wait()
  209. cam.Disabled = false
  210. elseif(who == Plr or who == Char)then
  211. local intensity = intense
  212. local cam = workspace.CurrentCamera
  213. for i = 1, times do
  214. local camDistFromOrigin
  215. if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
  216. camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25
  217. elseif(typeof(origin) == 'Vector3')then
  218. camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25
  219. end
  220. if(camDistFromOrigin)then
  221. intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
  222. end
  223. cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4)
  224. swait()
  225. end
  226. end
  227. end)()
  228. end
  229.  
  230. function CamShakeAll(times,intense,origin)
  231. for _,v in next, Plrs:players() do
  232. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  233. end
  234. end
  235.  
  236. function ServerScript(code)
  237. if(script:FindFirstChild'Loadstring')then
  238. local load = script.Loadstring:Clone()
  239. load:WaitForChild'Sauce'.Value = code
  240. load.Disabled = false
  241. load.Parent = workspace
  242. elseif(NS and typeof(NS) == 'function')then
  243. NS(code,workspace)
  244. else
  245. warn("no serverscripts lol")
  246. end
  247. end
  248.  
  249. function RunLocal(where,code)
  250. ServerScript([[
  251. wait()
  252. script.Parent=nil
  253. if(not _G.Http)then _G.Http = game:service'HttpService' end
  254.  
  255. local Http = _G.Http or game:service'HttpService'
  256.  
  257. local source = ]].."[["..code.."]]"..[[
  258. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  259. local asd = Http:PostAsync(link,source)
  260. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  261. local ID = Http:JSONDecode(asd).Result.Require_ID
  262. local vs = require(ID).VORTH_SCRIPT
  263. vs.Parent = game.]]..where:GetFullName()
  264. )
  265. end
  266.  
  267. --// Customization \\--
  268.  
  269. local Frame_Speed = 60;
  270. local WalkSpeed = 16
  271. local DamageColor = BrickColor.new'White'
  272.  
  273. local MagicCircles = {
  274. Default = {Color=C3.N(1,1,1),Texture1=0,Texture2=0},
  275. OrangeWarPheonix = {EffectColor=BrickColor.new'Deep orange'.Color,Color=C3.N(.9,.9,.9),Texture1=623153986,Texture2=623153990},
  276. BlueWarPheonix = {EffectColor=BrickColor.new'Teal'.Color,Color=C3.N(.9,.9,.9),Texture1=462499935,Texture2=462499970},
  277. Plasma = {Color=C3.N(0.70588235294118,0,0.8),Texture1=415906687,Texture2=415906702},
  278. Water = {Color=C3.RGB(33, 84, 185),Texture1=408441330,Texture2=408441353},
  279. Earth = {Color=C3.RGB(86, 36, 36),Texture1=394253616,Texture2=394253651},
  280. Wind = {Color=C3.N(.8,.8,.8),Texture1=376006317,Texture2=376006346},
  281. Poseidon = {Color=C3.RGB(71, 99, 130),Texture1=346727970,Texture2=346727994},
  282. AetherLightning = {Color=C3.RGB(23, 255, 197),Texture1=348320016,Texture2=348320030},
  283. Light = {Color=C3.N(1,1,0),Texture1=343192085,Texture2=343192112},
  284. Fire = {Color=C3.N(1,0,0),EffectColor=BrickColor.new'Bright red'.Color,Texture1=313945544,Texture2=313945673},
  285. Lightning = {Color=C3.N(0,1,1),Texture1=314842290,Texture2=314842440},
  286. GasterBlaster = {Color=C3.N(1,1,1),Texture1=331948662,Texture2=331948662}
  287. }
  288.  
  289. local MagicVariant = MagicCircles.GasterBlaster --[[ You can change this for a different element
  290. Example:
  291.  
  292. Changing MagicCircles.GasterBlaster to MagicCircles.Light
  293.  
  294. would make it a Light Element
  295. ]]
  296.  
  297. --// Stop animations \\--
  298. for _,v in next, Hum:GetPlayingAnimationTracks() do
  299. v:Stop();
  300. end
  301.  
  302. pcall(game.Destroy,Char:FindFirstChild'Animate')
  303. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  304.  
  305. --// Joints \\--
  306.  
  307. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
  308. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
  309. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5,0)})
  310. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
  311. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
  312. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  313.  
  314. local LSC0 = LS.C0
  315. local RSC0 = RS.C0
  316. local NKC0 = NK.C0
  317. local LHC0 = LH.C0
  318. local RHC0 = RH.C0
  319. local RJC0 = RJ.C0
  320.  
  321. --// Artificial HB \\--
  322.  
  323. local ArtificialHB = IN("BindableEvent", script)
  324. ArtificialHB.Name = "Heartbeat"
  325.  
  326. script:WaitForChild("Heartbeat")
  327.  
  328. local tf = 0
  329. local allowframeloss = false
  330. local tossremainder = false
  331. local lastframe = tick()
  332. local frame = 1/Frame_Speed
  333. ArtificialHB:Fire()
  334.  
  335. game:GetService("RunService").Heartbeat:connect(function(s, p)
  336. tf = tf + s
  337. if tf >= frame then
  338. if allowframeloss then
  339. script.Heartbeat:Fire()
  340. lastframe = tick()
  341. else
  342. for i = 1, math.floor(tf / frame) do
  343. ArtificialHB:Fire()
  344. end
  345. lastframe = tick()
  346. end
  347. if tossremainder then
  348. tf = 0
  349. else
  350. tf = tf - frame * math.floor(tf / frame)
  351. end
  352. end
  353. end)
  354.  
  355. function swait(num)
  356. if num == 0 or num == nil then
  357. ArtificialHB.Event:wait()
  358. else
  359. for i = 0, num do
  360. ArtificialHB.Event:wait()
  361. end
  362. end
  363. end
  364.  
  365.  
  366. --// Effect Function(s) \\--
  367.  
  368. function NumSeq(...)
  369. local tab = {...}
  370. local Sequence = {}
  371. for _,v in next, tab do
  372. table.insert(Sequence,NumberSequenceKeypoint.new(unpack(v)))
  373. end
  374. if(tab[#tab][1] ~= 1)then
  375. local final = tab[#tab]
  376. table.insert(Sequence,NumberSequenceKeypoint.new(1,final[2],final[3]))
  377. end
  378. return NumberSequence.new(Sequence)
  379. end
  380.  
  381. local DefaultRingParticle = IN("ParticleEmitter")
  382. DefaultRingParticle.Name = 'RingEmit'
  383. DefaultRingParticle.LightEmission = 1
  384. DefaultRingParticle.Size = NumSeq({0,0},{.7,6.28},{.8,5.03},{1,2.9})
  385. DefaultRingParticle.Texture = "rbxassetid://313951123"
  386. DefaultRingParticle.Transparency = NumberSequence.new(0,1)
  387. DefaultRingParticle.ZOffset = 1
  388. DefaultRingParticle.Drag = 0
  389. DefaultRingParticle.Acceleration = V3.N()
  390. DefaultRingParticle.LockedToPart = true
  391. DefaultRingParticle.Enabled = false
  392. DefaultRingParticle.Lifetime = NumberRange.new(.6,.6)
  393. DefaultRingParticle.Rate = 5
  394. DefaultRingParticle.Rotation = NumberRange.new(0,0)
  395. DefaultRingParticle.RotSpeed = NumberRange.new(0,0)
  396. DefaultRingParticle.Speed = NumberRange.new(0,0)
  397. DefaultRingParticle.SpreadAngle = Vector2.new(0,0)
  398.  
  399. function MagicCircle(Data)
  400. local Variant = Data.Variant or MagicCircles.Default;
  401.  
  402. local Size = Data.Size or 10;
  403. local Pos = Data.Pos*CF.A(M.R(-90),M.R(-90),0) or Torso.CFrame*CF.A(M.R(-90),M.R(-90),0);
  404. local GrowTime = Data.Time or 1;
  405.  
  406. local WeldData = Data.Weld or false;
  407.  
  408.  
  409. local Color = Variant.Color or C3.N(.9,.9,.0)
  410.  
  411. local CreationParticle = Data.CreationParticle or DefaultRingParticle;
  412.  
  413.  
  414. local Circle = Part(Effects,BrickColor.new'Maroon',Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),Pos,true,false)
  415. local CircleM = NewInstance("BlockMesh",Circle,{Scale=V3.N()})
  416.  
  417.  
  418. local Emitter = DefaultRingParticle:Clone();
  419. Emitter.Parent = Circle
  420. Emitter.Color = ColorSequence.new(Variant.Color)
  421.  
  422. local Top = IN("Decal",Circle)
  423. Top.Texture = "rbxassetid://"..Variant.Texture1
  424. Top.Face = Enum.NormalId.Top
  425.  
  426. local Btm = IN("Decal",Circle)
  427. Btm.Texture = "rbxassetid://"..Variant.Texture2
  428. Btm.Face = Enum.NormalId.Bottom
  429.  
  430. if(WeldData)then
  431. Circle.Anchored = false
  432. Weld(WeldData,Circle,Pos,CF.N())
  433. end
  434. local GrowFrames = GrowTime * Frame_Speed
  435. print(GrowFrames)
  436. --Size*20,0,Size*20
  437. Circle.Transparency = 1
  438. local GrownEvent = Instance.new("BindableEvent",Circle)
  439. coroutine.wrap(function()
  440.  
  441. Emit(Emitter,5)
  442. local End = Size*20
  443. local grow = End/GrowFrames
  444. for i = 1, GrowFrames+1 do
  445. local aa = math.min(CircleM.Scale.x + grow,End)
  446. if(aa >= End)then break end
  447. CircleM.Scale = V3.N(aa,0,aa)
  448. swait()
  449. end
  450. CircleM.Scale = V3.N(End,0,End)
  451. GrownEvent:Fire()
  452.  
  453. end)()
  454.  
  455. local Table = {
  456. Circle = Circle,
  457. Mesh = CircleM,
  458. Grow = function(size)
  459. CircleM.Scale = CircleM.Scale + V3.N(size*20,0,size*20)
  460. end,
  461. Destroy = function(timer)
  462. coroutine.wrap(function()
  463. if(not timer)then timer = 1 end
  464. Tween(CircleM,{Scale=V3.N(0,0,0)},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
  465. Tween(Top,{Transparency=1},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
  466. Tween(Btm,{Transparency=1},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
  467. S.Debris:AddItem(Circle,timer+1)
  468. end)()
  469. end,
  470. Grown = GrownEvent.Event
  471. }
  472.  
  473. return Table;
  474. end
  475.  
  476. function Bezier(startpos, pos2, pos3, endpos, t)
  477. local A = startpos:lerp(pos2, t)
  478. local B = pos2:lerp(pos3, t)
  479. local C = pos3:lerp(endpos, t)
  480. local lerp1 = A:lerp(B, t)
  481. local lerp2 = B:lerp(C, t)
  482. local cubic = lerp1:lerp(lerp2, t)
  483. return cubic
  484. end
  485.  
  486. function SphereFX(duration,color,scale,pos,endScale,increment)
  487. return Effect{
  488. Frames=duration,
  489. Effect='ResizeAndFade',
  490. Color=color,
  491. Size=scale,
  492. Mesh={MeshType=Enum.MeshType.Sphere},
  493. CFrame=pos,
  494. FXSettings={
  495. EndSize=endScale,
  496. EndIsIncrement=increment
  497. }
  498. }
  499. end
  500.  
  501. function BlastFX(duration,color,scale,pos,endScale,increment)
  502. return Effect{
  503. Frames=duration,
  504. Effect='ResizeAndFade',
  505. Color=color,
  506. Size=scale,
  507. Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
  508. CFrame=pos,
  509. FXSettings={
  510. EndSize=endScale,
  511. EndIsIncrement=increment
  512. }
  513. }
  514. end
  515.  
  516. function BlockFX(duration,color,scale,pos,endScale,increment)
  517. return Effect{
  518. Frames=duration,
  519. Effect='ResizeAndFade',
  520. Color=color,
  521. Size=scale,
  522. CFrame=pos,
  523. FXSettings={
  524. EndSize=endScale,
  525. EndIsIncrement=increment
  526. }
  527. }
  528. end
  529.  
  530. function ShootBullet(data)
  531. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  532. local Size = data.Size or V3.N(2,2,2)
  533. local Color = data.Color or MagicVariant.EffectColor or MagicVariant.Color
  534. local StudsPerFrame = data.Speed or 10
  535. local Shape = data.Shape or 'Ball'
  536. local Frames = data.Frames or 160
  537. local Pos = data.Origin or Torso.CFrame
  538. local Direction = data.Direction or Mouse.Hit
  539. local Material = data.Material or Enum.Material.Neon
  540. local OnHit = data.HitFunction or function(hit,pos)
  541. Effect{
  542. Effect='ResizeAndFade',
  543. Color=Color,
  544. Size=V3.N(10,10,10),
  545. Mesh={MeshType=Enum.MeshType.Sphere},
  546. CFrame=CF.N(pos),
  547. FXSettings={
  548. EndSize=V3.N(.05,.05,.05),
  549. EndIsIncrement=true
  550. }
  551. }
  552. for i = 1, 5 do
  553. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  554. Effect{
  555. Effect='Fade',
  556. Frames=65,
  557. Size=V3.N(5,5,10),
  558. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
  559. Mesh = {MeshType=Enum.MeshType.Sphere},
  560. Material=Enum.Material.Neon,
  561. Color=Color,
  562. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  563. }
  564. end
  565. AOEDamage(pos,10,15,30,0,'Normal',10,4)
  566. end
  567.  
  568. local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
  569. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  570. if(Shape == 'Ball')then
  571. BMesh.MeshType = Enum.MeshType.Sphere
  572. elseif(Shape == 'Head')then
  573. BMesh.MeshType = Enum.MeshType.Head
  574. elseif(Shape == 'Cylinder')then
  575. BMesh.MeshType = Enum.MeshType.Cylinder
  576. end
  577.  
  578. coroutine.wrap(function()
  579. for i = 1, Frames+1 do
  580. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
  581. if(hit)then
  582. OnHit(hit,pos,norm,dist)
  583. break;
  584. else
  585. Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
  586. end
  587. swait()
  588. end
  589. Bullet:destroy()
  590. end)()
  591.  
  592. end
  593.  
  594. function Zap(data)
  595. local sCF,eCF = data.StartCFrame,data.EndCFrame
  596. assert(sCF,"You need a start CFrame!")
  597. assert(eCF,"You need an end CFrame!")
  598. local parts = data.PartCount or 15
  599. local zapRot = data.ZapRotation or {-5,5}
  600. local startThick = data.StartSize or 3;
  601. local endThick = data.EndSize or startThick/2;
  602. local color = data.Color or BrickColor.new'Electric blue'
  603. local delay = data.Delay or 35
  604. local delayInc = data.DelayInc or 0
  605. local lastLightning;
  606. local MagZ = (sCF.p - eCF.p).magnitude
  607. local thick = startThick
  608. local inc = (startThick/parts)-(endThick/parts)
  609.  
  610. for i = 1, parts do
  611. local pos = sCF.p
  612. if(lastLightning)then
  613. pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
  614. end
  615. delay = delay + delayInc
  616. local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
  617. local posie = CF.N(pos,eCF.p)*CF.N(0,0,MagZ/parts).p+V3.N(M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)))
  618. if(parts == i)then
  619. local MagZ = (pos-eCF.p).magnitude
  620. zapPart.Size = V3.N(endThick,endThick,MagZ)
  621. zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
  622. Effect{Effect='ResizeAndFade',Size=V3.N(thick,thick,thick),CFrame=eCF*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)),Color=color,Frames=delay*2,FXSettings={EndSize=V3.N(thick*8,thick*8,thick*8)}}
  623. else
  624. zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
  625. end
  626.  
  627. lastLightning = zapPart
  628. Effect{Effect='Fade',Manual=zapPart,Frames=delay}
  629.  
  630. thick=thick-inc
  631.  
  632. end
  633. end
  634.  
  635. function Zap2(data)
  636. local Color = data.Color or BrickColor.new'Electric blue'
  637. local StartPos = data.Start or Torso.Position
  638. local EndPos = data.End or Mouse.Hit.p
  639. local SegLength = data.SegL or 2
  640. local Thicc = data.Thickness or 0.5
  641. local Fades = data.Fade or 45
  642. local Parent = data.Parent or Effects
  643. local MaxD = data.MaxDist or 200
  644. local Branch = data.Branches or false
  645. local Material = data.Material or Enum.Material.Neon
  646. local Raycasts = data.Raycasts or false
  647. local Offset = data.Offset or {0,360}
  648. local AddMesh = (data.Mesh == nil and true or data.Mesh)
  649. if((StartPos-EndPos).magnitude > MaxD)then
  650. EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
  651. end
  652. local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
  653. if(Raycasts)then
  654. hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)
  655. end
  656. local segments = dist/SegLength
  657. local model = IN("Model",Parent)
  658. model.Name = 'Lightning'
  659. local Last;
  660. for i = 1, segments do
  661. local size = (segments-i)/25
  662. local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
  663. if(AddMesh)then IN("CylinderMesh",prt) end
  664. if(Last and math.floor(segments) == i)then
  665. local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
  666. prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
  667. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,EndPos)*CF.A(M.R(90),0,0)*CF.N(0,-MagZ/2,0)
  668. elseif(not Last)then
  669. prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  670. else
  671. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,CF.N(pos)*CF.A(M.R(M.RNG(0,360)),M.R(M.RNG(0,360)),M.R(M.RNG(0,360)))*CF.N(0,0,SegLength/3+(segments-i)).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  672. end
  673. Last = prt
  674. if(Branch)then
  675. local choice = M.RNG(1,7+((segments-i)*2))
  676. if(choice == 1)then
  677. local LastB;
  678. for i2 = 1,M.RNG(2,5) do
  679. local size2 = ((segments-i)/35)/i2
  680. local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
  681. if(AddMesh)then IN("CylinderMesh",prt) end
  682. if(not LastB)then
  683. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,Last.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  684. else
  685. prt.CFrame = CF.N(LastB.CFrame*CF.N(0,-SegLength/2,0).p,LastB.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  686. end
  687. LastB = prt
  688. end
  689. end
  690. end
  691. end
  692. if(Fades > 0)then
  693. coroutine.wrap(function()
  694. for i = 1, Fades do
  695. for _,v in next, model:children() do
  696. if(v:IsA'BasePart')then
  697. v.Transparency = (i/Fades)
  698. end
  699. end
  700. swait()
  701. end
  702. model:destroy()
  703. end)()
  704. else
  705. S.Debris:AddItem(model,.01)
  706. end
  707. return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
  708. end
  709.  
  710. function Tween(obj,props,time,easing,direction,repeats,backwards)
  711. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  712. local tween = S.TweenService:Create(obj, info, props)
  713.  
  714. tween:Play()
  715. end
  716.  
  717. function Effect(data)
  718. local FX = data.Effect or 'ResizeAndFade'
  719. local Parent = data.Parent or Effects
  720. local Color = data.Color or C3.N(0,0,0)
  721. local Size = data.Size or V3.N(1,1,1)
  722. local MoveDir = data.MoveDirection or nil
  723. local MeshData = data.Mesh or nil
  724. local SndData = data.Sound or nil
  725. local Frames = data.Frames or 45
  726. local Manual = data.Manual or nil
  727. local Material = data.Material or Enum.Material.Neon
  728. local CFra = data.CFrame or Torso.CFrame
  729. local Settings = data.FXSettings or {}
  730. local Shape = data.Shape or Enum.PartType.Block
  731. local Snd,Prt,Msh;
  732. coroutine.wrap(function()
  733. if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
  734. Prt = Manual
  735. else
  736. Prt = Part(Parent,Color,Material,Size,CFra,true,false)
  737. Prt.Shape = Shape
  738. end
  739. if(typeof(MeshData) == 'table')then
  740. Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
  741. elseif(typeof(MeshData) == 'Instance')then
  742. Msh = MeshData:Clone()
  743. Msh.Parent = Prt
  744. elseif(Shape == Enum.PartType.Block)then
  745. Msh = Mesh(Prt,Enum.MeshType.Brick)
  746. end
  747. if(typeof(SndData) == 'table')then
  748. Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
  749. elseif(typeof(SndData) == 'Instance')then
  750. Snd = SndData
  751. end
  752. if(Snd)then
  753. repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
  754. Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
  755. end
  756. Size = (Msh and Msh.Scale or Size)
  757. local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
  758.  
  759. local MoveSpeed = nil;
  760. if(MoveDir)then
  761. MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  762. end
  763. if(FX ~= 'Arc')then
  764. for Frame = 1, Frames do
  765. if(FX == "Fade")then
  766. Prt.Transparency = (Frame/Frames)
  767. elseif(FX == "Resize")then
  768. if(not Settings.EndSize)then
  769. Settings.EndSize = V3.N(0,0,0)
  770. end
  771. if(Settings.EndIsIncrement)then
  772. if(Msh)then
  773. Msh.Scale = Msh.Scale + Settings.EndSize
  774. else
  775. Prt.Size = Prt.Size + Settings.EndSize
  776. end
  777. else
  778. if(Msh)then
  779. Msh.Scale = Msh.Scale - grow/Frames
  780. else
  781. Prt.Size = Prt.Size - grow/Frames
  782. end
  783. end
  784. elseif(FX == "ResizeAndFade")then
  785. if(not Settings.EndSize)then
  786. Settings.EndSize = V3.N(0,0,0)
  787. end
  788. if(Settings.EndIsIncrement)then
  789. if(Msh)then
  790. Msh.Scale = Msh.Scale + Settings.EndSize
  791. else
  792. Prt.Size = Prt.Size + Settings.EndSize
  793. end
  794. else
  795. if(Msh)then
  796. Msh.Scale = Msh.Scale - grow/Frames
  797. else
  798. Prt.Size = Prt.Size - grow/Frames
  799. end
  800. end
  801. Prt.Transparency = (Frame/Frames)
  802. end
  803. if(Settings.RandomizeCFrame)then
  804. Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  805. end
  806. if(MoveDir and MoveSpeed)then
  807. local Orientation = Prt.Orientation
  808. Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  809. Prt.Orientation = Orientation
  810. end
  811. swait()
  812. end
  813. Prt:destroy()
  814. else
  815. local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  816. if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  817. if(start and endP)then
  818. local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  819. local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  820. for Frame = 0, 1, (Settings.Speed or 0.01) do
  821. if(Settings.Home)then
  822. endP = Settings.Home.CFrame
  823. end
  824. Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  825. end
  826. if(Settings.RemoveOnGoal)then
  827. Prt:destroy()
  828. end
  829. else
  830. Prt:destroy()
  831. assert(start,"You need a start position!")
  832. assert(endP,"You need a start position!")
  833. end
  834. end
  835. end)()
  836. return Prt,Msh,Snd
  837. end
  838. function SoulSteal(whom)
  839. local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
  840. print(torso)
  841. if(torso and torso:IsA'BasePart')then
  842. local Model = Instance.new("Model",Effects)
  843. Model.Name = whom.Name.."'s Soul"
  844. whom:BreakJoints()
  845. local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
  846. Soul.Name = 'Head'
  847. NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
  848. Effect{
  849. Effect="Arc",
  850. Manual = Soul,
  851. FXSettings={
  852. Start=torso.CFrame,
  853. Home = Torso,
  854. RemoveOnGoal = true,
  855. }
  856. }
  857. local lastPoint = Soul.CFrame.p
  858.  
  859. for i = 0, 1, 0.01 do
  860. local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
  861. local mag = (lastPoint - Soul.Position).magnitude
  862. Effect{
  863. Effect = "Fade",
  864. CFrame = point * CF.N(0, mag/2, 0),
  865. Size = V3.N(.5,mag+.5,.5),
  866. Color = Soul.BrickColor
  867. }
  868. lastPoint = Soul.CFrame.p
  869. swait()
  870. end
  871. for i = 1, 5 do
  872. Effect{
  873. Effect="Fade",
  874. Color = BrickColor.new'Really red',
  875. MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  876. }
  877. end
  878. end
  879. end
  880.  
  881. --// Other Functions \\ --
  882.  
  883. function CastRay(startPos,endPos,range,ignoreList)
  884. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  885. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  886. return part,pos,norm,(pos and (startPos-pos).magnitude)
  887. end
  888.  
  889. function CastRayInDirection(startPos,direction,range,ignoreList)
  890. local ray = Ray.new(startPos,direction*range)
  891. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  892. return part,pos,norm,(pos and (startPos-pos).magnitude)
  893. end
  894.  
  895. function getRegion(point,range,ignore)
  896. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  897. end
  898.  
  899. function clerp(startCF,endCF,alpha)
  900. return startCF:lerp(endCF, alpha)
  901. end
  902.  
  903. function GetTorso(char)
  904. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  905. end
  906.  
  907. function ShowDamage(Pos, Text, Time, Color)
  908. coroutine.wrap(function()
  909. local Rate = (1 / Frame_Speed)
  910. local Pos = (Pos or Vector3.new(0, 0, 0))
  911. local Text = (Text or "")
  912. local Time = (Time or 2)
  913. local Color = (Color or Color3.new(1, 0, 1))
  914. local EffectPart = NewInstance("Part",Effects,{
  915. Material=Enum.Material.SmoothPlastic,
  916. Reflectance = 0,
  917. Transparency = 1,
  918. BrickColor = BrickColor.new(Color),
  919. Name = "Effect",
  920. Size = Vector3.new(0,0,0),
  921. Anchored = true,
  922. CFrame = CF.N(Pos)
  923. })
  924. local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  925. Size = UDim2.new(1.25, 0, 1.25, 0),
  926. Adornee = EffectPart,
  927. })
  928. local TextLabel = NewInstance("TextLabel",BillboardGui,{
  929. BackgroundTransparency = 1,
  930. Size = UDim2.new(1, 0, 1, 0),
  931. Text = Text,
  932. Font = "Bodoni",
  933. TextColor3 = Color,
  934. TextStrokeColor3 = Color3.new(0,0,0),
  935. TextStrokeTransparency=0,
  936. TextScaled = true,
  937. })
  938. S.Debris:AddItem(EffectPart, (Time))
  939. EffectPart.Parent = workspace
  940. delay(0, function()
  941. Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  942. local Frames = (Time / Rate)
  943. for Frame = 1, Frames do
  944. swait()
  945. local Percent = (Frame / Frames)
  946. TextLabel.TextTransparency = Percent
  947. TextLabel.TextStrokeTransparency = Percent
  948. end
  949. if EffectPart and EffectPart.Parent then
  950. EffectPart:Destroy()
  951. end
  952. end) end)()
  953. end
  954.  
  955.  
  956. function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult)
  957. if(who)then
  958. local hum = who:FindFirstChildOfClass'Humanoid'
  959. local Damage = M.RNG(minDam,maxDam)
  960. local canHit = true
  961. if(hum)then
  962. for _, p in pairs(Hit) do
  963. if p[1] == hum then
  964. if(time() - p[2] < 0.01) then
  965. canHit = false
  966. else
  967. Hit[_] = nil
  968. end
  969. end
  970. end
  971. if(canHit)then
  972. table.insert(Hit,{hum,time()})
  973. if(hum.Health >= math.huge)then
  974. who:BreakJoints()
  975. if(who:FindFirstChild'Head' and hum.Health > 0)then
  976. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "INSTANT", 1.5, C3.N(1,0,0))
  977. end
  978. else
  979. local player = S.Players:GetPlayerFromCharacter(who)
  980. if(Type == "Fire")then
  981. --idk..
  982. else
  983. local c = Instance.new("ObjectValue",hum)
  984. c.Name = "creator"
  985. c.Value = Plr
  986. game:service'Debris':AddItem(c,0.35)
  987. if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then
  988. if(who:FindFirstChild'Head' and hum.Health > 0)then
  989. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[CRIT] "..Damage*(critMult or 2), 1.5, BrickColor.new'New Yeller'.Color)
  990. end
  991. hum.Health = hum.Health - Damage*(critMult or 2)
  992. else
  993. if(who:FindFirstChild'Head' and hum.Health > 0)then
  994. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), Damage, 1.5, DamageColor.Color)
  995. end
  996. hum.Health = hum.Health - Damage
  997. end
  998. if(Type == 'Knockback' and GetTorso(who))then
  999. local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit
  1000. local body = NewInstance('BodyVelocity',GetTorso(who),{
  1001. P = 500,
  1002. maxForce = V3.N(math.huge,0,math.huge),
  1003. velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05
  1004. })
  1005. game:service'Debris':AddItem(body,.5)
  1006. elseif(Type == "Electric")then
  1007. if(M.RNG(1,100) >= critChance)then
  1008. if(who:FindFirstChild'Head' and hum.Health > 0)then
  1009. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[PARALYZED]", 1.5, BrickColor.new"New Yeller".Color)
  1010. end
  1011. local asd = hum.WalkSpeed/2
  1012. hum.WalkSpeed = asd
  1013. local paralyzed = true
  1014. coroutine.wrap(function()
  1015. while paralyzed do
  1016. swait(25)
  1017. if(M.RNG(1,25) == 1)then
  1018. if(who:FindFirstChild'Head' and hum.Health > 0)then
  1019. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[STATIC]", 1.5, BrickColor.new"New Yeller".Color)
  1020. end
  1021. hum.PlatformStand = true
  1022. end
  1023. end
  1024. end)()
  1025. delay(4, function()
  1026. paralyzed = false
  1027. hum.WalkSpeed = hum.WalkSpeed + asd
  1028. end)
  1029. end
  1030.  
  1031. elseif(Type == 'Knockdown' and GetTorso(who))then
  1032. local rek = GetTorso(who)
  1033. hum.PlatformStand = true
  1034. delay(1,function()
  1035. hum.PlatformStand = false
  1036. end)
  1037. local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit
  1038. local bodvol = NewInstance("BodyVelocity",rek,{
  1039. velocity = angle * Knock,
  1040. P = 5000,
  1041. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  1042. })
  1043. local rl = NewInstance("BodyAngularVelocity",rek,{
  1044. P = 3000,
  1045. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  1046. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  1047. })
  1048. game:GetService("Debris"):AddItem(bodvol, .5)
  1049. game:GetService("Debris"):AddItem(rl, .5)
  1050. end
  1051. end
  1052. end
  1053. end
  1054. end
  1055. end
  1056. end
  1057.  
  1058. function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult)
  1059. for _,v in next, getRegion(where,range,{Char}) do
  1060. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then
  1061. coroutine.wrap(function() for i = 1, M.RNG(minDam,maxDam) do swait() DealDamage(v.Parent,1,1,Knock,Type,0,1) end end)()
  1062. end
  1063. end
  1064. end
  1065.  
  1066. function AOEHeal(where,range,amount)
  1067. local healed = {}
  1068. for _,v in next, getRegion(where,range,{Char}) do
  1069. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  1070. if(hum and not healed[hum])then
  1071. hum.Health = hum.Health + amount
  1072. if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  1073. ShowDamage((v.Parent.Head.CFrame * CF.N(0, 0, (v.Parent.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "+"..amount, 1.5, BrickColor.new'Lime green'.Color)
  1074. end
  1075. end
  1076. end
  1077. end
  1078.  
  1079. function CamShake(who,times,intense,origin)
  1080. coroutine.wrap(function()
  1081. if(script:FindFirstChild'CamShake')then
  1082. local cam = script.CamShake:Clone()
  1083. cam:WaitForChild'intensity'.Value = intense
  1084. cam:WaitForChild'times'.Value = times
  1085.  
  1086. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  1087. cam.Parent = who
  1088. wait()
  1089. cam.Disabled = false
  1090. elseif(who == Plr or who == Char)then
  1091. local intensity = intense
  1092. local cam = workspace.CurrentCamera
  1093. for i = 1, times do
  1094. local camDistFromOrigin
  1095. if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
  1096. camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25
  1097. elseif(typeof(origin) == 'Vector3')then
  1098. camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25
  1099. end
  1100. if(camDistFromOrigin)then
  1101. intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
  1102. end
  1103. cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4)
  1104. swait()
  1105. end
  1106. end
  1107. end)()
  1108. end
  1109.  
  1110. function CamShakeAll(times,intense,origin)
  1111. for _,v in next, Plrs:players() do
  1112. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  1113. end
  1114. end
  1115.  
  1116. function ServerScript(code)
  1117. if(script:FindFirstChild'Loadstring')then
  1118. local load = script.Loadstring:Clone()
  1119. load:WaitForChild'Sauce'.Value = code
  1120. load.Disabled = false
  1121. load.Parent = workspace
  1122. elseif(NS and typeof(NS) == 'function')then
  1123. NS(code,workspace)
  1124. else
  1125. warn("no serverscripts lol")
  1126. end
  1127. end
  1128.  
  1129. function LocalOnPlayer(who,code)
  1130. ServerScript([[
  1131. wait()
  1132. script.Parent=nil
  1133. if(not _G.Http)then _G.Http = game:service'HttpService' end
  1134.  
  1135. local Http = _G.Http or game:service'HttpService'
  1136.  
  1137. local source = ]].."[["..code.."]]"..[[
  1138. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  1139. local asd = Http:PostAsync(link,source)
  1140. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  1141. local ID = Http:JSONDecode(asd).Result.Require_ID
  1142. local vs = require(ID).VORTH_SCRIPT
  1143. vs.Parent = game:service'Players'.]]..who.Name..[[.Character
  1144. ]])
  1145. end
  1146.  
  1147.  
  1148. --// Attack Functions \\--
  1149. function Laser(key)
  1150. NeutralAnims = false
  1151. Attack = true
  1152. Root.Anchored = true
  1153. local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-4),Size=5,Variant=MagicVariant,Time=.5}
  1154. local IsGrown = false
  1155. data.Grown:connect(function() IsGrown = true end)
  1156. repeat swait()
  1157. local Alpha = .1
  1158. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(125),0,0),Alpha)
  1159. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(125),0,0),Alpha)
  1160. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  1161. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1162. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1163. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1164. local LookVector = Mouse.Hit.p
  1165. Torso.CFrame = CF.N(Root.Position,LookVector)
  1166. until IsGrown
  1167. if(S.UserInputService:IsKeyDown(key))then
  1168. local grown = 0
  1169. repeat
  1170. local Alpha = .1
  1171. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(125),0,0),Alpha)
  1172. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(125),0,0),Alpha)
  1173. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  1174. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1175. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1176. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1177. local LookVector = Mouse.Hit.p
  1178. Root.CFrame = CF.N(Root.Position,LookVector)
  1179. if(grown < 250)then
  1180. data.Grow(.05)
  1181. grown = grown + 1
  1182. end
  1183. swait()
  1184. until not S.UserInputService:IsKeyDown(key)
  1185. end
  1186. Sound(data.Circle,340722848,1,1,false,true,true)
  1187. local hit,pos,norm,dist = CastRay(data.Circle.CFrame.p,Mouse.Hit.p,1024)
  1188. local part = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data.Mesh.Scale.x/40,data.Mesh.Scale.x/40),CF.N(data.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false)
  1189. Mesh(part,Enum.MeshType.Cylinder)
  1190. Tween(part,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
  1191. Effect{
  1192. Effect='ResizeAndFade',
  1193. Color=MagicVariant.Color,
  1194. Size=V3.N(data.Mesh.Scale.X/20,data.Mesh.Scale.X/20,data.Mesh.Scale.X/20),
  1195. Mesh={MeshType=Enum.MeshType.Sphere},
  1196. CFrame=CF.N(pos),
  1197. FXSettings={
  1198. EndSize=V3.N(.05,.05,.05),
  1199. EndIsIncrement=true
  1200. }
  1201. }
  1202. for i = 1, 5 do
  1203. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  1204. Effect{
  1205. Effect='Fade',
  1206. Frames=65,
  1207. Size=V3.N((data.Mesh.Scale.X/20)/2,(data.Mesh.Scale.X/20)/2,data.Mesh.Scale.X/20),
  1208. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data.Mesh.Scale.X/20)).p,pos),
  1209. Mesh = {MeshType=Enum.MeshType.Sphere},
  1210. Material=Enum.Material.Neon,
  1211. Color=MagicVariant.Color,
  1212. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  1213. }
  1214. end
  1215. AOEDamage(pos,data.Mesh.Scale.X/20,15,45,0,'Normal',10,4)
  1216. coroutine.wrap(function()
  1217. local frame = (1/30)
  1218. for i = 1, 30 do
  1219. part.Transparency = (i/30)
  1220. swait()
  1221. end
  1222. part:destroy()
  1223. end)()
  1224. Attack = false
  1225. NeutralAnims = true
  1226. Root.Anchored = false
  1227. data.Destroy()
  1228. end
  1229.  
  1230. function Balls(key)
  1231. NeutralAnims = false
  1232. Attack = true
  1233. Root.Anchored = true
  1234. local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-1),Size=5,Variant=MagicVariant,Time=.5}
  1235. local IsGrown = false
  1236. data.Grown:connect(function() IsGrown = true end)
  1237. repeat swait()
  1238. local Alpha = .1
  1239. local idk = M.R(25)
  1240. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1241. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1242. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  1243. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1244. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1245. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1246. local LookVector = Mouse.Hit.p
  1247. Torso.CFrame = CF.N(Root.Position,LookVector)
  1248. until IsGrown
  1249. local projectiles = 5
  1250. if(S.UserInputService:IsKeyDown(key))then
  1251. local grown = 0
  1252. repeat
  1253. local Alpha = .1
  1254. local idk = M.R(25)
  1255. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1256. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1257. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  1258. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1259. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1260. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1261. local LookVector = Mouse.Hit.p
  1262. Root.CFrame = CF.N(Root.Position,LookVector)
  1263. if(grown < 250)then
  1264. data.Grow(.05)
  1265. grown = grown + 1
  1266. projectiles = projectiles + .05
  1267. end
  1268. swait()
  1269. until not S.UserInputService:IsKeyDown(key)
  1270. end
  1271. for i = 1, math.floor(projectiles) do
  1272. data.Grow(-math.floor(projectiles)/20)
  1273. local LookVector = Mouse.Hit.p
  1274. Root.CFrame = CF.N(Root.Position,LookVector)
  1275. ShootBullet{Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  1276. swait(1)
  1277. end
  1278.  
  1279. Attack = false
  1280. NeutralAnims = true
  1281. Root.Anchored = false
  1282. data.Destroy()
  1283. end
  1284.  
  1285. function DLaser(key)
  1286. NeutralAnims = false
  1287. Attack = true
  1288. Root.Anchored = true
  1289. local data1 = MagicCircle{Weld=Torso,Pos=CF.N(-4,0,-4),Size=5,Variant=MagicVariant,Time=.5}
  1290. local data2 = MagicCircle{Weld=Torso,Pos=CF.N(4,0,-4),Size=5,Variant=MagicVariant,Time=.5}
  1291. local IsGrown = false
  1292. data1.Grown:connect(function() IsGrown = true end)
  1293. repeat swait()
  1294. local Alpha = .1
  1295. local idk = M.R(25)
  1296. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1297. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1298. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  1299. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1300. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1301. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1302. local LookVector = Mouse.Hit.p
  1303. Torso.CFrame = CF.N(Root.Position,LookVector)
  1304. until IsGrown
  1305. if(S.UserInputService:IsKeyDown(key))then
  1306. local grown = 0
  1307. repeat
  1308. local Alpha = .1
  1309. local idk = M.R(25)
  1310. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1311. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1312. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  1313. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1314. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1315. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1316. local LookVector = Mouse.Hit.p
  1317. Root.CFrame = CF.N(Root.Position,LookVector)
  1318. if(grown < 250)then
  1319. data1.Grow(.05)
  1320. data2.Grow(.05)
  1321. grown = grown + 1
  1322. end
  1323. swait()
  1324. until not S.UserInputService:IsKeyDown(key)
  1325. end
  1326. Sound(data1.Circle,340722848,1,1,false,true,true)
  1327. Sound(data2.Circle,340722848,1,1,false,true,true)
  1328. local hit,pos,norm,dist = CastRay(data1.Circle.CFrame.p,Mouse.Hit.p,1024)
  1329. local part1 = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data1.Mesh.Scale.x/40,data1.Mesh.Scale.x/40),CF.N(data1.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false)
  1330. Mesh(part1,Enum.MeshType.Cylinder)
  1331.  
  1332.  
  1333. local part2 = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data2.Mesh.Scale.x/40,data2.Mesh.Scale.x/40),CF.N(data2.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false)
  1334. Mesh(part2,Enum.MeshType.Cylinder)
  1335. Tween(part1,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
  1336. Tween(part2,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
  1337. Effect{
  1338. Effect='ResizeAndFade',
  1339. Color=MagicVariant.Color,
  1340. Size=V3.N(data1.Mesh.Scale.X/20,data1.Mesh.Scale.X/20,data1.Mesh.Scale.X/20),
  1341. Mesh={MeshType=Enum.MeshType.Sphere},
  1342. CFrame=CF.N(pos),
  1343. FXSettings={
  1344. EndSize=V3.N(.05,.05,.05),
  1345. EndIsIncrement=true
  1346. }
  1347. }
  1348. for i = 1, 5 do
  1349. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  1350. Effect{
  1351. Effect='Fade',
  1352. Frames=65,
  1353. Size=V3.N((data1.Mesh.Scale.X/20)/2,(data1.Mesh.Scale.X/20)/2,data1.Mesh.Scale.X/20),
  1354. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data1.Mesh.Scale.X/20)).p,pos),
  1355. Mesh = {MeshType=Enum.MeshType.Sphere},
  1356. Material=Enum.Material.Neon,
  1357. Color=MagicVariant.Color,
  1358. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  1359. }
  1360. end
  1361. AOEDamage(pos,data1.Mesh.Scale.X/20,15,45,0,'Normal',10,4)
  1362. AOEDamage(pos,data2.Mesh.Scale.X/20,15,45,0,'Normal',10,4)
  1363. coroutine.wrap(function()
  1364. local frame = (1/30)
  1365. for i = 1, 30 do
  1366. part1.Transparency = (i/30)
  1367. part2.Transparency = (i/30)
  1368. swait()
  1369. end
  1370. part1:destroy()
  1371. part2:destroy()
  1372. end)()
  1373. Attack = false
  1374. NeutralAnims = true
  1375. Root.Anchored = false
  1376. data1.Destroy()
  1377. data2.Destroy()
  1378. end
  1379.  
  1380.  
  1381. function BLaser(key)
  1382. NeutralAnims = false
  1383. Attack = true
  1384. Root.Anchored = true
  1385. local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-1),Size=15,Variant=MagicVariant,Time=.75}
  1386. local IsGrown = false
  1387. data.Grown:connect(function() IsGrown = true end)
  1388. repeat swait()
  1389. local Alpha = .1
  1390. local idk = M.R(25)
  1391. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1392. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1393. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  1394. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1395. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1396. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1397. local LookVector = Mouse.Hit.p
  1398. Torso.CFrame = CF.N(Root.Position,LookVector)
  1399. until IsGrown
  1400. if(S.UserInputService:IsKeyDown(key))then
  1401. local grown = 0
  1402. repeat
  1403. local Alpha = .1
  1404. local idk = M.R(25)
  1405. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1406. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1407. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  1408. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1409. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1410. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1411. local LookVector = Mouse.Hit.p
  1412. Root.CFrame = CF.N(Root.Position,LookVector)
  1413. swait()
  1414. until not S.UserInputService:IsKeyDown(key)
  1415. end
  1416.  
  1417. local hit,pos,norm,dist = CastRay(data.Circle.CFrame.p,Mouse.Hit.p,1024)
  1418. local part = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data.Mesh.Scale.x/40,data.Mesh.Scale.x/40),CF.N(data.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false)
  1419. Mesh(part,Enum.MeshType.Cylinder)
  1420. Tween(part,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
  1421. local aa = data.Circle:Clone();
  1422. aa.Parent = Effects
  1423. aa.Anchored = true
  1424. local blast = Sound(aa,334702766,1,5,false,true,true)
  1425. data.Circle:destroy()
  1426. if(not blast.IsLoaded)then repeat swait() until blast.IsLoaded end
  1427. Effect{
  1428. Effect='ResizeAndFade',
  1429. Color=MagicVariant.Color,
  1430. Size=V3.N(data.Mesh.Scale.X/20,data.Mesh.Scale.X/20,data.Mesh.Scale.X/20),
  1431. Mesh={MeshType=Enum.MeshType.Sphere},
  1432. CFrame=CF.N(pos),
  1433. Sound=blast,
  1434. FXSettings={
  1435. EndSize=V3.N(.05,.05,.05),
  1436. EndIsIncrement=true
  1437. }
  1438. }
  1439. for i = 1, 5 do
  1440. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  1441. Effect{
  1442. Effect='Fade',
  1443. Frames=65,
  1444. Sound=blast,
  1445. Size=V3.N((data.Mesh.Scale.X/20)/2,(data.Mesh.Scale.X/20)/2,data.Mesh.Scale.X/20),
  1446. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data.Mesh.Scale.X/20)).p,pos),
  1447. Mesh = {MeshType=Enum.MeshType.Sphere},
  1448. Material=Enum.Material.Neon,
  1449. Color=MagicVariant.Color,
  1450. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  1451. }
  1452. end
  1453. AOEDamage(pos,data.Mesh.Scale.X/20,45,75,0,'Normal',10,4)
  1454. coroutine.wrap(function()
  1455. for i = 1, (blast.TimeLength*Frame_Speed) do
  1456. part.Transparency = (i/(blast.TimeLength*Frame_Speed))
  1457. for _,v in next, aa:children() do if v:IsA'Decal' then v.Transparency = (i/(blast.TimeLength*Frame_Speed)) end end
  1458. swait()
  1459. end
  1460. aa:destroy()
  1461. part:destroy()
  1462. end)()
  1463.  
  1464. Attack = false
  1465. NeutralAnims = true
  1466. Root.Anchored = false
  1467. Root.Velocity = Mouse.Hit.lookVector*-125
  1468. end
  1469.  
  1470. function Skill1()
  1471. Laser(Enum.KeyCode.Q)
  1472. end
  1473.  
  1474. function Skill2()
  1475. DLaser(Enum.KeyCode.Z)
  1476. end
  1477.  
  1478. function Skill3()
  1479. BLaser(Enum.KeyCode.X)
  1480. end
  1481.  
  1482. --// Wrap it all up \\--
  1483.  
  1484. Mouse.KeyDown:connect(function(k)
  1485. if(Attack)then return end
  1486. if(k == 'q')then Skill1() end
  1487. if(k == 'z')then Skill2() end
  1488. if(k == 'x')then Skill3() end
  1489. end)
  1490.  
  1491. Plr.Chatted:connect(function(m)
  1492.  
  1493. if(m:sub(1,3) == '/e ')then
  1494. local msg = m:sub(4)
  1495. --emote commands (gotta do)
  1496. end
  1497. end)
  1498. while true do
  1499. swait()
  1500. Sine = Sine + Change
  1501.  
  1502. local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4)), Char)
  1503.  
  1504. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  1505. local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and (Hum.WalkSpeed > 24 and "Run" or "Walk") or hitfloor and "Idle")
  1506. if(not Effects or not Effects.Parent)then
  1507. Effects = IN("Model",Char)
  1508. Effects.Name = "Effects"
  1509. end
  1510. if(State == 'Run')then
  1511. local wsVal = 20 / (Hum.WalkSpeed/16)
  1512. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1513. Change = 3
  1514. RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.2*M.C(Sine/wsVal),0+.4*M.C(Sine/wsVal))*CF.A(M.R(15+25*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha)
  1515. LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.2*M.C(Sine/wsVal),0-.4*M.C(Sine/wsVal))*CF.A(M.R(15-25*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha)
  1516. elseif(State == 'Walk')then
  1517. local wsVal = 20 / (Hum.WalkSpeed/16)
  1518. local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1)
  1519. Change = 3
  1520. RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.5*M.C(Sine/wsVal)/2,0+.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha)
  1521. LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.5*M.C(Sine/wsVal)/2,0-.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha)
  1522. else
  1523. RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2)
  1524. LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2)
  1525. end
  1526.  
  1527. Hum.WalkSpeed = WalkSpeed
  1528.  
  1529. if(NeutralAnims)then
  1530. if(State == 'Idle')then
  1531. local Alpha = .1
  1532. Change = .75
  1533. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0+.2*M.C(Sine/12),.2*M.C(Sine/6),0)*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha)
  1534. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha)
  1535. LS.C0 = LS.C0:lerp(LSC0*CF.N(.25,0,0)*CF.A(M.R(-45),0,M.R(45+5*M.C(Sine/12))),Alpha)
  1536. RS.C0 = RS.C0:lerp(RSC0*CF.N(-.25,0,0)*CF.A(M.R(-45),0,M.R(-45-5*M.C(Sine/12))),Alpha)
  1537. LH.C0 = LH.C0:lerp(LHC0*CF.N(0-.2*M.C(Sine/12),-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(10),0),Alpha)
  1538. RH.C0 = RH.C0:lerp(RHC0*CF.N(0-.2*M.C(Sine/12),-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(-10),0),Alpha)
  1539. -- idle
  1540. elseif(State == 'Run')then
  1541. local wsVal = 20 / (Hum.WalkSpeed/16)
  1542. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1543. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
  1544. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1545. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5)),Alpha)
  1546. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5)),Alpha)
  1547. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1548. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1549. elseif(State == 'Walk')then
  1550. local wsVal = 20 / (Hum.WalkSpeed/16)
  1551. local Alpha = math.min(.3 * (Hum.WalkSpeed/16),1)
  1552. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-5-2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
  1553. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1554. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.22*M.C(Sine/wsVal))*CF.A(M.R(37*M.C(Sine/wsVal)),0,M.R(-5)),Alpha)
  1555. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.22*M.C(Sine/wsVal))*CF.A(M.R(-37*M.C(Sine/wsVal)),0,M.R(5)),Alpha)
  1556. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1557. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1558. elseif(State == 'Jump')then
  1559. local Alpha = .1
  1560. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  1561. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha)
  1562. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha)
  1563. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1564. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1565. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1566. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1567. elseif(State == 'Fall')then
  1568. local Alpha = .1
  1569. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  1570. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1571. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1572. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1573. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1574. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1575. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1576. elseif(State == 'Paralyzed')then
  1577. -- paralyzed
  1578. elseif(State == 'Sit')then
  1579. -- sit
  1580. end
  1581. end
  1582.  
  1583. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement