Advertisement
Christoffer07700Extr

sand undertable

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