Advertisement
Guest User

Untitled

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