carlosname

Untitled

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