Advertisement
JasonLion

Sans

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