Advertisement
ayeitsjordan14

Sans Script - Roblox

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