Advertisement
Tetezaza1542

sansssssss

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