Advertisement
epicboi

Untitled

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