Advertisement
PowerSans124

GlitchTale Chara Wings Ver.1345

Jul 10th, 2018
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VBScript 54.43 KB | None | 0 0
  1. -- Created by Nebula_Zorua --
  2. -- Your DeTERMINATION --
  3. -- Y o u  a c t  l i k e  y o u  h a v e  a  c h o i c e. =) --
  4. -- Discord: Nebula the Zorua#6969
  5. -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
  6.  
  7.  
  8. --// Initializing \\--
  9. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  10. local Plrs = S.Players
  11. local Plr = Plrs.LocalPlayer
  12. local Char = Plr.Character
  13. local Hum = Char:FindFirstChildOfClass'Humanoid'
  14. local RArm = Char["Right Arm"]
  15. local LArm = Char["Left Arm"]
  16. local RLeg = Char["Right Leg"]
  17. local LLeg = Char["Left Leg"]  
  18. local Root = Char:FindFirstChild'HumanoidRootPart'
  19. local Torso = Char.Torso
  20. local Head = Char.Head
  21. local NeutralAnims = true
  22. local Attack = false
  23. local BloodPuddles = {}
  24. local Effects = {}
  25. local Debounces = {Debounces={}}
  26. local Mouse = Plr:GetMouse()
  27. local Hit = {}
  28. local Sine = 0
  29. local Change = 1
  30. local Souls = 0
  31. --// Debounce System \\--
  32.  
  33. --//Wing Left\\--
  34. for LW = 1, #LEFTWINGS do
  35.         if LEFTWINGS[LW] ~= nil then
  36.             LEFTWINGS[LW].C1 = Clerp(LEFTWINGS[LW].C1, CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(2.5 * SIN(SINE / 12)), RAD(0), RAD(-3 + 3 * SIN(SINE / 12))), 1 / Animation_Speed)
  37.       end
  38.     end
  39. --//Wing Right//--
  40. for LW = 1, #LEFTWINGS do
  41.         if LEFTWINGS[LW] ~= nil then
  42.             LEFTWINGS[LW].C1 = Clerp(LEFTWINGS[LW].C1, CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(2.5 * SIN(SINE / 12)), RAD(0), RAD(-3 + 3 * SIN(SINE / 12))), 1 / Animation_Speed)
  43.       end
  44.     end
  45. --// Debounce Sytem 2 \\--
  46.  
  47.  
  48. function Debounces:New(name,cooldown)
  49.     local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  50.     setmetatable(aaaaa,{__index = Debounces})
  51.     Debounces.Debounces[name] = aaaaa
  52.     return aaaaa
  53. end
  54.  
  55. function Debounces:Use(overrideUsable)
  56.     assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  57.     if(self.Usable or overrideUsable)then
  58.         self.Usable = false
  59.         self.CoolingDown = true
  60.         local LastUse = time()
  61.         self.LastUse = LastUse
  62.         delay(self.Cooldown or 2,function()
  63.             if(self.LastUse == LastUse)then
  64.                 self.CoolingDown = false
  65.                 self.Usable = true
  66.             end
  67.         end)
  68.     end
  69. end
  70.  
  71. function Debounces:Get(name)
  72.     assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  73.   for i,v in next, Debounces.Debounces do
  74.         if(i == name)then
  75.             return v;
  76.         end
  77.     end
  78. end
  79.  
  80. function Debounces:GetProgressPercentage()
  81.     assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  82.     if(self.CoolingDown and not self.Usable)then
  83.         return math.max(
  84.             math.floor(
  85.                 (
  86.                     (time()-self.LastUse)/self.Cooldown or 2
  87.                 )*100
  88.             )
  89.         )
  90.     else
  91.         return 100
  92.     end
  93. end
  94.  
  95. --// Shortcut Variables \\--
  96. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  97. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  98. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  99. 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}
  100. local R3 = {N=Region3.new}
  101. local De = S.Debris
  102. local WS = workspace
  103. local Lght = S.Lighting
  104. local RepS = S.ReplicatedStorage
  105. local IN = Instance.new
  106. local CSK = ColorSequenceKeypoint.new
  107. local CS = ColorSequence.new
  108. --// Instance Creation Functions \\--
  109.  
  110. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  111.     local Sound = IN("Sound")
  112.     Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  113.     Sound.Pitch = pitch or 1
  114.     Sound.Volume = volume or 1
  115.     Sound.Looped = looped or false
  116.     if(autoPlay)then
  117.         coroutine.wrap(function()
  118.             repeat wait() until Sound.IsLoaded
  119.             Sound.Playing = autoPlay or false
  120.         end)()
  121.     end
  122.     if(not looped and effect)then
  123.         Sound.Stopped:connect(function()
  124.             Sound.Volume = 0
  125.             Sound:destroy()
  126.         end)
  127.     elseif(effect)then
  128.         warn("Sound can't be looped and a sound effect!")
  129.     end
  130.     Sound.Parent =parent or Torso
  131.     return Sound
  132. end
  133. function Part(parent,color,material,size,cframe,anchored,cancollide)
  134.     local part = IN("Part")
  135.     part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  136.   part.Material = (material or Enum.Material.SmoothPlastic)
  137.     part.TopSurface,part.BottomSurface=10,10
  138.     part.Size = (size or V3.N(1,1,1))
  139.     part.CFrame = (cframe or CF.N(0,0,0))
  140.     part.Anchored = (anchored or false)
  141.     part.CanCollide = (cancollide or false)
  142.     part.Parent = (parent or Char)
  143.     return part
  144. end
  145. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  146.     local part = IN("SpecialMesh")
  147.     part.MeshId = meshid or ""
  148.     part.TextureId = textid or ""
  149.     part.Scale = scale or V3.N(1,1,1)
  150.     part.Offset = offset or V3.N(0,0,0)
  151.     part.MeshType = meshtype or Enum.MeshType.Sphere
  152.     part.Parent = parent
  153.     return part
  154. end
  155.  
  156. NewInstance = function(instance,parent,properties)
  157.     local inst = Instance.new(instance,parent)
  158.     if(properties)then
  159.         for i,v in next, properties do
  160.             pcall(function() inst[i] = v end)
  161.         end
  162.     end
  163.     return inst;
  164. end
  165.  
  166.  
  167.  
  168. --// Extended ROBLOX tables \\--
  169. 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})
  170. --// Customization \\--
  171.  
  172. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  173. local Remove_Hats = false
  174. local Remove_Clothing = true
  175. local PlayerSize = 1
  176. local DamageColor = BrickColor.new'Really red'
  177. local MusicID = 379523580
  178. local WalkSpeed = 8
  179. local MaxSouls = 100
  180. local MaxHealth = 500
  181.  
  182.  
  183. if(_G.RefusedAnimation == nil) then _G.RefusedAnimation = false end
  184.  
  185. --// Weapon and GUI creation, and Character Customization \\--
  186.  
  187. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  188. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  189. local Effects = IN("Folder",Char)
  190. Effects.Name = "Effects"
  191.  
  192. Hum.MaxHealth = MaxHealth
  193. Hum.Health = MaxHealth
  194.  
  195. local Knife = NewInstance("Part",Char,{Name='Knife',Size=V3.N(.4,3,.7),Anchored=false,CanCollide=false,Locked=true,Archivable=false,Reflectance=.01,Color=C3.N(0,0,0)})
  196. local KnifeMesh = Mesh(Knife,Enum.MeshType.FileMesh,"rbxassetid://121944778","rbxassetid://362719969",V3.N(1,1,1),V3.N())
  197. local AuraEmitter = NewInstance("ParticleEmitter",Knife,{EmissionDirection='Back',Color=CS{CSK(0,C3.N(1,0,0)),CSK(0.5,C3.N(1,1,0)),CSK(1,C3.RGB(255,191,0))},LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(0.3),Texture="rbxassetid://141116476",Transparency=NumberSequence.new(0,1),LockedToPart=true,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(0)})
  198. local FireEmitter = NewInstance("ParticleEmitter",Knife,{EmissionDirection='Back',Color=CS(C3.N(1,0,0),C3.N(1,0,0)),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new{NumberSequenceKeypoint.new(0,.5,0),NumberSequenceKeypoint.new(0.755,0,0),NumberSequenceKeypoint.new(1,0,0)},Texture="rbxassetid://141116476",Transparency=NumberSequence.new(0.35,1),Lifetime=NumberRange.new(1,2),Rate=150,Speed=NumberRange.new(3)})
  199.  
  200. local KTrail = NewInstance("Trail",Knife,{
  201.     Attachment0=NewInstance("Attachment",Knife,{Position=V3.N(0,-.4,0)}),
  202.     Attachment1=NewInstance("Attachment",Knife,{Position=V3.N(0,1.2,0)}),
  203.     Color=CS(C3.N(1,0,0)),
  204.     Enabled=false,
  205.     Transparency=NumberSequence.new(0,1),
  206.     Lifetime=1.25,
  207. })
  208. local Hair = Part(Char,C3.N(0,0,0),Enum.Material.SmoothPlastic,V3.N(1,1,1),CF.N(),false,false)
  209. local HairMesh = Mesh(Hair,Enum.MeshType.FileMesh,"rbxassetid://250264520","rbxassetid://75975464",V3.N(1.05,1.05,1.05),V3.N())
  210.  
  211. NewInstance("PointLight",Knife,{Color=C3.N(1,0,0),Range=10,Brightness=3})
  212.  
  213.  
  214. Hum.DisplayDistanceType = 'None'
  215.  
  216. local naeeym2 = IN("BillboardGui",Char)
  217. naeeym2.AlwaysOnTop = true
  218. naeeym2.Size = UDim2.new(5,35,2,15)
  219. naeeym2.StudsOffset = V3.N(0,2.5,0)
  220. naeeym2.Adornee = Char.Head
  221. naeeym2.Name = "Name"
  222. naeeym2.PlayerToHideFrom = Plr
  223. local tecks2 = IN("TextLabel",naeeym2)
  224. tecks2.BackgroundTransparency = 1
  225. tecks2.TextScaled = true
  226. tecks2.BorderSizePixel = 0
  227. tecks2.Text = "Glitch Tale Chara"
  228. tecks2.Font = Enum.Font.Bodoni
  229. tecks2.TextSize = 30
  230. tecks2.TextStrokeTransparency = 0
  231. tecks2.TextColor3 = C3.N(0,0,0)
  232. tecks2.TextStrokeColor3 = C3.N(.7,0,0)
  233. tecks2.Size = UDim2.new(1,0,0.5,0)
  234. tecks2.Parent = naeeym2
  235.  
  236.  
  237. IN("Shirt",Char)
  238. IN("Pants",Char)
  239.  
  240. Hum.WalkSpeed = WalkSpeed
  241. if(PlayerSize ~= 1)then
  242.     for _,v in next, Char:GetDescendats() do
  243.         if(v:IsA'BasePart')then
  244.           v.Size = v.Size * PlayerSize
  245.         end
  246.     end
  247. end
  248.  
  249.  
  250. for i = 1, 35 do
  251.     local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false)
  252.     FACE.Transparency = 0+(i-1)/35.2
  253.     FACE.Name = 'ShadowFace'
  254.   Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  255.     NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)})
  256.     --CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  257. end
  258.  
  259. local LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
  260. local LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
  261. local LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)})
  262.  
  263. local REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
  264. local REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
  265. local REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)})
  266.  
  267.  
  268. pcall(function()
  269.     Char.LeftWing:destroy()
  270.     Char.ReaperShadowHead:destroy()
  271. end)
  272.  
  273.  
  274. local Music = Sound(Torso,MusicID,1,3,true,false,true)
  275. Music.Name = 'Music'
  276.  
  277. --// Stop animations \\--
  278. for _,v in next, Hum:GetPlayingAnimationTracks() do
  279.     v:Stop();
  280. end
  281.  
  282. pcall(game.Destroy,Char:FindFirstChild'Animate')
  283. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  284.  
  285. --// Joints \\--
  286.  
  287. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  288. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  289. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  290. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  291. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  292. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  293. local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=Knife,C0=CF.N(0,-1,-1)*CF.A(M.R(-90),0,0)})
  294. local HW2 = NewInstance('Motor',Char,{Part0=Head,Part1=Hair,C0=CF.N(0,.25,0)})
  295.  
  296. local LSC0 = LS.C0
  297. local RSC0 = RS.C0
  298. local NKC0 = NK.C0
  299. local LHC0 = LH.C0
  300. local RHC0 = RH.C0
  301. local RJC0 = RJ.C0
  302.  
  303. --// Artificial HB \\--
  304.  
  305. local ArtificialHB = IN("BindableEvent", script)
  306. ArtificialHB.Name = "Heartbeat"
  307.  
  308. script:WaitForChild("Heartbeat")
  309.  
  310. local tf = 0
  311. local allowframeloss = false
  312. local tossremainder = false
  313. local lastframe = tick()
  314. local frame = 1/Frame_Speed
  315. ArtificialHB:Fire()
  316.  
  317. game:GetService("RunService").Heartbeat:connect(function(s, p)
  318.     tf = tf + s
  319.     if tf >= frame then
  320.         if allowframeloss then
  321.             script.Heartbeat:Fire()
  322.             lastframe = tick()
  323.         else
  324.             for i = 1, math.floor(tf / frame) do
  325.                 ArtificialHB:Fire()
  326.             end
  327.             lastframe = tick()
  328.         end
  329.         if tossremainder then
  330.             tf = 0
  331.         else
  332.             tf = tf - frame * math.floor(tf / frame)
  333.         end
  334.     end
  335. end)
  336.  
  337. function swait(num)
  338.     if num == 0 or num == nil then
  339.         ArtificialHB.Event:wait()
  340.     else
  341.         for i = 0, num do
  342.             ArtificialHB.Event:wait()
  343.         end
  344.     end
  345. end
  346.  
  347.  
  348. --// Effect Function(s) \\--
  349.  
  350. function Bezier(startpos, pos2, pos3, endpos, t)
  351.     local A = startpos:lerp(pos2, t)
  352.     local B  = pos2:lerp(pos3, t)
  353.     local C = pos3:lerp(endpos, t)
  354.     local lerp1 = A:lerp(B, t)
  355.     local lerp2 = B:lerp(C, t)
  356.     local cubic = lerp1:lerp(lerp2, t)
  357.     return cubic
  358. end
  359.  
  360. function Tween(obj,props,time,easing,direction,repeats,backwards)
  361.     local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  362.     local tween = S.TweenService:Create(obj, info, props)
  363.    
  364.     tween:Play()
  365. end
  366.  
  367. local FXTable = {}
  368.  
  369. coroutine.resume(coroutine.create(function()
  370.     while true do
  371.         for i = 1, #FXTable do
  372.             local data = FXTable[i]
  373.             if(data)then
  374.                 local Frame = data.Frame
  375.                 local FX = data.Effect or 'ResizeAndFade'
  376.               local Parent = data.Parent or Effects
  377.                 local Color = data.Color or C3.N(0,0,0)
  378.                 local Size = data.Size or V3.N(1,1,1)
  379.                 local MoveDir = data.MoveDirection or nil
  380.                 local MeshData = data.Mesh or nil
  381.                 local SndData = data.Sound or nil
  382.                 local Frames = data.Frames or 45
  383.                 local CFra = data.CFrame or Torso.CFrame
  384.                 local Settings = data.FXSettings or {}
  385.                 local Prt,Msh,Snd = data.Part,data.Mesh,data.Sound
  386.                 local grow = data.Grow
  387.                
  388.                 local MoveSpeed = nil;
  389.                 if(MoveDir)then
  390.                     MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  391.                 end
  392.                 if(FX ~= 'Arc')then
  393.                   Frame = Frame + 1
  394.                     if(FX == "Fade")then
  395.                         Prt.Transparency  = (Frame/Frames)
  396.                     elseif(FX == "Resize")then
  397.                         if(not Settings.EndSize)then
  398.                             Settings.EndSize = V3.N(0,0,0)
  399.                         end
  400.                         if(Settings.EndIsIncrement)then
  401.                             if(Msh)then
  402.                                 Msh.Scale = Msh.Scale + Settings.EndSize
  403.                             else
  404.                                 Prt.Size = Prt.Size + Settings.EndSize
  405.                             end                
  406.                         else
  407.                             if(Msh)then
  408.                                 Msh.Scale = Msh.Scale - grow/Frames
  409.                             else
  410.                                 Prt.Size = Prt.Size - grow/Frames
  411.                             end
  412.                         end
  413.                     elseif(FX == "ResizeAndFade")then
  414.                         if(not Settings.EndSize)then
  415.                             Settings.EndSize = V3.N(0,0,0)
  416.                         end
  417.                         if(Settings.EndIsIncrement)then
  418.                             if(Msh)then
  419.                                 Msh.Scale = Msh.Scale + Settings.EndSize
  420.                             else
  421.                                 Prt.Size = Prt.Size + Settings.EndSize
  422.                             end                
  423.                         else
  424.                             if(Msh)then
  425.                                 Msh.Scale = Msh.Scale - grow/Frames
  426.                             else
  427.                                 Prt.Size = Prt.Size - grow/Frames
  428.                             end
  429.                         end
  430.                         Prt.Transparency = (Frame/Frames)
  431.                     end
  432.                     if(Settings.RandomizeCFrame)then
  433.                         Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  434.                     end
  435.                     if(MoveDir and MoveSpeed)then
  436.                         local Orientation = Prt.Orientation
  437.                         Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  438.                         Prt.Orientation = Orientation
  439.                     end
  440.                     if(Prt.Transparency >= 1 or Frame >= Frames)then
  441.                         Prt:destroy()
  442.                         table.remove(FXTable,i)
  443.                     else
  444.                         data.Frame = Frame
  445.                     end
  446.                 else
  447.                     local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  448.                     if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  449.                     if(start and endP)then
  450.                         local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  451.                         local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  452.                         Frame = Frame + (Settings.Speed or 0.01)
  453.                         if(Settings.Home)then
  454.                             endP = Settings.Home.CFrame
  455.                         end
  456.                         Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  457.                         if(Prt.Transparency >= 1 or Frame >= Frames)then
  458.                             if(Settings.RemoveOnGoal)then
  459.                                 Prt:destroy()
  460.                             end
  461.                         end
  462.                     else
  463.                         Prt:destroy()
  464.                     end
  465.                 end
  466.             end
  467.         end
  468.         swait()
  469.     end
  470. end))
  471.  
  472. function Effect(data)
  473.     local FX = data.Effect or 'ResizeAndFade'
  474.   local Parent = data.Parent or Effects
  475.     local Color = data.Color or C3.N(0,0,0)
  476.     local Size = data.Size or V3.N(1,1,1)
  477.     local MoveDir = data.MoveDirection or nil
  478.     local MeshData = data.Mesh or nil
  479.     local SndData = data.Sound or nil
  480.     local Frames = data.Frames or 45
  481.     local Manual = data.Manual or nil
  482.     local Material = data.Material or nil
  483.     local CFra = data.CFrame or Torso.CFrame
  484.     local Settings = data.FXSettings or {}
  485.     local Shape = data.Shape or Enum.PartType.Block
  486.     local Snd,Prt,Msh;
  487.     coroutine.wrap(function()
  488.         if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
  489.           Prt = Manual
  490.         else
  491.             Prt = Part(Parent,Color,Material,Size,CFra,true,false)
  492.             Prt.Shape = Shape
  493.         end
  494.         if(typeof(MeshData) == 'table')then
  495.           Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
  496.         elseif(typeof(MeshData) == 'Instance')then
  497.           Msh = MeshData:Clone()
  498.             Msh.Parent = Prt
  499.         elseif(Shape == Enum.PartType.Block)then
  500.             Msh = Mesh(Prt,Enum.MeshType.Brick)
  501.         end
  502.         if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
  503.           Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
  504.         end
  505.         if(Snd)then
  506.             repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
  507.             Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
  508.         end
  509.         Size = (Msh and Msh.Scale or Size)
  510.         local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
  511.        
  512.         local MoveSpeed = nil;
  513.         if(MoveDir)then
  514.             MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  515.         end
  516.         if(FX ~= 'Arc')then
  517.           for Frame = 1, Frames do
  518.                 if(FX == "Fade")then
  519.                     Prt.Transparency  = (Frame/Frames)
  520.                 elseif(FX == "Resize")then
  521.                     if(not Settings.EndSize)then
  522.                         Settings.EndSize = V3.N(0,0,0)
  523.                     end
  524.                     if(Settings.EndIsIncrement)then
  525.                         if(Msh)then
  526.                             Msh.Scale = Msh.Scale + Settings.EndSize
  527.                         else
  528.                             Prt.Size = Prt.Size + Settings.EndSize
  529.                         end                
  530.                     else
  531.                         if(Msh)then
  532.                             Msh.Scale = Msh.Scale - grow/Frames
  533.                         else
  534.                             Prt.Size = Prt.Size - grow/Frames
  535.                         end
  536.                     end
  537.                 elseif(FX == "ResizeAndFade")then
  538.                     if(not Settings.EndSize)then
  539.                         Settings.EndSize = V3.N(0,0,0)
  540.                     end
  541.                     if(Settings.EndIsIncrement)then
  542.                         if(Msh)then
  543.                             Msh.Scale = Msh.Scale + Settings.EndSize
  544.                         else
  545.                             Prt.Size = Prt.Size + Settings.EndSize
  546.                         end                
  547.                     else
  548.                         if(Msh)then
  549.                             Msh.Scale = Msh.Scale - grow/Frames
  550.                         else
  551.                             Prt.Size = Prt.Size - grow/Frames
  552.                         end
  553.                     end
  554.                     Prt.Transparency = (Frame/Frames)
  555.                 end
  556.                 if(Settings.RandomizeCFrame)then
  557.                     Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  558.                 end
  559.                 if(MoveDir and MoveSpeed)then
  560.                     local Orientation = Prt.Orientation
  561.                     Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  562.                     Prt.Orientation = Orientation
  563.                 end
  564.                 swait()
  565.             end
  566.             Prt:destroy()
  567.         else
  568.             local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  569.             if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  570.             if(start and endP)then
  571.                 local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  572.                 local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  573.                 for Frame = 0, 1, (Settings.Speed or 0.01) do
  574.                     if(Settings.Home)then
  575.                         endP = Settings.Home.CFrame
  576.                     end
  577.                     Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  578.                 end
  579.                 if(Settings.RemoveOnGoal)then
  580.                     Prt:destroy()
  581.                 end
  582.             else
  583.                 Prt:destroy()
  584.                 assert(start,"You need a start position!")
  585.                 assert(endP,"You need a start position!")
  586.             end
  587.         end
  588.     end)()
  589.     return Prt,Msh,Snd
  590. end
  591.  
  592.  
  593.  
  594. function SoulSteal(whom,human)
  595.     local torso = (whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart' or whom:FindFirstChild'Torso')
  596.   local succ, health, alive = pcall(function() return whom:FindFirstChildOfClass'Humanoid'.Health, whom:FindFirstChildOfClass'Humanoid'.Health > 0 end)
  597.   if(torso and torso:IsA'BasePart' and alive == true)then
  598.       whom:FindFirstChildOfClass'Humanoid'.Health = 0
  599.       whom:BreakJoints()
  600.         local Model = IN("Model",Effects)
  601.         warn('Soul stolen from '..whom.Name)
  602.       Model.Name = whom.Name.."'s Soul"
  603.         local Soul = Part(Model,(human and BrickColor.new'Really red' or BrickColor.new(C3.N(1,1,1))),'Glass',V3.N(1,1,1),torso.CFrame,true,false)
  604.       Soul.CanCollide=false
  605.         Mesh(Soul,Enum.MeshType.Sphere)
  606.         Soul.Name = 'Head'
  607.       if(whom.Name == 'CKbackup')then
  608.           Soul.Color = C3.N(1,1,1)
  609.             local DripEmitter = NewInstance("ParticleEmitter",Soul,{EmissionDirection='Bottom',Color=CS(Soul.Color),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(0.3),Texture="rbxassetid://243132757",Transparency=NumberSequence.new(0,1),LockedToPart=false,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(5)})
  610.       end
  611.         local Hoom = NewInstance("Humanoid",Model,{MaxHealth=(health <= 10000 and health/2 or 10000),Health=(health <= 10000 and health/2 or 10000)})
  612.         local AT0 = NewInstance("Attachment",Soul,{Position=V3.N(0,.5,0)})
  613.         local AT1 = NewInstance("Attachment",Soul,{Position=V3.N(0,-.5,0)})
  614.         local Trail = NewInstance("Trail",Soul,{Attachment0=AT0,Attachment1=AT1,Transparency=NumberSequence.new(0),FaceCamera = true,Texture="rbxassetid://945758042",LightEmission=.3,Color=CS(Soul.Color),Lifetime=.5,MinLength=0})
  615.         NewInstance("PointLight",Soul,{Color=Soul.Color,Range=10,Brightness=(human and 3 or .5)})
  616.        
  617.         local turdso = Soul:Clone()
  618.         turdso.Name = "Torso"
  619.         turdso.CanCollide = false
  620.         turdso.Anchored = true
  621.         turdso.CFrame = Soul.CFrame
  622.         turdso.Parent = Model
  623.         turdso.Size = V3.N()
  624.         turdso.Transparency=1
  625.         local Distance = math.huge
  626.         repeat
  627.             Soul.CFrame = CF.N(Soul.Position,Torso.Position)*CF.N(0,0,-1)
  628.             turdso.CFrame = Soul.CFrame
  629.             Distance = (Soul.CFrame.p-Torso.CFrame.p).magnitude
  630.             swait()
  631.         until Hoom.Health <= 0 or not Soul.Parent or Distance <= 1.2
  632.         if(Soul.Parent and Hoom.Health > 0)then
  633.             Model:destroy()
  634.             Effect{
  635.                 Effect="ResizeAndFade",
  636.                 Mesh={Enum.MeshType.Sphere},
  637.                 Color = Soul.Color,
  638.                 CFrame=Torso.CFrame,
  639.                 Size=V3.N(3,3,3),
  640.                 Material=Enum.Material.Neon,
  641.                 Sound={SoundId=444667859,Pitch=1,Volume=2.5},
  642.                 FXSettings={
  643.                     EndSize=V3.N(6,6,6),
  644.                 }
  645.             }
  646.             Souls = Souls + (human and 1 or .1)
  647.             warn("Souls: "..Souls)
  648.             MaxHealth = MaxHealth + Hoom.Health
  649.             Hum.Health = Hum.Health + Hoom.Health
  650.             for i = 1, 5 do
  651.                 Effect{
  652.                     Effect="Fade",
  653.                     Color = Soul.Color,
  654.                     MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  655.                 }  
  656.             end
  657.         else
  658.            
  659.             warn("Soul destroyed!")
  660.             for i = 1, 5 do
  661.                 Effect{
  662.                     Effect="Fade",
  663.                     Color = Soul.Color,
  664.                     CFrame=Soul.CFrame,
  665.                     MoveDirection = (Soul.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  666.                 }  
  667.             end
  668.             Effect{
  669.                 Effect="ResizeAndFade",
  670.                 Mesh={Enum.MeshType.Sphere},
  671.                 Sound={SoundId=444667859,Pitch=1,Volume=5},
  672.                 Color = Soul.Color,
  673.                 CFrame=Soul.CFrame,
  674.                 Size=V3.N(3,3,3),
  675.                 Material=Enum.Material.Neon,
  676.                 FXSettings={
  677.                     EndSize=V3.N(6,6,6),
  678.                 }
  679.             }
  680.             Model:destroy()
  681.         end
  682.     end
  683. end
  684.  
  685. --// Other Functions \\ --
  686.  
  687. function getRegion(point,range,ignore)
  688.     return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  689. end
  690.  
  691. function clerp(startCF,endCF,alpha)
  692.     return startCF:lerp(endCF, alpha)
  693. end
  694.  
  695. function GetTorso(char)
  696.     return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  697. end
  698.  
  699. function ShowDamage(Pos, Text, Time, Color)
  700.     coroutine.wrap(function()
  701.     local Rate = (1 / Frame_Speed)
  702.     local Pos = (Pos or Vector3.new(0, 0, 0))
  703.     local Text = (Text or "")
  704.     local Time = (Time or 2)
  705.     local Color = (Color or Color3.new(1, 0, 1))
  706.     local EffectPart = NewInstance("Part",Effects,{
  707.         Material=Enum.Material.SmoothPlastic,
  708.         Reflectance = 0,
  709.         Transparency = 1,
  710.         BrickColor = BrickColor.new(Color),
  711.         Name = "Effect",
  712.         Size = Vector3.new(0,0,0),
  713.         Anchored = true,
  714.         CFrame = CF.N(Pos)
  715.     })
  716.     local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  717.         Size = UDim2.new(1.25, 0, 1.25, 0),
  718.         Adornee = EffectPart,
  719.     })
  720.     local TextLabel = NewInstance("TextLabel",BillboardGui,{
  721.         BackgroundTransparency = 1,
  722.         Size = UDim2.new(1, 0, 1, 0),
  723.         Text = Text,
  724.         Font = "Arcade",
  725.         TextColor3 = Color,
  726.         TextStrokeColor3 = Color3.new(0,0,0),
  727.         TextStrokeTransparency=0,
  728.         TextScaled = true,
  729.     })
  730.     S.Debris:AddItem(EffectPart, (Time))
  731.     EffectPart.Parent = workspace
  732.     delay(0, function()
  733.         Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  734.         local Frames = (Time / Rate)
  735.         for Frame = 1, Frames do
  736.             swait()
  737.             local Percent = (Frame / Frames)
  738.             TextLabel.TextTransparency = Percent
  739.             TextLabel.TextStrokeTransparency = Percent
  740.         end
  741.         if EffectPart and EffectPart.Parent then
  742.             EffectPart:Destroy()
  743.         end
  744.     end) end)()
  745. end
  746.  
  747. function Kill(whom)
  748.     if(whom.Name ~= 'Nebula_Zorua')then
  749.       local isPlr = Plrs:GetPlayerFromCharacter(whom) ~= nil
  750.         coroutine.wrap(SoulSteal)(whom,isPlr)
  751.         for _,v in next, whom:children() do
  752.             if(v:IsA'BasePart')then
  753.               v.Parent = Effects
  754.                 v:ClearAllChildren()
  755.                 v.Anchored = true
  756.                 v.CanCollide = false
  757.                 v.Transparency = 1
  758.                 local dust = NewInstance("ParticleEmitter",v,{
  759.                     Color = ColorSequence.new(C3.N(1,1,1)),
  760.                     LightEmission=0,
  761.                     LightInfluence=1,
  762.                     Size=NumberSequence.new{NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(1,0,0)},
  763.                     Texture="rbxassetid://284205403",
  764.                     Transparency=NumberSequence.new{NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)},
  765.                     Lifetime = NumberRange.new(1),
  766.                     Rate=150,
  767.                     Acceleration = V3.N(0,10,0),
  768.                     Speed = NumberRange.new(5),
  769.                     Enabled = true
  770.                 })
  771.                 delay(1, function()
  772.                     dust.Enabled = false
  773.                     S.Debris:AddItem(v,2)
  774.                 end)
  775.             end
  776.         end
  777.     else
  778.         warn"nope. nawt happenin'"
  779.     end
  780. end
  781.  
  782. function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult)
  783.     if(who)then
  784.         local hum = who:FindFirstChildOfClass'Humanoid'
  785.       local Damage = M.RNG(minDam,maxDam)
  786.         local canHit = true
  787.         if(hum)then
  788.             for _, p in pairs(Hit) do
  789.                 if p[1] == hum then
  790.                     if(time() - p[2] < 0.4) then
  791.                         canHit = false
  792.                     else
  793.                         Hit[_] = nil
  794.                     end
  795.                 end
  796.             end
  797.             if(canHit)then
  798.                 table.insert(Hit,{hum,time()})
  799.                 if(GetTorso(who))then
  800.                     Sound(GetTorso(who),406913243,1,10,false,true,true)
  801.                 end
  802.                 if(hum.Health >= math.huge)then
  803.                     Kill(who)
  804.                     if(who:FindFirstChild'Head' and hum.Health > 0)then
  805.                       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", 3, DamageColor.Color)
  806.                     end
  807.                 else
  808.                     local player = S.Players:GetPlayerFromCharacter(who)
  809.                     if(Type == "Fire")then
  810.                         --idk..
  811.                     else
  812.                         local  c = Instance.new("ObjectValue",hum)
  813.                         c.Name = "creator"
  814.                         c.Value = Plr
  815.                         game:service'Debris':AddItem(c,0.35)
  816.                       local Crit = false
  817.                         if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then
  818.                             Crit = true
  819.                             Damage = Damage*(critMult or 2)
  820.                         end
  821.                         Damage = Damage*((Souls/5)+1)
  822.                         if(who:FindFirstChild'Head' and hum.Health > 0)then
  823.                           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 and "[CRIT] " or "").. math.floor(Damage), 3, (Crit and BrickColor.new'New Yeller'.Color or DamageColor.Color))
  824.                       end
  825.                        
  826.                         if(hum.Health - Damage <= 0)then
  827.                             Kill(who)
  828.                         else
  829.                             hum.Health = hum.Health - Damage
  830.                             if(Type == 'Knockback' and GetTorso(who))then
  831.                               local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit
  832.                                 local body = NewInstance('BodyVelocity',GetTorso(who),{
  833.                                   P = 500,
  834.                                     maxForce = V3.N(math.huge,0,math.huge),
  835.                                     velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05
  836.                                 })
  837.                                 game:service'Debris':AddItem(body,.5)
  838.                           elseif(Type == "Electric")then
  839.                                 if(M.RNG(1,100) >= critChance)then
  840.                                     if(who:FindFirstChild'Head' and hum.Health > 0)then
  841.                                       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]", 3, BrickColor.new"New Yeller".Color)
  842.                                     end
  843.                                     local asd = hum.WalkSpeed/2
  844.                                     hum.WalkSpeed = asd
  845.                                     local paralyzed = true
  846.                                     coroutine.wrap(function()
  847.                                         while paralyzed do
  848.                                             swait(25)
  849.                                             if(M.RNG(1,25) == 1)then
  850.                                                 if(who:FindFirstChild'Head' and hum.Health > 0)then
  851.                                                   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]", 3, BrickColor.new"New Yeller".Color)
  852.                                                 end
  853.                                                 hum.PlatformStand = true
  854.                                             end
  855.                                         end
  856.                                     end)()
  857.                                     delay(4, function()
  858.                                         paralyzed = false
  859.                                         hum.WalkSpeed = hum.WalkSpeed + asd
  860.                                     end)
  861.                                 end
  862.                                
  863.                             elseif(Type == 'Knockdown' and GetTorso(who))then
  864.                               local rek = GetTorso(who)
  865.                                 hum.PlatformStand = true
  866.                                 delay(1,function()
  867.                                     hum.PlatformStand = false
  868.                                 end)
  869.                                 local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit
  870.                                 local bodvol = NewInstance("BodyVelocity",rek,{
  871.                                     velocity = angle * Knock,
  872.                                     P = 5000,
  873.                                     maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  874.                                 })
  875.                                 local rl = NewInstance("BodyAngularVelocity",rek,{
  876.                                     P = 3000,
  877.                                     maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  878.                                     angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  879.                                 })
  880.                                 game:GetService("Debris"):AddItem(bodvol, .5)
  881.                                 game:GetService("Debris"):AddItem(rl, .5)
  882.                             end
  883.                         end
  884.                     end
  885.                 end
  886.             end
  887.         end
  888.     end
  889. end
  890.  
  891.  
  892. function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult)
  893.     for _,v in next, getRegion(where,range,{Char}) do
  894.         if(v.Name ~= 'Nebula_Zorua')then
  895.           if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then
  896.               DealDamage(v.Parent,minDam,maxDam,Knock,Type,critChance,critMult)
  897.             end
  898.         end
  899.     end
  900. end
  901.  
  902. function AOEKill(where,range)
  903.     for _,v in next, getRegion(where,range,{Char,Effects}) do
  904.         local succ,alive = pcall(function() return v.Parent:FindFirstChildOfClass'Humanoid'.Health > 0 end)
  905.       if(v.Name ~= 'Nebula_Zorua')then
  906.           if(v.Parent and alive == true)then
  907.                 coroutine.wrap(Kill)(v.Parent)
  908.             end
  909.         end
  910.     end
  911. end
  912.  
  913. function AOEHeal(where,range,amount)
  914.     local healed = {}
  915.     for _,v in next, getRegion(where,range,{Char}) do
  916.         local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  917.       if(hum and not healed[hum])then
  918.             hum.Health = hum.Health + amount
  919.             if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  920.               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)
  921.           end
  922.         end
  923.     end
  924. end
  925.  
  926.  
  927. --// Attack Functions \\--
  928.  
  929.  
  930. function Slash()
  931.     Attack = true
  932.     NeutralAnims = false
  933.     local sound = Sound(Knife,437475935,1,5,false,true,false)
  934.     for i = 0, 2, 0.1 do
  935.         swait()
  936.         local Alpha = .2
  937.         RJ.C0 = clerp(RJ.C0,CFrame.new(0.0343287587, 0.00629056804, 0.0572580174, 0.943793893, 0.00207689893, 0.330528289, 1.0000764e-06, 0.99998033, -0.00628630351, -0.330534875, 0.00593330665, 0.943775296),Alpha)
  938.         LH.C0 = clerp(LH.C0,CFrame.new(-0.496478021, -0.990818381, 0.021652732, 0.999878168, 0, 0.0156089365, -9.80779296e-05, 0.99998033, 0.00628268253, -0.0156086385, -0.00628344761, 0.999858379),Alpha)
  939.         RH.C0 = clerp(RH.C0,CFrame.new(0.498511612, -0.990985274, 0.0154910646, 0.999878168, 0, 0.0156089365, -9.80779296e-05, 0.99998033, 0.00628268253, -0.0156086385, -0.00628344761, 0.999858379),Alpha)
  940.         LS.C0 = clerp(LS.C0,CFrame.new(-1.32692134, 0.474511296, -0.0055731535, 0.934981823, 0.354351997, 0.0156129003, -0.354479939, 0.93504262, 0.00628374517, -0.0123721063, -0.0114096552, 0.999858379),Alpha)
  941.         RS.C0 = clerp(RS.C0,CFrame.new(1.12629449, 0.369358033, -0.486052871, 0.490151912, 0.65154773, 0.57899636, 0.721657813, 0.0691910982, -0.688783586, -0.488836735, 0.755445719, -0.436280251),Alpha)
  942.         NK.C0 = clerp(NK.C0,CFrame.new(-0.0118216109, 1.49854016, -0.0795068145, 0.943793833, 0.0190048125, -0.329988182, 0.00207654224, 0.997985244, 0.0634154305, 0.330528468, -0.0605363287, 0.94185257),Alpha)
  943.         HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  944.     end
  945.     KTrail.Enabled = true
  946.     sound:Play()
  947.     for i = 0, 2.5, 0.1 do
  948.         swait()
  949.         AOEDamage(Knife.CFrame.p,1,15,30,0,"Normal",0,1)
  950.         local Alpha = .25
  951.         RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0352100767, 0.00629066909, -0.0097481478, 0.817972422, -0.00361463916, -0.575246274, -1.74103582e-06, 0.99998033, -0.00628598873, 0.575257719, 0.00514276745, 0.817956269),Alpha)
  952.         LH.C0 = clerp(LH.C0,CFrame.new(-0.496478021, -0.990818381, 0.0216572341, 0.999878287, 0, 0.015610218, -9.80866607e-05, 0.99998033, 0.00628274865, -0.0156098902, -0.00628351374, 0.999858499),Alpha)
  953.         RH.C0 = clerp(RH.C0,CFrame.new(0.498511702, -0.990985274, 0.0154905058, 0.999878287, 0, 0.015610218, -9.80866607e-05, 0.99998033, 0.00628274865, -0.0156098902, -0.00628351374, 0.999858499),Alpha)
  954.         LS.C0 = clerp(LS.C0,CFrame.new(-1.32694602, 0.474510223, -0.00555660389, 0.934981823, 0.354351729, 0.0156157613, -0.354479671, 0.935042739, 0.00628153514, -0.012375474, -0.0114085823, 0.999858379),Alpha)
  955.         RS.C0 = clerp(RS.C0,CFrame.new(1.23906493, 0.406229913, 0.00231830776, 0.49015066, -0.849889755, 0.193494052, 0.721655607, 0.520183682, 0.456752002, -0.488841236, -0.0842411816, 0.868295968),Alpha)
  956.         NK.C0 = clerp(NK.C0,CFrame.new(0.0315471888, 1.49887729, -0.0257819965, 0.817972481, -0.0330747738, 0.574305832, -0.00361499586, 0.998030663, 0.0626262054, -0.575246155, -0.0533026271, 0.81624186),Alpha)
  957.         HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  958.     end
  959.     KTrail.Enabled = false
  960.     Attack = false
  961.     NeutralAnims = true
  962. end
  963.  
  964. Mouse.Button1Down:connect(function()
  965.     if(Attack)then return end
  966.     Slash()
  967. end)
  968.  
  969. Mouse.KeyDown:connect(function(k)
  970.     if(Attack)then return end
  971.     if(k == 'z')then AOEKill(Root.CFrame.p,25) end -- TODO: Animation and effects
  972.   if(k == 'q')then WalkSpeed = (WalkSpeed == 8 and 32 or 8) end  
  973. end)
  974.  
  975.  
  976. function Refuse()
  977.     Attack = true
  978.     warn("But Its ReTurn")
  979.     local oMH = MaxHealth
  980.     MaxHealth = "inf"
  981.     Hum.MaxHealth = "inf"
  982.     Hum.Health = "inf"
  983.     Char.Parent = nil
  984.     Hum:destroy()
  985.     if(not _G.RefusedAnimation)then
  986.         _G.RefusedAnimation = true
  987.        
  988.    
  989.         local Soul;
  990.         function Soul(where,decalId)
  991.             local destroy = false  
  992.             local soul = NewInstance("Part",workspace)
  993.             soul.Name = "Soul"
  994.             soul.Transparency=1
  995.             soul.Size = V3.N(2,2,.05)
  996.             soul.Anchored=true
  997.             soul.CanCollide=false
  998.             soul.CFrame = where
  999.             local heartF = NewInstance("Decal",soul,{Face=Enum.NormalId.Front,Texture="rbxassetid://"..decalId})
  1000.             local heartB = NewInstance("Decal",soul,{Face=Enum.NormalId.Back,Texture="rbxassetid://"..decalId})
  1001.             return soul,heartF,heartB
  1002.         end
  1003.         local owo = Root.CFrame
  1004.         local s,f,b = Soul(owo,1569347904)
  1005.         swait(60)
  1006.         local snd = Sound(s,862552636,1,5,false,false,false)
  1007.         snd:Play()
  1008.         f.Texture = "rbxassetid://1569348344"
  1009.         b.Texture = "rbxassetid://1569348344"
  1010.         swait(15)
  1011.         snd:Stop()
  1012.         swait(60)
  1013.         print'lol'
  1014.       for i = 0, 6, .1 do
  1015.             swait()
  1016.             s.CFrame = owo * CF.N(M.RNG(-50,50)/100,M.RNG(-50,50)/100,M.RNG(-50,50)/100)
  1017.         end
  1018.         local snd = Sound(s,862552636,1,5,false,false,false)
  1019.         snd:Play()
  1020.         s.CFrame = owo
  1021.         f.Texture = "rbxassetid://1569347904"
  1022.         b.Texture = "rbxassetid://1569347904"
  1023.         swait(15)
  1024.         snd:Stop()
  1025.         swait(60)
  1026.    
  1027.         s:destroy()
  1028.     end
  1029.    
  1030.     RJ.Parent = Char
  1031.     LS.Parent = Char
  1032.     RS.Parent = Char
  1033.     LH.Parent = Char
  1034.     RH.Parent = Char
  1035.     NK.Parent = Char
  1036.    
  1037.     LArm.Parent = Char
  1038.     RArm.Parent = Char
  1039.     LLeg.Parent = Char
  1040.     LArm.Parent = Char
  1041.     Root.Parent = Char
  1042.     Torso.Parent = Char
  1043.     Head.Parent = Char
  1044.    
  1045.     Knife.Parent = Char
  1046.     Hair.Parent = Char
  1047.    
  1048.     HW.Parent = Char
  1049.     HW2.Parent = Char
  1050.    
  1051.  
  1052.     REye:destroy()
  1053.     LEye:destroy()
  1054.    
  1055.     for _,v in next, Char:children() do
  1056.         if(v.Name == 'ShadowFace')then v:destroy() end
  1057.   end
  1058.     LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
  1059.     LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
  1060.     LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)})
  1061.    
  1062.     REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
  1063.     REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
  1064.     REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)})
  1065.     for i = 1, 35 do
  1066.         local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false)
  1067.         FACE.Transparency = 0+(i-1)/35.2
  1068.         FACE.Name = 'ShadowFace'
  1069.       Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  1070.         NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)})
  1071.         --CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  1072.     end
  1073.     Hum = NewInstance("Humanoid",Char,{DisplayDistanceType='None'})
  1074.   ConnectHum()
  1075.     MaxHealth = oMH
  1076.     Hum.MaxHealth = MaxHealth
  1077.     Hum.Health = MaxHealth
  1078.     swait(5)
  1079.     Char.Parent = workspace
  1080.    
  1081.     Attack = false
  1082. end
  1083.  
  1084. function ConnectHum()
  1085.     Hum.Died:connect(Refuse)
  1086. end
  1087. ConnectHum()
  1088.  
  1089.  
  1090. --// Wrap it all up \\--
  1091. while true do
  1092.     swait()
  1093.     Sine = Sine + Change
  1094.     if(not Music)then
  1095.         Music = Sound(Torso,MusicID,1,3,true,false,true)
  1096.         Music.Name = 'Music'
  1097.   end
  1098.     Music.Pitch = 1
  1099.     Music.Volume = 5
  1100.     Music.SoundId = "rbxassetid://"..MusicID
  1101.     Music.Parent = Torso
  1102.     Music:Resume()
  1103.     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)
  1104.     local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  1105.     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 "Walk" or hitfloor and "Idle")
  1106.   if(not Effects or not Effects.Parent)then
  1107.         Effects = IN("Model",Char)
  1108.         Effects.Name = "Effects"
  1109.     end
  1110.     Hum.WalkSpeed = WalkSpeed
  1111.     if(State == 'Walk')then
  1112.       if(Hum.WalkSpeed >= 24)then
  1113.             local wsVal = 22 / (Hum.WalkSpeed/16)
  1114.             local Alpha = math.min(.1 * (Hum.WalkSpeed/16),1)
  1115.             Change = 2
  1116.             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(25+45*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha)
  1117.             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(25-45*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha)
  1118.         else
  1119.             Change = .9
  1120.             local wsVal = 8 / (Hum.WalkSpeed/8)
  1121.             local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1)
  1122.             LH.C1 = LH.C1:lerp(CF.N(0,1-.2*M.C(Sine/wsVal)/2,.4*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))-M.S(Sine/wsVal)/2.5,0,0)*CF.A(M.R(0-3*M.C(Sine/wsVal)),0,0),Alpha)
  1123.             RH.C1 = RH.C1:lerp(CF.N(0,1+.2*M.C(Sine/wsVal)/2,-.4*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0)*CF.A(M.R(0+3*M.C(Sine/wsVal)),0,0),Alpha)
  1124.         end
  1125.     else
  1126.         RH.C1 = RH.C1:lerp(CF.N(0,1,0),.1)
  1127.         LH.C1 = LH.C1:lerp(CF.N(0,1,0),.1)
  1128.     end
  1129.     for _,v in next, Char:children() do
  1130.         if(v:IsA'Accessory')then
  1131.           v:destroy()
  1132.         elseif(v:IsA'Shirt')then
  1133.           v.ShirtTemplate = "rbxassetid://344089667"
  1134.         elseif(v:IsA'Pants')then
  1135.           v.PantsTemplate = "rbxassetid://344084364"
  1136.         elseif(v:IsA'CharacterMesh')then
  1137.           v:destroy()
  1138.         elseif(v:FindFirstChildOfClass'ShirtGraphic')then
  1139.           v:FindFirstChildOfClass'ShirtGraphic':destroy()
  1140.       end
  1141.     end
  1142.     local face = Head:FindFirstChild'face'
  1143.   if(not face)then
  1144.         NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://404306534"})
  1145.   else
  1146.         face.Texture = "rbxassetid://946610608"
  1147.     end
  1148.     RArm.BrickColor = BrickColor.new'Pastel brown'
  1149.   LArm.BrickColor = BrickColor.new'Pastel brown'
  1150.   RLeg.BrickColor = BrickColor.new'Pastel brown'
  1151.   LLeg.BrickColor = BrickColor.new'Pastel brown'
  1152.   Torso.BrickColor = BrickColor.new'Pastel brown'
  1153.   Head.BrickColor = BrickColor.new'Pastel brown'
  1154.   Hum.Name = 'Chara'
  1155.   if(Hum.MaxHealth ~= MaxHealth)then
  1156.         Hum.MaxHealth = MaxHealth
  1157.     end
  1158.     Hum.DisplayDistanceType='None'
  1159.   if(NeutralAnims)then  
  1160.         if(State == 'Idle')then
  1161.           Change = 1
  1162.             local Alpha = .1
  1163.             RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0999571308, 0+.05*M.C(Sine/16), -0.237876296, 0.857335567, -0.00323621999, -0.514731407, 0, 0.99998033, -0.00628707698, 0.51474154, 0.00539013464, 0.85731858),Alpha)
  1164.             LH.C0 = clerp(LH.C0,CFrame.new(-0.536091685, -0.991042495-.05*M.C(Sine/16), -0.0134909991, 0.849195242, 0, 0.528063774, -0.00331997755, 0.99998033, 0.00533895614, -0.528053343, -0.00628707698, 0.849178433),Alpha)
  1165.             RH.C0 = clerp(RH.C0,CFrame.new(0.529067397, -0.991597891-.05*M.C(Sine/16), -0.0818087086, 0.849195242, 0, 0.528063774, -0.00331997755, 0.99998033, 0.00533895614, -0.528053343, -0.00628707698, 0.849178433),Alpha)
  1166.             LS.C0 = clerp(LS.C0,CFrame.new(-1.32175505, 0.156236127+.15*M.C(Sine/16), 0.233877867, 0.877554953, -0.456876248, 0.145469457, 0.259513229, 0.707695842, 0.657129884, -0.403175086, -0.538916171, 0.739607573),Alpha)
  1167.             RS.C0 = clerp(RS.C0,CFrame.new(1.2516855, 0.604915917+.15*M.C(Sine/16), -0.0189059302, 0.915104508, -0.287113011, -0.283108115, 0.301054537, 0.953587949, 0.00603589695, 0.268235415, -0.0907544345, 0.959069014),Alpha)
  1168.             NK.C0 = clerp(NK.C0,CFrame.new(1.79447234e-05, 1.49895597, -0.0143749639, 0.769539058, -0.360377938, 0.527197778, 0.387706369, 0.919646919, 0.0627188534, -0.507438183, 0.156133309, 0.847424924),Alpha)
  1169.             HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1170.             -- idle
  1171.         elseif(State == 'Walk')then
  1172.           if(Hum.WalkSpeed >= 24)then
  1173.                 local wsVal = 22 / (Hum.WalkSpeed/16)
  1174.                 local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1175.                 RJ.C0 = RJ.C0:lerp(CF.N(0,0-.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15),M.R(0-15*M.S(Sine/wsVal)/2),0),Alpha)
  1176.                 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+15*M.S(Sine/wsVal))),Alpha)
  1177.                 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+15*M.S(Sine/wsVal))),Alpha)
  1178.                 NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(15),0,0),Alpha)
  1179.                 LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(15),0,0),Alpha)
  1180.                 RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(15),0,0),Alpha)
  1181.                 HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1182.             else
  1183.                 local wsVal = 8 / (Hum.WalkSpeed/8)
  1184.                 local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1)
  1185.                 RJ.C0 = RJ.C0:lerp(CF.N(0,0-.05*M.C(Sine/(wsVal/2)),0)*CF.A(0,M.R(0-5*M.S(Sine/wsVal)/2),0),Alpha)
  1186.                 LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-25*M.S(Sine/wsVal)),0,M.R(5-5*M.S(Sine/wsVal))),Alpha)
  1187.                 RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+25*M.S(Sine/wsVal)),0,M.R(-5-5*M.S(Sine/wsVal))),Alpha)
  1188.                 NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1189.                 LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha)
  1190.                 RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha)
  1191.                 HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1192.             end
  1193.         elseif(State == 'Jump' or State == 'Fall')then
  1194.           if(Walking)then
  1195.                 local Alpha = .2
  1196.                 RJ.C0 = clerp(RJ.C0,RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(65)),M.R(65)),0,0),Alpha)
  1197.                 LH.C0 = clerp(LH.C0,CFrame.new(-0.497912645, -1.0987643, -0.0683324337, 0.999878228, 0.00860835519, 0.0130246133, -0.00010142161, 0.837816596, -0.545952022, -0.015611981, 0.545884132, 0.837715328),Alpha)
  1198.                 RH.C0 = clerp(RH.C0,CFrame.new(0.499978393, -1.16382337, 0.109293163, 0.999878228, -0.0120433727, 0.00993486121, -0.00010142161, 0.631323814, 0.775519371, -0.015611981, -0.775425911, 0.631245613),Alpha)
  1199.                 LS.C0 = clerp(LS.C0,CFrame.new(-1.55211556, 0.576563478, -0.00269976072, 0.976067662, 0.216906726, 0.0156116467, -0.217024669, 0.976145923, 0.00628317893, -0.0138763804, -0.00952091813, 0.999858499),Alpha)
  1200.                 RS.C0 = clerp(RS.C0,CFrame.new(1.50182188, 0.636661649, 0.00632623257, 0.977592707, -0.209926367, 0.0156121543, 0.209851891, 0.977713108, 0.00628198683, -0.016582964, -0.00286500831, 0.999858439),Alpha)
  1201.                 NK.C0 = clerp(NK.C0,CFrame.new(1.14440072e-05, 1.49924362, -0.0143961608, 1.00000024, -5.82076609e-11, 0, 1.23691279e-10, 0.997964919, 0.0637660474, 0, -0.0637660623, 0.997965038),Alpha)
  1202.                 HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1203.             else
  1204.                 local Alpha = .2
  1205.                 RJ.C0 = clerp(RJ.C0,RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(65)),M.R(65)),0,0),Alpha)
  1206.                 LH.C0 = clerp(LH.C0,CFrame.new(-0.504374504, -0.291219354, -0.487436086, 0.999878228, -0.00438931212, 0.0149825988, -0.00010142161, 0.957819223, 0.287371844, -0.015611981, -0.287338346, 0.957701981),Alpha)
  1207.                 RH.C0 = clerp(RH.C0,CFrame.new(0.453094482, -0.871358454, 0.0898642987, 0.985589385, -0.168456957, 0.0153662469, 0.162863791, 0.969548643, 0.182895929, -0.0457084104, -0.177757636, 0.983012319),Alpha)
  1208.                 LS.C0 = clerp(LS.C0,CFrame.new(-1.55211556, 0.576563478, -0.00269976072, 0.976067662, 0.216906726, 0.0156116467, -0.217024669, 0.976145923, 0.00628317893, -0.0138763804, -0.00952091813, 0.999858499),Alpha)
  1209.                 RS.C0 = clerp(RS.C0,CFrame.new(1.50182188, 0.636661649, 0.00632623257, 0.977592707, -0.209926367, 0.0156121543, 0.209851891, 0.977713108, 0.00628198683, -0.016582964, -0.00286500831, 0.999858439),Alpha)
  1210.                 NK.C0 = clerp(NK.C0,CFrame.new(1.14440072e-05, 1.49924362, -0.0143961608, 1.00000024, -5.82076609e-11, 0, 1.23691279e-10, 0.997964919, 0.0637660474, 0, -0.0637660623, 0.997965038),Alpha)
  1211.                 HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1212.             end
  1213.         elseif(State == 'Paralyzed')then
  1214.           -- paralyzed
  1215.         elseif(State == 'Sit')then
  1216.           -- sit
  1217.         end
  1218.     end
  1219. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement