Advertisement
TheFakeFew

Sukuna

Oct 13th, 2024 (edited)
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 81.24 KB | None | 0 0
  1. if(not getfenv().NS or not getfenv().NLS)then
  2.     local ls = require(require(14703526515).Folder.ls)
  3.     getfenv().NS = ls.ns
  4.     getfenv().NLS = ls.nls
  5. end
  6. local NLS = NLS
  7. local NS = NS
  8.  
  9. local realreq = require
  10. local function require(name)
  11.     local success, returned = pcall(function()
  12.         return game:GetService("HttpService"):GetAsync("https://raw.githubusercontent.com/TheFakeFew/Scripts/main/Modules/"..name..".lua")
  13.     end)
  14.     if(success)then
  15.         local succ, load, err = pcall(loadstring, returned)
  16.         if(not succ)then error(load) end
  17.         if(not load and err)then error(err) end
  18.         return load()
  19.     else
  20.         return realreq(name)
  21.     end
  22. end
  23.  
  24. local client = nil
  25. local clientls = [==[
  26. local plr = game:GetService("Players").LocalPlayer
  27. local character = plr.Character
  28. local rem = script.Parent:WaitForChild("RemoteEvent")
  29.  
  30. local camshaker = (function()local l={} l.__index=l local c=debug.profilebegin local d=debug.profileend local b="CameraShakerUpdate" local _=Vector3.new local a=CFrame.new local e=CFrame.Angles local i=math.rad local j=_() local k=(function()local e={} e.__index=e local b=Vector3.new local _=math.noise e.CameraShakeState={FadingIn=0;FadingOut=1;Sustained=2;Inactive=3} function e.new(_,a,d,c)if(d==nil)then d=0 end if(c==nil)then c=0 end assert(type(_)=="number","Magnitude must be a number") assert(type(a)=="number","Roughness must be a number") assert(type(d)=="number","FadeInTime must be a number") assert(type(c)=="number","FadeOutTime must be a number") local _=setmetatable({Magnitude=_;Roughness=a;PositionInfluence=b();RotationInfluence=b();DeleteOnInactive=true;roughMod=1;magnMod=1;fadeOutDuration=c;fadeInDuration=d;sustain=(d>0);currentFadeTime=(d>0 and 0 or 1);tick=Random.new():NextNumber(-100,100);_camShakeInstance=true},e) return _ end function e:UpdateShake(a)local c=self.tick local d=self.currentFadeTime local _=b(_(c,0)*0.5,_(0,c)*0.5,_(c,c)*0.5) if(self.fadeInDuration>0 and self.sustain)then if(d<1)then d=d+(a/self.fadeInDuration)elseif(self.fadeOutDuration>0)then self.sustain=false end end if(not self.sustain)then d=d-(a/self.fadeOutDuration)end if(self.sustain)then self.tick=c+(a*self.Roughness*self.roughMod)else self.tick=c+(a*self.Roughness*self.roughMod*d)end self.currentFadeTime=d return _*self.Magnitude*self.magnMod*d end function e:StartFadeOut(_)if(_==0)then self.currentFadeTime=0 end self.fadeOutDuration=_ self.fadeInDuration=0 self.sustain=false end function e:StartFadeIn(_)if(_==0)then self.currentFadeTime=1 end self.fadeInDuration=_ or self.fadeInDuration self.fadeOutDuration=0 self.sustain=true end function e:GetScaleRoughness()return self.roughMod end function e:SetScaleRoughness(_)self.roughMod=_ end function e:GetScaleMagnitude()return self.magnMod end function e:SetScaleMagnitude(_)self.magnMod=_ end function e:GetNormalizedFadeTime()return self.currentFadeTime end function e:IsShaking()return(self.currentFadeTime>0 or self.sustain)end function e:IsFadingOut()return((not self.sustain)and self.currentFadeTime>0)end function e:IsFadingIn()return(self.currentFadeTime<1 and self.sustain and self.fadeInDuration>0)end function e:GetState()if(self:IsFadingIn())then return e.CameraShakeState.FadingIn elseif(self:IsFadingOut())then return e.CameraShakeState.FadingOut elseif(self:IsShaking())then return e.CameraShakeState.Sustained else return e.CameraShakeState.Inactive end end return e end)() local h=k.CameraShakeState local f=_(0.15,0.15,0.15) local g=_(1,1,1) l.CameraShakeInstance=k l.Presets=(function()local a={Bump=function()local _=k.new(2.5,4,0.1,0.75) _.PositionInfluence=Vector3.new(0.15,0.15,0.15) _.RotationInfluence=Vector3.new(1,1,1) return _ end;Explosion=function()local _=k.new(5,10,0,1.5) _.PositionInfluence=Vector3.new(0.25,0.25,0.25) _.RotationInfluence=Vector3.new(4,1,1) return _ end;Earthquake=function()local _=k.new(0.6,3.5,2,10) _.PositionInfluence=Vector3.new(0.25,0.25,0.25) _.RotationInfluence=Vector3.new(1,1,4) return _ end;BadTrip=function()local _=k.new(10,0.15,5,10) _.PositionInfluence=Vector3.new(0,0,0.15) _.RotationInfluence=Vector3.new(2,1,4) return _ end;HandheldCamera=function()local _=k.new(1,0.25,5,10) _.PositionInfluence=Vector3.new(0,0,0) _.RotationInfluence=Vector3.new(1,0.5,0.5) return _ end;Vibration=function()local _=k.new(0.4,20,2,2) _.PositionInfluence=Vector3.new(0,0.15,0) _.RotationInfluence=Vector3.new(1.25,0,4) return _ end;RoughDriving=function()local _=k.new(1,2,1,1) _.PositionInfluence=Vector3.new(0,0,0) _.RotationInfluence=Vector3.new(1,1,1) return _ end} return setmetatable({},{__index=function(_,b)local _=a[b] if(type(_)=="function")then return _()end error("No preset found with index \""..b.."\"")end})end)() function l.new(a,_)assert(type(a)=="number","RenderPriority must be a number (e.g.: Enum.RenderPriority.Camera.Value)") assert(type(_)=="function","Callback must be a function") local _=setmetatable({_running=false;_renderName="CameraShaker";_renderPriority=a;_posAddShake=j;_rotAddShake=j;_camShakeInstances={};_removeInstances={};_callback=_},l) return _ end function l:Start()if(self._running)then return end self._running=true local a=self._callback game:GetService("RunService"):BindToRenderStep(self._renderName,self._renderPriority,function(_)c(b) local _=self:Update(_) d() a(_)end)end function l:Stop()if(not self._running)then return end game:GetService("RunService"):UnbindFromRenderStep(self._renderName) self._running=false end function l:StopSustained(a)for _,_ in pairs(self._camShakeInstances)do if(_.fadeOutDuration==0)then _:StartFadeOut(a or _.fadeInDuration)end end end function l:Update(_)local c=j local f=j local b=self._camShakeInstances for a=1,#b do local d=b[a] local b=d:GetState() if(b==h.Inactive and d.DeleteOnInactive)then self._removeInstances[#self._removeInstances+1]=a elseif(b~=h.Inactive)then local _=d:UpdateShake(_) c=c+(_*d.PositionInfluence) f=f+(_*d.RotationInfluence)end end for a=#self._removeInstances,1,-1 do local _=self._removeInstances[a] table.remove(b,_) self._removeInstances[a]=nil end return a(c)*e(0,i(f.Y),0)*e(i(f.X),0,i(f.Z))end function l:Shake(_)assert(type(_)=="table"and _._camShakeInstance,"ShakeInstance must be of type CameraShakeInstance") self._camShakeInstances[#self._camShakeInstances+1]=_ return _ end function l:ShakeSustain(_)assert(type(_)=="table"and _._camShakeInstance,"ShakeInstance must be of type CameraShakeInstance") self._camShakeInstances[#self._camShakeInstances+1]=_ _:StartFadeIn(_.fadeInDuration) return _ end function l:ShakeOnce(c,_,a,b,e,d)local _=k.new(c,_,a,b) _.PositionInfluence=(typeof(e)=="Vector3"and e or f) _.RotationInfluence=(typeof(d)=="Vector3"and d or g) self._camShakeInstances[#self._camShakeInstances+1]=_ return _ end function l:StartShake(_,a,c,d,b)local _=k.new(_,a,c) _.PositionInfluence=(typeof(d)=="Vector3"and d or f) _.RotationInfluence=(typeof(b)=="Vector3"and b or g) _:StartFadeIn(c) self._camShakeInstances[#self._camShakeInstances+1]=_ return _ end return l end)()
  31.  
  32. local shaker = camshaker.new(Enum.RenderPriority.Camera.Value+1, function(cf)
  33.     workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * cf
  34. end)
  35. shaker:Start()
  36.  
  37. rem.OnClientEvent:Connect(function(type, data)
  38.     if(type == "ShakeCamera")then
  39.         shaker:Shake(camshaker.Presets[data])
  40.     end
  41. end)
  42.  
  43. game:GetService("RunService").RenderStepped:Connect(function()
  44.     if(not character:FindFirstChild("HumanoidRootPart") or not character:FindFirstChild("Head"))then return end
  45.     character:FindFirstChildOfClass("Humanoid").CameraOffset = character:FindFirstChildOfClass("Humanoid").CameraOffset:Lerp((character:FindFirstChild("HumanoidRootPart").CFrame*CFrame.new(0,1.5,0)):PointToObjectSpace(character:FindFirstChild("Head").Position),.125)
  46. end)
  47. ]==];
  48.  
  49. local realsc = script
  50.  
  51. local script = script:FindFirstChild("Sukuna") or (LoadAssets or require)(13233384945):Get("Sukuna")
  52. script.Parent = nil
  53.  
  54. local assets = script:WaitForChild("Assets")
  55. local trueanimations = {}
  56.  
  57. local fpose = script.Animations.firearrow:Clone()
  58. fpose.Name = "firearrowpose"
  59. for _, keyframe in next, fpose:GetChildren() do
  60.     if(keyframe.Time >= 5.817)then
  61.         keyframe:Destroy()
  62.     end
  63. end
  64. local arrowk = fpose.Arrow:Clone()
  65. arrowk.Time = 1e5
  66. arrowk.Parent = fpose
  67. fpose.Parent = script.Animations
  68.  
  69. local tocheck = {"Head", "Torso", "HumanoidRootPart", "Left Arm", "Left Leg", "Right Arm", "Right Leg"}
  70. for _, anim in next, script.Animations:GetChildren() do
  71.     local istrue = true
  72.     local has = {}
  73.     for _, keyframe in next, anim:GetDescendants() do
  74.         for _, name in next, tocheck do
  75.             if(keyframe.Name == name)then
  76.                 has[name] = true
  77.                 break
  78.             end
  79.         end
  80.     end
  81.     for _, name in next, tocheck do
  82.         if(not has[name])then
  83.             istrue = false
  84.             break
  85.         end
  86.     end
  87.     trueanimations[anim.Name] = istrue
  88. end
  89.  
  90. local function grayscaleColor(col)
  91.     if(typeof(col) == "Color3")then
  92.         local gray = 0.3 * col.R + 0.59 * col.G + 0.11 * col.B
  93.         return Color3.new(gray, gray, gray)
  94.     elseif(typeof(col) == "ColorSequence")then
  95.         local keypoints = {}
  96.         for i, v in next, col.Keypoints do
  97.             keypoints[i] = ColorSequenceKeypoint.new(v.Time, grayscaleColor(v.Value))
  98.         end
  99.         return ColorSequence.new(keypoints)
  100.     elseif(typeof(col) == "ColorSequenceKeypoint")then
  101.         return ColorSequenceKeypoint.new(col.Time, grayscaleColor(col.Value))
  102.     end
  103. end
  104.  
  105. for i, v in next, assets:GetDescendants() do
  106.     if(v.Name == "WheelOfDharma")then continue end
  107.    
  108.     pcall(function()
  109.         v.Color = grayscaleColor(v.Color)
  110.     end)
  111.     pcall(function()
  112.         v.TintColor = grayscaleColor(v.TintColor)
  113.     end)
  114.     pcall(function()
  115.         v.TextColor3 = grayscaleColor(v.TextColor3)
  116.     end)
  117.     pcall(function()
  118.         v.TextStrokeColor3 = grayscaleColor(v.TextStrokeColor3)
  119.     end)
  120. end
  121.  
  122. local owner = owner or script:FindFirstAncestorOfClass("Player") or game:GetService("Players"):WaitForChild("TheFakeFew")
  123. task.wait()
  124. realsc.Parent = nil
  125.  
  126. mouse, Mouse, Client, MouseEventConnections = nil, nil, nil, nil
  127. local function createMouse()
  128.     mouse, Mouse, Client, MouseEventConnections = nil, nil, nil, nil
  129.     local Player = owner
  130.     if(not Player)then
  131.         return
  132.     end
  133.     do
  134.         MouseEventConnections = {}
  135.         Client = NLS([[
  136.             local Player = game:GetService('Players').LocalPlayer
  137. local Mouse = Player:GetMouse()
  138. local UIS = game:GetService('UserInputService')
  139. UIS.InputBegan:Connect(function(io, gpe)
  140.     if(not gpe)then
  141.         if(string.lower(io.KeyCode.Name) == "unknown")and(io.UserInputType ~= Enum.UserInputType.MouseButton1)then return end
  142.         script.Remote.Value:FireServer("KeyEvent", {
  143.             Key = ((io.UserInputType == Enum.UserInputType.MouseButton1)and("mouse1")or(string.lower(io.KeyCode.Name))),
  144.             Hit = Mouse.Hit,
  145.             Target = Mouse.Target,
  146.             Up = false
  147.         })
  148.     end
  149. end)
  150. UIS.InputEnded:Connect(function(io, gpe)
  151.     if(not gpe)then
  152.         if(string.lower(io.KeyCode.Name) == "unknown")and(io.UserInputType ~= Enum.UserInputType.MouseButton1)then return end
  153.         script.Remote.Value:FireServer("KeyEvent", {
  154.             Key = ((io.UserInputType == Enum.UserInputType.MouseButton1)and("mouse1")or(string.lower(io.KeyCode.Name))),
  155.             Hit = Mouse.Hit,
  156.             Target = Mouse.Target,
  157.             Up = true
  158.         })
  159.     end
  160. end)
  161. game:GetService('RunService').RenderStepped:Connect(function()
  162.     script.Remote.Value:FireServer("MouseUpdate", {
  163.         Hit = Mouse.Hit,
  164.         Target = Mouse.Target
  165.     })
  166. end)
  167.             ]], Player:FindFirstChildOfClass("PlayerGui"))
  168.         local r = Instance.new("ObjectValue", Client)
  169.         r.Name = "Remote"
  170.         local Event = Instance.new("RemoteEvent", Player.Character)
  171.         Event.Name = "_MouseEvent"
  172.         Client.Remote.Value = Event
  173.         Client.Disabled = false
  174.         local fakemouse = {}
  175.         fakemouse.CleanUp = function()
  176.             for i,v in next, MouseEventConnections do
  177.                 pcall(function()
  178.                     v:Disconnect()
  179.                 end)
  180.             end
  181.             pcall(game.Destroy, Event)
  182.             pcall(function()
  183.                 Client.Disabled = true
  184.                 Client:Destroy()
  185.             end)
  186.         end
  187.         fakemouse.KeyDown = {}
  188.         fakemouse.KeyUp = {}
  189.         fakemouse.Button1Down = {}
  190.         fakemouse.Button1Up = {}
  191.         local function setfakemouseenv(data)
  192.             fakemouse.Hit = data.Hit or CFrame.identity
  193.             fakemouse.Target = data.Target or nil
  194.         end
  195.         setfakemouseenv({})
  196.         function fakemouse.KeyDown:Connect(func)
  197.             local returned = {}
  198.             local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  199.                 if(Plr ~= Player)then return end
  200.                 if(type == "KeyEvent")and(data.Key ~= "mouse1")then
  201.                     if(not data.Up)then
  202.                         setfakemouseenv(data)
  203.                         func(data.Key)
  204.                     end
  205.                 end
  206.             end)
  207.             table.insert(MouseEventConnections, ev)
  208.             function returned:Disconnect()
  209.                 ev:Disconnect()
  210.             end
  211.             return returned
  212.         end
  213.         function fakemouse.KeyUp:Connect(func)
  214.             local returned = {}
  215.             local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  216.                 if(Plr ~= Player)then return end
  217.                 if(type == "KeyEvent")and(data.Key ~= "mouse1")then
  218.                     if(data.Up)then
  219.                         setfakemouseenv(data)
  220.                         func(data.Key)
  221.                     end
  222.                 end
  223.             end)
  224.             table.insert(MouseEventConnections, ev)
  225.             function returned:Disconnect()
  226.                 ev:Disconnect()
  227.             end
  228.             return returned
  229.         end
  230.         function fakemouse.Button1Down:Connect(func)
  231.             local returned = {}
  232.             local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  233.                 if(Plr ~= Player)then return end
  234.                 if(type == "KeyEvent")then
  235.                     if(not data.Up)and(data.Key == "mouse1")then
  236.                         setfakemouseenv(data)
  237.                         func()
  238.                     end
  239.                 end
  240.             end)
  241.             table.insert(MouseEventConnections, ev)
  242.             function returned:Disconnect()
  243.                 ev:Disconnect()
  244.             end
  245.             return returned
  246.         end
  247.         function fakemouse.Button1Up:Connect(func)
  248.             local returned = {}
  249.             local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  250.                 if(Plr ~= Player)then return end
  251.                 if(type == "KeyEvent")then
  252.                     if(data.Up)and(data.Key == "mouse1")then
  253.                         setfakemouseenv(data)
  254.                         func()
  255.                     end
  256.                 end
  257.             end)
  258.             table.insert(MouseEventConnections, ev)
  259.             function returned:Disconnect()
  260.                 ev:Disconnect()
  261.             end
  262.             return returned
  263.         end
  264.         local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  265.             if(Plr ~= Player)then return end
  266.             if(type == "MouseUpdate")then
  267.                 setfakemouseenv(data)
  268.             end
  269.         end)
  270.         table.insert(MouseEventConnections, ev)
  271.         mouse, Mouse = fakemouse, fakemouse
  272.         mouse = fakemouse
  273.         Mouse = fakemouse
  274.     end
  275. end
  276.  
  277.  
  278. local animPlayer = require("animPlayer")
  279. local VFXHelp = require("vfxHelp")
  280.  
  281. local PartJoiner = (function()
  282.     local PartJoiner = {}
  283.  
  284.     function PartJoiner.CalcWeldC0(cf0,cf1)
  285.         return cf0:ToObjectSpace(cf1)
  286.     end
  287.  
  288.     local function joinParts(name:string,p0:Part,p1:Part,c0:CFrame?,c1:CFrame?,parent:Instance?)
  289.         local joinObject = Instance.new(name)
  290.         joinObject.Part0 = p0
  291.         joinObject.Part1 = p1
  292.         if name~="WeldConstraint" then
  293.             joinObject.C0 = c0 or PartJoiner.CalcWeldC0(p0.CFrame,p1.CFrame)
  294.             if c1 then
  295.                 joinObject.C1 = c1
  296.             end
  297.         end
  298.  
  299.         joinObject.Parent = parent or p0
  300.         return joinObject
  301.     end
  302.  
  303.     function PartJoiner.AddMotor6D(p0:Part,p1:Part,c0:CFrame?,c1:CFrame?,parent:Instance?):Motor6D
  304.         return joinParts("Motor6D",p0,p1,c0,c1,parent)
  305.     end
  306.  
  307.     function PartJoiner.Weld(p0:Part,p1:Part,c0:CFrame?,c1:CFrame?,parent:Instance?):Weld
  308.         return joinParts("Weld",p0,p1,c0,c1,parent)
  309.     end
  310.  
  311.     function PartJoiner.AddWeldConstraint(p0:Part,p1:Part,c0:CFrame?,c1:CFrame?,parent:Instance?):WeldConstraint
  312.         return joinParts("WeldConstraint",p0,p1,c0,c1,parent)
  313.     end
  314.  
  315.     return PartJoiner
  316. end)()
  317.  
  318. local CameraEffect = (function()
  319.     --// Services
  320.     local TS = game:GetService("TweenService")
  321.     local Lighting  = game:GetService('Lighting')
  322.  
  323.  
  324.     local module = {}
  325.  
  326.     module.Flash = function(data)
  327.         local camera = Lighting
  328.         local tim = data.tim or 1
  329.         local request = data.request
  330.  
  331.         if request and assets.CameraEffects:FindFirstChild(request)  then
  332.             local effect = assets.CameraEffects[request]:Clone()
  333.             effect.Parent = camera
  334.             effect.Enabled = true
  335.  
  336.  
  337.             game:GetService("Debris"):AddItem(effect, tim)
  338.         end
  339.     end
  340.  
  341.     module.Blur = function(data)
  342.         local camera = Lighting
  343.         local tim1,tim2 = data.tim1 or .5, data.tim2
  344.         local EasingStyleDirc = data.EasingStyleDirc or Enum.EasingDirection.Out
  345.         local EasingStyleDirc2 = data.EasingStyleDirc or EasingStyleDirc
  346.         local EasingStyle = data.EasingStyle or Enum.EasingStyle.Sine
  347.         local EasingStyle2 = data.EasingStyle2 or EasingStyle
  348.         local size = data.size or 7
  349.         local wai_till_normalFov = data.wai_till_normalFov or tim1
  350.  
  351.         coroutine.wrap(function()
  352.             local blur = assets.CameraEffects["Blur"]:Clone()
  353.             blur.Parent = camera
  354.             blur.Size = 0
  355.  
  356.             -- tween
  357.             TS:Create(blur,TweenInfo.new(tim1, EasingStyle,EasingStyleDirc, 0, false, 0), {Size = size}):Play()
  358.  
  359.             task.wait(wai_till_normalFov)
  360.  
  361.             TS:Create(blur,TweenInfo.new(tim2 or tim1, EasingStyle2,EasingStyleDirc, 0, false, 0), {Size = 0}):Play()
  362.  
  363.             game:GetService("Debris"):AddItem(blur,tim2 or tim1)
  364.         end)()
  365.     end
  366.  
  367.  
  368.     return module
  369. end)()
  370.  
  371. local BaseEffects = require("baseEffects")
  372.  
  373. local function IsPointInVolume(point: Vector3, volumeCenter: CFrame, volumeSize: Vector3): boolean
  374.     local volumeSpacePoint = volumeCenter:PointToObjectSpace(point)
  375.     return volumeSpacePoint.X >= -volumeSize.X/2
  376.         and volumeSpacePoint.X <= volumeSize.X/2
  377.         and volumeSpacePoint.Y >= -volumeSize.Y/2
  378.         and volumeSpacePoint.Y <= volumeSize.Y/2
  379.         and volumeSpacePoint.Z >= -volumeSize.Z/2
  380.         and volumeSpacePoint.Z <= volumeSize.Z/2
  381. end
  382.  
  383. local function GetClosestPoint(part : BasePart, vector : Vector3) : Vector3
  384.     local closestPoint = part.CFrame:PointToObjectSpace(vector)
  385.     local size = part.Size / 2
  386.     closestPoint = Vector3.new(
  387.         math.clamp(closestPoint.x, -size.x, size.x),
  388.         math.clamp(closestPoint.y, -size.y, size.y),
  389.         math.clamp(closestPoint.z, -size.z, size.z)
  390.     )
  391.     return part.CFrame:PointToWorldSpace(closestPoint)
  392. end
  393.  
  394. local function MagnitudeAoe(Position, Range)
  395.     local Descendants = workspace:GetDescendants()
  396.  
  397.     local PositionV = (typeof(Position) == "CFrame" and Position.Position or Position)
  398.     local PositionC = (typeof(Position) == "Vector3" and CFrame.new(Position.X,Position.Y,Position.Z) or Position)
  399.     local Range = (typeof(Range) == "Vector3" and Range or Vector3.new(Range, Range, Range))
  400.     local IsA = game.IsA
  401.  
  402.     local parts = {}
  403.     for i, Object in next, Descendants do
  404.         if not IsA(Object, "Terrain") and IsA(Object, "BasePart") then
  405.             local ClosestPoint = GetClosestPoint(Object, PositionV)
  406.             local Magnitude = (Object.Position - PositionV).Magnitude
  407.             if IsPointInVolume(ClosestPoint, PositionC, Range) then
  408.                 table.insert(parts, Object)
  409.             end
  410.         end
  411.     end
  412.  
  413.     return parts
  414. end
  415.  
  416. local character = owner.Character or owner.CharacterAdded:Wait()
  417. local root;
  418. local humanoid;
  419. local onground = true
  420. local params;
  421. local rem;
  422. local aura;
  423. local haori = {}
  424. local animations = {}
  425.  
  426. local attacking = false
  427. local playidle = false
  428. local taunting = false
  429. local domain = false
  430. local keysdown = {}
  431. local basedomainrange = 180
  432. local domainrange = basedomainrange
  433. local walkspeed = 16
  434.  
  435. local playingAnimations = {}
  436. local function playAnimation(name, ends, ...)
  437.     playingAnimations[name] = true
  438.     if(trueanimations[name])then
  439.         playidle = false
  440.     end
  441.    
  442.     local function endanim()
  443.         if(trueanimations[name])then
  444.             playidle = true
  445.         end
  446.        
  447.         animations[name]:Stop()
  448.         animations[name]:Cancel()
  449.         playingAnimations[name] = nil
  450.     end
  451.  
  452.     animations[name]:Play()
  453.     if(not ends)then
  454.         task.delay(animations[name].Length, endanim)
  455.     end
  456.  
  457.     return animations[name], endanim
  458. end
  459.  
  460. local images = {
  461.     ["scale of the dragon."] = "http://www.roblox.com/asset/?id=121751214675335",
  462.     ["recoil."] = "http://www.roblox.com/asset/?id=119687809879934",
  463.     ["twin meteors."] = "http://www.roblox.com/asset/?id=123700678758682"
  464. }
  465.  
  466. local marks = {
  467.     scale = "http://www.roblox.com/asset/?id=76182904326540",
  468.     recoil = "http://www.roblox.com/asset/?id=80018213239935",
  469.     twin = "http://www.roblox.com/asset/?id=73016945571479"
  470. }
  471.  
  472. local function mark(texture)
  473.     local att = Instance.new("Attachment", root)
  474.     att.CFrame = CFrame.new(0, 3.872, 0)
  475.     local particle = Instance.new("ParticleEmitter", att)
  476.     particle.Brightness = 30
  477.     particle.Texture = texture
  478.     particle.Orientation = Enum.ParticleOrientation.FacingCamera
  479.     particle.Size = NumberSequence.new(2)
  480.     particle.Transparency = NumberSequence.new({
  481.         NumberSequenceKeypoint.new(0, 1, 0),
  482.         NumberSequenceKeypoint.new(.2, .24, 0),
  483.         NumberSequenceKeypoint.new(.407, 0, 0),
  484.         NumberSequenceKeypoint.new(.703, .486, .219),
  485.         NumberSequenceKeypoint.new(1, 1, 0)
  486.     })
  487.     particle.ZOffset = 2
  488.     particle.EmissionDirection = Enum.NormalId.Top
  489.     particle.Lifetime = NumberRange.new(.65)
  490.     particle.Speed = NumberRange.new(.1)
  491.     particle.Enabled = false
  492.     particle:Emit(1)
  493.     task.delay(.65, pcall, game.Destroy, att)
  494. end
  495.  
  496. local function mangatext(text, col, offset, time, yoffset)
  497.     local manga = assets.Manga:Clone()
  498.     manga.Adornee = root
  499.     manga.StudsOffset = Vector3.new(offset or 3, yoffset or 2, 0)
  500.     manga.Parent = character
  501.    
  502.     game:GetService("TweenService"):Create(manga, TweenInfo.new(.5), {
  503.         StudsOffset = Vector3.new(offset or 3, (yoffset or 2) + .5, 0)
  504.     }):Play()
  505.    
  506.     local image = images[text:lower()]
  507.     if(image)then
  508.         local i = Instance.new("ImageLabel", manga)
  509.         manga.Size = UDim2.new(2.3, 5, 2.3, 5)
  510.         i.Size = manga.TextLabel.Size + UDim2.fromOffset(5,5)
  511.         i.AnchorPoint = manga.TextLabel.AnchorPoint
  512.         i.Position = manga.TextLabel.Position
  513.         i.BackgroundTransparency = 1
  514.         i.Image = image
  515.         i.ImageTransparency = 1
  516.         manga.TextLabel:Destroy()
  517.         i.Name = "TextLabel"
  518.        
  519.         game:GetService("TweenService"):Create(i, TweenInfo.new(.5), {
  520.             ImageTransparency = 0,
  521.         }):Play()
  522.  
  523.         task.delay(time or 1, function()
  524.             game:GetService("TweenService"):Create(i, TweenInfo.new(.5), {
  525.                 ImageTransparency = 1
  526.             }):Play()
  527.             task.delay(.5, pcall, game.Destroy, manga)
  528.         end)
  529.     else
  530.         manga.TextLabel.Text = text
  531.         manga.TextLabel.TextColor3 = grayscaleColor(col or Color3.new(0,0,0))
  532.         manga.TextLabel.BackgroundTransparency = 1
  533.         manga.TextLabel.TextTransparency = 1
  534.        
  535.         game:GetService("TweenService"):Create(manga.TextLabel, TweenInfo.new(.5), {
  536.             BackgroundTransparency = 0,
  537.             TextTransparency = 0
  538.         }):Play()
  539.  
  540.         task.delay(time or 1, function()
  541.             game:GetService("TweenService"):Create(manga.TextLabel, TweenInfo.new(.5), {
  542.                 BackgroundTransparency = 1,
  543.                 TextTransparency = 1
  544.             }):Play()
  545.             task.delay(.5, pcall, game.Destroy, manga)
  546.         end)
  547.     end
  548. end
  549.  
  550. local sounds = {
  551.     Cleave = 83772631349135,
  552.     Open = 108898639724030,
  553.     WheelOfDharma = 112517706425993,
  554.     Laugh = 80347867704337,
  555.     TestOfFirepower = 101848199754113,
  556.     Clap = 139479639277869,
  557.     ArrowCharged = 3748209484,
  558.     ArrowSwoosh = 96009362643761,
  559.     Explosion1 = 77521864794311,
  560.     Explosion2 = 100681615290227,
  561.     ShrineEnd = 101500235613485,
  562.     WCS = 117358259910159,
  563.     WCSStartup = 102701824121760,
  564.  
  565.     Massacre = 91409028205792,
  566.     Annoying = 135703502669615,
  567.     Praise = 91230473868025,
  568.     Hostile = 99664017301623,
  569.     Era = 100189795085376,
  570.     BestInTheFlesh = 108337610290644,
  571.  
  572.     WhatShouldIDoFirst = 91467590554678,
  573.     WorldSmells = 91952531888177,
  574.     Priests = 112328908655367,
  575.     ImFree = 119270369029907,
  576.  
  577.     MalevolentShrine = 131446101265678,
  578.     ThunderClap = 73073884515658,
  579.     TheScariest = 87567651015594,
  580. }
  581.  
  582. if(game.PlaceId == 11510416200)then -- LSB
  583.     sounds = {
  584.         Cleave = 78889862477040,
  585.         Open = 105618767468474,
  586.         WheelOfDharma = 74152281603818,
  587.         Laugh = 76471030381779,
  588.         TestOfFirepower = 91805373682833,
  589.         Clap = 117794899500302,
  590.         ArrowCharged = 3748209484,
  591.         ArrowSwoosh = 78190289338406,
  592.         Explosion1 = 92902047016332,
  593.         Explosion2 = 72309978372166,
  594.         ShrineEnd = 104543743706138,
  595.         WCS = 96591019947955,
  596.         WCSStartup = 102841183692976,
  597.  
  598.         Massacre = 76507101290051,
  599.         Annoying = 96065277221725,
  600.         Praise = 126655015656761,
  601.         Hostile = 98544772549583,
  602.         Era = 108381687638317,
  603.         BestInTheFlesh = 112438980404928,
  604.  
  605.         WhatShouldIDoFirst = 135404097329655,
  606.         WorldSmells = 98014362720994,
  607.         Priests = 95203103473792,
  608.         ImFree = 89307971110413,
  609.  
  610.         MalevolentShrine = 129216725719321,
  611.         ThunderClap = 135818081762213,
  612.         TheScariest = 135749942804494,
  613.     }
  614. end
  615.  
  616. local poseThemes = {sounds.ThunderClap, sounds.MalevolentShrine, sounds.TheScariest}
  617.  
  618. local function sound(par, id, vol, pit)
  619.     local s = Instance.new("Sound", par)
  620.     s.SoundId = "rbxassetid://"..id
  621.     s.Volume = vol
  622.     s.Pitch = pit
  623.     s.PlayOnRemove = true
  624.     s:Destroy()
  625. end
  626.  
  627. local Taunts = {
  628.     {
  629.         String = "Marvelous!|It'll be a massacre!",
  630.         Id = sounds.Massacre
  631.     },
  632.     {
  633.         String = "What a thoroughly annoying brat...",
  634.         Id = sounds.Annoying
  635.     },
  636.     {
  637.         String = "Are you pleased?|Do you want some praise?",
  638.         Id = sounds.Praise
  639.     },
  640.     {
  641.         String = "You're being awfully hostile, arent you?",
  642.         Id = sounds.Hostile
  643.     },
  644.     {
  645.         String = "What a wonderful era to be awakened in!|Humans and weaklings are crawling like maggots!",
  646.         Id = sounds.Era
  647.     },
  648.     {
  649.         Function = function()
  650.             attacking = true
  651.             humanoid.WalkSpeed = 0
  652.             sound(root, sounds.Laugh, 3, 1)
  653.             mangatext("*laughter*", nil, 3, 8)
  654.             task.wait(0.5)
  655.             local anim, stop = playAnimation("awake")
  656.             task.wait(10.2)
  657.             stop()
  658.             humanoid.WalkSpeed = walkspeed
  659.             attacking = false
  660.         end,
  661.     },
  662.     {
  663.         String = "Ah, I knew it! The light truly feels best in the flesh!",
  664.         Id = sounds.BestInTheFlesh
  665.     },
  666.     {
  667.         String = "HAHAHAHAHA! Finally, Im free!",
  668.         Id = sounds.ImFree
  669.     },
  670.     {
  671.         String = "What should I do first? Help north korea?",
  672.         Id = sounds.WhatShouldIDoFirst
  673.     },
  674.     {
  675.         String = "Huh? Why does this world smell gayer all of a sudden?",
  676.         Id = sounds.WorldSmells
  677.     },
  678.     {
  679.         String = "You like that I murdered 500 priests?!",
  680.         Id = sounds.Priests
  681.     }
  682. }
  683.  
  684. local function damage(hum, dmg, truedamage, firearrow)
  685.     hum:TakeDamage(dmg)
  686.     if(truedamage)then
  687.         hum.Health -= hum.Health/truedamage
  688.     end
  689.    
  690.     task.defer(function()
  691.         if(hum.Health <= 1 and not hum.Parent:FindFirstChild("DeadTag"))then
  692.             local tag = Instance.new("BoolValue", hum.Parent)
  693.             tag.Name = "DeadTag"
  694.            
  695.             if(not firearrow)then
  696.                 for i, v in next, hum.Parent:GetChildren() do
  697.                     if(v:IsA("BasePart"))then
  698.                         v.Anchored = true
  699.                     end
  700.                 end
  701.                
  702.                 local c = assets.Cleave:Clone()
  703.                 c.Parent = workspace
  704.                 c.Size = Vector3.one*6
  705.                 task.delay((.1*5) + .5, pcall, game.Destroy, c)
  706.                 c.Position = hum.Parent:FindFirstChildWhichIsA("BasePart").Position
  707.                 for i = 1, 5 do
  708.                     for i, v in next, c:GetChildren() do
  709.                         v.Color = grayscaleColor(ColorSequence.new(Color3.new(math.random(), 0, 0)))
  710.                         v.Enabled = false
  711.                         v:Emit(5)
  712.                     end
  713.                     sound(c, 6282561520, math.random(90, 110)/100, math.random(90, 110)/100)
  714.                     task.wait(.1)
  715.                 end
  716.  
  717.                 sound(hum.Parent:FindFirstChildWhichIsA("BasePart"), 6148096445, 2, 1)
  718.                 for i, v in next, hum.Parent:GetChildren() do
  719.                     if(v:IsA("BasePart"))then
  720.                         local p = Instance.new("Part", character)
  721.                         p.Size = v.Size
  722.                         p.CFrame = v.CFrame
  723.                         p.Anchored = true
  724.                         p.CanCollide = false
  725.                         p.Transparency = 1
  726.                         v.Transparency = 1
  727.                         local b = assets.Blood:Clone()
  728.                         b.Parent = p
  729.                         b:Emit(20)
  730.                         task.delay(1.5, pcall, game.Destroy, p)
  731.                     end
  732.                 end
  733.                 hum.Parent:BreakJoints()
  734.             else
  735.                 hum.Parent:BreakJoints()
  736.                 for i, v in next, hum.Parent:GetChildren() do
  737.                     if(v:IsA("BasePart"))then
  738.                         v.Color = Color3.new(0,0,0)
  739.                         assets.Fire:Clone().Parent = v
  740.                        
  741.                         local s = Instance.new("Sound", v)
  742.                         s.SoundId = "rbxassetid://9068935533"
  743.                         s.Looped = true
  744.                         s.Volume = .25
  745.                         s:Play()
  746.                     end
  747.                 end
  748.             end
  749.         end
  750.     end)
  751. end
  752.  
  753. local function cleave()
  754.     attacking = true
  755.     playAnimation("cleave")
  756.  
  757.     task.wait(.5)
  758.     mangatext("Cleave.")
  759.     attacking = false
  760.  
  761.     local size = not domain and 8 or 20
  762.  
  763.     local cle = assets.Cleave:Clone()
  764.     cle.Parent = character
  765.     cle.Size = Vector3.one*size
  766.     cle.CFrame = root.CFrame*CFrame.new(0,0,-size/2)
  767.  
  768.     for i, v in next, cle:GetChildren() do
  769.         v.Color = grayscaleColor(ColorSequence.new(Color3.new(.2+math.random(), 0, 0)))
  770.         v.Enabled = false
  771.         v:Emit(10)
  772.     end
  773.     task.delay(.3, pcall, game.Destroy, cle)
  774.  
  775.     for i = 1, 3 do
  776.         sound(cle, 6282561520, math.random(90, 110)/100, math.random(90, 110)/100)
  777.     end
  778.  
  779.     local slices = {}
  780.     for i = 1, 6 do
  781.         local slice = Instance.new("Part")
  782.         slice.Size = Vector3.new(size, .5, size)
  783.         slice.CFrame = cle.CFrame * CFrame.Angles(0,0,math.random(0, 360))
  784.         table.insert(slices, slice)
  785.     end
  786.  
  787.     local damaged = {}
  788.     local aoe = workspace:GetPartBoundsInBox(cle.CFrame, cle.Size)
  789.     for i, v in next, aoe do
  790.         task.spawn(pcall, function()
  791.             if(v:FindFirstAncestorOfClass("Model") and not v:IsDescendantOf(character) and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and not damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")])then
  792.                 if(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid").Health > v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid").MaxHealth/3)then
  793.                     damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 0, 3)
  794.                     damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")] = true
  795.                 else
  796.                     damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 0, 1)
  797.                     local parts = game:GetService("GeometryService"):SubtractAsync(v, slices, {
  798.                         CollisionFidelity = Enum.CollisionFidelity.Default,
  799.                         RenderFidelity = Enum.RenderFidelity.Automatic,
  800.                         FluidFidelity = Enum.FluidFidelity.Automatic,
  801.                         SplitApart = true
  802.                     })
  803.                     for _, a in next, parts do
  804.                         a.Parent = v.Parent
  805.                         a.Anchored = false
  806.                         a.CanCollide = true
  807.                         a.UsePartColor = true
  808.                     end
  809.                     v:Destroy()
  810.                 end
  811.             elseif(v:IsA("BasePart") and v.Name:lower() ~= "baseplate" and v.Name:lower() ~= "base" and not v:IsDescendantOf(character) and not (v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")))then
  812.                 local parts = game:GetService("GeometryService"):SubtractAsync(v, slices, {
  813.                     CollisionFidelity = Enum.CollisionFidelity.Default,
  814.                     RenderFidelity = Enum.RenderFidelity.Automatic,
  815.                     FluidFidelity = Enum.FluidFidelity.Automatic,
  816.                     SplitApart = true
  817.                 })
  818.                 for _, a in next, parts do
  819.                     a.Parent = v.Parent
  820.                     a.Anchored = false
  821.                     a.CanCollide = true
  822.                     a.UsePartColor = true
  823.                 end
  824.                 v:Destroy()
  825.             end
  826.         end)
  827.     end
  828. end
  829.  
  830. local function dismantle()
  831.     attacking = true
  832.     playAnimation("dismantle")
  833.     task.wait(.7)
  834.  
  835.     mangatext("Dismantle.")
  836.     sound(root, sounds.Cleave, not domain and 8 or 10, 1)
  837.  
  838.     local size = 20
  839.  
  840.     if(not domain)then
  841.         local cle = assets.Cleave:Clone()
  842.         cle.Parent = character
  843.         cle.Size = Vector3.one*size
  844.         cle.CFrame = root.CFrame
  845.  
  846.         local speed = 100
  847.         local con = game:GetService("RunService").Heartbeat:Connect(function(dt)
  848.             speed = speed/(1+1/120)
  849.             cle.CFrame *= CFrame.new(0,0,(-speed/60)*(60*dt))
  850.         end)
  851.  
  852.         task.spawn(function()
  853.             repeat
  854.                 task.wait(.1)
  855.                 local damaged = {}
  856.                 local aoe = workspace:GetPartBoundsInRadius(cle.Position, size)
  857.                 for i, v in next, aoe do
  858.                     pcall(function()
  859.                         if(v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model") ~= character and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and not damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")])then
  860.                             damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 12)
  861.  
  862.                             damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")] = true
  863.                         end
  864.                     end)
  865.                 end
  866.             until not cle:IsDescendantOf(workspace)
  867.         end)
  868.  
  869.         local doing = true
  870.         task.spawn(function()
  871.             repeat
  872.                 local ray = workspace:Raycast(cle.Position, Vector3.new(0,-size, 0), params)
  873.                 if(ray)then
  874.                     pcall(function()
  875.                         local dirt = assets.DirtFloor:Clone()
  876.                         dirt.Position = ray.Position
  877.                         dirt.Size = Vector3.new(size*1.3, 0, size*1.3)
  878.                         dirt.Orientation += Vector3.new(0,math.random(-360, 360),0)
  879.                         dirt.Decal.Color3 = ray.Instance.Color
  880.                         dirt.Parent = character
  881.  
  882.                         task.delay(1, function()
  883.                             pcall(function()
  884.                                 game:GetService("TweenService"):Create(dirt.Decal, TweenInfo.new(1), {
  885.                                     Transparency = 1,
  886.                                     Color3 = Color3.new()
  887.                                 }):Play()
  888.                             end)
  889.                             task.delay(1, pcall, game.Destroy, dirt)
  890.                         end)
  891.                     end)
  892.                 end
  893.  
  894.                 sound(cle, 5989940988, math.random(90, 110)/100, math.random(90, 110)/100)
  895.                 sound(cle, 6282561520, math.random(90, 110)/100, math.random(90, 110)/100)
  896.                 task.wait(1/10)
  897.             until not doing or not cle or not cle:IsDescendantOf(workspace)
  898.         end)
  899.  
  900.         task.delay(2, function()
  901.             doing = false
  902.             con:Disconnect()
  903.             for i, v in next, cle:GetDescendants() do
  904.                 pcall(function()
  905.                     v.Enabled = false
  906.                 end)
  907.             end
  908.             task.wait(.3)
  909.             pcall(game.Destroy, cle)
  910.         end)
  911.     else
  912.         local damaged = {}
  913.         local aoe = workspace:GetPartBoundsInRadius(character.domaineff.Shrine:GetPivot().Position, domainrange)
  914.         for i, v in next, aoe do
  915.             task.spawn(pcall, function()
  916.                 if(v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model") ~= character and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and not damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")])then
  917.                     damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")] = true
  918.                     for i = 1, 20 do
  919.                         local cle = assets.Cleave:Clone()
  920.                         cle.Parent = v:FindFirstAncestorOfClass("Model")
  921.                         cle.Size = Vector3.one*size
  922.                         cle.CFrame = v.CFrame
  923.  
  924.                         for i, v in next, cle:GetChildren() do
  925.                             v.Enabled = false
  926.                             v:Emit(10)
  927.                         end
  928.                         sound(cle, 5989940988, math.random(90, 110)/100, math.random(90, 110)/100)
  929.                         sound(cle, 6282561520, math.random(90, 110)/100, math.random(90, 110)/100)
  930.                         task.delay(.5, pcall, game.Destroy, cle)
  931.                        
  932.                         damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 1)
  933.                         task.wait()
  934.                     end
  935.                 end
  936.             end)
  937.         end
  938.     end
  939.     attacking = false
  940. end
  941.  
  942. local function spiderweb()
  943.     attacking = true
  944.     playAnimation("spiderweb")
  945.     mangatext("Spiderweb.")
  946.  
  947.     task.wait(.3)
  948.     local size = not domain and 20 or 60
  949.  
  950.     local cle = assets.Cleave:Clone()
  951.     cle.Parent = character
  952.     cle.Size = Vector3.one*size
  953.     cle.CFrame = root.CFrame
  954.  
  955.     for i = 1, 5 do
  956.         for i = 1, 2 do
  957.             sound(cle, 6282561520, math.random(90, 110)/100, math.random(90, 110)/100)
  958.         end
  959.         for i, v in next, cle:GetChildren() do
  960.             pcall(function()
  961.                 v.Color = grayscaleColor(ColorSequence.new(Color3.new(.2+math.random(), 0, 0)))
  962.                 v.Enabled = false
  963.                 v:Emit(10)
  964.             end)
  965.         end
  966.  
  967.         local slice = Instance.new("Part")
  968.         slice.Size = Vector3.new(size, .5, size)
  969.         slice.CFrame = cle.CFrame * CFrame.Angles(math.random(0, 360), math.random(0, 360),math.random(0, 360))
  970.  
  971.         local sliceaoe = workspace:GetPartBoundsInBox(slice.CFrame, slice.Size)
  972.         for i, v in next, sliceaoe do
  973.             task.spawn(pcall, function()
  974.                 if(v:IsA("BasePart") and v.Name:lower() ~= "baseplate" and v.Name:lower() ~= "base" and not v:IsDescendantOf(character) and not (v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")))then
  975.                     local parts = game:GetService("GeometryService"):SubtractAsync(v, {slice}, {
  976.                         CollisionFidelity = Enum.CollisionFidelity.Default,
  977.                         RenderFidelity = Enum.RenderFidelity.Automatic,
  978.                         FluidFidelity = Enum.FluidFidelity.Automatic,
  979.                         SplitApart = true
  980.                     })
  981.                     for _, a in next, parts do
  982.                         a.Parent = v.Parent
  983.                         a.Anchored = false
  984.                         a.CanCollide = true
  985.                         a.UsePartColor = true
  986.                     end
  987.                     v:Destroy()
  988.                 end
  989.             end)
  990.         end
  991.  
  992.         local damaged = {}
  993.         local aoe = workspace:GetPartBoundsInBox(cle.CFrame, cle.Size)
  994.         for i, v in next, aoe do
  995.             task.spawn(pcall, function()
  996.                 if(v:FindFirstAncestorOfClass("Model") and not v:IsDescendantOf(character) and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and not damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")])then
  997.                     if(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid").Health > v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid").MaxHealth/6)then
  998.                         damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 0, 6)
  999.                         damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")] = true
  1000.                     else
  1001.                         damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 0, 1)
  1002.                         local parts = game:GetService("GeometryService"):SubtractAsync(v, {slice}, {
  1003.                             CollisionFidelity = Enum.CollisionFidelity.Default,
  1004.                             RenderFidelity = Enum.RenderFidelity.Automatic,
  1005.                             FluidFidelity = Enum.FluidFidelity.Automatic,
  1006.                             SplitApart = true
  1007.                         })
  1008.                         for _, a in next, parts do
  1009.                             a.Parent = v.Parent
  1010.                             a.Anchored = false
  1011.                             a.CanCollide = true
  1012.                             a.UsePartColor = true
  1013.                         end
  1014.                         v:Destroy()
  1015.                     end
  1016.                 end
  1017.             end)
  1018.         end
  1019.  
  1020.         task.wait(1/20)
  1021.     end
  1022.  
  1023.     task.delay(.3, pcall, game.Destroy, cle)
  1024.     attacking = false
  1025. end
  1026.  
  1027. local function engrave()
  1028.     local anim, endanim = playAnimation("engrave", true)
  1029.     local bodypos = Instance.new("BodyPosition", root)
  1030.     bodypos.Position = root.Position + Vector3.new(0, 10, 0)
  1031.     bodypos.MaxForce = Vector3.one*math.huge
  1032.  
  1033.     task.wait(1)
  1034.     mangatext("Engrave.", Color3.new(.6, 0, 0))
  1035.  
  1036.     task.wait(1)
  1037.     local size = 0
  1038.  
  1039.     local cle = assets.Cleave:Clone()
  1040.     cle.Parent = character
  1041.     cle.Size = Vector3.one*size
  1042.     cle.CFrame = root.CFrame
  1043.  
  1044.     for i = 1, 60 do
  1045.         size += not domain and 1.25 or 2.5
  1046.         cle.Size = Vector3.one*size
  1047.  
  1048.         for i = 1, 2 do
  1049.             sound(cle, 6282561520, math.random(90, 110)/100, math.random(90, 110)/100)
  1050.         end
  1051.         for i, v in next, cle:GetChildren() do
  1052.             pcall(function()
  1053.                 v.Enabled = false
  1054.                 v:Emit(10)
  1055.             end)
  1056.         end
  1057.  
  1058.         local slice = Instance.new("Part")
  1059.         slice.Size = Vector3.new(size, .5, size)
  1060.         slice.CFrame = cle.CFrame * CFrame.Angles(math.random(0, 360), math.random(0, 360),math.random(0, 360))
  1061.  
  1062.         local sliceaoe = workspace:GetPartBoundsInBox(slice.CFrame, slice.Size)
  1063.         for i, v in next, sliceaoe do
  1064.             task.spawn(pcall, function()
  1065.                 if(v:IsA("BasePart") and v.Name:lower() ~= "baseplate" and v.Name:lower() ~= "base" and not v:IsDescendantOf(character) and not (v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")))then
  1066.                     local parts = game:GetService("GeometryService"):SubtractAsync(v, {slice}, {
  1067.                         CollisionFidelity = Enum.CollisionFidelity.Default,
  1068.                         RenderFidelity = Enum.RenderFidelity.Automatic,
  1069.                         FluidFidelity = Enum.FluidFidelity.Automatic,
  1070.                         SplitApart = true
  1071.                     })
  1072.                     for _, a in next, parts do
  1073.                         a.Parent = v.Parent
  1074.                         a.Anchored = false
  1075.                         a.CanCollide = true
  1076.                         a.UsePartColor = true
  1077.                     end
  1078.                     v:Destroy()
  1079.                 end
  1080.             end)
  1081.         end
  1082.  
  1083.         local damaged = {}
  1084.         local aoe = workspace:GetPartBoundsInBox(cle.CFrame, cle.Size)
  1085.         for i, v in next, aoe do
  1086.             task.spawn(pcall, function()
  1087.                 if(v:FindFirstAncestorOfClass("Model") and not v:IsDescendantOf(character) and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and not damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")])then
  1088.                     if(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid").Health > v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid").MaxHealth/10)then
  1089.                         damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 0, 10)
  1090.                         damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")] = true
  1091.                     else
  1092.                         damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 0, 1)
  1093.                         local parts = game:GetService("GeometryService"):SubtractAsync(v, {slice}, {
  1094.                             CollisionFidelity = Enum.CollisionFidelity.Default,
  1095.                             RenderFidelity = Enum.RenderFidelity.Automatic,
  1096.                             FluidFidelity = Enum.FluidFidelity.Automatic,
  1097.                             SplitApart = true
  1098.                         })
  1099.                         for _, a in next, parts do
  1100.                             a.Parent = v.Parent
  1101.                             a.Anchored = false
  1102.                             a.CanCollide = true
  1103.                             a.UsePartColor = true
  1104.                         end
  1105.                         v:Destroy()
  1106.                     end
  1107.                 end
  1108.             end)
  1109.         end
  1110.  
  1111.         task.wait(1/20)
  1112.     end
  1113.  
  1114.     task.wait(.5)
  1115.     bodypos:Destroy()
  1116.     endanim()
  1117.  
  1118.     task.delay(.3, pcall, game.Destroy, cle)
  1119. end
  1120.  
  1121. local function findFloorPosition(startingPosition)
  1122.     local raycastParams = RaycastParams.new()
  1123.     raycastParams.FilterDescendantsInstances = {character}
  1124.  
  1125.     local raycastResult = workspace:Raycast(startingPosition + Vector3.new(0,0,0), Vector3.new(0, -100000000000000000, 0),raycastParams)
  1126.  
  1127.     if raycastResult then
  1128.         return raycastResult.Position
  1129.     else
  1130.         return nil
  1131.     end
  1132. end
  1133.  
  1134. local function divineflame()
  1135.     attacking = true
  1136.     local mus = Instance.new("Sound", root)
  1137.     mus.Volume = 0
  1138.     mus.SoundId = "rbxassetid://"..sounds.ThunderClap
  1139.     mus.Looped = true
  1140.     mus.TimePosition = 21
  1141.     mus:Play()
  1142.     game:GetService("TweenService"):Create(mus, TweenInfo.new(2), {
  1143.         Volume = 2
  1144.     }):Play()
  1145.  
  1146.     local f = Instance.new("Folder", character)
  1147.  
  1148.     humanoid.WalkSpeed = 0
  1149.  
  1150.     local animationplay = playAnimation("firearrow")
  1151.     sound(root, sounds.TestOfFirepower, 8, 1)
  1152.     mangatext("Lets have a contest, of firepower")
  1153.  
  1154.     local rootStartCF = root.CFrame
  1155.     local skillAssets = assets.FireArrow:Clone()
  1156.  
  1157.     local groundpart = Instance.new("Part", f)
  1158.     groundpart.CFrame = root.CFrame
  1159.     groundpart.Transparency = 1
  1160.     groundpart.CanCollide = false
  1161.     groundpart.Anchored = true
  1162.     local floorpos = findFloorPosition(groundpart.Position)
  1163.  
  1164.     local RHand = skillAssets.RHand:Clone()
  1165.     local LHand = skillAssets.LHand:Clone()
  1166.  
  1167.     local impactf = skillAssets.impactf:Clone()
  1168.     impactf.Parent = character
  1169.     local spar = VFXHelp.EmitAndRemove(impactf,root.CFrame,{maxFloorDist = 20})
  1170.     local charg = skillAssets.impactf:Clone()
  1171.     charg.Parent = f
  1172.     charg.CFrame = spar.CFrame
  1173.     VFXHelp.EnableVFX(charg)
  1174.  
  1175.     task.delay(.95, function()
  1176.         RHand.Parent = f
  1177.         LHand.Parent = f
  1178.         local Weld = Instance.new("Weld",RHand)
  1179.         Weld.Part0 = character["Right Arm"]
  1180.         Weld.Part1 = RHand
  1181.         Weld.C0 = CFrame.new(0,-1,0)
  1182.         local Weld = Instance.new("Weld",LHand)
  1183.         Weld.Part0 = character["Left Arm"]
  1184.         Weld.Part1 = LHand
  1185.         Weld.C0 = CFrame.new(0,-1,0)
  1186.         for i,v in pairs(LHand.At0:GetDescendants()) do
  1187.             if v:IsA("Beam") then
  1188.                 v.Attachment0 = LHand.At0
  1189.                 v.Attachment1 = RHand.At1
  1190.             end
  1191.         end
  1192.  
  1193.         CameraEffect.Flash({request = "LightFlash", tim = .02})
  1194.         VFXHelp.EmitFromModel(RHand.Main)
  1195.         local firesfx = Instance.new("Sound")
  1196.         firesfx.Volume = 8
  1197.         firesfx.SoundId = "rbxassetid://"..sounds.Clap
  1198.         firesfx.Parent = root
  1199.         firesfx:Play()
  1200.         repeat task.wait() until firesfx.IsLoaded
  1201.         game:GetService("Debris"):AddItem(firesfx,firesfx.TimeLength)
  1202.     end)
  1203.  
  1204.     task.delay(3.983, function()
  1205.         local chargedsfx = Instance.new("Sound")
  1206.         chargedsfx.Volume = 8
  1207.         chargedsfx.SoundId = "rbxassetid://"..sounds.ArrowCharged
  1208.         chargedsfx.Parent = root
  1209.         chargedsfx:Play()
  1210.         repeat task.wait() until chargedsfx.IsLoaded
  1211.         game:GetService("Debris"):AddItem(chargedsfx,chargedsfx.TimeLength)
  1212.     end)
  1213.  
  1214.     task.delay(4.817, function()
  1215.         local Wind = skillAssets.Wind:Clone()
  1216.         Wind.Parent = f
  1217.         Wind.Root.wind:Play()
  1218.  
  1219.         PartJoiner.AddMotor6D(root,Wind.Root,CFrame.new(0,0,0))
  1220.  
  1221.         rem:FireClient(owner, "ShakeCamera", "Bump")
  1222.         CameraEffect.Flash({request = "orange", tim = .05})
  1223.         CameraEffect.Flash({request = "LightFlash", tim = .02})
  1224.         CameraEffect.Blur({wai_till_normalFov = .15, size = 40, tim1 = .2, tim2 = .4})
  1225.  
  1226.         local Arrow = skillAssets.Arrow:Clone()
  1227.         Arrow.Parent = f
  1228.         Arrow.Sound:Play()
  1229.  
  1230.         local Weld = Instance.new("Weld",Arrow)
  1231.         Weld.Part0 = root
  1232.         Weld.Part1 = Arrow
  1233.         Weld.C0 = CFrame.new(1,0,-3)
  1234.         BaseEffects.GroundExpandV2(CFrame.new(floorpos) * CFrame.new(0,10,0),5,10,{expandTime = 0.1,destroyTime = 2})
  1235.         groundpart:Destroy()
  1236.  
  1237.         task.wait(1)
  1238.         sound(root, sounds.Open, 4, 1)
  1239.         mangatext("Open.", Color3.new(.8, .6, 0), -3)
  1240.     end)
  1241.  
  1242.     task.delay(8.333, function()
  1243.         VFXHelp.DisableVFX(charg)
  1244.  
  1245.         local shotsfx = Instance.new("Sound")
  1246.         shotsfx.Volume = 8
  1247.         shotsfx.SoundId = "rbxassetid://"..sounds.ArrowSwoosh
  1248.         shotsfx.Parent = root
  1249.         shotsfx:Play()
  1250.         task.spawn(function()
  1251.             repeat task.wait() until shotsfx.IsLoaded
  1252.             game:GetService("Debris"):AddItem(shotsfx,shotsfx.TimeLength)
  1253.         end)
  1254.  
  1255.         CameraEffect.Flash({request = "Dark 50%", tim = .05})
  1256.         CameraEffect.Flash({request = "LightFlash", tim = .02})
  1257.         CameraEffect.Blur({wai_till_normalFov = .15, size = 40, tim1 = .2, tim2 = .4})
  1258.         RHand:Destroy()
  1259.         LHand:Destroy()
  1260.         f.Wind:Destroy()
  1261.         f.Arrow:Destroy()
  1262.  
  1263.         BaseEffects.GroundExpandV2(CFrame.new(floorpos) * CFrame.new(0,10,0),10,20,{baseHeight = 3,baseLength = 7,expandTime = 0.1,destroyTime = 2})
  1264.  
  1265.         local slamef = VFXHelp.EmitAndRemove(skillAssets.upex,CFrame.new(floorpos))
  1266.  
  1267.         rem:FireClient(owner, "ShakeCamera", "Bump")
  1268.  
  1269.         local Range = 500
  1270.         local DefaultTravelTime = 1.5
  1271.         local TravelTime
  1272.         local Destination
  1273.         local Distance
  1274.         --
  1275.  
  1276.         local Projectile    = skillAssets.Arrow:Clone()
  1277.         Projectile.Parent   = f
  1278.         Projectile.CFrame   =  root.CFrame
  1279.  
  1280.         local Origin    = root.Position
  1281.         local Direction = (root.CFrame*CFrame.new(0,0,-Range)).Position - Origin
  1282.  
  1283.         local RayParam = RaycastParams.new()
  1284.         RayParam.FilterDescendantsInstances = {character}
  1285.         RayParam.FilterType = Enum.RaycastFilterType.Exclude
  1286.         local result = workspace:Raycast(Origin, Direction, RayParam)
  1287.  
  1288.         if result then  --if raycast hit
  1289.             Distance    = (root.Position - result.Position).Magnitude
  1290.             TravelTime  = Distance / (Range * (1/ DefaultTravelTime))
  1291.             Destination = result.Position
  1292.         elseif not result then -- if raycast didn't hit
  1293.             Distance    = Range
  1294.             TravelTime  = DefaultTravelTime
  1295.             Destination = root.CFrame * CFrame.new(0,0,-Range).Position
  1296.         end
  1297.  
  1298.         local Tween = game:GetService("TweenService"):Create(Projectile,TweenInfo.new(TravelTime, Enum.EasingStyle.Linear),
  1299.             {
  1300.                 ["Position"] = Destination
  1301.             }
  1302.         )
  1303.         Tween:Play()
  1304.  
  1305.         Tween.Completed:Connect(function(playbackstate)
  1306.             if playbackstate == Enum.PlaybackState.Completed then
  1307.                 local floorpos1 = findFloorPosition(Projectile.Position)
  1308.  
  1309.                 local Ball = skillAssets.Ball:Clone()
  1310.                 Ball.Parent = f
  1311.                 Ball.VFX.CFrame = Projectile.CFrame * CFrame.new(0,10,0)
  1312.                 Ball.VFX.Rotation = Vector3.new(0,0,90)
  1313.                 local BWind = skillAssets.WindBig:Clone()
  1314.                 BWind.Parent = f
  1315.                 BWind.bottomstuff.CFrame = Projectile.CFrame * CFrame.new(0,-3,0)
  1316.                 BWind.bottomstuff.Rotation = Vector3.new(0,0,90)
  1317.  
  1318.                 local ex1 = Instance.new("Sound")
  1319.                 ex1.Volume = 2
  1320.                 ex1.SoundId = "rbxassetid://"..sounds.Explosion1
  1321.                 ex1.Parent = f
  1322.                 ex1:Play()
  1323.  
  1324.                 BaseEffects.GroundExpandV2(CFrame.new(floorpos1) * CFrame.new(0,10,0),20,20,{baseHeight = 8,baseLength = 20,expandTime = 0.3,destroyTime = 2})
  1325.  
  1326.                 CameraEffect.Flash({request = "Dark 50%", tim = .05})
  1327.                 CameraEffect.Flash({request = "LightFlash", tim = .02})
  1328.                 rem:FireClient(owner, "ShakeCamera", "Bump")
  1329.  
  1330.                 local hitcontent = workspace:GetPartBoundsInBox(Ball.VFX.CFrame, Vector3.new(65,65,65))
  1331.                 local hitlist = {}
  1332.                 for _,v in pairs(hitcontent) do
  1333.                     if v.Parent:FindFirstChild("Humanoid") and v.Parent ~= character then
  1334.                         if not hitlist[v.Parent.Humanoid] then
  1335.                             hitlist[v.Parent.Humanoid] = true
  1336.                             damage(v.Parent.Humanoid, 27, nil, true)
  1337.                         end
  1338.                     end
  1339.                 end
  1340.  
  1341.                 task.wait(2)
  1342.                 Ball:Destroy()
  1343.  
  1344.                 CameraEffect.Blur({wai_till_normalFov = .3, size = 40, tim1 = .2, tim2 = .4})
  1345.  
  1346.                 local Beam = skillAssets.Beam:Clone()
  1347.                 Beam.Position = floorpos1
  1348.                 Beam.Parent = f
  1349.                 game:GetService("TweenService"):Create(Beam.End, TweenInfo.new(0, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Position = Beam.Position + Vector3.new(0,300,0)}):Play()
  1350.  
  1351.                 local Cylinder = skillAssets.cylinder:Clone()
  1352.                 Cylinder.Parent = f
  1353.                 Cylinder.CFrame = Beam.CFrame * CFrame.new(150,0,0)
  1354.                 Cylinder.Rotation = Vector3.new(0,180,0)
  1355.                 game:GetService("TweenService"):Create(Cylinder, TweenInfo.new(.3, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Size = Vector3.new(60,300,60)}):Play()
  1356.                 VFXHelp.EnableVFX(Cylinder)
  1357.                 VFXHelp.EnableVFX(Beam)
  1358.  
  1359.                 BaseEffects.GroundExpandV2(CFrame.new(floorpos1) * CFrame.new(0,10,0),50,20,{baseHeight = 15,baseLength = 50,expandTime = 0.3,destroyTime = 6})
  1360.  
  1361.  
  1362.                 local ex2 = Instance.new("Sound")
  1363.                 ex2.Volume = 3
  1364.                 ex2.SoundId = "rbxassetid://"..sounds.Explosion2
  1365.                 ex2.Parent = f
  1366.                 ex2:Play()
  1367.  
  1368.                 task.spawn(function()
  1369.                     repeat task.wait() until ex2.IsLoaded
  1370.                     game:GetService("Debris"):AddItem(ex2,ex2.TimeLength)
  1371.                 end)
  1372.  
  1373.                 rem:FireClient(owner, "ShakeCamera", "Explosion")
  1374.                 Projectile:Destroy()
  1375.  
  1376.                 local hitcontent = workspace:GetPartBoundsInBox(Cylinder.CFrame, Vector3.new(70,300,70))
  1377.                 local hitlist = {}
  1378.                 for _,v in pairs(hitcontent) do
  1379.                     if v.Parent:FindFirstChild("Humanoid") and v.Parent ~= character then
  1380.                         if not hitlist[v.Parent.Humanoid] then
  1381.                             hitlist[v.Parent.Humanoid] = true
  1382.  
  1383.                             if(not domain)then
  1384.                                 task.spawn(function()
  1385.                                     for i = 1, 3 do
  1386.                                         damage(v.Parent.Humanoid, 27, nil, true)
  1387.                                         task.wait(.7)
  1388.                                     end
  1389.                                 end)
  1390.                             else
  1391.                                 v.Parent:BreakJoints()
  1392.                             end
  1393.                         end
  1394.                     end
  1395.                 end
  1396.  
  1397.                 task.wait(2)
  1398.                 for i,v in pairs(Beam:GetDescendants()) do
  1399.                     if v:IsA("Beam") then
  1400.                         game:GetService("TweenService"):Create(v,TweenInfo.new(1),{Width0 = 0,Width1 = 0}):Play()
  1401.                     end
  1402.                 end
  1403.                 for i,v in pairs(BWind:GetDescendants()) do
  1404.                     if v:IsA("Beam") then
  1405.                         game:GetService("TweenService"):Create(v,TweenInfo.new(1),{Width0 = 0,Width1 = 0}):Play()
  1406.                     elseif v:IsA("PointLight") then
  1407.                         game:GetService("TweenService"):Create(v,TweenInfo.new(1),{Brightness = 0}):Play()
  1408.                     end
  1409.                 end
  1410.                 game:GetService("TweenService"):Create(Cylinder,TweenInfo.new(1),{Transparency = 1}):Play()
  1411.  
  1412.                 VFXHelp.DisableVFX(Cylinder)
  1413.                 VFXHelp.DisableVFX(Beam)
  1414.                 VFXHelp.DisableVFX(BWind)
  1415.  
  1416.                 game:GetService("Debris"):AddItem(Beam,3)
  1417.                 game:GetService("Debris"):AddItem(Cylinder,3)
  1418.                 game:GetService("Debris"):AddItem(BWind,3)
  1419.  
  1420.                 task.delay(5, pcall, game.Destroy, f)
  1421.                 task.wait(5)
  1422.                 game:GetService("TweenService"):Create(mus, TweenInfo.new(2), {
  1423.                     Volume = 0
  1424.                 }):Play()
  1425.                 task.delay(2, pcall, game.Destroy, mus)
  1426.             end
  1427.         end)
  1428.     end)
  1429.  
  1430.     task.wait(animationplay.Length)
  1431.     humanoid.WalkSpeed = walkspeed
  1432.     attacking = false
  1433. end
  1434.  
  1435. local fearframes = {
  1436.     [1] = "http://www.roblox.com/asset/?id=100669883057211",
  1437.     [2] = "http://www.roblox.com/asset/?id=98146842737958",
  1438.     [3] = "http://www.roblox.com/asset/?id=134078983312898",
  1439.     [4] = "http://www.roblox.com/asset/?id=123216692524077",
  1440.     [5] = "http://www.roblox.com/asset/?id=125955042773370",
  1441.     [6] = "http://www.roblox.com/asset/?id=109181203041935",
  1442.     [7] = "http://www.roblox.com/asset/?id=90739573094350",
  1443.     [8] = "http://www.roblox.com/asset/?id=130643257792933",
  1444.     [9] = "http://www.roblox.com/asset/?id=77566364110013",
  1445.     [10] = "http://www.roblox.com/asset/?id=136027809275308",
  1446.     [11] = "http://www.roblox.com/asset/?id=71613591246780",
  1447.     [12] = "http://www.roblox.com/asset/?id=140545576313341",
  1448.     [13] = "http://www.roblox.com/asset/?id=81082742636518",
  1449.     [14] = "http://www.roblox.com/asset/?id=93357445320302",
  1450.     [15] = "http://www.roblox.com/asset/?id=137768891493696",
  1451.     [16] = "http://www.roblox.com/asset/?id=133251095642604"
  1452. }
  1453.  
  1454. local function malevolentshrine()
  1455.     attacking = true
  1456.     if(not domain)then
  1457.         domain = true
  1458.         humanoid.WalkSpeed = 0
  1459.         local f = Instance.new("Folder", character)
  1460.         f.Name = "domaineff"
  1461.  
  1462.         sound(root, 7817341182, 3, 1)
  1463.         local anim, endanim = playAnimation("domain", true)
  1464.         mangatext("Domain expansion.")
  1465.  
  1466.         local malevolentshrine = assets.MalevolentShrine:Clone()
  1467.  
  1468.         local range = malevolentshrine.Domain:Clone()
  1469.         range.Anchored = true
  1470.         range.Size = Vector3.zero
  1471.         range.CanCollide = false
  1472.         range.CanQuery = false
  1473.         range.Material = Enum.Material.ForceField
  1474.         range.CFrame = root.CFrame
  1475.         range.CastShadow = false
  1476.         range.Transparency = 0
  1477.         range.Reflectance = .2
  1478.         range:ClearAllChildren()
  1479.         range.Parent = character
  1480.  
  1481.         game:GetService("TweenService"):Create(range, TweenInfo.new(1, Enum.EasingStyle.Linear), {
  1482.             Size = Vector3.one*domainrange*2
  1483.         }):Play()
  1484.         task.wait(1)
  1485.  
  1486.         repeat
  1487.             task.wait()
  1488.             domainrange += 3
  1489.             range.Size = Vector3.one*domainrange*2
  1490.         until not keysdown["b"] or domainrange >= 1024
  1491.         pcall(game.Destroy, range)
  1492.  
  1493.         local aoe = workspace:GetPartBoundsInRadius(root.Position, domainrange)
  1494.         local done = {}
  1495.         for _, p in next, aoe do
  1496.             if(p:FindFirstAncestorOfClass("Model"))then
  1497.                 local plr = game:GetService("Players"):GetPlayerFromCharacter(p:FindFirstAncestorOfClass("Model"))
  1498.                 if(plr and not done[plr])then
  1499.                     done[plr] = true
  1500.                     task.spawn(pcall, function()
  1501.                         sound(workspace, 7817336081, 3, 1)
  1502.                         task.spawn(function()
  1503.                             task.wait(.5)
  1504.                             sound(workspace, 8181034930, 6, 1)
  1505.                         end)
  1506.                        
  1507.                         local s = Instance.new("ScreenGui", plr:FindFirstChildOfClass("PlayerGui"))
  1508.                         s.IgnoreGuiInset = true
  1509.                         s.ResetOnSpawn = false
  1510.                         local f = Instance.new("Frame", s)
  1511.                         f.Size = UDim2.fromScale(1,1)
  1512.                         f.BackgroundColor3 = Color3.new(0,0,0)
  1513.                         f.BackgroundTransparency = 1
  1514.                         game:GetService("TweenService"):Create(f, TweenInfo.new(.5), {
  1515.                             BackgroundTransparency = 0
  1516.                         }):Play()
  1517.                         task.wait(.5)
  1518.                         for i, v in next, fearframes do
  1519.                             local f = Instance.new("ImageLabel", s)
  1520.                             f.Size = UDim2.fromScale(1,1)
  1521.                             f.BackgroundColor3 = Color3.new(0,0,0)
  1522.                             f.BackgroundTransparency = 1
  1523.                             f.Image = v
  1524.                             f.Name = i
  1525.                             f.ZIndex = -1
  1526.                         end
  1527.                         task.wait(.5)
  1528.                         for i, v in next, fearframes do
  1529.                             if(i ~= 1)then
  1530.                                 s[tostring(i - 1)]:Destroy()
  1531.                             end
  1532.                             s[tostring(i)].ZIndex = 1
  1533.                             task.wait(1/10)
  1534.                         end
  1535.                         s[tostring(#fearframes)]:Destroy()
  1536.                         task.wait(1)
  1537.                         game:GetService("TweenService"):Create(f, TweenInfo.new(.5), {
  1538.                             BackgroundTransparency = 1
  1539.                         }):Play()
  1540.                         task.delay(.5, pcall, game.Destroy, s)
  1541.                     end)
  1542.                 end
  1543.             end
  1544.         end
  1545.  
  1546.         task.wait(1.5)
  1547.  
  1548.         humanoid.WalkSpeed = walkspeed
  1549.         endanim()
  1550.  
  1551.         local shrine = malevolentshrine.Shrine
  1552.         shrine:PivotTo(root.CFrame*CFrame.new(0,7,0))
  1553.         character:PivotTo(shrine:GetPivot()*CFrame.new(0,30,0))
  1554.         shrine.Parent = f
  1555.         for i, v in next, haori do
  1556.             v.Transparency = 1
  1557.         end
  1558.  
  1559.         task.delay(4, function()
  1560.             mangatext("Malevolent Shrine!", Color3.new(.8, 0, 0), 2, 5)
  1561.         end)
  1562.  
  1563.         local ball = malevolentshrine.Domain:Clone()
  1564.         ball.Size = Vector3.one*(domainrange*2)
  1565.         ball.Anchored = true
  1566.         ball.CanCollide = false
  1567.         ball.CastShadow = false
  1568.         ball.CFrame = shrine:GetPivot()
  1569.         ball.Parent = shrine
  1570.  
  1571.         local ball2 = malevolentshrine.Domain
  1572.         ball2.Size = Vector3.one*(domainrange*2)
  1573.         ball2.Material = Enum.Material.ForceField
  1574.         ball2.Transparency = .749
  1575.         ball2:ClearAllChildren()
  1576.         ball2.Anchored = true
  1577.         ball2.CanCollide = false
  1578.         ball2.CastShadow = true
  1579.         ball2.CFrame = shrine:GetPivot()
  1580.         ball2.Reflectance = 0
  1581.         ball2.Parent = shrine
  1582.  
  1583.         task.wait(4)
  1584.  
  1585.         local muspart = Instance.new("Part", character)
  1586.         muspart.Name = "domain"
  1587.         muspart.Anchored = true
  1588.         muspart.Size = ball.Size
  1589.         muspart.Shape = "Ball"
  1590.         muspart.CanCollide = false
  1591.         muspart.CanQuery = false
  1592.         muspart.CFrame = ball.CFrame
  1593.         muspart.Transparency = 1
  1594.  
  1595.         local music = Instance.new("Sound", muspart)
  1596.         music.Volume = 2
  1597.         music.RollOffMaxDistance = 100
  1598.         music.SoundId = "rbxassetid://"..sounds.MalevolentShrine
  1599.         music.Looped = true
  1600.         music:Play()
  1601.  
  1602.         local floor = malevolentshrine.Ground
  1603.         floor.CFrame = shrine:GetPivot()*CFrame.new(0, -10, 0)
  1604.         floor.Size = Vector3.new(domainrange*2, 0, domainrange*2)
  1605.         floor.Parent = shrine
  1606.         local slashes = malevolentshrine.Slashes
  1607.         slashes.Size = Vector3.new((domainrange*2)-20, domainrange/2, (domainrange*2)-20)
  1608.         slashes.CFrame = shrine:GetPivot()
  1609.         slashes.Parent = shrine
  1610.  
  1611.         task.spawn(function()
  1612.             repeat
  1613.                 task.wait(.2)
  1614.  
  1615.                 local slice = Instance.new("Part")
  1616.                 slice.Size = Vector3.new(domainrange, .5, domainrange)
  1617.                 slice.CFrame = shrine:GetPivot() * CFrame.new(math.random(-domainrange, domainrange)/2,0,math.random(-domainrange, domainrange)/2) * CFrame.Angles(math.random(0, 360), math.random(0, 360),math.random(0, 360))
  1618.  
  1619.  
  1620.                 local sliceaoe = workspace:GetPartBoundsInBox(slice.CFrame, slice.Size)
  1621.                 for i, v in next, sliceaoe do
  1622.                     task.spawn(pcall, function()
  1623.                         if(v:IsA("BasePart") and v.Name:lower() ~= "baseplate" and v.Name:lower() ~= "base" and not v:IsDescendantOf(character) and not (v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid").Health > 1))then
  1624.                             local parts = game:GetService("GeometryService"):SubtractAsync(v, {slice}, {
  1625.                                 CollisionFidelity = Enum.CollisionFidelity.Default,
  1626.                                 RenderFidelity = Enum.RenderFidelity.Automatic,
  1627.                                 FluidFidelity = Enum.FluidFidelity.Automatic,
  1628.                                 SplitApart = true
  1629.                             })
  1630.                             for _, a in next, parts do
  1631.                                 a.Parent = v.Parent
  1632.                                 a.Anchored = false
  1633.                                 a.CanCollide = true
  1634.                                 a.UsePartColor = true
  1635.                             end
  1636.                             v:Destroy()
  1637.                         end
  1638.                     end)
  1639.                 end
  1640.  
  1641.                 local damaged = {}
  1642.                 local aoe = workspace:GetPartBoundsInRadius(shrine:GetPivot().Position, domainrange)
  1643.                 for i, v in next, aoe do
  1644.                     pcall(function()
  1645.                         if(v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model") ~= character and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and not damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")])then
  1646.                             damage(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), 0, domainrange/8)
  1647.                             local cl = assets.Cleave:Clone()
  1648.                             cl.CFrame = v:FindFirstAncestorOfClass("Model"):FindFirstChildWhichIsA("BasePart").CFrame
  1649.                             cl.Parent = v:FindFirstAncestorOfClass("Model")
  1650.                             cl.Size = Vector3.one*4
  1651.                             for i, v in next, cl:GetChildren() do
  1652.                                 v.Enabled = false
  1653.                                 v:Emit(5)
  1654.                             end
  1655.                             sound(cl, 5989940988, math.random(90, 110)/100, math.random(90, 110)/100)
  1656.                             sound(cl, 6282561520, math.random(90, 110)/100, math.random(90, 110)/100)
  1657.                             task.delay(.5, pcall, game.Destroy, cl)
  1658.  
  1659.                             damaged[v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")] = true
  1660.                         end
  1661.                     end)
  1662.                 end
  1663.             until not domain
  1664.         end)
  1665.         attacking = false
  1666.     else
  1667.         attacking = false
  1668.         domain = false
  1669.  
  1670.         pcall(function()
  1671.             local aoe = workspace:GetPartBoundsInRadius(character.domaineff.Shrine:GetPivot().Position, domainrange)
  1672.             local done = {}
  1673.             for _, p in next, aoe do
  1674.                 if(p:FindFirstAncestorOfClass("Model"))then
  1675.                     local plr = game:GetService("Players"):GetPlayerFromCharacter(p:FindFirstAncestorOfClass("Model"))
  1676.                     if(plr and not done[plr])then
  1677.                         done[plr] = true
  1678.                         task.spawn(pcall, function()
  1679.                             sound(workspace, sounds.ShrineEnd, 5, 1)
  1680.                             local s = Instance.new("ScreenGui", plr:FindFirstChildOfClass("PlayerGui"))
  1681.                             s.IgnoreGuiInset = true
  1682.                             s.ResetOnSpawn = false
  1683.                             local f = Instance.new("Frame", s)
  1684.                             f.Size = UDim2.fromScale(2, 2)
  1685.                             f.BackgroundColor3 = Color3.new(0,0,0)
  1686.                             f.BackgroundTransparency = 1
  1687.                             game:GetService("TweenService"):Create(f, TweenInfo.new(.5), {
  1688.                                 BackgroundTransparency = 0
  1689.                             }):Play()
  1690.                             task.wait(1)
  1691.                             game:GetService("TweenService"):Create(f, TweenInfo.new(.5), {
  1692.                                 BackgroundTransparency = 1
  1693.                             }):Play()
  1694.                             task.delay(.5, pcall, game.Destroy, s)
  1695.                         end)
  1696.                     end
  1697.                 end
  1698.             end
  1699.             domainrange = basedomainrange
  1700.  
  1701.             task.wait(.5)
  1702.             character.domaineff:Destroy()
  1703.         end)
  1704.  
  1705.         for i, v in next, haori do
  1706.             v.Transparency = 0
  1707.         end
  1708.  
  1709.         game:GetService("TweenService"):Create(character.domain.Sound, TweenInfo.new(1), {
  1710.             Volume = 0
  1711.         }):Play()
  1712.         task.delay(1, pcall, game.Destroy, character.domain)
  1713.     end
  1714. end
  1715.  
  1716. local function growback(affectedlimb)
  1717.     affectedlimb.Transparency = 1
  1718.     for i, v in next, affectedlimb:GetDescendants() do
  1719.         if(v:IsA("BasePart"))then
  1720.             v.Transparency = 1
  1721.         end
  1722.     end
  1723.  
  1724.     pcall(function()
  1725.         character.Torso[affectedlimb.Name.." sizzle"].Sound:Stop()
  1726.     end)
  1727.     pcall(function()
  1728.         character.Torso[affectedlimb.Name.." sizzle"].Steam.Enabled = false
  1729.     end)
  1730.     pcall(function()
  1731.         character.Torso[affectedlimb.Name.." sizzle"].Blood.Enabled = false
  1732.     end)
  1733.  
  1734.     local muscle = Instance.new("Part", affectedlimb)
  1735.     muscle.Size = Vector3.zero
  1736.     muscle.Color = grayscaleColor(Color3.new(.5, 0, 0))
  1737.     muscle.CanCollide = false
  1738.     muscle.Material = Enum.Material.Slate
  1739.  
  1740.     sound(muscle, 6148096445, 1, math.random(90, 110)/100)
  1741.  
  1742.     local w = Instance.new("Weld", muscle)
  1743.     w.C0 = CFrame.new(0, -2, 0)
  1744.     w.Part0 = muscle
  1745.     w.Part1 = affectedlimb
  1746.  
  1747.     game:GetService("TweenService"):Create(muscle, TweenInfo.new(.3, Enum.EasingStyle.Quint), {
  1748.         Size = affectedlimb.Size - Vector3.one*.2
  1749.     }):Play()
  1750.  
  1751.     game:GetService("TweenService"):Create(w, TweenInfo.new(.3, Enum.EasingStyle.Quint), {
  1752.         C0 = CFrame.new(0, -.1, 0)
  1753.     }):Play()
  1754.  
  1755.     task.wait(.3)
  1756.  
  1757.     local skin = Instance.new("Part", affectedlimb)
  1758.     skin.Size = Vector3.zero
  1759.     skin.CanCollide = false
  1760.     skin.Color = affectedlimb.Color
  1761.  
  1762.     local w = Instance.new("Weld", skin)
  1763.     w.C0 = CFrame.new(0, -2, 0)
  1764.     w.Part0 = skin
  1765.     w.Part1 = affectedlimb
  1766.  
  1767.     game:GetService("TweenService"):Create(skin, TweenInfo.new(.3, Enum.EasingStyle.Quint), {
  1768.         Size = affectedlimb.Size
  1769.     }):Play()
  1770.  
  1771.     game:GetService("TweenService"):Create(w, TweenInfo.new(.3, Enum.EasingStyle.Quint), {
  1772.         C0 = CFrame.new(0, 0, 0)
  1773.     }):Play()
  1774.  
  1775.     task.wait(.3)
  1776.     muscle:Destroy()
  1777.     skin:Destroy()
  1778.     affectedlimb.Transparency = 0
  1779.     for i, v in next, affectedlimb:GetDescendants() do
  1780.         if(v:IsA("BasePart"))then
  1781.             v.Transparency = 0
  1782.         end
  1783.     end
  1784. end
  1785.  
  1786. local oldhp = 500
  1787. local limbbackups = {}
  1788. local limbwelds = {}
  1789. local shouldbethere = {
  1790.     "Right Arm", "Left Arm", "Right Leg", "Left Leg"
  1791. }
  1792. local limbbackups = {
  1793.     ["Right Arm"] = assets.Character["Right Arm"]:Clone(),
  1794.     ["Left Arm"] = assets.Character["Left Arm"]:Clone(),
  1795.     ["Right Leg"] = assets.Character["Right Leg"]:Clone(),
  1796.     ["Left Leg"] = assets.Character["Left Leg"]:Clone(),
  1797. }
  1798. local limbwelds = {
  1799.     ["Right Arm"] = assets.Character["Torso"]["Right Shoulder"]:Clone(),
  1800.     ["Left Arm"] = assets.Character["Torso"]["Left Shoulder"]:Clone(),
  1801.     ["Right Leg"] = assets.Character["Torso"]["Right Hip"]:Clone(),
  1802.     ["Left Leg"] = assets.Character["Torso"]["Left Hip"]:Clone(),
  1803. }
  1804.  
  1805. local function rct(limb)
  1806.     local lostlimb = nil
  1807.     for i, v in next, shouldbethere do
  1808.         if(not character:FindFirstChild(v))then
  1809.             lostlimb = v
  1810.             break
  1811.         end
  1812.     end
  1813.  
  1814.     if(not lostlimb)then
  1815.         for i, v in next, character:GetDescendants() do
  1816.             if(v.Name == "RCT")then
  1817.                 v.Enabled = true
  1818.             end
  1819.         end
  1820.         repeat
  1821.             task.wait()
  1822.             oldhp += 1
  1823.         until not keysdown["q"]
  1824.         for i, v in next, character:GetDescendants() do
  1825.             if(v.Name == "RCT")then
  1826.                 v.Enabled = false
  1827.             end
  1828.         end
  1829.         return
  1830.     end
  1831.  
  1832.     attacking = true
  1833.  
  1834.     local lastc0 = {}
  1835.     for i, v in next, character:GetDescendants() do
  1836.         if(v:IsA("Motor6D"))then
  1837.             lastc0[v] = v.C0
  1838.         end
  1839.     end
  1840.  
  1841.     for i, v in next, animations do
  1842.         pcall(function()
  1843.             v:CancelInstant()
  1844.             v:Stop()
  1845.         end)
  1846.     end
  1847.  
  1848.     local cloned = limbbackups[lostlimb]:Clone()
  1849.     cloned.Parent = character
  1850.     local weld = limbwelds[lostlimb]:Clone()
  1851.     pcall(game.Destroy, character["Torso"]:FindFirstChild(weld.Name))
  1852.     weld.Part0 = character["Torso"]
  1853.     weld.Part1 = cloned
  1854.     weld.Parent = character["Torso"]
  1855.  
  1856.     table.clear(haori)
  1857.     for i, v in next, character:GetDescendants() do
  1858.         if(v:IsA("BasePart") and v.Name == "Haori")then
  1859.             table.insert(haori, v)
  1860.         end
  1861.     end
  1862.  
  1863.     table.clear(playingAnimations)
  1864.  
  1865.     local animgroup = animPlayer.CreateModuleGroup()
  1866.     table.clear(animations)
  1867.     for i, v in next, script.Animations:GetChildren() do
  1868.         if(v.Name:find("rct "))then
  1869.             animations[v.Name] = animPlayer.new(character, v)
  1870.             continue
  1871.         end
  1872.         animations[v.Name] = animPlayer.new(character, v, animgroup)
  1873.     end
  1874.  
  1875.     for i, v in next, lastc0 do
  1876.         pcall(function()
  1877.             i.C0 = v
  1878.         end)
  1879.     end
  1880.  
  1881.     if(animations["rct "..lostlimb])then
  1882.         local anim = animations["rct "..lostlimb]
  1883.         anim:Play()
  1884.         task.delay(.8, function()
  1885.             anim:Cancel()
  1886.         end)
  1887.     end
  1888.  
  1889.     growback(cloned)
  1890.  
  1891.     task.wait(.2)
  1892.     attacking = false
  1893. end
  1894.  
  1895. local function worldcuttingslash()
  1896.     attacking = true
  1897.     humanoid.WalkSpeed = 0
  1898.     playAnimation("worldcuttingslash")
  1899.     sound(root, sounds.WCSStartup, 3, 1)
  1900.    
  1901.     for i, v in next, aura.Mark:GetChildren() do
  1902.         v.Enabled = true
  1903.     end
  1904.  
  1905.     local h = Instance.new("Highlight", character)
  1906.     h.FillColor = Color3.new(1,1,1)
  1907.     h.OutlineColor = Color3.new(1,1,1)
  1908.     h.FillTransparency = 1
  1909.     h.OutlineTransparency = 1
  1910.  
  1911.     task.wait(.3)
  1912.     mangatext("Scale of the dragon.", nil, nil, .6)
  1913.     mark(marks.scale)
  1914.     game:GetService("TweenService"):Create(h, TweenInfo.new(.25,Enum.EasingStyle.Quint, Enum.EasingDirection.In, 0, true), {
  1915.         FillTransparency = .5,
  1916.         OutlineTransparency = 0
  1917.     }):Play()
  1918.  
  1919.     task.wait(.5)
  1920.     mark(marks.recoil)
  1921.     mangatext("Recoil.", nil, -3, .6, 0)
  1922.     game:GetService("TweenService"):Create(h, TweenInfo.new(.25,Enum.EasingStyle.Quint, Enum.EasingDirection.In, 0, true), {
  1923.         FillTransparency = .5,
  1924.         OutlineTransparency = 0
  1925.     }):Play()
  1926.  
  1927.     task.wait(.5)
  1928.     mark(marks.twin)
  1929.     for i, v in next, aura.Mark:GetChildren() do
  1930.         v.Enabled = false
  1931.     end
  1932.    
  1933.     mangatext("Twin meteors.", nil, nil, .6, -2)
  1934.     game:GetService("TweenService"):Create(h, TweenInfo.new(.25,Enum.EasingStyle.Quint, Enum.EasingDirection.In, 0, true), {
  1935.         FillTransparency = .5,
  1936.         OutlineTransparency = 0
  1937.     }):Play()
  1938.  
  1939.     task.wait(.8)
  1940.     mangatext("Dismantle.", nil, -3)
  1941.     game:GetService("TweenService"):Create(h, TweenInfo.new(.6,Enum.EasingStyle.Quint, Enum.EasingDirection.In, 0, true), {
  1942.         FillTransparency = .5,
  1943.         OutlineTransparency = 0
  1944.     }):Play()
  1945.     task.delay(.6, pcall, game.Destroy, h)
  1946.  
  1947.     task.wait(.6)
  1948.     sound(root, sounds.WCS, 3, 1)
  1949.     humanoid.WalkSpeed = walkspeed
  1950.     attacking = false
  1951.  
  1952.     local size = 1024
  1953.     local splitter = Instance.new("Part")
  1954.     splitter.Size = Vector3.new(size, .5, size)
  1955.     splitter.CFrame = root.CFrame*CFrame.new(0,0,-size/2)*CFrame.Angles(0,0,math.rad(math.random(-45, 45)))
  1956.     splitter.Anchored = true
  1957.     splitter.CanCollide = false
  1958.  
  1959.     local splitter2 = Instance.new("Part")
  1960.     splitter2.Size = Vector3.new(size, .5, size)
  1961.     splitter2.CFrame = root.CFrame*CFrame.new(0,0,-size/2)*CFrame.Angles(0,0,math.rad(math.random(-45, 45)))
  1962.     splitter2.Anchored = true
  1963.     splitter2.CanCollide = false
  1964.  
  1965.     local aoe = MagnitudeAoe(splitter.CFrame, splitter.Size)
  1966.     local aoe2 = MagnitudeAoe(splitter2.CFrame, splitter2.Size)
  1967.  
  1968.     local aoe3 = workspace:GetPartBoundsInBox(splitter.CFrame, splitter.Size)
  1969.     local aoe4 = workspace:GetPartBoundsInBox(splitter2.CFrame, splitter2.Size)
  1970.  
  1971.     for i, v in next, aoe2 do
  1972.         if(not table.find(aoe, v))then
  1973.             table.insert(aoe, v)
  1974.         end
  1975.     end
  1976.  
  1977.     for i, v in next, aoe4 do
  1978.         if(not table.find(aoe3, v))then
  1979.             table.insert(aoe3, v)
  1980.         end
  1981.     end
  1982.  
  1983.     for i, v in next, aoe3 do
  1984.         if(not table.find(aoe, v))then
  1985.             table.insert(aoe, v)
  1986.         end
  1987.     end
  1988.  
  1989.     local eff = splitter:Clone()
  1990.     local h = Instance.new("Highlight", eff)
  1991.     h.OutlineTransparency = 1
  1992.     h.FillTransparency = 0
  1993.     h.FillColor = Color3.new(1,1,1)
  1994.     eff.Material = Enum.Material.Glass
  1995.     eff.Size = Vector3.zero
  1996.     eff.CFrame = CFrame.new(root.CFrame.Position)*splitter.CFrame.Rotation
  1997.     eff.Parent = workspace
  1998.     eff.Transparency = 5
  1999.     eff.Reflectance = 1
  2000.     game:GetService("TweenService"):Create(eff, TweenInfo.new(.5, Enum.EasingStyle.Quint), {
  2001.         CFrame = splitter.CFrame,
  2002.         Size = splitter.Size+Vector3.new(0,.5,0)
  2003.     }):Play()
  2004.     game:GetService("TweenService"):Create(eff, TweenInfo.new(2, Enum.EasingStyle.Quint), {
  2005.         Transparency = 1
  2006.     }):Play()
  2007.     game:GetService("TweenService"):Create(h, TweenInfo.new(.5, Enum.EasingStyle.Quint), {
  2008.         FillTransparency = 1
  2009.     }):Play()
  2010.     task.delay(1.2, pcall, game.Destroy, eff)
  2011.  
  2012.     local eff = splitter2:Clone()
  2013.     local h = Instance.new("Highlight", eff)
  2014.     h.OutlineTransparency = 1
  2015.     h.FillTransparency = 0
  2016.     h.FillColor = Color3.new(1,1,1)
  2017.     eff.Material = Enum.Material.Glass
  2018.     eff.Size = Vector3.zero
  2019.     eff.CFrame = CFrame.new(root.CFrame.Position)*splitter2.CFrame.Rotation
  2020.     eff.Parent = workspace
  2021.     eff.Transparency = 5
  2022.     eff.Reflectance = 1
  2023.     game:GetService("TweenService"):Create(eff, TweenInfo.new(.8, Enum.EasingStyle.Quint), {
  2024.         CFrame = splitter2.CFrame,
  2025.         Size = splitter2.Size+Vector3.new(0,.5,0)
  2026.     }):Play()
  2027.     game:GetService("TweenService"):Create(eff, TweenInfo.new(2, Enum.EasingStyle.Quint), {
  2028.         Transparency = 1
  2029.     }):Play()
  2030.     game:GetService("TweenService"):Create(h, TweenInfo.new(.8, Enum.EasingStyle.Quint), {
  2031.         FillTransparency = 1
  2032.     }):Play()
  2033.     task.delay(1.2, pcall, game.Destroy, eff)
  2034.  
  2035.     for i, v in next, aoe do
  2036.         if(v.Name:lower() ~= "baseplate" and v.Name:lower() ~= "base" and not v:IsDescendantOf(character))then
  2037.             task.spawn(pcall, function()
  2038.                 local parts = game:GetService("GeometryService"):SubtractAsync(v, {splitter, splitter2}, {
  2039.                     CollisionFidelity = Enum.CollisionFidelity.Default,
  2040.                     RenderFidelity = Enum.RenderFidelity.Automatic,
  2041.                     FluidFidelity = Enum.FluidFidelity.Automatic,
  2042.                     SplitApart = true
  2043.                 })
  2044.                 for _, a in next, parts do
  2045.                     a.Parent = v.Parent
  2046.                     a.Anchored = false
  2047.                     a.CanCollide = true
  2048.                     a.UsePartColor = true
  2049.                 end
  2050.                 v:Destroy()
  2051.             end)
  2052.         end
  2053.     end
  2054.  
  2055.     task.wait(1)
  2056.     splitter:Destroy()
  2057. end
  2058.  
  2059. local posing = false
  2060. local onKeyDown = function(key)
  2061.     keysdown[key] = true
  2062.  
  2063.     if(key == "n" and not taunting)then
  2064.         local taunt = Taunts[Random.new():NextInteger(1, #Taunts)]
  2065.         if(math.random(2) == 1)then
  2066.             taunt = Taunts[Random.new():NextInteger(#Taunts - 4, #Taunts)]
  2067.         end
  2068.         taunting = true
  2069.         if(taunt.Function)then
  2070.             taunt.Function()
  2071.         else
  2072.             local s = Instance.new("Sound", root)
  2073.             s.SoundId = "rbxassetid://"..taunt.Id
  2074.             s.Volume = 3
  2075.             s:Play()
  2076.             repeat task.wait() until s.IsLoaded
  2077.             game:GetService("Debris"):AddItem(s, s.TimeLength)
  2078.  
  2079.             local am = #taunt.String:split("|")
  2080.             for i, v in next, taunt.String:split("|") do
  2081.                 mangatext(v, nil, i%2 == 0 and -3 or 3, s.TimeLength/am)
  2082.                 task.wait(s.TimeLength/am)
  2083.             end
  2084.         end
  2085.         taunting = false
  2086.     end
  2087.  
  2088.     if(attacking)then return end
  2089.     if(key == "z")then
  2090.         cleave()
  2091.     elseif(key == "x")then
  2092.         dismantle()
  2093.     elseif(key == "c")then
  2094.         if(onground)then
  2095.             spiderweb()
  2096.         else
  2097.             engrave()
  2098.         end
  2099.     elseif(key == "v")then
  2100.         divineflame()
  2101.     elseif(key == "b")then
  2102.         malevolentshrine()
  2103.     elseif(key == "q")then
  2104.         rct()
  2105.     elseif(key == "f")then
  2106.         worldcuttingslash()
  2107.     elseif(key == "p")then
  2108.         if(not posing)then
  2109.             posing = not posing
  2110.             task.spawn(function()
  2111.                 local f = Instance.new("Folder", character)
  2112.                 f.Name = "posefolder"
  2113.  
  2114.                 local m = Instance.new("Sound", root)
  2115.                 m.Name = "pose"
  2116.                 m.Looped = true
  2117.                 m.SoundId = "rbxassetid://"..poseThemes[math.random(1, #poseThemes)]
  2118.                 m.Volume = 3
  2119.                 m:Play()
  2120.  
  2121.                 humanoid.WalkSpeed = 0
  2122.  
  2123.                 playAnimation("firearrowpose", true)
  2124.  
  2125.                 local rootStartCF = root.CFrame
  2126.                 local skillAssets = assets.FireArrow:Clone()
  2127.  
  2128.                 local groundpart = Instance.new("Part", f)
  2129.                 groundpart.CFrame = root.CFrame
  2130.                 groundpart.Transparency = 1
  2131.                 groundpart.CanCollide = false
  2132.                 groundpart.Anchored = true
  2133.                 local floorpos = findFloorPosition(groundpart.Position)
  2134.  
  2135.                 local RHand = skillAssets.RHand:Clone()
  2136.                 local LHand = skillAssets.LHand:Clone()
  2137.  
  2138.                 local impactf = skillAssets.impactf:Clone()
  2139.                 impactf.Parent = character
  2140.                 local spar = VFXHelp.EmitAndRemove(impactf,root.CFrame,{maxFloorDist = 20})
  2141.                 local charg = skillAssets.impactf:Clone()
  2142.                 charg.Parent = f
  2143.                 charg.CFrame = spar.CFrame
  2144.                 VFXHelp.EnableVFX(charg)
  2145.  
  2146.                 task.delay(.95, function()
  2147.                     RHand.Parent = f
  2148.                     LHand.Parent = f
  2149.                     local Weld = Instance.new("Weld",RHand)
  2150.                     Weld.Part0 = character["Right Arm"]
  2151.                     Weld.Part1 = RHand
  2152.                     Weld.C0 = CFrame.new(0,-1,0)
  2153.                     local Weld = Instance.new("Weld",LHand)
  2154.                     Weld.Part0 = character["Left Arm"]
  2155.                     Weld.Part1 = LHand
  2156.                     Weld.C0 = CFrame.new(0,-1,0)
  2157.                     for i,v in pairs(LHand.At0:GetDescendants()) do
  2158.                         if v:IsA("Beam") then
  2159.                             v.Attachment0 = LHand.At0
  2160.                             v.Attachment1 = RHand.At1
  2161.                         end
  2162.                     end
  2163.  
  2164.                     CameraEffect.Flash({request = "LightFlash", tim = .02})
  2165.                     VFXHelp.EmitFromModel(RHand.Main)
  2166.                     local firesfx = Instance.new("Sound")
  2167.                     firesfx.Volume = 8
  2168.                     firesfx.SoundId = "rbxassetid://"..sounds.Clap
  2169.                     firesfx.Parent = root
  2170.                     firesfx:Play()
  2171.                     repeat task.wait() until firesfx.IsLoaded
  2172.                     game:GetService("Debris"):AddItem(firesfx,firesfx.TimeLength)
  2173.                 end)
  2174.  
  2175.                 task.delay(3.983, function()
  2176.                     local chargedsfx = Instance.new("Sound")
  2177.                     chargedsfx.Volume = 8
  2178.                     chargedsfx.SoundId = "rbxassetid://"..sounds.ArrowCharged
  2179.                     chargedsfx.Parent = root
  2180.                     chargedsfx:Play()
  2181.                     repeat task.wait() until chargedsfx.IsLoaded
  2182.                     game:GetService("Debris"):AddItem(chargedsfx,chargedsfx.TimeLength)
  2183.                 end)
  2184.  
  2185.                 task.delay(4.817, function()
  2186.                     local Wind = skillAssets.Wind:Clone()
  2187.                     Wind.Parent = f
  2188.                     Wind.Root.wind:Play()
  2189.  
  2190.                     PartJoiner.AddMotor6D(root,Wind.Root,CFrame.new(0,0,0))
  2191.  
  2192.                     rem:FireClient(owner, "ShakeCamera", "Bump")
  2193.                     CameraEffect.Flash({request = "orange", tim = .05})
  2194.                     CameraEffect.Flash({request = "LightFlash", tim = .02})
  2195.                     CameraEffect.Blur({wai_till_normalFov = .15, size = 40, tim1 = .2, tim2 = .4})
  2196.  
  2197.                     local Arrow = skillAssets.Arrow:Clone()
  2198.                     Arrow.Parent = f
  2199.                     Arrow.Sound:Play()
  2200.  
  2201.                     local Weld = Instance.new("Weld",Arrow)
  2202.                     Weld.Part0 = root
  2203.                     Weld.Part1 = Arrow
  2204.                     Weld.C0 = CFrame.new(1,0,-3)
  2205.                     BaseEffects.GroundExpandV2(CFrame.new(floorpos) * CFrame.new(0,10,0),5,10,{expandTime = 0.1,destroyTime = 2})
  2206.  
  2207.                     groundpart:Destroy()
  2208.                     humanoid.AutoRotate = true
  2209.  
  2210.                     task.wait(1)
  2211.                     sound(root, sounds.Open, 4, 1)
  2212.                     mangatext("Open.", Color3.new(.8, .6, 0), -3)
  2213.                 end)
  2214.             end)
  2215.         else
  2216.             playidle = true
  2217.             posing = not posing
  2218.             humanoid.WalkSpeed = walkspeed
  2219.             character.posefolder:Destroy()
  2220.             root.pose:Destroy()
  2221.  
  2222.             animations["firearrowpose"]:Stop()
  2223.             animations["firearrowpose"]:Cancel()
  2224.             playingAnimations["firearrowpose"] = nil
  2225.         end
  2226.     elseif(key == "leftcontrol")then
  2227.         walkspeed = walkspeed == 16 and 32 or 16
  2228.         humanoid.WalkSpeed = walkspeed
  2229.     end
  2230. end
  2231.  
  2232. local onKeyUp = function(key)
  2233.     keysdown[key] = false
  2234. end
  2235.  
  2236. local adapt = 1
  2237. local debounce = false
  2238. local DharmaWeld = nil
  2239. local timesincelastattack = tick()
  2240. local lastadapttick = tick()
  2241. local adaptConnection;
  2242.  
  2243. local keydown;
  2244. local keyup;
  2245.  
  2246. local dead = true
  2247. local lastpivot = character:GetPivot()
  2248.  
  2249. local lostlimbs = {}
  2250. local healthscript;
  2251.  
  2252. local function createcharacter()
  2253.     table.clear(playingAnimations)
  2254.     attacking = false
  2255.     posing = false
  2256.     domain = false
  2257.     taunting = false
  2258.     playidle = true
  2259.  
  2260.     if(not dead)then
  2261.         assets.Character:PivotTo(lastpivot)
  2262.     else
  2263.         table.clear(lostlimbs)
  2264.         character = owner.Character or owner.CharacterAdded:Wait()
  2265.         assets.Character:PivotTo(character:GetPivot())
  2266.     end
  2267.     local wasdead = dead
  2268.     dead = false
  2269.  
  2270.     for i, v in next, animations do
  2271.         pcall(function()
  2272.             v:CancelInstant()
  2273.             v:Stop()
  2274.         end)
  2275.     end
  2276.  
  2277.     pcall(game.Destroy, character)
  2278.     pcall(game.Destroy, client)
  2279.     pcall(game.Destroy, healthscript)
  2280.     pcall(game.Destroy, rem)
  2281.     pcall(function()
  2282.         keydown:Disconnect()
  2283.         keyup:Disconnect()
  2284.     end)
  2285.     character = assets.Character:Clone()
  2286.  
  2287.     character.Name = game:GetService("HttpService"):GenerateGUID(false)
  2288.     owner.Character = character
  2289.  
  2290.     root = character.HumanoidRootPart
  2291.     humanoid = character:FindFirstChildOfClass("Humanoid")
  2292.     humanoid.MaxHealth = 500
  2293.     humanoid.Health = 500
  2294.     humanoid.RequiresNeck = false
  2295.     humanoid.BreakJointsOnDeath = false
  2296.     humanoid.DisplayName = owner.DisplayName
  2297.     humanoid.WalkSpeed = walkspeed
  2298.  
  2299.     params = RaycastParams.new()
  2300.     params.FilterDescendantsInstances = {character}
  2301.    
  2302.     aura = root.Aura
  2303.  
  2304.     table.clear(haori)
  2305.     for i, v in next, character:GetDescendants() do
  2306.         if(v:IsA("BasePart") and v.Name == "Haori")then
  2307.             table.insert(haori, v)
  2308.         end
  2309.     end
  2310.     DharmaWeld = character.Head.WheelOfDharma.Weld
  2311.  
  2312.     character.Parent = workspace
  2313.  
  2314.     local animgroup = animPlayer.CreateModuleGroup()
  2315.     table.clear(animations)
  2316.     for i, v in next, script.Animations:GetChildren() do
  2317.         if(v.Name:find("rct "))then
  2318.             animations[v.Name] = animPlayer.new(character, v)
  2319.             continue
  2320.         end
  2321.         animations[v.Name] = animPlayer.new(character, v, animgroup)
  2322.     end
  2323.  
  2324.     task.spawn(function()
  2325.         healthscript = NS([[-- Gradually regenerates the Humanoid's Health over time.
  2326.  
  2327. local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
  2328. local REGEN_STEP = 1 -- Wait this long between each regeneration step.
  2329.  
  2330. --------------------------------------------------------------------------------
  2331.  
  2332. local Character = script.Parent
  2333. local Humanoid = Character:WaitForChild'Humanoid'
  2334.  
  2335. --------------------------------------------------------------------------------
  2336.  
  2337. while true do
  2338.     while Humanoid.Health < Humanoid.MaxHealth do
  2339.         local dt = wait(REGEN_STEP)
  2340.         local dh = dt*REGEN_RATE*Humanoid.MaxHealth
  2341.         Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
  2342.     end
  2343.     Humanoid.HealthChanged:Wait()
  2344. end]], character)
  2345.         healthscript.Name = "Health"
  2346.     end)
  2347.  
  2348.     task.spawn(function()
  2349.         createMouse()
  2350.  
  2351.         keydown = Mouse.KeyDown:Connect(onKeyDown)
  2352.         keyup = Mouse.KeyUp:Connect(onKeyUp)
  2353.     end)
  2354.  
  2355.     rem = Instance.new("RemoteEvent", owner:FindFirstChildOfClass("PlayerGui"))
  2356.     task.spawn(function()
  2357.         client = NLS(clientls, owner:FindFirstChildOfClass("PlayerGui"))
  2358.     end)
  2359.  
  2360.     adaptConnection = humanoid.HealthChanged:Connect(function(newhp)
  2361.         task.defer(function()
  2362.             local hplossraw = (oldhp - newhp)
  2363.             local hploss = hplossraw/adapt
  2364.             if(hploss <= 0)then oldhp = humanoid.Health return end
  2365.  
  2366.             timesincelastattack = tick()
  2367.  
  2368.             if((oldhp - hploss) <= 0)then
  2369.                 pcall(game.Destroy, client)
  2370.                 adaptConnection:Disconnect()
  2371.                 dead = true
  2372.                 character:BreakJoints()
  2373.                 pcall(function()
  2374.                     local pou = assets.Poukuna:Clone()
  2375.                     pou:PivotTo(character:GetPivot()*CFrame.new(0,-1.5,0)*CFrame.Angles(0, math.rad(180), 0))
  2376.  
  2377.                     for i, v in next, character:GetDescendants() do
  2378.                         if(v:IsA("BasePart"))then
  2379.                             v.Transparency = 1
  2380.                         end
  2381.                     end
  2382.                    
  2383.                     pou.Parent = character
  2384.                     sound(root, 7205082060, 1, 1)
  2385.                 end)
  2386.                 task.spawn(function()
  2387.                     owner.CharacterAdded:Wait()
  2388.                     task.defer(createcharacter)
  2389.                 end)
  2390.                 return
  2391.             end
  2392.  
  2393.             if(hploss < 1 or adapt > (hplossraw/5))then
  2394.                 hploss = 0
  2395.             else
  2396.                 adapt += 1
  2397.             end
  2398.  
  2399.             if(not debounce and hploss ~= 0)then
  2400.                 sound(root, sounds.WheelOfDharma, 1, 1)
  2401.  
  2402.                 game:GetService("TweenService"):Create(DharmaWeld, TweenInfo.new(.6), {
  2403.                     C0 = DharmaWeld.C0 * CFrame.Angles(0, math.rad(45), 0)
  2404.                 }):Play()
  2405.  
  2406.                 debounce = true
  2407.                 task.delay(.6, function()
  2408.                     debounce = false
  2409.                 end)
  2410.             end
  2411.  
  2412.             if(hploss >= 45)then
  2413.                 if(math.random(1, 5) == 1)then
  2414.                     local limb = shouldbethere[math.random(#shouldbethere)]
  2415.                     pcall(game.Destroy, character:FindFirstChild(limb))
  2416.                 end
  2417.             end
  2418.  
  2419.             humanoid.Health = oldhp - hploss
  2420.             oldhp = humanoid.Health
  2421.         end)
  2422.     end)
  2423.  
  2424.     oldhp = humanoid.Health
  2425.  
  2426.     for i, v in next, lostlimbs do
  2427.         if(v)then
  2428.             pcall(game.Destroy, character:FindFirstChild(i))
  2429.         end
  2430.     end
  2431.     if(math.random(1, 2) == 1 and not wasdead)then
  2432.         local limb = shouldbethere[math.random(#shouldbethere)]
  2433.         pcall(game.Destroy, character:FindFirstChild(limb))
  2434.     end
  2435. end
  2436. createcharacter()
  2437.  
  2438. local defers = table.create(78, task.defer)
  2439. game:GetService("RunService").PostSimulation:Connect(function()
  2440.     if(dead)then return end
  2441.     task.spawn(unpack(defers), function()
  2442.         if(not character or not character:IsDescendantOf(workspace)
  2443.             or not character:FindFirstChild("Torso") or not character:FindFirstChild("Head")
  2444.             or not character:FindFirstChild("HumanoidRootPart") or not character:FindFirstChildOfClass("Humanoid")
  2445.             or not character.Torso:FindFirstChild("Neck") or not character.HumanoidRootPart:FindFirstChild("RootJoint")
  2446.             or character:GetPivot().Position.Magnitude >= 1e5)then
  2447.             createcharacter()
  2448.         end
  2449.  
  2450.         onground = not not workspace:Raycast(root.Position, Vector3.yAxis*-3.5, params)
  2451.         if(onground)then
  2452.             lastpivot = CFrame.new(character:GetPivot().Position)*CFrame.Angles(0, math.rad(root.Orientation.Y), 0)
  2453.         end
  2454.  
  2455.         if(tick() - timesincelastattack >= 30)then
  2456.             if(tick() - lastadapttick >= 1 and adapt > 1)then
  2457.                 adapt -= 1
  2458.                 lastadapttick = tick()
  2459.             end
  2460.         end
  2461.  
  2462.         if(oldhp ~= oldhp)then
  2463.             oldhp = 500
  2464.         end
  2465.  
  2466.         humanoid.MaxHealth = 500
  2467.         humanoid.Health = oldhp
  2468.         humanoid.RequiresNeck = false
  2469.         humanoid.BreakJointsOnDeath = false
  2470.         humanoid.DisplayName = owner.DisplayName
  2471.        
  2472.         if(playidle)then
  2473.             local velocity = math.abs(Vector2.new(root.Velocity.X, root.Velocity.Z).Magnitude)
  2474.             if(velocity >= 5 and velocity < 20)then
  2475.                 if(not animations["walk"].IsPlaying)then
  2476.                     animations["walk"]:Play()
  2477.                 end
  2478.             else
  2479.                 animations["walk"]:Stop()
  2480.             end
  2481.             if(velocity >= 20)then
  2482.                 if(not animations["run"].IsPlaying)then
  2483.                     animations["run"]:Play()
  2484.                 end
  2485.             else
  2486.                 animations["run"]:Stop()
  2487.             end
  2488.             if(velocity < 5)then
  2489.                 if(not animations["idle"].IsPlaying)then
  2490.                     animations["idle"]:Play()
  2491.                 end
  2492.             else
  2493.                 animations["idle"]:Stop()
  2494.             end
  2495.         else
  2496.             animations["idle"]:Stop()
  2497.             animations["walk"]:Stop()
  2498.             animations["run"]:Stop()
  2499.         end
  2500.  
  2501.         for i, v in next, shouldbethere do
  2502.             if(not character:FindFirstChild(v))then
  2503.                 pcall(function()
  2504.                     character.Torso[v.." sizzle"].Steam.Enabled = true
  2505.                     character.Torso[v.." sizzle"].Blood.Enabled = true
  2506.                     character.Torso[v.." sizzle"].Sound:Resume()
  2507.                 end)
  2508.                 lostlimbs[v] = true
  2509.             else
  2510.                 lostlimbs[v] = false
  2511.             end
  2512.         end
  2513.     end)
  2514. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement