SHARE
TWEET

Lunatic Sans

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