Advertisement
Guest User

Untitled

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