Advertisement
oatmeal2009

FE sans

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