Advertisement
EpicHackerman

Testy boi (sans fe)

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