Advertisement
EdgyHedgehog

Sans Script Fe

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