Advertisement
Zach_script_stealer2

Sans ( may glitch a lot )

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