Advertisement
MaxNutellaOML

sans

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