artucox7

Underfell sans

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