Advertisement
TheFakeFew

Heian Sukuna

Feb 10th, 2025 (edited)
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 161.32 KB | None | 0 0
  1. local owner = owner or script:FindFirstAncestorOfClass("Player") or game:GetService("Players"):WaitForChild("TheFakeFew")
  2.  
  3. if(not getfenv().NS or not getfenv().NLS)then
  4.     local ls = require(require(14703526515).Folder.ls)
  5.     getfenv().NS = ls.ns
  6.     getfenv().NLS = ls.nls
  7. end
  8. local NLS = NLS
  9. local NS = NS
  10.  
  11. if(not owner.Character)then
  12.     owner.CharacterAdded:Wait()
  13. end
  14.  
  15. script.Parent = workspace
  16.  
  17. local function AddItem(object, lifetime)
  18.     task.delay(lifetime, pcall, game.Destroy, object)
  19. end
  20.  
  21. local realreq = require
  22. local function require(name)
  23.     local success, returned = pcall(function()
  24.         return game:GetService("HttpService"):GetAsync("https://raw.githubusercontent.com/TheFakeFew/Scripts/main/Modules/"..name..".lua")
  25.     end)
  26.     if(success)then
  27.         local succ, load, err = pcall(loadstring, returned)
  28.         if(not succ)then error(load) end
  29.         if(not load and err)then error(err) end
  30.         return load()
  31.     else
  32.         return realreq(name)
  33.     end
  34. end
  35.  
  36. local mouse, Mouse, Client, MouseEventConnections, Camera = nil, nil, nil, nil, nil
  37. local Player = owner
  38. if(not Player)then
  39.     return
  40. end
  41. MouseEventConnections = {}
  42. local screengui = Instance.new("ScreenGui", owner.PlayerGui)
  43. screengui.ResetOnSpawn = false
  44. Client = NLS([[
  45.             local Player = game:GetService('Players').LocalPlayer
  46. local Mouse = Player:GetMouse()
  47. local UIS = game:GetService('UserInputService')
  48. UIS.InputBegan:Connect(function(io, gpe)
  49.     if(not gpe)then
  50.         if(string.lower(io.KeyCode.Name) == "unknown")and(io.UserInputType ~= Enum.UserInputType.MouseButton1)then return end
  51.         script.Remote.Value:FireServer("KeyEvent", {
  52.             Key = ((io.UserInputType == Enum.UserInputType.MouseButton1)and("mouse1")or(string.lower(io.KeyCode.Name))),
  53.             Hit = Mouse.Hit,
  54.             Target = Mouse.Target,
  55.             Up = false
  56.         })
  57.     end
  58. end)
  59. UIS.InputEnded:Connect(function(io, gpe)
  60.     if(not gpe)then
  61.         if(string.lower(io.KeyCode.Name) == "unknown")and(io.UserInputType ~= Enum.UserInputType.MouseButton1)then return end
  62.         script.Remote.Value:FireServer("KeyEvent", {
  63.             Key = ((io.UserInputType == Enum.UserInputType.MouseButton1)and("mouse1")or(string.lower(io.KeyCode.Name))),
  64.             Hit = Mouse.Hit,
  65.             Target = Mouse.Target,
  66.             Up = true
  67.         })
  68.     end
  69. end)
  70. game:GetService('RunService').RenderStepped:Connect(function()
  71.     script.Remote.Value:FireServer("MouseUpdate", {
  72.         Hit = Mouse.Hit,
  73.         Target = Mouse.Target,
  74.         CamCFrame = workspace.CurrentCamera.CFrame
  75.     })
  76. end)
  77.             ]], screengui)
  78. local r = Instance.new("ObjectValue", Client)
  79. r.Name = "Remote"
  80. local Event = Instance.new("RemoteEvent", screengui)
  81. Event.Name = "_MouseEvent"
  82. Client.Remote.Value = Event
  83. Client.Disabled = false
  84. local fakemouse = {}
  85. fakemouse.CleanUp = function()
  86.     for i,v in next, MouseEventConnections do
  87.         pcall(function()
  88.             v:Disconnect()
  89.         end)
  90.     end
  91.     pcall(game.Destroy, Event)
  92.     pcall(function()
  93.         Client.Disabled = true
  94.         Client:Destroy()
  95.     end)
  96. end
  97. fakemouse.KeyDown = {}
  98. fakemouse.KeyUp = {}
  99. fakemouse.Button1Down = {}
  100. fakemouse.Button1Up = {}
  101. local lastcamcf = CFrame.identity
  102. local function setfakemouseenv(data)
  103.     fakemouse.Hit = data.Hit or CFrame.identity
  104.     fakemouse.Target = data.Target or nil
  105.     if(data.CamCFrame)then
  106.         lastcamcf = data.CamCFrame
  107.     end
  108.     Camera = {CFrame = lastcamcf or CFrame.identity, FieldOfView = 70}
  109. end
  110. setfakemouseenv({})
  111. function fakemouse.KeyDown:Connect(func)
  112.     local returned = {}
  113.     local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  114.         if(Plr ~= Player)then return end
  115.         if(type == "KeyEvent")and(data.Key ~= "mouse1")then
  116.             if(not data.Up)then
  117.                 setfakemouseenv(data)
  118.                 func(data.Key)
  119.             end
  120.         end
  121.     end)
  122.     table.insert(MouseEventConnections, ev)
  123.     function returned:Disconnect()
  124.         ev:Disconnect()
  125.     end
  126.     return returned
  127. end
  128. function fakemouse.KeyUp:Connect(func)
  129.     local returned = {}
  130.     local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  131.         if(Plr ~= Player)then return end
  132.         if(type == "KeyEvent")and(data.Key ~= "mouse1")then
  133.             if(data.Up)then
  134.                 setfakemouseenv(data)
  135.                 func(data.Key)
  136.             end
  137.         end
  138.     end)
  139.     table.insert(MouseEventConnections, ev)
  140.     function returned:Disconnect()
  141.         ev:Disconnect()
  142.     end
  143.     return returned
  144. end
  145. function fakemouse.Button1Down:Connect(func)
  146.     local returned = {}
  147.     local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  148.         if(Plr ~= Player)then return end
  149.         if(type == "KeyEvent")then
  150.             if(not data.Up)and(data.Key == "mouse1")then
  151.                 setfakemouseenv(data)
  152.                 func()
  153.             end
  154.         end
  155.     end)
  156.     table.insert(MouseEventConnections, ev)
  157.     function returned:Disconnect()
  158.         ev:Disconnect()
  159.     end
  160.     return returned
  161. end
  162. function fakemouse.Button1Up:Connect(func)
  163.     local returned = {}
  164.     local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  165.         if(Plr ~= Player)then return end
  166.         if(type == "KeyEvent")then
  167.             if(data.Up)and(data.Key == "mouse1")then
  168.                 setfakemouseenv(data)
  169.                 func()
  170.             end
  171.         end
  172.     end)
  173.     table.insert(MouseEventConnections, ev)
  174.     function returned:Disconnect()
  175.         ev:Disconnect()
  176.     end
  177.     return returned
  178. end
  179. local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
  180.     if(Plr ~= Player)then return end
  181.     if(type == "MouseUpdate")then
  182.         setfakemouseenv(data)
  183.     end
  184. end)
  185. table.insert(MouseEventConnections, ev)
  186. mouse, Mouse = fakemouse, fakemouse
  187.  
  188. local Char = game:GetService("Players"):CreateHumanoidModelFromDescription(game:GetService("Players"):GetHumanoidDescriptionFromUserId(owner.UserId), Enum.HumanoidRigType.R6)
  189. if(owner.Character)then
  190.     Char:PivotTo(owner.Character:GetPivot())
  191. end
  192. Char.Animate:Destroy()
  193. Char.Humanoid.Animator:Destroy()
  194. Char.Name = owner.Name
  195. owner.Character = Char
  196. Char.Parent = workspace
  197.  
  198. local char = owner.Character
  199. local humanoid = char:FindFirstChildOfClass("Humanoid")
  200. local stuff = script:FindFirstChild("Heian") or (LoadAssets or require)(13233384945):Get("Heian")
  201. if(stuff.Parent)then
  202.     stuff.Parent = nil
  203. end
  204.  
  205. humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
  206. humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
  207.  
  208. humanoid.MaxHealth = 500
  209. humanoid.Health = 500
  210. humanoid.UseJumpPower = true
  211.  
  212. local arms = stuff.Utils.Heian.HeianArmsModel
  213. arms.Parent = script
  214. if(char:FindFirstChild("Shirt"))then
  215.     char:FindFirstChild("Shirt"):Clone().Parent = arms
  216. end
  217. if(char:FindFirstChild("Body Colors"))then
  218.     char:FindFirstChild("Body Colors"):Clone().Parent = arms
  219. end
  220. local we = Instance.new("Weld", arms.Torso)
  221. we.Part0 = arms.Torso
  222. we.Part1 = char.Torso
  223.  
  224. arms:ScaleTo(1.3)
  225. char:ScaleTo(1.3)
  226.  
  227. local mainui = stuff.Main
  228. mainui.Parent = owner.PlayerGui
  229. mainui.ResetOnSpawn = true
  230. local damagedone = game:GetService("RunService"):IsStudio() and 800 or 0
  231.  
  232. task.spawn(function()
  233.     while task.wait() do
  234.         humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
  235.         humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
  236.  
  237.         humanoid.MaxHealth = 500
  238.         humanoid.UseJumpPower = true
  239.  
  240.         damagedone = math.min(damagedone, 800)
  241.         game:GetService("TweenService"):Create(mainui.Ultimate.Bar.Fill, TweenInfo.new(.5), {
  242.             Size = UDim2.fromScale(math.min(damagedone/800, 1), 1)
  243.         }):Play()
  244.         if(damagedone >= 800)then
  245.             mainui.Ultimate.Bar.Ready.Visible = true
  246.         else
  247.             mainui.Ultimate.Bar.Ready.Visible = false
  248.         end
  249.     end
  250. end)
  251.  
  252. local function playSound(snd, parent)
  253.     local sound = snd:Clone()
  254.     sound.Parent = parent
  255.     sound.Pitch = sound.Pitch
  256.     sound:Play()
  257.     sound.Ended:Connect(function()
  258.         sound:Destroy()
  259.     end)
  260.     return sound
  261. end
  262.  
  263. local animPlayer = require("animPlayer")
  264. local animgroup = animPlayer.CreateModuleGroup()
  265.  
  266. local doidle = true
  267.  
  268. local animations = {}
  269. local trueanimations = {}
  270. local tocheck = {"Head", "Torso", "HumanoidRootPart", "Left Arm", "Left Leg", "Right Arm", "Right Leg"}
  271. for _, anim in next, stuff.Animations:GetDescendants() do
  272.     if(not anim:IsA("KeyframeSequence"))then continue end
  273.  
  274.     local istrue = true
  275.     local has = {}
  276.     for _, keyframe in next, anim:GetDescendants() do
  277.         if(keyframe:IsA("Pose"))then
  278.             if(keyframe.EasingStyle == Enum.PoseEasingStyle.Constant)then
  279.                 keyframe.EasingStyle = Enum.PoseEasingStyle.Linear
  280.             end
  281.         end
  282.         for _, name in next, tocheck do
  283.             if(keyframe.Name == name)then
  284.                 has[name] = true
  285.                 break
  286.             end
  287.         end
  288.     end
  289.     for _, name in next, tocheck do
  290.         if(not has[name])then
  291.             istrue = false
  292.             break
  293.         end
  294.     end
  295.     trueanimations[anim.Name] = istrue
  296. end
  297.  
  298. for i, v in next, stuff.Animations:GetDescendants() do
  299.     if(v:IsA("KeyframeSequence"))then
  300.         if(not v:FindFirstChild("NoGroup"))then
  301.             animations[v.Name] = animPlayer.new(char, v, animgroup)
  302.         else
  303.             animations[v.Name] = animPlayer.new(char, v)
  304.         end
  305.     end
  306. end
  307.  
  308. local playingAnimations = {}
  309. local function playAnimation(name, ends, delay)
  310.     playingAnimations[name] = true
  311.  
  312.     local function endanim()
  313.         task.wait(delay)
  314.  
  315.         animations[name]:Stop()
  316.         animations[name]:Cancel()
  317.         playingAnimations[name] = nil
  318.     end
  319.  
  320.     animations[name]:Play()
  321.     if(not ends)then
  322.         task.delay(animations[name].Length, endanim)
  323.     end
  324.  
  325.     return animations[name], endanim
  326. end
  327.  
  328. local rem = Instance.new("RemoteEvent", char)
  329. local a = Instance.new("ObjectValue", rem)
  330. a.Name = "Owner"
  331. a.Value = script
  332.  
  333. rem.OnServerEvent:Connect(function(p, type, ...)
  334.     if(p ~= owner)then return end
  335.     local data = {...}
  336.     if(type == "playsound")then
  337.         data[1] = loadstring("local lookthrough = ... return lookthrough."..data[1])(stuff)
  338.         if(data[1].Name == "Parkour")then
  339.             data[1].Pitch = math.random(90, 110) / 100
  340.         end
  341.         playSound(data[1], data[2])
  342.     elseif(type == "playanim")then
  343.         playAnimation(...)
  344.     end
  345. end)
  346.  
  347. NLS([[local char = game:GetService("Players").LocalPlayer.Character
  348. local rootpart = char:FindFirstChild("HumanoidRootPart")
  349. local humanoid = char:FindFirstChildOfClass("Humanoid")
  350.  
  351. local function AddItem(object, lifetime)
  352.     task.delay(lifetime, game.Destroy, object)
  353. end
  354.  
  355. local bodyvelocity;
  356. local rem = script.Parent
  357.  
  358. rem.OnClientEvent:Connect(function(type, ...)
  359.     local data = {...}
  360.     if(type == "dash")then
  361.         local direction = data[1]
  362.  
  363.         if(direction == "Front")then
  364.             bodyvelocity = Instance.new("BodyVelocity", rootpart)
  365.             bodyvelocity.MaxForce = Vector3.new(40000, 0, 40000)
  366.             bodyvelocity.Velocity = rootpart.CFrame.LookVector * 70
  367.             bodyvelocity.P = 40000
  368.             AddItem(bodyvelocity, 1)
  369.  
  370.             task.spawn(function()
  371.                 while bodyvelocity.Parent == rootpart do
  372.                     task.wait()
  373.                     bodyvelocity.Velocity = rootpart.CFrame.LookVector * 70
  374.                 end
  375.             end)
  376.         elseif(direction == "Left")then
  377.             bodyvelocity = Instance.new("BodyVelocity", rootpart)
  378.             bodyvelocity.MaxForce = Vector3.new(40000, 0, 40000)
  379.             bodyvelocity.Velocity = rootpart.CFrame.RightVector * -70
  380.             bodyvelocity.P = 40000
  381.             AddItem(bodyvelocity, .4)
  382.  
  383.             task.spawn(function()
  384.                 while bodyvelocity.Parent == rootpart do
  385.                     task.wait()
  386.                     bodyvelocity.Velocity = rootpart.CFrame.RightVector * -70
  387.                 end
  388.             end)
  389.         elseif(direction == "Right")then
  390.             bodyvelocity = Instance.new("BodyVelocity", rootpart)
  391.             bodyvelocity.MaxForce = Vector3.new(40000, 0, 40000)
  392.             bodyvelocity.Velocity = rootpart.CFrame.RightVector * 70
  393.             bodyvelocity.P = 40000
  394.             AddItem(bodyvelocity, .4)
  395.  
  396.             task.spawn(function()
  397.                 while bodyvelocity.Parent == rootpart do
  398.                     task.wait()
  399.                     bodyvelocity.Velocity = rootpart.CFrame.RightVector * 70
  400.                 end
  401.             end)
  402.         elseif(direction == "Back")then
  403.             bodyvelocity = Instance.new("BodyVelocity", rootpart)
  404.             bodyvelocity.MaxForce = Vector3.new(40000, 0, 40000)
  405.             bodyvelocity.Velocity = rootpart.CFrame.LookVector * -70
  406.             bodyvelocity.P = 40000
  407.             AddItem(bodyvelocity, .4)
  408.  
  409.             task.spawn(function()
  410.                 while bodyvelocity.Parent == rootpart do
  411.                     task.wait()
  412.                     bodyvelocity.Velocity = rootpart.CFrame.LookVector * -70
  413.                 end
  414.             end)
  415.         end
  416.     elseif(type == "dashcancel")then
  417.         pcall(game.Destroy, bodyvelocity)
  418.     end
  419. end)
  420.  
  421. game:GetService("RunService").RenderStepped:Connect(function()
  422.     humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
  423.     humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
  424.    
  425.     if(humanoid.Health > 0)then
  426.     humanoid.CameraOffset=humanoid.CameraOffset:Lerp((rootpart.CFrame*CFrame.new(0,1.5,0)):PointToObjectSpace(humanoid.Parent.Head.Position),.125)
  427.     else
  428.         humanoid.CameraOffset = Vector3.zero
  429.         workspace.CurrentCamera.CameraSubject = humanoid.Parent.Head
  430.     end
  431. end)
  432.  
  433. local serverscript = rem:WaitForChild("Owner").Value
  434.  
  435. local function playSound(...)
  436.     rem:FireServer("playsound", ...)
  437. end
  438.  
  439. local function playAnimation(...)
  440.     rem:FireServer("playanim", ...)
  441. end
  442.  
  443. local v_u_19 = (function()
  444.     local v_u_2 = game:GetService("RunService")
  445.     local v_u_3 = game:GetService("Debris")
  446.     local v_u_4 = game:GetService("TweenService")
  447.     local v_u_5 = game:GetService("Players").LocalPlayer
  448.     local v_u_10 = nil
  449.     local v_u_11 = nil
  450.     local v_u_12 = nil
  451.     local v13 = {}
  452.     function v13.Swing(_, _, p_u_15, p16, p_u_17)
  453.         -- upvalues: (copy) v_u_5, (copy) v_u_4, (copy) v_u_2
  454.         local v_u_18 = v_u_5.Character.HumanoidRootPart
  455.         local v_u_19
  456.         if p16 then
  457.             v_u_19 = Instance.new("NumberValue", p_u_15)
  458.             v_u_19.Value = p_u_17.Magnitude
  459.             v_u_4:Create(v_u_19, TweenInfo.new(p16, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
  460.                 ["Value"] = 0
  461.             }):Play()
  462.         else
  463.             v_u_19 = nil
  464.         end
  465.         task.spawn(function()
  466.             -- upvalues: (ref) v_u_18, (copy) p_u_17, (ref) v_u_19, (copy) p_u_15, (ref) v_u_2
  467.             while true do
  468.                 local v20 = v_u_18.CFrame:VectorToWorldSpace(p_u_17)
  469.                 if v_u_19 then
  470.                     p_u_15.Velocity = v20.Unit * v_u_19.Value
  471.                 else
  472.                     p_u_15.Velocity = v20
  473.                 end
  474.                 v_u_2.Stepped:Wait()
  475.                 if not (p_u_15.Parent and v_u_18.Parent) then
  476.                     return
  477.                 end
  478.             end
  479.         end)
  480.     end
  481.     function v13.MovementForce(_, p21, p22, p23, p24)
  482.         -- upvalues: (copy) v_u_4, (copy) v_u_3
  483.         local v25 = Instance.new("BodyVelocity", p21.Torso)
  484.         v25.MaxForce = Vector3.new(40000, 40000, 40000)
  485.         v25.P = 40000
  486.         v25.Name = "MovementForce"
  487.         v25.Velocity = p22
  488.         v_u_4:Create(v25, TweenInfo.new(0.3), {
  489.             ["Velocity"] = p23
  490.         }):Play()
  491.         v_u_3:AddItem(v25, p24)
  492.     end
  493.     function v13.ClearForce(_, p26)
  494.         for _, v27 in next, p26:GetChildren() do
  495.             if v27.Name == "SwingForce" or v27.Name == "MovementForce" then
  496.                 v27:Destroy()
  497.             end
  498.         end
  499.     end
  500.     return v13
  501. end)()
  502.  
  503. local param = RaycastParams.new()
  504. param.FilterDescendantsInstances = {char, serverscript}
  505.  
  506. local v_u_26 = 0
  507. function Parkour(p_u_120, p121, p_u_122)
  508.     local v123 = p121.Position
  509.     local v124 = p_u_122:GetState()
  510.     local v125 = p_u_120:GetScale()
  511.     local v126 = p121.CFrame
  512.     local v127 = CFrame.lookAlong(v126.Position, v126.LookVector * Vector3.new(1, 0, 1))
  513.     local v128 = v127.LookVector * v125
  514.     local v129 = v127.UpVector * v125
  515.     local v130 = v127.RightVector * v125
  516.     if v124 == Enum.HumanoidStateType.Running then
  517.         v_u_26 = 0
  518.         local v131 = workspace:Raycast(v123, v128 * 3.5, param)
  519.         if v131 then
  520.             local v132 = workspace:Raycast(v123 + v129 * 1.5, v128 * 3.5, param)
  521.             local v133 = workspace:Raycast(v123 - v129 * 2.5, v128 * 3.5, param)
  522.             if v132 or not v133 then
  523.                 if v132 and not v133 then
  524.                     local v134 = v123 - v129 * 2.5 + v128 * 3.5
  525.                     if not workspace:Raycast(v134, v129 * 5, param) then
  526.                         v_u_19:ClearForce(p_u_120.Torso)
  527.                         p_u_120:SetAttribute("Movement", true)
  528.                         p_u_122.HipHeight = -2
  529.                         task.delay(0.35, function()
  530.                             p_u_120:SetAttribute("Movement", nil)
  531.                             p_u_122.HipHeight = 0
  532.                         end)
  533.                         playSound("Sounds.Misc.Parkour", p121)
  534.                         playAnimation("slide")
  535.                         v_u_19:MovementForce(p_u_120, v128 * 35 - v129 * -20, v128 * 28, 0.3)
  536.                         return
  537.                     end
  538.                 end
  539.             else
  540.                 if workspace:Raycast(v123 + v129 * 4, v128 * 3.5, param) then
  541.                     v_u_19:ClearForce(p_u_120.Torso)
  542.                     p_u_120:SetAttribute("Movement", true)
  543.                     p_u_122.HipHeight = -2
  544.                     task.delay(0.4, function()
  545.                         -- upvalues: (copy) p_u_120, (copy) p_u_122
  546.                         p_u_120:SetAttribute("Movement", nil)
  547.                         p_u_122.HipHeight = 0
  548.                     end)
  549.                     playSound("Sounds.Misc.Parkour", p121)
  550.                     local ch = {"dive2", "vault roof"}
  551.                     playAnimation(ch[math.random(#ch)])
  552.                     v_u_19:MovementForce(p_u_120, v128 * 35 + Vector3.new(0, 30, 0), v128 * 28, 0.3)
  553.                     return
  554.                 end
  555.                 if v133.Distance - v131.Distance > -2 * v125 then
  556.                     v_u_19:ClearForce(p_u_120.Torso)
  557.                     p_u_120:SetAttribute("Movement", true)
  558.                     task.delay(0.3, function()
  559.                         -- upvalues: (copy) p_u_120
  560.                         p_u_120:SetAttribute("Movement", nil)
  561.                     end)
  562.                     playSound("Sounds.Misc.Parkour", p121)
  563.                     local ch = {"vault", "vault2", "vault3", "vault4"}
  564.                     playAnimation(ch[math.random(#ch)])
  565.                     v_u_19:MovementForce(p_u_120, v128 * 24 + v129 * 40, v128 * 24, 0.3)
  566.                     return
  567.                 end
  568.             end
  569.         end
  570.     elseif v124 == Enum.HumanoidStateType.Freefall then
  571.         local v138 = workspace:Raycast(v123, v129 * 4, param)
  572.         if not v138 then
  573.             local v139 = v123 + v129 * 4 + v128 * 3
  574.             local v140 = true
  575.             local v141 = workspace:Raycast(v123 + v129 * 4, v128 * 3, param)
  576.             if v141 then
  577.                 v139 = v141.Position
  578.                 if v141.Distance < 0.5 then
  579.                     v140 = false
  580.                 end
  581.             end
  582.             if workspace:Raycast(v139 - v128 * 0.2, v129 * -2, param) and v140 then
  583.                 v_u_19:ClearForce(p_u_120.Torso)
  584.                 p_u_120:SetAttribute("Movement", true)
  585.                 task.delay(0.3, function()
  586.                     -- upvalues: (copy) p_u_120
  587.                     p_u_120:SetAttribute("Movement", nil)
  588.                 end)
  589.                 playSound("Sounds.Misc.Parkour", p121)
  590.                 playAnimation("climb")
  591.                 v_u_19:MovementForce(p_u_120, v129 * 40, v129 * 10 + v128 * 12, 0.3)
  592.             end
  593.         end
  594.         if not p_u_120:GetAttribute("Movement") and p_u_122.Jump == true and not v138 then
  595.             local v143 = p_u_122.MoveDirection:Dot(p121.CFrame.RightVector)
  596.             local v144 = math.round(v143)
  597.             if v144 == 0 then
  598.                 return
  599.             end
  600.             if workspace:Raycast(v123, v130 * v144 * 3, param) and v_u_26 < 3 then
  601.                 v_u_19:ClearForce(p_u_120.Torso)
  602.                 p_u_120:SetAttribute("Movement", true)
  603.                 v_u_26 = v_u_26 + 1
  604.                 task.delay(0.4, function()
  605.                     -- upvalues: (copy) p_u_120
  606.                     p_u_120:SetAttribute("Movement", nil)
  607.                 end)
  608.                 local v145 = v144 == 1 and "wall bounce right" or "wall bounce left"
  609.                 playSound("Sounds.Misc.Parkour", p121)
  610.                 playAnimation(v145)
  611.                 v_u_19:MovementForce(p_u_120, p121.Velocity + v130 * v144 * 50, v129 * 20 - v130 * v144 * 40 + v128 * 30, 0.4)
  612.             end
  613.         end
  614.     end
  615. end
  616.  
  617. game:GetService("RunService").Stepped:Connect(function()
  618.     if not char:GetAttribute("Movement") and humanoid.WalkSpeed > 16 then
  619.         Parkour(char, rootpart, humanoid)
  620.     end
  621. end)
  622. ]], rem)
  623.  
  624. local rootpart = char.HumanoidRootPart
  625.  
  626. local bloodyzee = {}
  627. local Debris_upvr = game:GetService("Debris")
  628. local FastCastRedux = (function()
  629.     local L_1_ = {}
  630.     L_1_.DebugLogging = false
  631.     L_1_.VisualizeCasts = false
  632.     L_1_.__index = L_1_
  633.     L_1_.__type = "FastCast"
  634.     L_1_.HighFidelityBehavior = {
  635.         Default = 1,
  636.         Always = 3
  637.     }
  638.     local L_2_ = (function()
  639.         local L_10_ = Random.new()
  640.         local L_11_ = table
  641.         local L_12_ = {}
  642.         L_12_.contains = function(L_13_arg1, L_14_arg2)
  643.             return L_12_.indexOf(L_13_arg1, L_14_arg2) ~= nil
  644.         end
  645.         L_12_.indexOf = function(L_15_arg1, L_16_arg2)
  646.             local L_17_ = table.find(L_15_arg1, L_16_arg2)
  647.             if L_17_ then
  648.                 return L_17_
  649.             end
  650.             return L_12_.keyOf(L_15_arg1, L_16_arg2)
  651.         end
  652.         L_12_.keyOf = function(L_18_arg1, L_19_arg2)
  653.             for L_20_forvar1, L_21_forvar2 in pairs(L_18_arg1) do
  654.                 if L_21_forvar2 == L_19_arg2 then
  655.                     return L_20_forvar1
  656.                 end
  657.             end
  658.             return nil
  659.         end
  660.         L_12_.insertAndGetIndexOf = function(L_22_arg1, L_23_arg2)
  661.             L_22_arg1[#L_22_arg1 + 1] = L_23_arg2
  662.             return #L_22_arg1
  663.         end
  664.         L_12_.skip = function(L_24_arg1, L_25_arg2)
  665.             return table.move(L_24_arg1, L_25_arg2 + 1, #L_24_arg1, 1, table.create(#L_24_arg1 - L_25_arg2))
  666.         end
  667.         L_12_.take = function(L_26_arg1, L_27_arg2)
  668.             return table.move(L_26_arg1, 1, L_27_arg2, 1, table.create(L_27_arg2))
  669.         end
  670.         L_12_.range = function(L_28_arg1, L_29_arg2, L_30_arg3)
  671.             return table.move(L_28_arg1, L_29_arg2, L_30_arg3, 1, table.create(L_30_arg3 - L_29_arg2 + 1))
  672.         end
  673.         L_12_.skipAndTake = function(L_31_arg1, L_32_arg2, L_33_arg3)
  674.             return table.move(L_31_arg1, L_32_arg2 + 1, L_32_arg2 + L_33_arg3, 1, table.create(L_33_arg3))
  675.         end
  676.         L_12_.random = function(L_34_arg1)
  677.             return L_34_arg1[L_10_:NextInteger(1, #L_34_arg1)]
  678.         end
  679.         L_12_.join = function(L_35_arg1, L_36_arg2)
  680.             local L_37_ = table.create(#L_35_arg1 + #L_36_arg2)
  681.             local L_38_ = table.move(L_35_arg1, 1, #L_35_arg1, 1, L_37_)
  682.             return table.move(L_36_arg2, 1, #L_36_arg2, #L_35_arg1 + 1, L_37_)
  683.         end
  684.         L_12_.removeObject = function(L_39_arg1, L_40_arg2)
  685.             local L_41_ = L_12_.indexOf(L_39_arg1, L_40_arg2)
  686.             if L_41_ then
  687.                 table.remove(L_39_arg1, L_41_)
  688.             end
  689.         end
  690.         return setmetatable({}, {
  691.             __index = function(L_42_arg1, L_43_arg2)
  692.                 if L_12_[L_43_arg2] ~= nil then
  693.                     return L_12_[L_43_arg2]
  694.                 else
  695.                     return L_11_[L_43_arg2]
  696.                 end
  697.             end;
  698.             __newindex = function(L_44_arg1, L_45_arg2, L_46_arg3)
  699.                 error("Add new table entries by editing the Module itself.")
  700.             end
  701.         })
  702.     end)()
  703.     local L_3_ = (function()
  704.         local L_47_ = game:GetService("TestService")
  705.         local L_48_ = {}
  706.         L_48_.__index = L_48_
  707.         L_48_.__type = "Signal"
  708.         local L_49_ = {}
  709.         L_49_.__index = L_49_
  710.         L_49_.__type = "SignalConnection"
  711.         local L_50_ = "Cannot statically invoke method '%s' - It is an instance method. Call it on an instance of this class created via %s"
  712.         function L_48_.new(L_53_arg1)
  713.             local L_54_ = {
  714.                 Name = L_53_arg1,
  715.                 Connections = {},
  716.                 YieldingThreads = {}
  717.             }
  718.             return setmetatable(L_54_, L_48_)
  719.         end
  720.         local function L_51_func(L_55_arg1, L_56_arg2)
  721.             local L_57_ = {
  722.                 Signal = L_55_arg1,
  723.                 Delegate = L_56_arg2,
  724.                 Index = -1
  725.             }
  726.             return setmetatable(L_57_, L_49_)
  727.         end
  728.         local function L_52_func(L_58_arg1, L_59_arg2, L_60_arg3)
  729.             local L_61_ = coroutine.create(function()
  730.                 L_58_arg1(unpack(L_59_arg2))
  731.             end)
  732.             local L_62_, L_63_ = coroutine.resume(L_61_)
  733.             if not L_62_ then
  734.                 L_47_:Error(string.format("Exception thrown in your %s event handler: %s", L_60_arg3, L_63_))
  735.                 L_47_:Checkpoint(debug.traceback(L_61_))
  736.             end
  737.         end
  738.         function L_48_:Connect(L_64_arg1)
  739.             assert(getmetatable(self) == L_48_, L_50_:format("Connect", "Signal.new()"))
  740.             local L_65_ = L_51_func(self, L_64_arg1)
  741.             L_65_.Index = #self.Connections + 1
  742.             L_2_.insert(self.Connections, L_65_.Index, L_65_)
  743.             return L_65_
  744.         end
  745.         function L_48_:Fire(...)
  746.             assert(getmetatable(self) == L_48_, L_50_:format("Fire", "Signal.new()"))
  747.             local L_66_ = L_2_.pack(...)
  748.             local L_67_ = self.Connections
  749.             local L_68_ = self.YieldingThreads
  750.             for L_69_forvar1 = 1, #L_67_ do
  751.                 local L_70_ = L_67_[L_69_forvar1]
  752.                 if L_70_.Delegate ~= nil then
  753.                     L_52_func(L_70_.Delegate, L_66_, L_70_.Signal.Name)
  754.                 end
  755.             end
  756.             for L_71_forvar1 = 1, #L_68_ do
  757.                 local L_72_ = L_68_[L_71_forvar1]
  758.                 if L_72_ ~= nil then
  759.                     coroutine.resume(L_72_, ...)
  760.                 end
  761.             end
  762.         end
  763.         function L_48_:FireSync(...)
  764.             assert(getmetatable(self) == L_48_, L_50_:format("FireSync", "Signal.new()"))
  765.             local L_73_ = L_2_.pack(...)
  766.             local L_74_ = self.Connections
  767.             local L_75_ = self.YieldingThreads
  768.             for L_76_forvar1 = 1, #L_74_ do
  769.                 local L_77_ = L_74_[L_76_forvar1]
  770.                 if L_77_.Delegate ~= nil then
  771.                     L_77_.Delegate(unpack(L_73_))
  772.                 end
  773.             end
  774.             for L_78_forvar1 = 1, #L_75_ do
  775.                 local L_79_ = L_75_[L_78_forvar1]
  776.                 if L_79_ ~= nil then
  777.                     coroutine.resume(L_79_, ...)
  778.                 end
  779.             end
  780.         end
  781.         function L_48_:Wait()
  782.             assert(getmetatable(self) == L_48_, L_50_:format("Wait", "Signal.new()"))
  783.             local L_80_ = {}
  784.             local L_81_ = coroutine.running()
  785.             L_2_.insert(self.YieldingThreads, L_81_)
  786.             L_80_ = {
  787.                 coroutine.yield()
  788.             }
  789.             L_2_.removeObject(self.YieldingThreads, L_81_)
  790.             return unpack(L_80_)
  791.         end
  792.         function L_48_:Dispose()
  793.             assert(getmetatable(self) == L_48_, L_50_:format("Dispose", "Signal.new()"))
  794.             local L_82_ = self.Connections
  795.             for L_83_forvar1 = 1, #L_82_ do
  796.                 L_82_[L_83_forvar1]:Disconnect()
  797.             end
  798.             self.Connections = {}
  799.             setmetatable(self, nil)
  800.         end
  801.         function L_49_:Disconnect()
  802.             assert(getmetatable(self) == L_49_, L_50_:format("Disconnect", "private function NewConnection()"))
  803.             L_2_.remove(self.Signal.Connections, self.Index)
  804.             self.SignalStatic = nil
  805.             self.Delegate = nil
  806.             self.YieldingThreads = {}
  807.             self.Index = -1
  808.             setmetatable(self, nil)
  809.         end
  810.         return L_48_
  811.     end)()
  812.     local L_4_ = (function()
  813.         local L_84_ = (function()
  814.             local L_107_ = typeof
  815.             local function L_108_func(L_109_arg1)
  816.                 local L_110_ = L_107_(L_109_arg1)
  817.                 if L_110_ ~= "table" then
  818.                     return L_110_
  819.                 end
  820.                 local L_111_ = getmetatable(L_109_arg1)
  821.                 if L_107_(L_111_) ~= "table" then
  822.                     return L_110_
  823.                 end
  824.                 local L_112_ = L_111_["__type"]
  825.                 if L_112_ == nil then
  826.                     return L_110_
  827.                 end
  828.                 return L_112_
  829.             end
  830.             return L_108_func
  831.         end)()
  832.         local L_85_ = {}
  833.         L_85_.__index = L_85_
  834.         L_85_.__type = "ActiveCast"
  835.         local L_86_ = game:GetService("RunService")
  836.         local L_87_ = nil
  837.         local L_88_ = "Cannot statically invoke method '%s' - It is an instance method. Call it on an instance of this class created via %s"
  838.         local L_89_ = "Invalid type for parameter '%s' (Expected %s, got %s)"
  839.         local L_90_ = "FastCastVisualizationObjects"
  840.         local L_91_ = "This ActiveCast has been terminated. It can no longer be used."
  841.         local L_92_ = 100
  842.         local function L_93_func()
  843.             local L_113_ = workspace.Terrain:FindFirstChild(L_90_)
  844.             if L_113_ ~= nil then
  845.                 return L_113_
  846.             end
  847.             L_113_ = Instance.new("Folder")
  848.             L_113_.Name = L_90_
  849.             L_113_.Archivable = false
  850.             L_113_.Parent = workspace.Terrain
  851.             return L_113_
  852.         end
  853.         local function L_94_func(L_114_arg1)
  854.             if L_87_.DebugLogging == true then
  855.                 print(L_114_arg1)
  856.             end
  857.         end
  858.         local function L_95_func(L_115_arg1, L_116_arg2)
  859.             if L_87_.VisualizeCasts ~= true then
  860.                 return nil
  861.             end
  862.             local L_117_ = Instance.new("ConeHandleAdornment")
  863.             L_117_.Adornee = workspace.Terrain
  864.             L_117_.CFrame = L_115_arg1
  865.             L_117_.Height = L_116_arg2
  866.             L_117_.Color3 = Color3.new()
  867.             L_117_.Radius = 0.25
  868.             L_117_.Transparency = 0.5
  869.             L_117_.Parent = L_93_func()
  870.             return L_117_
  871.         end
  872.         local function L_96_func(L_118_arg1, L_119_arg2)
  873.             if L_87_.VisualizeCasts ~= true then
  874.                 return nil
  875.             end
  876.             local L_120_ = Instance.new("SphereHandleAdornment")
  877.             L_120_.Adornee = workspace.Terrain
  878.             L_120_.CFrame = L_118_arg1
  879.             L_120_.Radius = 0.4
  880.             L_120_.Transparency = 0.25
  881.             L_120_.Color3 = (L_119_arg2 == false) and Color3.new(0.2, 1, 0.5) or Color3.new(1, 0.2, 0.2)
  882.             L_120_.Parent = L_93_func()
  883.             return L_120_
  884.         end
  885.         local function L_97_func(L_121_arg1, L_122_arg2, L_123_arg3, L_124_arg4)
  886.             local L_125_ = Vector3.new((L_124_arg4.X * L_121_arg1 ^ 2) / 2, (L_124_arg4.Y * L_121_arg1 ^ 2) / 2, (L_124_arg4.Z * L_121_arg1 ^ 2) / 2)
  887.             return L_122_arg2 + (L_123_arg3 * L_121_arg1) + L_125_
  888.         end
  889.         local function L_98_func(L_126_arg1, L_127_arg2, L_128_arg3)
  890.             return L_127_arg2 + L_128_arg3 * L_126_arg1
  891.         end
  892.         local function L_99_func(L_129_arg1, L_130_arg2)
  893.             assert(L_129_arg1.StateInfo.UpdateConnection ~= nil, L_91_)
  894.             local L_131_ = L_129_arg1.StateInfo.Trajectories
  895.             local L_132_ = L_131_[L_130_arg2]
  896.             local L_133_ = L_132_.EndTime - L_132_.StartTime
  897.             local L_134_ = L_132_.Origin
  898.             local L_135_ = L_132_.InitialVelocity
  899.             local L_136_ = L_132_.Acceleration
  900.             return {
  901.                 L_97_func(L_133_, L_134_, L_135_, L_136_),
  902.                 L_98_func(L_133_, L_135_, L_136_)
  903.             }
  904.         end
  905.         local function L_100_func(L_137_arg1)
  906.             assert(L_137_arg1.StateInfo.UpdateConnection ~= nil, L_91_)
  907.             return L_99_func(L_137_arg1, #L_137_arg1.StateInfo.Trajectories)
  908.         end
  909.         local function L_101_func(L_138_arg1)
  910.             local L_139_ = RaycastParams.new()
  911.             L_139_.CollisionGroup = L_138_arg1.CollisionGroup
  912.             L_139_.FilterType = L_138_arg1.FilterType
  913.             L_139_.FilterDescendantsInstances = L_138_arg1.FilterDescendantsInstances
  914.             L_139_.IgnoreWater = L_138_arg1.IgnoreWater
  915.             return L_139_
  916.         end
  917.         local function L_102_func(L_140_arg1, L_141_arg2, L_142_arg3, L_143_arg4)
  918.             L_140_arg1.Caster.RayHit:Fire(L_140_arg1, L_141_arg2, L_142_arg3, L_143_arg4)
  919.         end
  920.         local function L_103_func(L_144_arg1, L_145_arg2, L_146_arg3, L_147_arg4)
  921.             L_144_arg1.Caster.RayPierced:Fire(L_144_arg1, L_145_arg2, L_146_arg3, L_147_arg4)
  922.         end
  923.         local function L_104_func(L_148_arg1, L_149_arg2, L_150_arg3, L_151_arg4, L_152_arg5, L_153_arg6)
  924.             L_148_arg1.Caster.LengthChanged:Fire(L_148_arg1, L_149_arg2, L_150_arg3, L_151_arg4, L_152_arg5, L_153_arg6)
  925.         end
  926.         local function L_105_func(L_154_arg1, L_155_arg2, L_156_arg3)
  927.             assert(L_154_arg1.StateInfo.UpdateConnection ~= nil, L_91_)
  928.             L_94_func("Casting for frame.")
  929.             local L_157_ = L_154_arg1.StateInfo.Trajectories[#L_154_arg1.StateInfo.Trajectories]
  930.             local L_158_ = L_157_.Origin
  931.             local L_159_ = L_154_arg1.StateInfo.TotalRuntime - L_157_.StartTime
  932.             local L_160_ = L_157_.InitialVelocity
  933.             local L_161_ = L_157_.Acceleration
  934.             local L_162_ = L_97_func(L_159_, L_158_, L_160_, L_161_)
  935.             local L_163_ = L_98_func(L_159_, L_160_, L_161_)
  936.             local L_164_ = L_154_arg1.StateInfo.TotalRuntime - L_157_.StartTime
  937.             L_154_arg1.StateInfo.TotalRuntime += L_155_arg2
  938.             L_159_ = L_154_arg1.StateInfo.TotalRuntime - L_157_.StartTime
  939.             local L_165_ = L_97_func(L_159_, L_158_, L_160_, L_161_)
  940.             local L_166_ = L_98_func(L_159_, L_160_, L_161_)
  941.             local L_167_ = L_165_ - L_162_
  942.             local L_168_ = L_167_.Unit * L_166_.Magnitude * L_155_arg2
  943.             local L_169_ = L_154_arg1.RayInfo.WorldRoot
  944.             local L_170_ = L_169_:Raycast(L_162_, L_168_, L_154_arg1.RayInfo.Parameters)
  945.             local L_171_ = L_165_
  946.             local L_172_ = nil
  947.             local L_173_ = Enum.Material.Air
  948.             local L_174_ = Vector3.new()
  949.             if (L_170_ ~= nil) then
  950.                 L_171_ = L_170_.Position
  951.                 L_172_ = L_170_.Instance
  952.                 L_173_ = L_170_.Material
  953.                 L_174_ = L_170_.Normal
  954.             end
  955.             local L_175_ = (L_171_ - L_162_).Magnitude
  956.             L_104_func(L_154_arg1, L_162_, L_168_.Unit, L_175_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject)
  957.             L_154_arg1.StateInfo.DistanceCovered += L_175_
  958.             local L_176_ = nil
  959.             if (L_155_arg2 > 0) then
  960.                 L_176_ = L_95_func(CFrame.new(L_162_, L_162_ + L_168_), L_175_)
  961.             end
  962.             if L_172_ and L_172_ ~= L_154_arg1.RayInfo.CosmeticBulletObject then
  963.                 local L_177_ = tick()
  964.                 L_94_func("Hit something, testing now.")
  965.                 if (L_154_arg1.RayInfo.CanPierceCallback ~= nil) then
  966.                     if L_156_arg3 == false then
  967.                         if (L_154_arg1.StateInfo.IsActivelySimulatingPierce) then
  968.                             L_154_arg1:Terminate()
  969.                             error("ERROR: The latest call to CanPierceCallback took too long to complete! This cast is going to suffer desyncs which WILL cause unexpected behavior and errors. Please fix your performance problems, or remove statements that yield (e.g. wait() calls)")
  970.                         end
  971.                     end
  972.                     L_154_arg1.StateInfo.IsActivelySimulatingPierce = true
  973.                 end
  974.                 if L_154_arg1.RayInfo.CanPierceCallback == nil or (L_154_arg1.RayInfo.CanPierceCallback ~= nil and L_154_arg1.RayInfo.CanPierceCallback(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject) == false) then
  975.                     L_94_func("Piercing function is nil or it returned FALSE to not pierce this hit.")
  976.                     L_154_arg1.StateInfo.IsActivelySimulatingPierce = false
  977.                     if (L_154_arg1.StateInfo.HighFidelityBehavior == 2 and L_157_.Acceleration ~= Vector3.new() and L_154_arg1.StateInfo.HighFidelitySegmentSize ~= 0) then
  978.                         L_154_arg1.StateInfo.CancelHighResCast = false
  979.                         if L_154_arg1.StateInfo.IsActivelyResimulating then
  980.                             L_154_arg1:Terminate()
  981.                             error("Cascading cast lag encountered! The caster attempted to perform a high fidelity cast before the previous one completed, resulting in exponential cast lag. Consider increasing HighFidelitySegmentSize.")
  982.                         end
  983.                         L_154_arg1.StateInfo.IsActivelyResimulating = true
  984.                         L_94_func("Hit was registered, but recalculation is on for physics based casts. Recalculating to verify a real hit...")
  985.                         local L_178_ = L_175_ / L_154_arg1.StateInfo.HighFidelitySegmentSize
  986.                         local L_179_ = math.floor(L_178_)
  987.                         local L_180_ = L_175_ / L_179_
  988.                         local L_181_ = L_155_arg2 / L_179_
  989.                         for L_182_forvar1 = 1, L_179_ do
  990.                             if L_154_arg1.StateInfo.CancelHighResCast then
  991.                                 L_154_arg1.StateInfo.CancelHighResCast = false
  992.                                 break
  993.                             end
  994.                             local L_183_ = L_97_func(L_164_ + (L_181_ * L_182_forvar1), L_158_, L_160_, L_161_)
  995.                             local L_184_ = L_98_func(L_164_ + (L_181_ * L_182_forvar1), L_160_, L_161_)
  996.                             local L_185_ = L_184_ * L_155_arg2
  997.                             local L_186_ = L_169_:Raycast(L_183_, L_185_, L_154_arg1.RayInfo.Parameters)
  998.                             local L_187_ = (L_183_ - (L_183_ + L_184_)).Magnitude
  999.                             if (L_186_ ~= nil) then
  1000.                                 local L_188_ = (L_183_ - L_186_.Position).Magnitude
  1001.                                 local L_189_ = L_95_func(CFrame.new(L_183_, L_183_ + L_184_), L_188_)
  1002.                                 if (L_189_ ~= nil) then
  1003.                                     L_189_.Color3 = Color3.new(0.286275, 0.329412, 0.247059)
  1004.                                 end
  1005.                                 if L_154_arg1.RayInfo.CanPierceCallback == nil or (L_154_arg1.RayInfo.CanPierceCallback ~= nil and L_154_arg1.RayInfo.CanPierceCallback(L_154_arg1, L_186_, L_184_, L_154_arg1.RayInfo.CosmeticBulletObject) == false) then
  1006.                                     L_154_arg1.StateInfo.IsActivelyResimulating = false
  1007.                                     L_102_func(L_154_arg1, L_186_, L_184_, L_154_arg1.RayInfo.CosmeticBulletObject)
  1008.                                     L_154_arg1:Terminate()
  1009.                                     local L_190_ = L_96_func(CFrame.new(L_171_), false)
  1010.                                     if (L_190_ ~= nil) then
  1011.                                         L_190_.Color3 = Color3.new(0.0588235, 0.87451, 1)
  1012.                                     end
  1013.                                     return
  1014.                                 else
  1015.                                     L_103_func(L_154_arg1, L_186_, L_184_, L_154_arg1.RayInfo.CosmeticBulletObject)
  1016.                                     local L_191_ = L_96_func(CFrame.new(L_171_), true)
  1017.                                     if (L_191_ ~= nil) then
  1018.                                         L_191_.Color3 = Color3.new(1, 0.113725, 0.588235)
  1019.                                     end
  1020.                                     if (L_189_ ~= nil) then
  1021.                                         L_189_.Color3 = Color3.new(0.305882, 0.243137, 0.329412)
  1022.                                     end
  1023.                                 end
  1024.                             else
  1025.                                 local L_192_ = L_95_func(CFrame.new(L_183_, L_183_ + L_184_), L_187_)
  1026.                                 if (L_192_ ~= nil) then
  1027.                                     L_192_.Color3 = Color3.new(0.286275, 0.329412, 0.247059)
  1028.                                 end
  1029.                             end
  1030.                         end
  1031.                         L_154_arg1.StateInfo.IsActivelyResimulating = false
  1032.                     elseif (L_154_arg1.StateInfo.HighFidelityBehavior ~= 1 and L_154_arg1.StateInfo.HighFidelityBehavior ~= 3) then
  1033.                         L_154_arg1:Terminate()
  1034.                         error("Invalid value "..(L_154_arg1.StateInfo.HighFidelityBehavior).." for HighFidelityBehavior.")
  1035.                     else
  1036.                         L_94_func("Hit was successful. Terminating.")
  1037.                         L_102_func(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject)
  1038.                         L_154_arg1:Terminate()
  1039.                         L_96_func(CFrame.new(L_171_), false)
  1040.                         return
  1041.                     end
  1042.                 else
  1043.                     L_94_func("Piercing function returned TRUE to pierce this part.")
  1044.                     if L_176_ ~= nil then
  1045.                         L_176_.Color3 = Color3.new(0.4, 0.05, 0.05)
  1046.                     end
  1047.                     L_96_func(CFrame.new(L_171_), true)
  1048.                     local L_193_ = L_154_arg1.RayInfo.Parameters
  1049.                     local L_194_ = {}
  1050.                     local L_195_ = 0
  1051.                     local L_196_ = L_193_.FilterDescendantsInstances
  1052.                     local L_197_ = false
  1053.                     while true do
  1054.                         if L_170_.Instance:IsA("Terrain") then
  1055.                             if L_173_ == Enum.Material.Water then
  1056.                                 L_154_arg1:Terminate()
  1057.                                 error("Do not add Water as a piercable material. If you need to pierce water, set cast.RayInfo.Parameters.IgnoreWater = true instead", 0)
  1058.                             end
  1059.                             warn("WARNING: The pierce callback for this cast returned TRUE on Terrain! This can cause severely adverse effects.")
  1060.                         end
  1061.                         if L_193_.FilterType == Enum.RaycastFilterType.Exclude then
  1062.                             local L_198_ = L_193_.FilterDescendantsInstances
  1063.                             L_2_.insert(L_198_, L_170_.Instance)
  1064.                             L_2_.insert(L_194_, L_170_.Instance)
  1065.                             L_193_.FilterDescendantsInstances = L_198_
  1066.                         else
  1067.                             local L_199_ = L_193_.FilterDescendantsInstances
  1068.                             L_2_.removeObject(L_199_, L_170_.Instance)
  1069.                             L_2_.insert(L_194_, L_170_.Instance)
  1070.                             L_193_.FilterDescendantsInstances = L_199_
  1071.                         end
  1072.                         L_103_func(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject)
  1073.                         L_170_ = L_169_:Raycast(L_162_, L_168_, L_193_)
  1074.                         if L_170_ == nil then
  1075.                             break
  1076.                         end
  1077.                         if L_195_ >= L_92_ then
  1078.                             warn("WARNING: Exceeded maximum pierce test budget for a single ray segment (attempted to test the same segment "..L_92_.." times!)")
  1079.                             break
  1080.                         end
  1081.                         L_195_ = L_195_ + 1
  1082.                         if L_154_arg1.RayInfo.CanPierceCallback(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject) == false then
  1083.                             L_197_ = true
  1084.                             break
  1085.                         end
  1086.                     end
  1087.                     L_154_arg1.RayInfo.Parameters.FilterDescendantsInstances = L_196_
  1088.                     L_154_arg1.StateInfo.IsActivelySimulatingPierce = false
  1089.                     if L_197_ then
  1090.                         L_94_func("Broke because the ray hit something solid ("..tostring(L_170_.Instance)..") while testing for a pierce. Terminating the cast.")
  1091.                         L_102_func(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject)
  1092.                         L_154_arg1:Terminate()
  1093.                         L_96_func(CFrame.new(L_170_.Position), false)
  1094.                         return
  1095.                     end
  1096.                 end
  1097.             end
  1098.             if (L_154_arg1.StateInfo.DistanceCovered >= L_154_arg1.RayInfo.MaxDistance) then
  1099.                 L_154_arg1:Terminate()
  1100.                 L_96_func(CFrame.new(L_165_), false)
  1101.             end
  1102.         end
  1103.         function L_85_.new(L_200_arg1, L_201_arg2, L_202_arg3, L_203_arg4, L_204_arg5)
  1104.             if L_84_(L_203_arg4) == "number" then
  1105.                 L_203_arg4 = L_202_arg3.Unit * L_203_arg4
  1106.             end
  1107.             if (L_204_arg5.HighFidelitySegmentSize <= 0) then
  1108.                 error("Cannot set FastCastBehavior.HighFidelitySegmentSize <= 0!", 0)
  1109.             end
  1110.             local L_205_ = {
  1111.                 Caster = L_200_arg1,
  1112.                 StateInfo = {
  1113.                     UpdateConnection = nil,
  1114.                     Paused = false,
  1115.                     TotalRuntime = 0,
  1116.                     DistanceCovered = 0,
  1117.                     HighFidelitySegmentSize = L_204_arg5.HighFidelitySegmentSize,
  1118.                     HighFidelityBehavior = L_204_arg5.HighFidelityBehavior,
  1119.                     IsActivelySimulatingPierce = false,
  1120.                     IsActivelyResimulating = false,
  1121.                     CancelHighResCast = false,
  1122.                     Trajectories = {
  1123.                         {
  1124.                             StartTime = 0,
  1125.                             EndTime = -1,
  1126.                             Origin = L_201_arg2,
  1127.                             InitialVelocity = L_203_arg4,
  1128.                             Acceleration = L_204_arg5.Acceleration
  1129.                         }
  1130.                     }
  1131.                 },
  1132.                 RayInfo = {
  1133.                     Parameters = L_204_arg5.RaycastParams,
  1134.                     WorldRoot = workspace,
  1135.                     MaxDistance = L_204_arg5.MaxDistance or 1000,
  1136.                     CosmeticBulletObject = L_204_arg5.CosmeticBulletTemplate,
  1137.                     CanPierceCallback = L_204_arg5.CanPierceFunction
  1138.                 },
  1139.                 UserData = {}
  1140.             }
  1141.             if L_205_.StateInfo.HighFidelityBehavior == 2 then
  1142.                 L_205_.StateInfo.HighFidelityBehavior = 3
  1143.             end
  1144.             if L_205_.RayInfo.Parameters ~= nil then
  1145.                 L_205_.RayInfo.Parameters = L_101_func(L_205_.RayInfo.Parameters)
  1146.             else
  1147.                 L_205_.RayInfo.Parameters = RaycastParams.new()
  1148.             end
  1149.             local L_206_ = false
  1150.             if L_204_arg5.CosmeticBulletProvider == nil then
  1151.                 if L_205_.RayInfo.CosmeticBulletObject ~= nil then
  1152.                     L_205_.RayInfo.CosmeticBulletObject = L_205_.RayInfo.CosmeticBulletObject:Clone()
  1153.                     L_205_.RayInfo.CosmeticBulletObject.CFrame = CFrame.new(L_201_arg2, L_201_arg2 + L_202_arg3)
  1154.                     L_205_.RayInfo.CosmeticBulletObject.Parent = L_204_arg5.CosmeticBulletContainer
  1155.                 end
  1156.             else
  1157.                 if L_84_(L_204_arg5.CosmeticBulletProvider) == "PartCache" then
  1158.                     if L_205_.RayInfo.CosmeticBulletObject ~= nil then
  1159.                         warn("Do not define FastCastBehavior.CosmeticBulletTemplate and FastCastBehavior.CosmeticBulletProvider at the same time! The provider will be used, and CosmeticBulletTemplate will be set to nil.")
  1160.                         L_205_.RayInfo.CosmeticBulletObject = nil
  1161.                         L_204_arg5.CosmeticBulletTemplate = nil
  1162.                     end
  1163.                     L_205_.RayInfo.CosmeticBulletObject = L_204_arg5.CosmeticBulletProvider:GetPart()
  1164.                     L_205_.RayInfo.CosmeticBulletObject.CFrame = CFrame.new(L_201_arg2, L_201_arg2 + L_202_arg3)
  1165.                     L_206_ = true
  1166.                 else
  1167.                     warn("FastCastBehavior.CosmeticBulletProvider was not an instance of the PartCache module (an external/separate model)! Are you inputting an instance created via PartCache.new? If so, are you on the latest version of PartCache? Setting FastCastBehavior.CosmeticBulletProvider to nil.")
  1168.                     L_204_arg5.CosmeticBulletProvider = nil
  1169.                 end
  1170.             end
  1171.             local L_207_
  1172.             if L_206_ then
  1173.                 L_207_ = L_204_arg5.CosmeticBulletProvider.CurrentCacheParent
  1174.             else
  1175.                 L_207_ = L_204_arg5.CosmeticBulletContainer
  1176.             end
  1177.             if L_204_arg5.AutoIgnoreContainer == true and L_207_ ~= nil then
  1178.                 local L_209_ = L_205_.RayInfo.Parameters.FilterDescendantsInstances
  1179.                 if L_2_.find(L_209_, L_207_) == nil then
  1180.                     L_2_.insert(L_209_, L_207_)
  1181.                     L_205_.RayInfo.Parameters.FilterDescendantsInstances = L_209_
  1182.                 end
  1183.             end
  1184.             local L_208_
  1185.             if L_86_:IsClient() then
  1186.                 L_208_ = L_86_.RenderStepped
  1187.             else
  1188.                 L_208_ = L_86_.Heartbeat
  1189.             end
  1190.             setmetatable(L_205_, L_85_)
  1191.             L_205_.StateInfo.UpdateConnection = L_208_:Connect(function(L_210_arg1)
  1192.                 if L_205_.StateInfo.Paused then
  1193.                     return
  1194.                 end
  1195.                 L_94_func("Casting for frame.")
  1196.                 local L_211_ = L_205_.StateInfo.Trajectories[#L_205_.StateInfo.Trajectories]
  1197.                 if (L_205_.StateInfo.HighFidelityBehavior == 3 and L_211_.Acceleration ~= Vector3.new() and L_205_.StateInfo.HighFidelitySegmentSize > 0) then
  1198.                     local L_212_ = tick()
  1199.                     if L_205_.StateInfo.IsActivelyResimulating then
  1200.                         L_205_:Terminate()
  1201.                         error("Cascading cast lag encountered! The caster attempted to perform a high fidelity cast before the previous one completed, resulting in exponential cast lag. Consider increasing HighFidelitySegmentSize.")
  1202.                     end
  1203.                     L_205_.StateInfo.IsActivelyResimulating = true
  1204.                     local L_213_ = L_211_.Origin
  1205.                     local L_214_ = L_205_.StateInfo.TotalRuntime - L_211_.StartTime
  1206.                     local L_215_ = L_211_.InitialVelocity
  1207.                     local L_216_ = L_211_.Acceleration
  1208.                     local L_217_ = L_97_func(L_214_, L_213_, L_215_, L_216_)
  1209.                     local L_218_ = L_98_func(L_214_, L_215_, L_216_)
  1210.                     local L_219_ = L_205_.StateInfo.TotalRuntime - L_211_.StartTime
  1211.                     L_205_.StateInfo.TotalRuntime += L_210_arg1
  1212.                     L_214_ = L_205_.StateInfo.TotalRuntime - L_211_.StartTime
  1213.                     local L_220_ = L_97_func(L_214_, L_213_, L_215_, L_216_)
  1214.                     local L_221_ = L_98_func(L_214_, L_215_, L_216_)
  1215.                     local L_222_ = L_220_ - L_217_
  1216.                     local L_223_ = L_222_.Unit * L_221_.Magnitude * L_210_arg1
  1217.                     local L_224_ = L_205_.RayInfo.WorldRoot
  1218.                     local L_225_ = L_224_:Raycast(L_217_, L_223_, L_205_.RayInfo.Parameters)
  1219.                     local L_226_ = L_220_
  1220.                     if (L_225_ ~= nil) then
  1221.                         L_226_ = L_225_.Position
  1222.                     end
  1223.                     local L_227_ = (L_226_ - L_217_).Magnitude
  1224.                     L_205_.StateInfo.TotalRuntime -= L_210_arg1
  1225.                     local L_228_ = L_227_ / L_205_.StateInfo.HighFidelitySegmentSize
  1226.                     local L_229_ = math.floor(L_228_)
  1227.                     if (L_229_ == 0) then
  1228.                         L_229_ = 1
  1229.                     end
  1230.                     local L_230_ = L_210_arg1 / L_229_
  1231.                     for L_231_forvar1 = 1, L_229_ do
  1232.                         if getmetatable(L_205_) == nil then
  1233.                             return
  1234.                         end
  1235.                         if L_205_.StateInfo.CancelHighResCast then
  1236.                             L_205_.StateInfo.CancelHighResCast = false
  1237.                             break
  1238.                         end
  1239.                         L_94_func("["..L_231_forvar1.."] Subcast of time increment "..L_230_)
  1240.                         L_105_func(L_205_, L_230_, true)
  1241.                     end
  1242.                     if getmetatable(L_205_) == nil then
  1243.                         return
  1244.                     end
  1245.                     L_205_.StateInfo.IsActivelyResimulating = false
  1246.                     if (tick() - L_212_) > 0.016 * 5 then
  1247.                         warn("Extreme cast lag encountered! Consider increasing HighFidelitySegmentSize.")
  1248.                     end
  1249.                 else
  1250.                     L_105_func(L_205_, L_210_arg1, false)
  1251.                 end
  1252.             end)
  1253.             return L_205_
  1254.         end
  1255.         function L_85_.SetStaticFastCastReference(L_232_arg1)
  1256.             L_87_ = L_232_arg1
  1257.         end
  1258.         local function L_106_func(L_233_arg1, L_234_arg2, L_235_arg3, L_236_arg4)
  1259.             local L_237_ = L_233_arg1.StateInfo.Trajectories
  1260.             local L_238_ = L_237_[#L_237_]
  1261.             if L_238_.StartTime == L_233_arg1.StateInfo.TotalRuntime then
  1262.                 if (L_234_arg2 == nil) then
  1263.                     L_234_arg2 = L_238_.InitialVelocity
  1264.                 end
  1265.                 if (L_235_arg3 == nil) then
  1266.                     L_235_arg3 = L_238_.Acceleration
  1267.                 end
  1268.                 if (L_236_arg4 == nil) then
  1269.                     L_236_arg4 = L_238_.Origin
  1270.                 end
  1271.                 L_238_.Origin = L_236_arg4
  1272.                 L_238_.InitialVelocity = L_234_arg2
  1273.                 L_238_.Acceleration = L_235_arg3
  1274.             else
  1275.                 L_238_.EndTime = L_233_arg1.StateInfo.TotalRuntime
  1276.                 local L_239_, L_240_ = unpack(L_100_func(L_233_arg1))
  1277.                 if (L_234_arg2 == nil) then
  1278.                     L_234_arg2 = L_240_
  1279.                 end
  1280.                 if (L_235_arg3 == nil) then
  1281.                     L_235_arg3 = L_238_.Acceleration
  1282.                 end
  1283.                 if (L_236_arg4 == nil) then
  1284.                     L_236_arg4 = L_239_
  1285.                 end
  1286.                 L_2_.insert(L_233_arg1.StateInfo.Trajectories, {
  1287.                     StartTime = L_233_arg1.StateInfo.TotalRuntime,
  1288.                     EndTime = -1,
  1289.                     Origin = L_236_arg4,
  1290.                     InitialVelocity = L_234_arg2,
  1291.                     Acceleration = L_235_arg3
  1292.                 })
  1293.                 L_233_arg1.StateInfo.CancelHighResCast = true
  1294.             end
  1295.         end
  1296.         function L_85_:SetVelocity(L_241_arg1)
  1297.             assert(getmetatable(self) == L_85_, L_88_:format("SetVelocity", "ActiveCast.new(...)"))
  1298.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1299.             L_106_func(self, L_241_arg1, nil, nil)
  1300.         end
  1301.         function L_85_:SetAcceleration(L_242_arg1)
  1302.             assert(getmetatable(self) == L_85_, L_88_:format("SetAcceleration", "ActiveCast.new(...)"))
  1303.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1304.             L_106_func(self, nil, L_242_arg1, nil)
  1305.         end
  1306.         function L_85_:SetPosition(L_243_arg1)
  1307.             assert(getmetatable(self) == L_85_, L_88_:format("SetPosition", "ActiveCast.new(...)"))
  1308.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1309.             L_106_func(self, nil, nil, L_243_arg1)
  1310.         end
  1311.         function L_85_:GetVelocity()
  1312.             assert(getmetatable(self) == L_85_, L_88_:format("GetVelocity", "ActiveCast.new(...)"))
  1313.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1314.             local L_244_ = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
  1315.             return L_98_func(self.StateInfo.TotalRuntime - L_244_.StartTime, L_244_.InitialVelocity, L_244_.Acceleration)
  1316.         end
  1317.         function L_85_:GetAcceleration()
  1318.             assert(getmetatable(self) == L_85_, L_88_:format("GetAcceleration", "ActiveCast.new(...)"))
  1319.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1320.             local L_245_ = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
  1321.             return L_245_.Acceleration
  1322.         end
  1323.         function L_85_:GetPosition()
  1324.             assert(getmetatable(self) == L_85_, L_88_:format("GetPosition", "ActiveCast.new(...)"))
  1325.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1326.             local L_246_ = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
  1327.             return L_97_func(self.StateInfo.TotalRuntime - L_246_.StartTime, L_246_.Origin, L_246_.InitialVelocity, L_246_.Acceleration)
  1328.         end
  1329.         function L_85_:AddVelocity(L_247_arg1)
  1330.             assert(getmetatable(self) == L_85_, L_88_:format("AddVelocity", "ActiveCast.new(...)"))
  1331.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1332.             self:SetVelocity(self:GetVelocity() + L_247_arg1)
  1333.         end
  1334.         function L_85_:AddAcceleration(L_248_arg1)
  1335.             assert(getmetatable(self) == L_85_, L_88_:format("AddAcceleration", "ActiveCast.new(...)"))
  1336.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1337.             self:SetAcceleration(self:GetAcceleration() + L_248_arg1)
  1338.         end
  1339.         function L_85_:AddPosition(L_249_arg1)
  1340.             assert(getmetatable(self) == L_85_, L_88_:format("AddPosition", "ActiveCast.new(...)"))
  1341.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1342.             self:SetPosition(self:GetPosition() + L_249_arg1)
  1343.         end
  1344.         function L_85_:Pause()
  1345.             assert(getmetatable(self) == L_85_, L_88_:format("Pause", "ActiveCast.new(...)"))
  1346.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1347.             self.StateInfo.Paused = true
  1348.         end
  1349.         function L_85_:Resume()
  1350.             assert(getmetatable(self) == L_85_, L_88_:format("Resume", "ActiveCast.new(...)"))
  1351.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1352.             self.StateInfo.Paused = false
  1353.         end
  1354.         function L_85_:Terminate()
  1355.             assert(getmetatable(self) == L_85_, L_88_:format("Terminate", "ActiveCast.new(...)"))
  1356.             assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
  1357.             local L_250_ = self.StateInfo.Trajectories
  1358.             local L_251_ = L_250_[#L_250_]
  1359.             L_251_.EndTime = self.StateInfo.TotalRuntime
  1360.             self.StateInfo.UpdateConnection:Disconnect()
  1361.             self.Caster.CastTerminating:FireSync(self)
  1362.             self.StateInfo.UpdateConnection = nil
  1363.             self.Caster = nil
  1364.             self.StateInfo = nil
  1365.             self.RayInfo = nil
  1366.             self.UserData = nil
  1367.             setmetatable(self, nil)
  1368.         end
  1369.         return L_85_
  1370.     end)()
  1371.     local L_5_ = "Cannot statically invoke method '%s' - It is an instance method. Call it on an instance of this class created via %s"
  1372.     local L_6_ = "Invalid type for parameter '%s' (Expected %s, got %s)"
  1373.     local L_7_ = "FastCastVisualizationObjects"
  1374.     local L_8_ = "This Caster has been disposed. It can no longer be used."
  1375.     L_4_.SetStaticFastCastReference(L_1_)
  1376.     function L_1_.new()
  1377.         return setmetatable({
  1378.             LengthChanged = L_3_.new("LengthChanged"),
  1379.             RayHit = L_3_.new("RayHit"),
  1380.             RayPierced = L_3_.new("RayPierced"),
  1381.             CastTerminating = L_3_.new("CastTerminating"),
  1382.             WorldRoot = workspace
  1383.         }, L_1_)
  1384.     end
  1385.     function L_1_.newBehavior()
  1386.         return {
  1387.             RaycastParams = nil,
  1388.             Acceleration = Vector3.new(),
  1389.             MaxDistance = 1000,
  1390.             CanPierceFunction = nil,
  1391.             HighFidelityBehavior = L_1_.HighFidelityBehavior.Default,
  1392.             HighFidelitySegmentSize = 0.5,
  1393.             CosmeticBulletTemplate = nil,
  1394.             CosmeticBulletProvider = nil,
  1395.             CosmeticBulletContainer = nil,
  1396.             AutoIgnoreContainer = true
  1397.         }
  1398.     end
  1399.     local L_9_ = L_1_.newBehavior()
  1400.     function L_1_:Fire(L_252_arg1, L_253_arg2, L_254_arg3, L_255_arg4)
  1401.         if L_255_arg4 == nil then
  1402.             L_255_arg4 = L_9_
  1403.         end
  1404.         local L_256_ = L_4_.new(self, L_252_arg1, L_253_arg2, L_254_arg3, L_255_arg4)
  1405.         L_256_.RayInfo.WorldRoot = self.WorldRoot
  1406.         return L_256_
  1407.     end
  1408.     return L_1_
  1409. end)()
  1410.  
  1411. local puddle = game:GetService("InsertService"):CreateMeshPartAsync("rbxassetid://13311434522", Enum.CollisionFidelity.Box, Enum.RenderFidelity.Automatic)
  1412. puddle.CanCollide = false
  1413. puddle.Anchored = false
  1414. puddle.Color = Color3.fromRGB(117, 0, 0)
  1415. puddle.Material = Enum.Material.SmoothPlastic
  1416. puddle.Size = Vector3.zero
  1417. puddle.Massless = true
  1418. puddle.Name = "BloodPuddle"
  1419. local wel = Instance.new("WeldConstraint", puddle)
  1420. wel.Name = "WeldConstraint"
  1421. wel.Part0 = puddle
  1422.  
  1423. local bloodfly = Instance.new("Part")
  1424. bloodfly.Name = "BloodFly"
  1425. bloodfly.Transparency = 1
  1426. bloodfly.Size = Vector3.one/2
  1427. bloodfly.CanCollide = false
  1428. bloodfly.Anchored = true
  1429. local at = Instance.new("Attachment", bloodfly)
  1430. at.CFrame = CFrame.new(0.1, 0, 0)
  1431. local at2 = Instance.new("Attachment", bloodfly)
  1432. at2.CFrame = CFrame.new(-0.1, 0, 0)
  1433. local trail = Instance.new("Trail", bloodfly)
  1434. trail.Color = ColorSequence.new(Color3.fromRGB(85, 0, 0))
  1435. trail.LightInfluence = 1
  1436. trail.LightEmission = 0
  1437. trail.Transparency = NumberSequence.new(0)
  1438. trail.TextureLength = 1
  1439. trail.FaceCamera = true
  1440. trail.Attachment0 = at
  1441. trail.Attachment1 = at2
  1442. trail.Lifetime = 0.15
  1443. trail.MaxLength = 0
  1444. trail.MinLength = .1
  1445. trail.WidthScale = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(.1, 1), NumberSequenceKeypoint.new(1, 0)})
  1446.  
  1447. local random_state_upvr = Random.new()
  1448. local any_newBehavior_result1_upvr = FastCastRedux.newBehavior()
  1449. any_newBehavior_result1_upvr.MaxDistance = 150
  1450. any_newBehavior_result1_upvr.Acceleration = Vector3.new(0, -workspace.Gravity, 0)
  1451. any_newBehavior_result1_upvr.CosmeticBulletTemplate = bloodfly
  1452. if(script:FindFirstChild("Effects"))then
  1453.     any_newBehavior_result1_upvr.CosmeticBulletContainer = script.Effects
  1454. end
  1455. task.spawn(function()
  1456.     while task.wait() do
  1457.         if(script:FindFirstChild("Effects"))then
  1458.             any_newBehavior_result1_upvr.CosmeticBulletContainer = script.Effects
  1459.         end
  1460.     end
  1461. end)
  1462. any_newBehavior_result1_upvr.AutoIgnoreContainer = true
  1463.  
  1464. local living = {script}
  1465. for i, v in next, workspace:GetChildren() do
  1466.     if(v:FindFirstChildOfClass("Humanoid") and v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Head"))then
  1467.         table.insert(living, v)
  1468.     end
  1469. end
  1470.  
  1471. local RaycastParams_new_result1_upvr = RaycastParams.new()
  1472. RaycastParams_new_result1_upvr.FilterDescendantsInstances = living
  1473.  
  1474. workspace.ChildAdded:Connect(function(v)
  1475.     task.defer(function()
  1476.         if(v:FindFirstChildOfClass("Humanoid") and v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Head"))then
  1477.             table.insert(living, v)
  1478.  
  1479.             RaycastParams_new_result1_upvr = RaycastParams.new()
  1480.             RaycastParams_new_result1_upvr.FilterDescendantsInstances = living
  1481.             any_newBehavior_result1_upvr.RaycastParams = RaycastParams_new_result1_upvr
  1482.         end
  1483.     end)
  1484. end)
  1485.  
  1486. any_newBehavior_result1_upvr.RaycastParams = RaycastParams_new_result1_upvr
  1487. local cframe_upvr_2 = CFrame.Angles((-math.pi/2), 0, 0)
  1488. local TweenService_upvr = game:GetService("TweenService")
  1489. local TweenInfo_new_result1_upvr = TweenInfo.new(0.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out)
  1490. local any_new_result1_upvr = FastCastRedux.new()
  1491.  
  1492.  
  1493.  
  1494. any_new_result1_upvr.RayHit:Connect(function(arg1, arg2, arg3, arg4)
  1495.     local Instance_upvw = arg2.Instance
  1496.     local any_NextInteger_result1 = random_state_upvr:NextInteger(0.5, 2)
  1497.     local cframe_upvr = CFrame.Angles(0, math.random(0, math.pi), 0)
  1498.     local clone_upvr = puddle:Clone()
  1499.     clone_upvr.CFrame = CFrame.lookAlong(arg2.Position + arg2.Normal * 0.1, arg2.Normal) * cframe_upvr_2 * cframe_upvr
  1500.     clone_upvr.WeldConstraint.Part1 = Instance_upvw
  1501.     clone_upvr.Parent = script.Effects
  1502.     TweenService_upvr:Create(clone_upvr, TweenInfo_new_result1_upvr, {
  1503.         Size = Vector3.new(any_NextInteger_result1, 0, any_NextInteger_result1);
  1504.     }):Play()
  1505.     task.delay(7.7, function()
  1506.         TweenService_upvr:Create(clone_upvr, TweenInfo_new_result1_upvr, {
  1507.             Size = Vector3.zero;
  1508.         }):Play()
  1509.     end)
  1510.     AddItem(clone_upvr, 8)
  1511.     task.spawn(function()
  1512.         local CFrame = clone_upvr.CFrame
  1513.         repeat
  1514.             if 200 < (CFrame.Position - clone_upvr.Position).Magnitude then
  1515.                 local workspace_Raycast_result1 = workspace:Raycast(CFrame.Position, -CFrame.UpVector, RaycastParams_new_result1_upvr)
  1516.                 if not workspace_Raycast_result1 then
  1517.                     clone_upvr:Destroy()
  1518.                     return
  1519.                 end
  1520.                 if workspace_Raycast_result1.Instance ~= Instance_upvw then
  1521.                     Instance_upvw = workspace_Raycast_result1.Instance
  1522.                     clone_upvr.WeldConstraint.Part1 = nil
  1523.                     clone_upvr.CFrame = CFrame.lookAlong(workspace_Raycast_result1.Position + workspace_Raycast_result1.Normal * 0.1, workspace_Raycast_result1.Normal) * cframe_upvr_2 * cframe_upvr
  1524.                     clone_upvr.WeldConstraint.Part1 = Instance_upvw
  1525.                 end
  1526.             end
  1527.             task.wait(0.02)
  1528.         until not clone_upvr.Parent
  1529.     end)
  1530. end)
  1531.  
  1532. any_new_result1_upvr.LengthChanged:Connect(function(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 61, Named "onRayUpdated"
  1533.     if not arg6 then
  1534.     else
  1535.         arg6.Position = arg2 + arg3 * arg4
  1536.     end
  1537. end)
  1538.  
  1539. any_new_result1_upvr.CastTerminating:Connect(function(arg1)
  1540.     local CosmeticBulletObject = arg1.RayInfo.CosmeticBulletObject
  1541.     if CosmeticBulletObject then
  1542.         CosmeticBulletObject.Trail.Enabled = false
  1543.         AddItem(CosmeticBulletObject, 0.15)
  1544.     end
  1545. end)
  1546.  
  1547. function bloodyzee.Blood(arg1, arg2, arg3, arg4, arg5)
  1548.     any_new_result1_upvr:Fire(arg2.Position, (arg2 * CFrame.Angles(math.rad(random_state_upvr:NextInteger(-arg4, arg4)), math.rad(random_state_upvr:NextInteger(-arg5, arg5)), 0)).LookVector, arg3, any_newBehavior_result1_upvr)
  1549. end
  1550.  
  1551. local Ragdoll = {}
  1552.  
  1553. function I(instance,properties)
  1554.     local inst = Instance.new(instance)
  1555.     for _, val in next, properties or {} do
  1556.         pcall(function()
  1557.             inst[val[1]] = val[2]
  1558.         end)
  1559.     end
  1560.     return inst
  1561. end
  1562.  
  1563. function Ragdoll:Ragdoll(chr, duration)
  1564.     if(chr:FindFirstChild("RagdollTime"))then
  1565.         chr:FindFirstChild("RagdollTime").Value = tick()+duration
  1566.         return
  1567.     end
  1568.  
  1569.     playSound(stuff.Sounds.Impact.Players.Ragdoll_Impact, chr:FindFirstChild("HumanoidRootPart"))
  1570.     local scale = chr:GetScale()
  1571.  
  1572.     local unstunnedLol = false
  1573.     local function Stun(whom)
  1574.         task.spawn(function()
  1575.             if(whom:FindFirstChild("Health"))then whom:FindFirstChild("Health").Disabled = true end
  1576.             whom:FindFirstChildOfClass'Humanoid':ChangeState(Enum.HumanoidStateType.Physics)
  1577.             whom:FindFirstChildOfClass'Humanoid'.EvaluateStateMachine = false
  1578.             chr.HumanoidRootPart:ApplyImpulse(chr.HumanoidRootPart.CFrame.LookVector * -50)
  1579.             while game:GetService('RunService').PostSimulation:wait() do
  1580.                 if(unstunnedLol)then break end
  1581.                 local asdq = game:service'Players':GetPlayerFromCharacter(whom)
  1582.                 local h = whom:FindFirstChildOfClass"Humanoid"
  1583.                 if(h and h.Health > 0)then
  1584.                     for _,c in next, whom:children() do
  1585.                         if c:IsA'Tool' then
  1586.                             c.ManualActivationOnly = true
  1587.                             game:GetService('RunService').Heartbeat:wait()
  1588.                             if(asdq)then
  1589.                                 c.Parent = asdq:FindFirstChildOfClass'Backpack'
  1590.                                 c.ManualActivationOnly=false
  1591.                             else
  1592.                                 c:Remove()
  1593.                             end
  1594.                         end
  1595.                     end
  1596.                     h.Jump = false
  1597.                     h.BreakJointsOnDeath = false
  1598.                     h.AutoRotate = false
  1599.                     h:ChangeState(Enum.HumanoidStateType.Physics)
  1600.                 end
  1601.                 if(h.Health < 1)then h:ChangeState(Enum.HumanoidStateType.Dead) end
  1602.             end
  1603.             local h = whom:FindFirstChildOfClass"Humanoid"
  1604.             h.AutoRotate = true
  1605.             h.BreakJointsOnDeath = true
  1606.             h.EvaluateStateMachine = true
  1607.             h.Jump = true
  1608.             if(h.Health < 1)then h:ChangeState(Enum.HumanoidStateType.Dead) end
  1609.             task.wait()
  1610.             if(h.Health < 1)then h:ChangeState(Enum.HumanoidStateType.Dead) end
  1611.             h:ChangeState(Enum.HumanoidStateType.GettingUp)
  1612.             if(whom:FindFirstChild("Health"))then whom:FindFirstChild("Health").Disabled = false end
  1613.         end)
  1614.     end
  1615.  
  1616.     local function ragdollJoint(Character, part0, part1, attachmentName, className, properties) -- thanks mustardfat im too lazy
  1617.         if Character:FindFirstChild("RagdollConstraint"..part1.Name) == nil then
  1618.             if Character:FindFirstChild('HumanoidRootPart')then
  1619.                 Character.HumanoidRootPart.CanCollide = false
  1620.             end
  1621.             for i,v in pairs(Character:GetChildren()) do
  1622.                 if v:IsA("MeshPart") and (v.MeshId == 'http://www.roblox.com/asset/?id=553602991' or v.MeshId == 'http://www.roblox.com/asset/?id=553602977' or v.MeshId == 'http://www.roblox.com/asset/?id=553602987') then
  1623.                     v.Size = Vector3.new(1,1,1)
  1624.                 end
  1625.             end
  1626.             for _,v in next, Character:GetDescendants() do
  1627.                 if v:IsA("Attachment") then
  1628.                     v.Axis = Vector3.new(0, 1, 0)
  1629.                     v.SecondaryAxis = Vector3.new(0, 0, 1)
  1630.                     v.Rotation = Vector3.new(0, 0, 0)
  1631.                 end
  1632.             end
  1633.             if part1:FindFirstChildOfClass('Motor6D') then
  1634.                 part1:FindFirstChildOfClass('Motor6D').Enabled = false
  1635.             end
  1636.             if attachmentName ~= "NeckAttachment" then
  1637.                 attachmentName = attachmentName.."RigAttachment"
  1638.             end
  1639.             local constraint = Instance.new(className.."Constraint")
  1640.             constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  1641.             constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  1642.             constraint.Name = "RagdollConstraint"..part1.Name
  1643.             if Character:FindFirstChildOfClass('Humanoid').Health > 0 then
  1644.                 local collidepart = Instance.new('Part',part1)
  1645.                 collidepart.Size = part1.Size/2
  1646.                 if string.find(string.lower(part1.Name),"upper") then
  1647.                     if string.find(string.lower(part1.Name),"leg") then
  1648.                         collidepart.Size = part1.Size/3
  1649.                     else
  1650.                         collidepart.Size = part1.Size/2.5
  1651.                     end
  1652.                 end
  1653.                 collidepart.CanCollide = true
  1654.                 collidepart.Name = "RagdollJoint"
  1655.                 collidepart.Anchored = false
  1656.                 collidepart.Transparency = 1
  1657.                 collidepart.CFrame = part1.CFrame
  1658.                 collidepart.Touched:Connect(function(p)
  1659.                     if(not p:IsDescendantOf(Character) and collidepart.AssemblyLinearVelocity.Magnitude > 10 and not Character:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
  1660.                         if(collidepart.AssemblyLinearVelocity.Y > -10)then
  1661.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
  1662.                             local s = playSound(ch[#ch], Character:FindFirstChild("HumanoidRootPart"))
  1663.                             s.Name = "RagdollSound"
  1664.                         else
  1665.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
  1666.                             local s = playSound(ch[#ch], Character:FindFirstChild("HumanoidRootPart"))
  1667.                             s.Name = "RagdollSound"
  1668.                         end
  1669.                     end
  1670.                 end)
  1671.                 local attachment0 = Instance.new('Attachment',part1)
  1672.                 local attachment1 = Instance.new('Attachment',collidepart)
  1673.                 if attachment0 and attachment1 then
  1674.                     local constraint = Instance.new("HingeConstraint")
  1675.                     constraint.Attachment0 = attachment0
  1676.                     constraint.Attachment1 = attachment1
  1677.                     constraint.LimitsEnabled = true
  1678.                     constraint.UpperAngle = 0
  1679.                     constraint.LowerAngle = 0
  1680.                     constraint.Parent = Character
  1681.                 end
  1682.                 if string.find(string.lower(part1.Name),"upper") then
  1683.                     if string.find(string.lower(part1.Name),"leg") then
  1684.                         attachment0.Position = Vector3.new(0,0.01,0)
  1685.                     else
  1686.                         attachment0.Position = Vector3.new(0,0.25,0)
  1687.                     end
  1688.                 else
  1689.                     attachment0.Position = Vector3.new(0,-0.1,0)
  1690.                 end
  1691.             end
  1692.             for _,propertyData in next,properties or {} do
  1693.                 constraint[propertyData[1]] = propertyData[2]
  1694.             end
  1695.             constraint.Parent = Character
  1696.             return constraint
  1697.         end
  1698.     end
  1699.  
  1700.     local function R6RagdollLimb(whom,limb)
  1701.         local Torso = whom:FindFirstChild'Torso'
  1702.         if(Torso)then
  1703.             local RLeg = whom:FindFirstChild'Right Leg'
  1704.             local LLeg = whom:FindFirstChild'Left Leg'
  1705.             local RArm = whom:FindFirstChild'Right Arm'
  1706.             local LArm = whom:FindFirstChild'Left Arm'
  1707.             local Head = whom:FindFirstChild'Head'
  1708.             if(RLeg and limb == "Right Leg" and not RLeg:FindFirstChild"RagdollJoint")then
  1709.                 for _,v in next, whom:GetDescendants() do
  1710.                     if(v:IsA'JointInstance' and (v.Part0 == RLeg or v.Part1 == RLeg))then
  1711.                         v.Enabled = false
  1712.                     end
  1713.                 end
  1714.                 local torsoJoint = I('Attachment',{
  1715.                     {"Name","RagdollJoint"},
  1716.                     {"Position",Vector3.new(0.5,-1,0)*scale},
  1717.                     {"Axis",Vector3.new(1,0,0)*scale},
  1718.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1719.                     {"Parent",Torso},
  1720.                     {"Visible",false}
  1721.                 })
  1722.                 local limbJoint = I('Attachment',{
  1723.                     {"Name","RagdollJoint"},
  1724.                     {"Position",Vector3.new(0,1,0)*scale},
  1725.                     {"Axis",Vector3.new(1,0,0)*scale},
  1726.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1727.                     {"Parent",RLeg},
  1728.                     {"Visible",false}
  1729.                 })
  1730.                 I('BallSocketConstraint',{
  1731.                     {'Parent',Torso},
  1732.                     {'Attachment0',torsoJoint},
  1733.                     {'Attachment1',limbJoint},
  1734.                     {'LimitsEnabled',true}
  1735.                 })
  1736.                 local RagdollJoint = I('Part',{
  1737.                     {"Size",RLeg.Size/1.5},
  1738.                     {"Anchored",false},
  1739.                     {"Transparency",1},
  1740.                     {'Parent',whom},
  1741.                     {'Name','RagdollJoint'}
  1742.                 })
  1743.                 RagdollJoint.Touched:Connect(function(p)
  1744.                     if(not p:IsDescendantOf(whom) and RagdollJoint.AssemblyLinearVelocity.Magnitude > 10 and not whom:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
  1745.                         if(RagdollJoint.AssemblyLinearVelocity.Y > -10)then
  1746.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
  1747.                             local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
  1748.                             s.Name = "RagdollSound"
  1749.                         else
  1750.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
  1751.                             local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
  1752.                             s.Name = "RagdollSound"
  1753.                         end
  1754.                     end
  1755.                 end)
  1756.                 I("Weld",{
  1757.                     {'Part0',RLeg},
  1758.                     {'Part1',RagdollJoint},
  1759.                     {'Parent',RLeg}
  1760.                 })
  1761.                 Stun(whom)
  1762.             end
  1763.             if(LLeg and limb == "Left Leg" and not LLeg:FindFirstChild"RagdollJoint")then
  1764.                 for _,v in next, whom:GetDescendants() do
  1765.                     if(v:IsA'JointInstance' and (v.Part0 == LLeg or v.Part1 == LLeg))then
  1766.                         v.Enabled = false
  1767.                     end
  1768.                 end
  1769.                 local torsoJoint = I('Attachment',{
  1770.                     {"Name","RagdollJoint"},
  1771.                     {"Position",Vector3.new(-0.5,-1,0)*scale},
  1772.                     {"Axis",Vector3.new(1,0,0)*scale},
  1773.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1774.                     {"Parent",Torso},
  1775.                     {"Visible",false}
  1776.                 })
  1777.                 local limbJoint = I('Attachment',{
  1778.                     {"Name","RagdollJoint"},
  1779.                     {"Position",Vector3.new(0,1,0)*scale},
  1780.                     {"Axis",Vector3.new(1,0,0)*scale},
  1781.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1782.                     {"Parent",LLeg},
  1783.                     {"Visible",false}
  1784.                 })
  1785.                 I('BallSocketConstraint',{
  1786.                     {'Parent',Torso},
  1787.                     {'Attachment0',torsoJoint},
  1788.                     {'Attachment1',limbJoint},
  1789.                     {'LimitsEnabled',true}
  1790.                 })
  1791.                 local RagdollJoint = I('Part',{
  1792.                     {"Size",LLeg.Size/1.5},
  1793.                     {"Anchored",false},
  1794.                     {"Transparency",1},
  1795.                     {'Parent',whom},
  1796.                     {'Name','RagdollJoint'}    
  1797.                 })
  1798.                 RagdollJoint.Touched:Connect(function(p)
  1799.                     if(not p:IsDescendantOf(whom) and RagdollJoint.AssemblyLinearVelocity.Magnitude > 10 and not whom:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
  1800.                         if(RagdollJoint.AssemblyLinearVelocity.Y > -10)then
  1801.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
  1802.                             local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
  1803.                             s.Name = "RagdollSound"
  1804.                         else
  1805.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
  1806.                             local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
  1807.                             s.Name = "RagdollSound"
  1808.                         end
  1809.                     end
  1810.                 end)
  1811.                 I("Weld",{
  1812.                     {'Part0',LLeg},
  1813.                     {'Part1',RagdollJoint},
  1814.                     {'Parent',LLeg}
  1815.                 })
  1816.                 Stun(whom)
  1817.             end
  1818.             if(LArm and limb == "Left Arm" and not LArm:FindFirstChild"RagdollJoint")then
  1819.                 for _,v in next, whom:GetDescendants() do
  1820.                     if(v:IsA'JointInstance' and (v.Part0 == LArm or v.Part1 == LArm))then
  1821.                         v.Enabled = false
  1822.                     end
  1823.                 end
  1824.                 local torsoJoint = I('Attachment',{
  1825.                     {"Name","RagdollJoint"},
  1826.                     {"Position",Vector3.new(-1.5,0.5,0)*scale},
  1827.                     {"Axis",Vector3.new(1,0,0)*scale},
  1828.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1829.                     {"Parent",Torso},
  1830.                     {"Visible",false}
  1831.                 })
  1832.                 local limbJoint = I('Attachment',{
  1833.                     {"Name","RagdollJoint"},
  1834.                     {"Position",Vector3.new(0,0.5,0)*scale},
  1835.                     {"Axis",Vector3.new(1,0,0)*scale},
  1836.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1837.                     {"Parent",LArm},
  1838.                     {"Visible",false}
  1839.                 })
  1840.                 I('BallSocketConstraint',{
  1841.                     {'Parent',Torso},
  1842.                     {'Attachment0',torsoJoint},
  1843.                     {'Attachment1',limbJoint},
  1844.                     {'LimitsEnabled',true}
  1845.                 })
  1846.                 local RagdollJoint = I('Part',{
  1847.                     {"Size",LArm.Size/1.5},
  1848.                     {"Anchored",false},
  1849.                     {"Transparency",1},
  1850.                     {'Parent',whom},
  1851.                     {'Name','RagdollJoint'}    
  1852.                 })
  1853.                 RagdollJoint.Touched:Connect(function(p)
  1854.                     if(not p:IsDescendantOf(whom) and RagdollJoint.AssemblyLinearVelocity.Magnitude > 10 and not whom:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
  1855.                         if(RagdollJoint.AssemblyLinearVelocity.Y > -10)then
  1856.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
  1857.                             local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
  1858.                             s.Name = "RagdollSound"
  1859.                         else
  1860.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
  1861.                             local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
  1862.                             s.Name = "RagdollSound"
  1863.                         end
  1864.                     end
  1865.                 end)
  1866.                 I("Weld",{
  1867.                     {'Part0',LArm},
  1868.                     {'Part1',RagdollJoint},
  1869.                     {'Parent',LArm}
  1870.                 })
  1871.             end
  1872.             if(RArm and limb == "Right Arm" and not RArm:FindFirstChild"RagdollJoint")then
  1873.                 for _,v in next, whom:GetDescendants() do
  1874.                     if(v:IsA'JointInstance' and (v.Part0 == RArm or v.Part1 == RArm))then
  1875.                         v.Enabled = false
  1876.                     end
  1877.                 end
  1878.                 local torsoJoint = I('Attachment',{
  1879.                     {"Name","RagdollJoint"},
  1880.                     {"Position",Vector3.new(1.5,0.5,0)*scale},
  1881.                     {"Axis",Vector3.new(1,0,0)*scale},
  1882.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1883.                     {"Parent",Torso},
  1884.                     {"Visible",false}
  1885.                 })
  1886.                 local limbJoint = I('Attachment',{
  1887.                     {"Name","RagdollJoint"},
  1888.                     {"Position",Vector3.new(0,0.5,0)*scale},
  1889.                     {"Axis",Vector3.new(1,0,0)*scale},
  1890.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1891.                     {"Parent",RArm},
  1892.                     {"Visible",false}
  1893.                 })
  1894.                 I('BallSocketConstraint',{
  1895.                     {'Parent',Torso},
  1896.                     {'Attachment0',torsoJoint},
  1897.                     {'Attachment1',limbJoint},
  1898.                     {'LimitsEnabled',true}
  1899.                 })
  1900.                 local RagdollJoint = I('Part',{
  1901.                     {"Size",RArm.Size/1.5},
  1902.                     {"Anchored",false},
  1903.                     {"Transparency",1},
  1904.                     {'Parent',whom},
  1905.                     {'Name','RagdollJoint'}
  1906.                 })
  1907.                 RagdollJoint.Touched:Connect(function(p)
  1908.                     if(not p:IsDescendantOf(whom) and RagdollJoint.AssemblyLinearVelocity.Magnitude > 10 and not whom:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
  1909.                         if(RagdollJoint.AssemblyLinearVelocity.Y > -10)then
  1910.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
  1911.                             local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
  1912.                             s.Name = "RagdollSound"
  1913.                         else
  1914.                             local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
  1915.                             local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
  1916.                             s.Name = "RagdollSound"
  1917.                         end
  1918.                     end
  1919.                 end)
  1920.                 I("Weld",{
  1921.                     {'Part0',RArm},
  1922.                     {'Part1',RagdollJoint},
  1923.                     {'Parent',RArm}
  1924.                 })
  1925.             end
  1926.             if(Head and limb == "Head" and not Head:FindFirstChild"RagdollJoint")then
  1927.                 for _,v in next, whom:GetDescendants() do
  1928.                     if(v.Name == 'RagdollJoint' or v:IsA'Attachment' or v:IsA'Constraint')then
  1929.                         v:Remove()
  1930.                     end
  1931.                 end
  1932.                 local torsoJoint = I('Attachment',{
  1933.                     {"Name","RagdollJoint"},
  1934.                     {"Position",Vector3.new(0,1,0)*scale},
  1935.                     {"Axis",Vector3.new(1,0,0)*scale},
  1936.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1937.                     {"Parent",Torso},
  1938.                     {"Visible",false}
  1939.                 })
  1940.                 local limbJoint = I('Attachment',{
  1941.                     {"Name","RagdollJoint"},
  1942.                     {"Position",Vector3.new(0,-0.5,0)*scale},
  1943.                     {"Axis",Vector3.new(1,0,0)*scale},
  1944.                     {"SecondaryAxis",Vector3.new(0,1,0)*scale},
  1945.                     {"Orientation",Vector3.new(0,0,0)},
  1946.                     {"Parent",Head},
  1947.                     {"Visible",false}
  1948.                 })
  1949.                 I('HingeConstraint',{
  1950.                     {'Parent',Torso},
  1951.                     {'Attachment0',torsoJoint},
  1952.                     {'Attachment1',limbJoint},
  1953.                     {'LimitsEnabled',true},
  1954.                     {"UpperAngle",50},
  1955.                     {"LowerAngle",-50},
  1956.                 })
  1957.                 R6RagdollLimb(whom,"Right Leg")
  1958.                 R6RagdollLimb(whom,"Left Leg")
  1959.                 R6RagdollLimb(whom,"Right Arm")
  1960.                 R6RagdollLimb(whom,"Left Arm")
  1961.             end
  1962.         end
  1963.     end
  1964.  
  1965.  
  1966.     local function R15Ragdoll(Character,head)
  1967.         if Character:FindFirstChild('UpperTorso') and Character:FindFirstChild('LowerTorso') then
  1968.             ragdollJoint(Character,Character.LowerTorso, Character.UpperTorso, "Waist", "BallSocket", {
  1969.                 {"LimitsEnabled",true};
  1970.                 {"UpperAngle",5};
  1971.                 {"Radius",5};
  1972.             })
  1973.         end
  1974.  
  1975.         local handProperties = {
  1976.             {"LimitsEnabled", true};
  1977.             {"UpperAngle",0};
  1978.             {"LowerAngle",0};
  1979.         }
  1980.         if Character:FindFirstChild('LeftLowerArm') and Character:FindFirstChild('LeftHand') then
  1981.             ragdollJoint(Character,Character.LeftLowerArm, Character.LeftHand, "LeftWrist", "Hinge", handProperties)
  1982.         end
  1983.         if Character:FindFirstChild('RightLowerArm') and Character:FindFirstChild('RightHand') then
  1984.             ragdollJoint(Character,Character.RightLowerArm, Character.RightHand, "RightWrist", "Hinge", handProperties)
  1985.         end
  1986.  
  1987.         local shinProperties = {
  1988.             {"LimitsEnabled", true};
  1989.             {"UpperAngle", 0};
  1990.             {"LowerAngle", -75};
  1991.         }
  1992.         if Character:FindFirstChild('LeftUpperLeg') and Character:FindFirstChild('LeftLowerLeg') then
  1993.             ragdollJoint(Character,Character.LeftUpperLeg, Character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  1994.         end
  1995.         if Character:FindFirstChild('RightUpperLeg') and Character:FindFirstChild('RightLowerLeg') then
  1996.             ragdollJoint(Character,Character.RightUpperLeg, Character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  1997.         end
  1998.  
  1999.         local footProperties = {
  2000.             {"LimitsEnabled", true};
  2001.             {"UpperAngle", 15};
  2002.             {"LowerAngle", -45};
  2003.         }
  2004.         if Character:FindFirstChild('LeftLowerLeg') and Character:FindFirstChild('LeftFoot') then
  2005.             ragdollJoint(Character,Character.LeftLowerLeg, Character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  2006.         end
  2007.         if Character:FindFirstChild('RightLowerLeg') and Character:FindFirstChild('RightFoot') then
  2008.             ragdollJoint(Character,Character.RightLowerLeg, Character.RightFoot, "RightAnkle", "Hinge", footProperties)
  2009.         end
  2010.         if Character:FindFirstChild('UpperTorso') and Character:FindFirstChild('LeftUpperArm') then
  2011.             ragdollJoint(Character,Character.UpperTorso, Character.LeftUpperArm, "LeftShoulder", "BallSocket")
  2012.         end
  2013.         if Character:FindFirstChild('LeftLowerArm') and Character:FindFirstChild('LeftUpperArm') then
  2014.             ragdollJoint(Character,Character.LeftUpperArm, Character.LeftLowerArm, "LeftElbow", "BallSocket")
  2015.         end
  2016.         if Character:FindFirstChild('UpperTorso') and Character:FindFirstChild('RightUpperArm') then
  2017.             ragdollJoint(Character,Character.UpperTorso, Character.RightUpperArm, "RightShoulder", "BallSocket")
  2018.         end
  2019.         if Character:FindFirstChild('RightUpperArm') and Character:FindFirstChild('RightLowerArm') then
  2020.             ragdollJoint(Character,Character.RightUpperArm, Character.RightLowerArm, "RightElbow", "BallSocket")
  2021.         end
  2022.         if Character:FindFirstChild('LowerTorso') and Character:FindFirstChild('LeftUpperLeg') then
  2023.             ragdollJoint(Character,Character.LowerTorso, Character.LeftUpperLeg, "LeftHip", "BallSocket")
  2024.         end
  2025.         if Character:FindFirstChild('LowerTorso') and Character:FindFirstChild('RightUpperLeg') then
  2026.             ragdollJoint(Character,Character.LowerTorso, Character.RightUpperLeg, "RightHip", "BallSocket")
  2027.         end
  2028.         if Character:FindFirstChild('UpperTorso') and Character:FindFirstChild('Head') then
  2029.             ragdollJoint(Character,Character.UpperTorso, Character.Head, "Neck", "Hinge", {
  2030.                 {"LimitsEnabled",true};
  2031.                 {"UpperAngle",50};
  2032.                 {"LowerAngle",-50};
  2033.             })
  2034.         end
  2035.     end
  2036.  
  2037.     local function RagdollLimb(whom,limb,bheded)
  2038.         task.spawn(function()
  2039.             local hum = whom:FindFirstChildOfClass'Humanoid'
  2040.             if(hum)then
  2041.                 if(hum.RigType == Enum.HumanoidRigType.R6)then
  2042.                     R6RagdollLimb(whom,limb)
  2043.                 else
  2044.                     R15Ragdoll(whom)
  2045.                     local handProperties = {
  2046.                         {"LimitsEnabled", true};
  2047.                         {"UpperAngle",0};
  2048.                         {"LowerAngle",0};
  2049.                     }
  2050.                     local footProperties = {
  2051.                         {"LimitsEnabled", true};
  2052.                         {"UpperAngle", 15};
  2053.                         {"LowerAngle", -45};
  2054.                     }
  2055.                     local shinProperties = {
  2056.                         {"LimitsEnabled", true};
  2057.                         {"UpperAngle", 0};
  2058.                         {"LowerAngle", -75};
  2059.                     }
  2060.                     if limb == "RightHand" or limb == "RightLowerArm" or limb == "RightUpperArm" then
  2061.                         if whom:FindFirstChild('RightLowerArm') and whom:FindFirstChild('RightHand') then
  2062.                             ragdollJoint(whom,whom.RightLowerArm, whom.RightHand, "RightWrist", "Hinge", handProperties)
  2063.                         end
  2064.                         if whom:FindFirstChild('UpperTorso') and whom:FindFirstChild('RightUpperArm') then
  2065.                             ragdollJoint(whom, whom.UpperTorso, whom["RightUpperArm"], "RightShoulder", "BallSocket")
  2066.                         end
  2067.                         if whom:FindFirstChild('RightUpperArm') and whom:FindFirstChild('RightLowerArm') then
  2068.                             ragdollJoint(whom, whom.RightUpperArm, whom.RightLowerArm, "RightElbow", "BallSocket")
  2069.                         end
  2070.                     elseif limb == "LeftHand" or limb == "LeftLowerArm" or limb == "LeftUpperArm" then
  2071.                         if whom:FindFirstChild('LeftLowerArm') and whom:FindFirstChild('LeftHand') then
  2072.                             ragdollJoint(whom,whom.LeftLowerArm, whom.LeftHand, "LeftWrist", "Hinge", handProperties)
  2073.                         end
  2074.                         if whom:FindFirstChild('UpperTorso') and whom:FindFirstChild('LeftUpperArm') then
  2075.                             ragdollJoint(whom, whom.UpperTorso, whom["LeftUpperArm"], "LeftShoulder", "BallSocket")
  2076.                         end
  2077.                         if whom:FindFirstChild('LeftUpperArm') and whom:FindFirstChild('LeftLowerArm') then
  2078.                             ragdollJoint(whom, whom.LeftUpperArm, whom.LeftLowerArm, "LeftElbow", "BallSocket")
  2079.                         end
  2080.                     elseif limb == "RightFoot" or limb == "RightUpperLeg" or limb == "RightLowerLeg" then
  2081.                         Stun(whom)
  2082.                         if whom:FindFirstChild('RightUpperLeg') and whom:FindFirstChild('RightLowerLeg') then
  2083.                             ragdollJoint(whom,whom.RightUpperLeg, whom.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  2084.                         end
  2085.                         if whom:FindFirstChild('RightLowerLeg') and whom:FindFirstChild('RightFoot') then
  2086.                             ragdollJoint(whom,whom.RightLowerLeg, whom.RightFoot, "RightAnkle", "Hinge", footProperties)
  2087.                         end
  2088.                         if whom:FindFirstChild('LowerTorso') and whom:FindFirstChild('RightUpperLeg') then
  2089.                             ragdollJoint(whom,whom.LowerTorso, whom.RightUpperLeg, "RightHip", "BallSocket")
  2090.                         end
  2091.                     elseif limb == "LeftFoot" or limb == "LeftUpperLeg" or limb == "LeftLowerLeg" then
  2092.                         Stun(whom)
  2093.                         if whom:FindFirstChild('LeftUpperLeg') and whom:FindFirstChild('LeftLowerLeg') then
  2094.                             ragdollJoint(whom,whom.LeftUpperLeg, whom.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  2095.                         end
  2096.                         if whom:FindFirstChild('LeftLowerLeg') and whom:FindFirstChild('LeftFoot') then
  2097.                             ragdollJoint(whom,whom.LeftLowerLeg, whom.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  2098.                         end
  2099.                         if whom:FindFirstChild('LowerTorso') and whom:FindFirstChild('LeftUpperLeg') then
  2100.                             ragdollJoint(whom,whom.LowerTorso, whom.LeftUpperLeg, "LeftHip", "BallSocket")
  2101.                         end
  2102.                     elseif limb == "Head" or limb == "UpperTorso" or limb == "LowerTorso" then
  2103.                         if hum and hum.RigType == Enum.HumanoidRigType.R15 then
  2104.                             if whom:FindFirstChild('HumanoidRootPart') then
  2105.                                 whom.HumanoidRootPart:Remove()
  2106.                             end
  2107.                         end
  2108.                     end
  2109.                 end
  2110.             end
  2111.         end)
  2112.     end
  2113.  
  2114.     local function R6Ragdoll(whom)
  2115.         R6RagdollLimb(whom,"Left Leg")
  2116.         R6RagdollLimb(whom,"Right Leg")
  2117.         R6RagdollLimb(whom,"Left Arm")
  2118.         R6RagdollLimb(whom,"Right Arm")
  2119.     end
  2120.  
  2121.     local OJ = {}
  2122.     for _,v in next, chr:GetDescendants() do
  2123.         if(v:IsA'JointInstance')then
  2124.             table.insert(OJ,{v,v.Parent})
  2125.         end
  2126.     end
  2127.     local hum = chr:FindFirstChildOfClass'Humanoid'
  2128.  
  2129.     if(hum.RigType == Enum.HumanoidRigType.R6)then
  2130.         R6Ragdoll(chr)
  2131.     elseif(hum.RigType == Enum.HumanoidRigType.R15)then
  2132.         R15Ragdoll(chr)
  2133.     end
  2134.  
  2135.     local returned = {}
  2136.     function returned:Remove()
  2137.         unstunnedLol = true
  2138.         for i,v in next, chr:GetDescendants() do
  2139.             if(v:IsA("JointInstance"))then
  2140.                 v.Enabled = true
  2141.             elseif(v:IsA("BallSocketContraint"))then
  2142.                 v:Destroy()
  2143.             end
  2144.             if(v.Name == "RagdollJoint")then
  2145.                 v:Destroy()
  2146.             end
  2147.         end
  2148.     end
  2149.  
  2150.     task.spawn(function()
  2151.         local a = Instance.new("NumberValue", chr)
  2152.         a.Name = "RagdollTime"
  2153.         a.Value = tick()+duration
  2154.  
  2155.         while chr.Parent and not unstunnedLol and chr:FindFirstChild("RagdollTime") and tick() < chr:FindFirstChild("RagdollTime").Value do
  2156.             task.wait()
  2157.         end
  2158.  
  2159.         if(not unstunnedLol)then
  2160.             returned:Remove()
  2161.         end
  2162.         a:Destroy()
  2163.     end)
  2164.  
  2165.     return returned
  2166. end
  2167.  
  2168.  
  2169. local clock = os.clock
  2170. local workspace, RunService = game:GetService("Workspace"), game:GetService("RunService")
  2171.  
  2172. local BoltPart = Instance.new("Part") --Template primitive that will make up the entire bolt
  2173. BoltPart.TopSurface, BoltPart.BottomSurface = 0, 0
  2174. BoltPart.Anchored, BoltPart.CanCollide = true, false
  2175. BoltPart.Locked, BoltPart.CastShadow = true, false
  2176. BoltPart.CanTouch, BoltPart.CanQuery = false, false
  2177. BoltPart.Name = "BoltPart"
  2178. BoltPart.Material = Enum.Material.Neon
  2179. BoltPart.Color = Color3.new(1, 1, 1)
  2180. BoltPart.Transparency = 1
  2181.  
  2182.  
  2183. --*
  2184.  
  2185. local function CubicBezier(PercentAlongBolt, p0, p1, p2, p3)
  2186.     return p0 * (1 - PercentAlongBolt) ^ 3
  2187.         + p1 * 3 * PercentAlongBolt * (1 - PercentAlongBolt) ^ 2
  2188.         + p2 * 3 * (1 - PercentAlongBolt) * PercentAlongBolt ^ 2
  2189.         + p3 * PercentAlongBolt ^ 3
  2190. end
  2191.  
  2192. local function DiscretePulse(PercentAlongBolt, TimePassed, s, k, f, min, max) --See https://www.desmos.com/calculator/hg5h4fpfim for demonstration
  2193.     return math.clamp(k / (2 * f) - math.abs((PercentAlongBolt - TimePassed * s + 0.5 * k) / f), min, max)
  2194. end
  2195.  
  2196. local function ExtrudeCenter(PercentAlongBolt)
  2197.     return math.exp(-5000 * (PercentAlongBolt - 0.5) ^ 10)
  2198. end
  2199.  
  2200. local function NoiseBetween(x, y, z, min, max)
  2201.     return min + (max - min) * (math.noise(x, y, z) + 0.5)
  2202. end
  2203.  
  2204. local xInverse = CFrame.lookAt(Vector3.new(), Vector3.new(1, 0, 0)):inverse()
  2205. local offsetAngle = math.cos(math.rad(90))
  2206.  
  2207. local ActiveBranches = {} --Contains all LightningBolt instances
  2208.  
  2209. local LightningBolt = {} --Define new class
  2210. LightningBolt.__type = "LightningBolt"
  2211. LightningBolt.__index = LightningBolt
  2212.  
  2213.  
  2214. function LightningBolt.new(Attachment0, Attachment1, PartCount)
  2215.     local self = setmetatable({}, LightningBolt)
  2216.     PartCount = PartCount or 30
  2217.    
  2218.  
  2219.     --*Main (default) Properties--
  2220.  
  2221.     --Bolt Appearance Properties
  2222.  
  2223.     self.Enabled = true --Hides bolt without removing any parts when false
  2224.     self.Attachment0, self.Attachment1 = Attachment0, Attachment1 --Bolt originates from Attachment0 and ends at Attachment1
  2225.     self.CurveSize0, self.CurveSize1 = 0, 0 --Works similarly to roblox beams. See https://dk135eecbplh9.cloudfront.net/assets/blt160ad3fdeadd4ff2/BeamCurve1.png
  2226.     self.MinRadius, self.MaxRadius = 0, 2.4 --Governs the amplitude of fluctuations throughout the bolt
  2227.     self.Frequency = 1 --Governs the frequency of fluctuations throughout the bolt. Lower this to remove jittery-looking lightning
  2228.     self.AnimationSpeed = 7 --Governs how fast the bolt oscillates (i.e. how fast the fluctuating wave travels along bolt)
  2229.     self.Thickness = 1 --The thickness of the bolt
  2230.     self.MinThicknessMultiplier, self.MaxThicknessMultiplier = 0.2, 1 --Multiplies Thickness value by a fluctuating random value between MinThicknessMultiplier and MaxThicknessMultiplier along the Bolt
  2231.  
  2232.     --Bolt Kinetic Properties
  2233.  
  2234.     self.MinTransparency, self.MaxTransparency = 0, 1
  2235.     self.PulseSpeed = 2 --Bolt arrives at Attachment1 1/PulseSpeed seconds later
  2236.     self.PulseLength = 1000000
  2237.     self.FadeLength = 0.2
  2238.     self.ContractFrom = 0.5 --Parts shorten or grow once their Transparency exceeds this value. Set to a value above 1 to turn effect off. See https://imgur.com/OChA441
  2239.  
  2240.     --Bolt Color Properties
  2241.  
  2242.     self.Color = Color3.new(1, 1, 1) --Can be a Color3 or ColorSequence
  2243.     self.ColorOffsetSpeed = 3 --Sets speed at which ColorSequence travels along Bolt
  2244.  
  2245.     --*
  2246.  
  2247.     --*Advanced Properties--
  2248.  
  2249.     self.SpaceCurveFunction = CubicBezier
  2250.  
  2251.     self.OpacityProfileFunction = DiscretePulse
  2252.  
  2253.     self.RadialProfileFunction = ExtrudeCenter
  2254.     --*
  2255.  
  2256.     --! Private vars are prefixed with an underscore (e.g. self._Parts) and should not be changed manually
  2257.  
  2258.     self._Parts = {} --The BoltParts which make up the Bolt
  2259.  
  2260.     for i = 1, PartCount do
  2261.         local par = BoltPart:Clone()
  2262.         par.Parent = script.Effects
  2263.         self._Parts[i] = par
  2264.     end
  2265.  
  2266.     self._PartsHidden = false
  2267.     self._DisabledTransparency = 1
  2268.     self._StartT = clock()
  2269.     self._RanNum = math.random() * 100
  2270.     self._RefIndex = #ActiveBranches + 1
  2271.  
  2272.     ActiveBranches[self._RefIndex] = self
  2273.  
  2274.     return self
  2275. end
  2276.  
  2277. function LightningBolt:Destroy()
  2278.     ActiveBranches[self._RefIndex] = nil
  2279.  
  2280.     for i = 1, #self._Parts do
  2281.         pcall(game.Destroy, self._Parts[i])
  2282.     end
  2283.  
  2284.     self = nil
  2285. end
  2286.  
  2287. --Calls Destroy() after TimeLength seconds where a dissipating effect takes place in the meantime
  2288. function LightningBolt:DestroyDissipate(TimeLength, Strength)
  2289.     TimeLength = TimeLength or 0.2
  2290.     Strength = Strength or 0.5
  2291.     local DissipateStartT = clock()
  2292.     local start, mid, goal = self.MinTransparency, self.ContractFrom, self.ContractFrom
  2293.         + 1 / (#self._Parts * self.FadeLength)
  2294.     local StartRadius = self.MaxRadius
  2295.     local StartMinThick = self.MinThicknessMultiplier
  2296.     local DissipateLoop
  2297.  
  2298.     DissipateLoop = RunService.Heartbeat:Connect(function()
  2299.         local TimeSinceDissipate = clock() - DissipateStartT
  2300.         self.MinThicknessMultiplier = StartMinThick + (-2 - StartMinThick) * TimeSinceDissipate / TimeLength
  2301.  
  2302.         if TimeSinceDissipate < TimeLength * 0.4 then
  2303.             local interp = (TimeSinceDissipate / (TimeLength * 0.4))
  2304.             self.MinTransparency = start + (mid - start) * interp
  2305.         elseif TimeSinceDissipate < TimeLength then
  2306.             local interp = ((TimeSinceDissipate - TimeLength * 0.4) / (TimeLength * 0.6))
  2307.             self.MinTransparency = mid + (goal - mid) * interp
  2308.             self.MaxRadius = StartRadius * (1 + Strength * interp)
  2309.             self.MinRadius = self.MinRadius + (self.MaxRadius - self.MinRadius) * interp
  2310.         else
  2311.             --Destroy Bolt
  2312.             local TimePassed = clock() - self._StartT
  2313.             local Lifetime = (self.PulseLength + 1) / self.PulseSpeed
  2314.  
  2315.             if TimePassed < Lifetime then --prevents Destroy()ing twice
  2316.                 self:Destroy()
  2317.             end
  2318.  
  2319.             --Disconnect Loop
  2320.             DissipateLoop:Disconnect()
  2321.             DissipateLoop = nil
  2322.         end
  2323.     end)
  2324. end
  2325.  
  2326. function LightningBolt:_UpdateGeometry(
  2327.     BPart,
  2328.     PercentAlongBolt,
  2329.     TimePassed,
  2330.     ThicknessNoiseMultiplier,
  2331.     PrevPoint,
  2332.     NextPoint
  2333. )
  2334.     --Compute opacity for this particular section
  2335.     local MinOpa, MaxOpa = 1 - self.MaxTransparency, 1 - self.MinTransparency
  2336.     local Opacity = self.OpacityProfileFunction(
  2337.         PercentAlongBolt,
  2338.         TimePassed,
  2339.         self.PulseSpeed,
  2340.         self.PulseLength,
  2341.         self.FadeLength,
  2342.         MinOpa,
  2343.         MaxOpa
  2344.     )
  2345.  
  2346.     --Compute thickness for this particular section
  2347.     local Thickness = self.Thickness * ThicknessNoiseMultiplier * Opacity
  2348.     Opacity = Thickness > 0 and Opacity or 0
  2349.  
  2350.     --Compute + update sizing and orientation of this particular section
  2351.     local contractf = 1 - self.ContractFrom
  2352.     local PartsN = #self._Parts
  2353.     if Opacity > contractf then
  2354.         BPart.Size = Vector3.new((NextPoint - PrevPoint).Magnitude, Thickness, Thickness)
  2355.         BPart.CFrame = CFrame.lookAt((PrevPoint + NextPoint) * 0.5, NextPoint) * xInverse
  2356.         BPart.Transparency = 1 - Opacity
  2357.     elseif Opacity > contractf - 1 / (PartsN * self.FadeLength) then
  2358.         local interp = (1 - (Opacity - (contractf - 1 / (PartsN * self.FadeLength))) * PartsN * self.FadeLength)
  2359.             * (PercentAlongBolt < TimePassed * self.PulseSpeed - 0.5 * self.PulseLength and 1 or -1)
  2360.         BPart.Size = Vector3.new((1 - math.abs(interp)) * (NextPoint - PrevPoint).Magnitude, Thickness, Thickness)
  2361.         BPart.CFrame = CFrame.lookAt(
  2362.             PrevPoint + (NextPoint - PrevPoint) * (math.max(0, interp) + 0.5 * (1 - math.abs(interp))),
  2363.             NextPoint
  2364.         )
  2365.             * xInverse
  2366.         BPart.Transparency = 1 - Opacity
  2367.     else
  2368.         BPart.Transparency = 1
  2369.     end
  2370. end
  2371.  
  2372. function LightningBolt:_UpdateColor(BPart, PercentAlongBolt, TimePassed)
  2373.     if typeof(self.Color) == "Color3" then
  2374.         BPart.Color = self.Color
  2375.     else --ColorSequence
  2376.         local t1 = (self._RanNum + PercentAlongBolt - TimePassed * self.ColorOffsetSpeed) % 1
  2377.         local keypoints = self.Color.Keypoints
  2378.         for i = 1, #keypoints - 1 do
  2379.             if keypoints[i].Time < t1 and t1 < keypoints[i + 1].Time then
  2380.                 BPart.Color = keypoints[i].Value:lerp(
  2381.                     keypoints[i + 1].Value,
  2382.                     (t1 - keypoints[i].Time) / (keypoints[i + 1].Time - keypoints[i].Time)
  2383.                 )
  2384.                 break
  2385.             end
  2386.         end
  2387.     end
  2388. end
  2389.  
  2390. function LightningBolt:_Disable()
  2391.     self.Enabled = false
  2392.     for _, BPart in ipairs(self._Parts) do
  2393.         BPart.Transparency = self._DisabledTransparency
  2394.     end
  2395. end
  2396.  
  2397. RunService.Heartbeat:Connect(function()
  2398.     debug.profilebegin("LightningBolt") --Create performance profile
  2399.  
  2400.     for _, ThisBranch in pairs(ActiveBranches) do
  2401.         if ThisBranch.Enabled == true then
  2402.             ThisBranch._PartsHidden = false
  2403.  
  2404.             --Extract important variables
  2405.             local MinRadius, MaxRadius = ThisBranch.MinRadius, ThisBranch.MaxRadius
  2406.             local Parts = ThisBranch._Parts
  2407.             local PartsN = #Parts
  2408.             local RanNum = ThisBranch._RanNum
  2409.             local spd = ThisBranch.AnimationSpeed
  2410.             local freq = ThisBranch.Frequency
  2411.             local MinThick, MaxThick = ThisBranch.MinThicknessMultiplier, ThisBranch.MaxThicknessMultiplier
  2412.             local TimePassed = clock() - ThisBranch._StartT
  2413.             local SpaceCurveFunction, RadialProfileFunction =
  2414.                 ThisBranch.SpaceCurveFunction, ThisBranch.RadialProfileFunction
  2415.             local Lifetime = (ThisBranch.PulseLength + 1) / ThisBranch.PulseSpeed
  2416.  
  2417.             --Extract control points
  2418.             local a0, a1, CurveSize0, CurveSize1 =
  2419.                 ThisBranch.Attachment0, ThisBranch.Attachment1, ThisBranch.CurveSize0, ThisBranch.CurveSize1
  2420.             local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition
  2421.                 + a0.WorldAxis * CurveSize0, a1.WorldPosition
  2422.             - a1.WorldAxis * CurveSize1, a1.WorldPosition
  2423.  
  2424.             --Initialise iterative scheme for generating points along space curve
  2425.             local init = SpaceCurveFunction(0, p0, p1, p2, p3)
  2426.             local PrevPoint, bezier0 = init, init
  2427.  
  2428.             --Update
  2429.             if TimePassed < Lifetime then
  2430.                 for i = 1, PartsN do
  2431.                     local BPart = Parts[i]
  2432.                     local PercentAlongBolt = i / PartsN
  2433.  
  2434.                     --Compute noisy inputs
  2435.                     local input, input2 = (spd * -TimePassed)
  2436.                         + freq * 10 * PercentAlongBolt
  2437.                     - 0.2
  2438.                         + RanNum * 4, 5 * ((spd * 0.01 * -TimePassed) / 10 + freq * PercentAlongBolt)
  2439.                         + RanNum * 4
  2440.                     local noise0 = NoiseBetween(5 * input, 1.5, 5 * 0.2 * input2, 0, 0.1 * 2 * math.pi)
  2441.                         + NoiseBetween(0.5 * input, 1.5, 0.5 * 0.2 * input2, 0, 0.9 * 2 * math.pi)
  2442.                     local noise1 = NoiseBetween(3.4, input2, input, MinRadius, MaxRadius)
  2443.                         * RadialProfileFunction(PercentAlongBolt)
  2444.                     local thicknessNoise = NoiseBetween(2.3, input2, input, MinThick, MaxThick)
  2445.  
  2446.                     --Find next point along space curve
  2447.                     local bezier1 = SpaceCurveFunction(PercentAlongBolt, p0, p1, p2, p3)
  2448.  
  2449.                     --Find next point along bolt
  2450.                     local NextPoint = i ~= PartsN
  2451.                         and (CFrame.new(bezier0, bezier1) * CFrame.Angles(0, 0, noise0) * CFrame.Angles(
  2452.                             math.acos(math.clamp(NoiseBetween(input2, input, 2.7, offsetAngle, 1), -1, 1)),
  2453.                             0,
  2454.                             0
  2455.                             ) * CFrame.new(0, 0, -noise1)).Position
  2456.                         or bezier1
  2457.  
  2458.                     ThisBranch:_UpdateGeometry(BPart, PercentAlongBolt, TimePassed, thicknessNoise, PrevPoint, NextPoint)
  2459.  
  2460.                     ThisBranch:_UpdateColor(BPart, PercentAlongBolt, TimePassed)
  2461.  
  2462.                     PrevPoint, bezier0 = NextPoint, bezier1
  2463.                 end
  2464.             else
  2465.                 ThisBranch:Destroy()
  2466.             end
  2467.         else --Enabled = false
  2468.             if ThisBranch._PartsHidden == false then
  2469.                 ThisBranch._PartsHidden = true
  2470.                 ThisBranch:_Disable()
  2471.             end
  2472.         end
  2473.     end
  2474.  
  2475.     debug.profileend()
  2476. end)
  2477.  
  2478. local craters = {}
  2479.  
  2480. function craters.crater(position,size,Parent,Time,TransSpeed,ignore)
  2481.     local didhit = false
  2482.     local mate = nil
  2483.     local colo = nil
  2484.     local ray = Ray.new(position,Vector3.new(0,-15,0))
  2485.     local tabd = ignore
  2486.     local part, hitPosition = workspace:FindPartOnRayWithIgnoreList(ray, tabd, false, true)
  2487.     if part then
  2488.         didhit = true
  2489.         mate = part.Material
  2490.         colo = part.BrickColor
  2491.     else
  2492.         didhit = false
  2493.     end
  2494.     if didhit then
  2495.         task.spawn(function()
  2496.             local b = Instance.new("Part",Parent)
  2497.             b.Size = Vector3.new(1,1,1)
  2498.             b.Anchored = true
  2499.             b.CanCollide = false
  2500.             b.CFrame = CFrame.new(hitPosition)*CFrame.new(0,.5,0)
  2501.             b.Transparency = 1
  2502.             AddItem(b,1/10)
  2503.             local t = 0
  2504.             for i = 1, 36 do
  2505.                 t = t + 10
  2506.                 local b2 = b:Clone()
  2507.                 b2.Parent = workspace
  2508.                 b2.Transparency = 1
  2509.                 b2.CFrame = b.CFrame * CFrame.Angles(0,math.rad(t),math.rad(0)) * CFrame.new(size*10,0,0)
  2510.                 AddItem(b2, 1/10)
  2511.                 local grassblock = Instance.new("Part",Parent)
  2512.                 grassblock.Size = Vector3.new(size,size,size)*2
  2513.                 grassblock.BrickColor = colo
  2514.                 grassblock.Material = mate
  2515.                 grassblock.Anchored = true
  2516.                 grassblock.CanCollide = true
  2517.                 grassblock.CFrame = b2.CFrame * CFrame.Angles(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180)))
  2518.                 AddItem(grassblock,10)
  2519.                 pcall(game.Destroy,b2)
  2520.                 local ray = Ray.new(grassblock.Position,Vector3.new(0,-5,0))
  2521.                 local tabd = {grassblock}
  2522.                 for i,v in next, ignore do
  2523.                     table.insert(tabd, v)
  2524.                 end
  2525.                 local part, hitPosition = workspace:FindPartOnRayWithIgnoreList(ray, tabd,false,true)
  2526.                 if part then
  2527.                     task.spawn(function()
  2528.                         task.wait(Time)
  2529.                         game:GetService("TweenService"):Create(grassblock,TweenInfo.new(TransSpeed),{
  2530.                             Transparency = 1,
  2531.                             Size = Vector3.new(0,0,0)
  2532.                         }):Play()
  2533.                         task.spawn(function()
  2534.                             task.wait(TransSpeed)
  2535.                             grassblock:Destroy()
  2536.                         end)
  2537.                     end)
  2538.                 else
  2539.                     grassblock:Destroy()
  2540.                 end
  2541.             end
  2542.         end)
  2543.     end
  2544. end
  2545.  
  2546. function craters.debris(from, size, color, material, collide, knockback, destroyafter)
  2547.     local deb = Instance.new("Part", script.Effects)
  2548.     deb.Size = Vector3.new(size*(math.random(50, 110)/100), size*(math.random(50, 110)/100), size*(math.random(50, 110)/100))
  2549.     deb.Position = from+Vector3.new(math.random(-100,100)/100,0+math.random(-100,100)/100,math.random(-100,100)/100)
  2550.     deb.Color = color
  2551.     deb.Material = material
  2552.     deb.CanCollide = collide
  2553.     deb.Anchored = false
  2554.     deb:SetNetworkOwner(owner)
  2555.     local vel = Instance.new("BodyVelocity", deb)
  2556.     vel.maxForce = Vector3.new(9999999999999,9999999999999,9999999999999)
  2557.     vel.velocity = CFrame.new(deb.Position, from).lookVector*knockback
  2558.     AddItem(vel, .1)
  2559.     task.delay(destroyafter-1, function()
  2560.         game:GetService('TweenService'):Create(deb, TweenInfo.new(1), {
  2561.             Size = Vector3.new()
  2562.         }):Play()
  2563.     end)
  2564.     AddItem(deb, destroyafter)
  2565. end
  2566.  
  2567. local rayparam = RaycastParams.new()
  2568. rayparam.FilterDescendantsInstances = {script, char}
  2569.  
  2570. local FXController = (function()
  2571.     local RunService_upvr = game:GetService("RunService")
  2572.     local Debris_upvr = game:GetService("Debris")
  2573.     local TweenService_upvr = game:GetService("TweenService")
  2574.     local ReplicatedStorage_upvr = game:GetService("ReplicatedStorage")
  2575.  
  2576.     local Utils_upvr = (script:IsA("ModuleScript") and script.Parent.Parent or stuff).Utils
  2577.  
  2578.     local var10_upvw
  2579.     local var11_upvw
  2580.  
  2581.     local abs_upvr = math.abs
  2582.     local function _(arg1, arg2) -- Line 46, Named "ManhattanDistance"
  2583.     --[[ Upvalues[1]:
  2584.         [1]: abs_upvr (readonly)
  2585.     ]]
  2586.         return abs_upvr(arg1.X - arg2.X) + abs_upvr(arg1.Y - arg2.Y) + abs_upvr(arg1.Z - arg2.Z)
  2587.     end
  2588.     local any_CreateController_result1 = {}
  2589.     function any_CreateController_result1.PlaySound(arg1, arg2, arg3, arg5) -- Line 54
  2590.         local clone_3_upvr = arg2:Clone()
  2591.         clone_3_upvr.Parent = arg3
  2592.         clone_3_upvr:Play()
  2593.         if arg2.PlayOnRemove == true then
  2594.             clone_3_upvr:Destroy()
  2595.             return
  2596.         end
  2597.         if not arg5 then
  2598.             clone_3_upvr.Ended:Connect(function() -- Line 58
  2599.             --[[ Upvalues[1]:
  2600.                 [1]: clone_3_upvr (readonly)
  2601.             ]]
  2602.                 clone_3_upvr:Destroy()
  2603.             end)
  2604.         end
  2605.         return clone_3_upvr
  2606.     end
  2607.     function any_CreateController_result1.Flash(arg1, arg2, arg3, arg4) -- Line 63
  2608.     --[[ Upvalues[4]:
  2609.         [1]: abs_upvr (readonly)
  2610.         [2]: Utils_upvr (readonly)
  2611.         [3]: Debris_upvr (readonly)
  2612.         [4]: TweenService_upvr (readonly)
  2613.     ]]
  2614.         local clone_4 = Utils_upvr.Damage.HitGlow:Clone()
  2615.         if arg2:GetScale() ~= 1 then
  2616.             clone_4:ScaleTo(arg2:GetScale())
  2617.         end
  2618.         clone_4.Parent = script.Effects
  2619.         AddItem(clone_4, arg4 or 0.15)
  2620.         for _, v_17 in clone_4:GetChildren() do
  2621.             local SOME_2 = arg2:FindFirstChild(v_17.Name)
  2622.             if SOME_2 then
  2623.                 local Weld = Instance.new("Weld", v_17)
  2624.                 Weld.Part0 = v_17
  2625.                 Weld.Part1 = SOME_2
  2626.             end
  2627.             v_17.Color = arg3
  2628.             if arg4 then
  2629.                 TweenService_upvr:Create(v_17, TweenInfo.new(arg4), {
  2630.                     Transparency = 1;
  2631.                 }):Play()
  2632.             end
  2633.         end
  2634.     end
  2635.     function any_CreateController_result1.Bleed(arg1, arg2)
  2636.         for _, v_18 in Utils_upvr.Damage.Explode:GetDescendants() do
  2637.             if v_18:IsA("Attachment") then
  2638.                 v_18:Clone().Parent = arg2:FindFirstChild(v_18.Parent.Name)
  2639.             end
  2640.         end
  2641.         if arg2:GetAttribute("Bleeding") then return end
  2642.         arg2:SetAttribute("Bleeding", true)
  2643.         task.spawn(function()
  2644.             repeat
  2645.                 if(arg2:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6)then
  2646.                     bloodyzee:Blood(arg2.Torso.CFrame, 50, 180, 180)
  2647.                 else
  2648.                     bloodyzee:Blood(arg2.UpperTorso.CFrame, 50, 180, 180)
  2649.                 end
  2650.                 task.wait(0.1)
  2651.             until not arg2.Parent
  2652.         end)
  2653.     end
  2654.     function any_CreateController_result1.ArmFlash(arg1, arg2, arg3, arg4)
  2655.         local clone_7_upvr = Utils_upvr.Damage.CombatTrail:Clone()
  2656.         clone_7_upvr.Size = arg2.Size * 1.1
  2657.         clone_7_upvr.Color = arg3
  2658.         clone_7_upvr.Trail.Color = ColorSequence.new(arg3)
  2659.         clone_7_upvr.Weld.Part0 = arg2
  2660.         clone_7_upvr.Parent = script.Effects
  2661.         task.delay(arg4 or 0.2, function()
  2662.             clone_7_upvr.Trail.Enabled = false
  2663.             TweenService_upvr:Create(clone_7_upvr, TweenInfo.new(0.1), {
  2664.                 Transparency = 1;
  2665.             }):Play()
  2666.             AddItem(clone_7_upvr, 0.2)
  2667.         end)
  2668.     end
  2669.     function any_CreateController_result1.DustBreak(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
  2670.         local cframe = CFrame.new(arg2, arg2 + arg3)
  2671.         for _ = 1, arg5 do
  2672.             local workspace_Raycast_result1 = workspace:Raycast((cframe * CFrame.Angles(0, 0, math.random(0, math.pi)) * CFrame.new(math.random(0, arg4 * 10) / 10, 0, 0)).Position, cframe.LookVector * -(arg8 or 8), _G.MapParams)
  2673.             if workspace_Raycast_result1 then
  2674.                 local clone_2_upvr = Utils_upvr.Damage.DebreeRef:Clone()
  2675.                 clone_2_upvr.Color = workspace_Raycast_result1.Instance.Color
  2676.                 clone_2_upvr.Material = workspace_Raycast_result1.Instance.Material
  2677.                 clone_2_upvr.Transparency = workspace_Raycast_result1.Instance.Transparency
  2678.                 clone_2_upvr.Size = Vector3.new(math.random(arg6 * 10, arg7 * 10) / 10, math.random(arg6 * 10, arg7 * 10) / 10, math.random(arg6 * 10, arg7 * 10) / 10)
  2679.                 clone_2_upvr.Position = workspace_Raycast_result1.Position
  2680.                 clone_2_upvr.CollisionGroup = "Effects"
  2681.                 clone_2_upvr.Anchored = false
  2682.                 clone_2_upvr.Velocity = Vector3.new(math.random(-20, 20), math.random(20, 40), math.random(-20, 20))
  2683.                 clone_2_upvr.RotVelocity = Vector3.new(math.random(-200, 200), math.random(-200, 200), math.random(-200, 200))
  2684.                 clone_2_upvr.Parent = script.Effects
  2685.                 task.delay(3, function()
  2686.                     TweenService_upvr:Create(clone_2_upvr, TweenInfo.new(1), {
  2687.                         Transparency = 1;
  2688.                     }):Play()
  2689.                     AddItem(clone_2_upvr, 1)
  2690.                 end)
  2691.             end
  2692.         end
  2693.     end
  2694.     function any_CreateController_result1.Burn(arg1, arg2) -- Line 170
  2695.     --[[ Upvalues[1]:
  2696.         [1]: Utils_upvr (readonly)
  2697.     ]]
  2698.         for _, v in arg2:GetChildren() do
  2699.             if v:IsA("BasePart") then
  2700.                 v.Color = Color3.new(0.1, 0.1, 0.1)
  2701.                 Utils_upvr.Damage.LegBurn.Smoke:Clone().Parent = v
  2702.             elseif v:IsA("Shirt") or v:IsA("Pants") or v:IsA("TShirt") then
  2703.                 v.Color3 = Color3.new(0.1, 0.1, 0.1)
  2704.             elseif v:IsA("Accessory") then
  2705.                 v.Handle.Color = Color3.new(0.1, 0.1, 0.1)
  2706.                 v.Handle:FindFirstChildWhichIsA("SpecialMesh").TextureId = ""
  2707.             end
  2708.         end
  2709.     end
  2710.     function any_CreateController_result1.DomainBurst(arg1, arg2)
  2711.         local clone = Utils_upvr.DomainBurst:Clone()
  2712.         clone.Position = arg2.Position
  2713.         clone.Parent = script.Effects
  2714.         TweenService_upvr:Create(clone, TweenInfo.new(0.3), {
  2715.             Size = Vector3.new(75, 75, 75);
  2716.             Transparency = 1;
  2717.         }):Play()
  2718.         clone.Attachment.Spark:Emit(1)
  2719.         AddItem(clone, 0.4)
  2720.         arg1:PlaySound((script:IsA("ModuleScript") and script.Parent.Parent or stuff).Sounds.Misc.Domain.DomainOpen, arg2)
  2721.     end
  2722.     function any_CreateController_result1.ApplyCopyOutfit(arg1, arg2, arg3)
  2723.         --arg3:ScaleTo(arg2:GetScale())
  2724.         for _, v_3 in arg2:GetChildren() do
  2725.             if v_3:IsA("Shirt") or v_3:IsA("TShirt") or v_3:IsA("Pants") or v_3:IsA("BodyColors") then
  2726.                 v_3:Clone().Parent = arg3
  2727.             elseif v_3:IsA("Accessory") then
  2728.                 local clone_10 = v_3:Clone()
  2729.                 clone_10.Parent = arg3
  2730.             end
  2731.         end
  2732.         arg3:ScaleTo(1)
  2733.         local face = arg2.Head:FindFirstChild("face")
  2734.         if face then
  2735.             arg3.Head.face.Texture = face.Texture
  2736.         end
  2737.         if arg3["Left Arm"]:FindFirstChild("FingersL") then
  2738.             for _, v_5 in arg3["Left Arm"].FingersL:GetChildren() do
  2739.                 if v_5:IsA("BasePart") then
  2740.                     local v_4 = arg2["Left Arm"]
  2741.                     v_5.Color = v_4.Color
  2742.                 end
  2743.             end
  2744.             for _, v_6 in arg3["Right Arm"].FingersR:GetChildren() do
  2745.                 if v_6:IsA("BasePart") then
  2746.                     local v_4 = arg2["Right Arm"]
  2747.                     v_6.Color = v_4.Color
  2748.                 end
  2749.             end
  2750.         end
  2751.     end
  2752.     local tbl_3_upvr = {0.3, 0.7, 0.5}
  2753.     function any_CreateController_result1.Domain(arg1, arg2, arg3)
  2754.         for i, LocalPlayer_upvr in next, game:GetService("Players"):GetPlayers() do
  2755.             task.spawn(function()
  2756.                 local clone_5_upvr = Utils_upvr.DomainWarn:Clone()
  2757.                 clone_5_upvr.Parent = LocalPlayer_upvr.PlayerGui
  2758.                 local Display_upvr = clone_5_upvr.Panel.Viewport.Display
  2759.                 pcall(function()
  2760.                     arg1:ApplyCopyOutfit(arg2, Display_upvr)
  2761.                 end)
  2762.                 local Camera = Instance.new("Camera", clone_5_upvr.Panel)
  2763.                 Camera.FieldOfView = 40
  2764.                 Camera.CFrame = Display_upvr.HumanoidRootPart.CFrame * CFrame.new(0, 1, -5) * CFrame.Angles(0, math.pi, 0)
  2765.                 clone_5_upvr.Panel.Viewport.CurrentCamera = Camera
  2766.                 arg3(clone_5_upvr, Display_upvr)
  2767.                 TweenService_upvr:Create(clone_5_upvr.FlashText, TweenInfo.new(1.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
  2768.                     Size = UDim2.new(1.5, 0, 0.43, 0);
  2769.                 }):Play()
  2770.                 task.delay(0.625, function()
  2771.                     TweenService_upvr:Create(clone_5_upvr.FlashText.Text1, TweenInfo.new(0.625), {
  2772.                         TextTransparency = 1;
  2773.                     }):Play()
  2774.                     TweenService_upvr:Create(clone_5_upvr.FlashText.Text1.UIStroke, TweenInfo.new(0.625), {
  2775.                         Transparency = 1;
  2776.                     }):Play()
  2777.                     TweenService_upvr:Create(clone_5_upvr.FlashText.Text2, TweenInfo.new(0.625), {
  2778.                         TextTransparency = 1;
  2779.                     }):Play()
  2780.                     TweenService_upvr:Create(clone_5_upvr.FlashText.Text2.UIStroke, TweenInfo.new(0.625), {
  2781.                         Transparency = 1;
  2782.                     }):Play()
  2783.                 end)
  2784.  
  2785.                 local var172 = 0
  2786.                 for _, v_10 in clone_5_upvr:GetChildren() do
  2787.                     TweenService_upvr:Create(v_10, TweenInfo.new(1.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {
  2788.                         Position = UDim2.new(0.5, 0, tbl_3_upvr[var172 % 3 + 1], 0);
  2789.                     }):Play()
  2790.                     local _
  2791.                 end
  2792.                 TweenService_upvr:Create(clone_5_upvr.Panel, TweenInfo.new(0.625, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
  2793.                     Size = UDim2.new(1.5, 0, 0.4, 0);
  2794.                 }):Play()
  2795.                 TweenService_upvr:Create(clone_5_upvr.PanelBack, TweenInfo.new(0.625, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
  2796.                     Size = UDim2.new(1.5, 0, 0.43, 0);
  2797.                 }):Play()
  2798.                 task.wait(0.625)
  2799.                 TweenService_upvr:Create(clone_5_upvr.Panel, TweenInfo.new(0.625, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
  2800.                     Size = UDim2.new(1.5, 0, 0, 0);
  2801.                 }):Play()
  2802.                 TweenService_upvr:Create(clone_5_upvr.PanelBack, TweenInfo.new(0.625, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
  2803.                     Size = UDim2.new(1.5, 0, 0.03, 0);
  2804.                 }):Play()
  2805.                 AddItem(clone_5_upvr, 0.625)
  2806.             end)
  2807.         end
  2808.     end
  2809.     return any_CreateController_result1
  2810. end)()
  2811.  
  2812. playAnimation("Arms", true)
  2813. task.wait()
  2814. local idle, stopidle = playAnimation("RobloxIdle", true)
  2815. local walk, stopwalk, run, stoprun;
  2816.  
  2817. local spaceheld = false
  2818. local attacking = false
  2819. local dashing = false
  2820. local domain = false
  2821.  
  2822. local basewalkspeed = 12
  2823. local walkspeedadd = 0
  2824. local speed = 0
  2825.  
  2826. humanoid.Running:Connect(function(s)
  2827.     speed = math.min(s, 30)
  2828. end)
  2829.  
  2830. task.spawn(function()
  2831.     while(task.wait())do
  2832.         if(not script:FindFirstChild("Effects"))then
  2833.             Instance.new("Folder", script).Name = "Effects"
  2834.         end
  2835.  
  2836.         if(humanoid.Health < 1)then
  2837.             attacking = true
  2838.             doidle = false
  2839.             domain = false
  2840.             dashing = true
  2841.             return
  2842.         end
  2843.  
  2844.         if(char:FindFirstChild("StunTime") or char:FindFirstChild("RagdollTime"))then
  2845.             attacking = true
  2846.             repeat task.wait()
  2847.                 attacking = true
  2848.             until not char:FindFirstChild("StunTime") and not char:FindFirstChild("RagdollTime")
  2849.             attacking = false
  2850.         end
  2851.  
  2852.         humanoid.WalkSpeed = (if(walk)then 12 elseif(run)then 32 else 16) + walkspeedadd
  2853.         if(walkspeedadd < 0)then
  2854.             humanoid.WalkSpeed = 12 + walkspeedadd
  2855.         end
  2856.  
  2857.         if speed > 0.01 and not attacking and not dashing then
  2858.             doidle = false
  2859.  
  2860.             if(math.round(humanoid.MoveDirection:Dot(CFrame.new(rootpart.Position, rootpart.Position + Vector3.new(Camera.CFrame.LookVector.X, 0, Camera.CFrame.LookVector.Z)).LookVector)) ~= 1)then
  2861.                 if(stoprun)then stoprun() run = nil stoprun = nil end
  2862.                 walk, stopwalk = playAnimation("RobloxWalk", true)
  2863.                 walk.Speed = speed / 14.5
  2864.                 humanoid.WalkSpeed = 12 + walkspeedadd
  2865.             else
  2866.                 if(stopwalk)then stopwalk() walk = nil stopwalk = nil end
  2867.                 run, stoprun = playAnimation("Run", true)
  2868.                 run.Speed = speed / 30.5
  2869.                 humanoid.WalkSpeed = 32 + walkspeedadd
  2870.                 if(walkspeedadd < 0)then
  2871.                     humanoid.WalkSpeed = 12 + walkspeedadd
  2872.                 end
  2873.             end
  2874.         else
  2875.             if(stopwalk)then stopwalk() walk = nil stopwalk = nil end
  2876.             if(stoprun)then stoprun() run = nil stoprun = nil end
  2877.             doidle = true
  2878.         end
  2879.  
  2880.         if(doidle)then
  2881.             if(not playingAnimations["RobloxIdle"])then
  2882.                 idle, stopidle = playAnimation("RobloxIdle", true)
  2883.             end
  2884.         else
  2885.             stopidle()
  2886.         end
  2887.     end
  2888. end)
  2889.  
  2890. local footstepi = 0
  2891. task.spawn(function()
  2892.     while task.wait() do
  2893.         if(walk or run)and(humanoid.FloorMaterial ~= Enum.Material.Air)then
  2894.             footstepi += 1
  2895.             if(walk)then
  2896.                 playSound(stuff.Sounds.Misc.Footstep.Ground, rootpart)
  2897.                 task.wait(math.min((walk.Length/walk.Speed)/2, .5))
  2898.             else
  2899.                 playSound(stuff.Sounds.Misc.Footstep.Ground, rootpart)
  2900.                 local ray = workspace:Raycast(rootpart.Position, Vector3.yAxis*-6, rayparam)
  2901.                 if(ray)then
  2902.                     for i = 1, math.random(1, 5) do
  2903.                         craters.debris(((footstepi%2 == 0 and char["Right Leg"].CFrame or char["Left Leg"].CFrame)*CFrame.new(0, -1.3, 0)).Position, .3, ray.Instance.Color, ray.Instance.Material, true, 30, 3)
  2904.                     end
  2905.                 end
  2906.                 task.wait(math.min((run.Length/run.Speed)/2, .5))
  2907.             end
  2908.         end
  2909.     end
  2910. end)
  2911.  
  2912. local function stun(hum)
  2913.     if(hum.Parent:FindFirstChild("Heian") and hum.Parent ~= char)then return end
  2914.     if(hum.Parent:FindFirstChild("StunTime"))then
  2915.         hum.Parent:FindFirstChild("StunTime").Value = tick()+1
  2916.     end
  2917.     if(not hum.Parent:FindFirstChild("StunTime"))then
  2918.         local a = Instance.new("NumberValue", hum.Parent)
  2919.         a.Name = "StunTime"
  2920.         a.Value = tick()+1
  2921.  
  2922.         task.spawn(function()
  2923.             while game:GetService("RunService").PostSimulation:Wait() and hum.Parent and hum.Parent.Parent and hum.Parent:FindFirstChild("StunTime") and tick() < hum.Parent:FindFirstChild("StunTime").Value do
  2924.                 hum.WalkSpeed = 5
  2925.                 hum.UseJumpPower = true
  2926.                 hum.JumpPower = 0
  2927.             end
  2928.             pcall(game.Destroy, hum.Parent:FindFirstChild("StunTime"))
  2929.             hum.WalkSpeed = 16
  2930.             hum.JumpPower = 50
  2931.         end)
  2932.     end
  2933. end
  2934.  
  2935. local identifier = Instance.new("BoolValue", char)
  2936. identifier.Name = "Heian"
  2937.  
  2938. local function dmg(hum, am)
  2939.     if(not domain)then
  2940.         damagedone += math.min(am, 100)
  2941.     end
  2942.     hum:TakeDamage(am)
  2943.     if(am > 300)then
  2944.         hum.Health -= am
  2945.     end
  2946.     stun(hum)
  2947.  
  2948.     if(hum.Health < 1)then
  2949.         playSound(stuff.Sounds.Impact.Players.Death, hum.Parent:FindFirstChild("HumanoidRootPart"))
  2950.         Ragdoll:Ragdoll(hum.Parent, 20)
  2951.         return
  2952.     end
  2953.  
  2954.     if(hum.RigType == Enum.HumanoidRigType.R6 and not hum.Parent:FindFirstChild("Heian") and not hum.Parent:FindFirstChild("HitAnim"))then
  2955.         local a = Instance.new("BoolValue", hum.Parent)
  2956.         a.Name = "HitAnim"
  2957.         local anim = animPlayer.new(hum.Parent, stuff.Animations.Normal:GetChildren()[math.random(#stuff.Animations.Normal:GetChildren())])
  2958.         anim:Play()
  2959.         task.delay(anim.Length, function()
  2960.             anim:Destroy()
  2961.             task.wait(.15)
  2962.             a:Destroy()
  2963.         end)
  2964.     end
  2965. end
  2966.  
  2967. local iframes = false
  2968. local lasthp = humanoid.Health
  2969. local lastdamaged = tick()
  2970. humanoid.HealthChanged:Connect(function()
  2971.     if(iframes)then
  2972.         humanoid.Health = lasthp
  2973.         return
  2974.     end
  2975.     task.defer(task.defer, function()
  2976.         local newhp = lasthp - humanoid.Health
  2977.         lasthp = humanoid.Health
  2978.         if(newhp <= 0)then return end
  2979.  
  2980.         lastdamaged = tick()
  2981.  
  2982.         attacking = true
  2983.         playAnimation("Hit"..math.random(1,4))
  2984.         stun(humanoid)
  2985.         task.spawn(function()
  2986.             repeat task.wait()
  2987.                 attacking = true
  2988.             until not char:FindFirstChild("StunTime")
  2989.             attacking = false
  2990.         end)
  2991.     end)
  2992. end)
  2993.  
  2994. task.spawn(function()
  2995.     while task.wait(1) do
  2996.         if(tick() - lastdamaged >= 20 and humanoid.Health < humanoid.MaxHealth)then
  2997.             humanoid.Health += humanoid.MaxHealth/100
  2998.         end
  2999.     end
  3000. end)
  3001.  
  3002. local impactsounds = {
  3003.     [Enum.Material.Brick] = {1.3, stuff.Sounds.Impact.Enviroment.BrickImpact};
  3004.     [Enum.Material.Cobblestone] = {1.2, stuff.Sounds.Impact.Enviroment.BrickImpact};
  3005.     [Enum.Material.Slate] = {1.1, stuff.Sounds.Impact.Enviroment.BrickImpact};
  3006.     [Enum.Material.Glass] = {0.2, stuff.Sounds.Impact.Enviroment.GlassImpact};
  3007.     [Enum.Material.Concrete] = {0.8, stuff.Sounds.Impact.Enviroment.StoneImpact};
  3008.     [Enum.Material.Plastic] = {1, stuff.Sounds.Impact.Enviroment.StoneImpact};
  3009.     [Enum.Material.SmoothPlastic] = {1, stuff.Sounds.Impact.Enviroment.StoneImpact};
  3010.     [Enum.Material.Wood] = {0.8, stuff.Sounds.Impact.Enviroment.WoodImpact};
  3011.     [Enum.Material.WoodPlanks] = {0.75, stuff.Sounds.Impact.Enviroment.WoodImpact};
  3012.     [Enum.Material.Grass] = {0.6, stuff.Sounds.Impact.Enviroment.GrassImpact};
  3013.     [Enum.Material.Sand] = {0.5, stuff.Sounds.Impact.Enviroment.GrassImpact};
  3014.     [Enum.Material.Metal] = {0.5, stuff.Sounds.Impact.Enviroment.MetalImpact};
  3015.     [Enum.Material.DiamondPlate] = {0.5, stuff.Sounds.Impact.Enviroment.MetalImpact};
  3016.     [Enum.Material.Neon] = {0.5, stuff.Sounds.Impact.Enviroment.NeonImpact};
  3017. }
  3018.  
  3019. local showhitbox = game:GetService("RunService"):IsStudio()
  3020. local function hitbox(cframe, size, damage, ragdoll, onhit, alreadyhit)
  3021.     if(showhitbox)then
  3022.         local a = Instance.new("Part", script.Effects)
  3023.         a.Color = Color3.new(1,0,0)
  3024.         a.Anchored = true a.CanCollide = false a.CanQuery = false a.CanTouch = false
  3025.         a.Material = Enum.Material.ForceField
  3026.         a.Size = size
  3027.         a.CFrame = cframe
  3028.         task.delay(.5, pcall, game.Destroy, a)
  3029.     end
  3030.  
  3031.     local bounds = workspace:GetPartBoundsInBox(cframe, size)
  3032.     local alreadyhit = alreadyhit or {}
  3033.     for i, v in next, bounds do
  3034.         pcall(function()
  3035.             if(v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and not alreadyhit[v:FindFirstAncestorOfClass("Model")])then
  3036.                 if(v:FindFirstAncestorOfClass("Model") ~= char and v:FindFirstAncestorOfClass("Model") ~= arms and v:FindFirstAncestorOfClass("Model"):FindFirstChild("HumanoidRootPart") and v:FindFirstAncestorOfClass("Model"):FindFirstChild("Head") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid").Health > 0)then
  3037.                     alreadyhit[v:FindFirstAncestorOfClass("Model")] = true
  3038.                     if(size.Magnitude < 14 and v:FindFirstAncestorOfClass("Model"):FindFirstChild("RagdollTime"))then
  3039.                         return
  3040.                     end
  3041.                     dmg(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), damage)
  3042.  
  3043.                     if(onhit)then
  3044.                         onhit(v:FindFirstAncestorOfClass("Model"))
  3045.                     end
  3046.                     if(ragdoll)then
  3047.                         Ragdoll:Ragdoll(v:FindFirstAncestorOfClass("Model"), 2)
  3048.                     end
  3049.                 end
  3050.             elseif(v:IsA("BasePart") and not (v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")))then
  3051.                 if(v:IsDescendantOf(char) or v:IsDescendantOf(script) or ((v.Name == "Base" or v.Name == "Baseplate") and v.Parent == workspace) or v:FindFirstAncestorOfClass("Script"))then return end
  3052.  
  3053.                 if(impactsounds[v.Material] and not v:FindFirstChild("ImpactSound"))then
  3054.                     local ch = impactsounds[v.Material][2]:GetChildren()
  3055.                     local s = playSound(ch[math.random(#ch)], v)
  3056.                     s.Name = "ImpactSound"
  3057.                 end
  3058.  
  3059.                 local bodyvelocity = Instance.new("BodyVelocity", v)
  3060.                 bodyvelocity.MaxForce = Vector3.one*math.huge
  3061.                 bodyvelocity.Velocity = CFrame.lookAt(v.Position, cframe.Position).LookVector * (-2*math.random(size.Magnitude))
  3062.                 AddItem(bodyvelocity, .2)
  3063.                 v.Anchored = false
  3064.                 v:BreakJoints()
  3065.                 pcall(v.SetNetworkOwner, v, owner)
  3066.             end
  3067.         end)
  3068.     end
  3069.     return alreadyhit
  3070. end
  3071.  
  3072. local function interp(dismantle, speed)
  3073.     speed = speed or 1
  3074.     local CFrame_upvw = dismantle.CFrame
  3075.     local tick_result1_upvw = tick()
  3076.     playSound(stuff.Sounds.Heian.Dismantle.Fire, dismantle)
  3077.     local var22_upvw
  3078.     local any_Connect_result1_upvr = dismantle:GetPropertyChangedSignal("Position"):Connect(function()
  3079.         CFrame_upvw = dismantle.CFrame
  3080.         tick_result1_upvw = tick()
  3081.     end)
  3082.     var22_upvw = game:GetService("RunService").Stepped:Connect(function()
  3083.         if not dismantle.Parent then
  3084.             var22_upvw:Disconnect()
  3085.             any_Connect_result1_upvr:Disconnect()
  3086.         else
  3087.             local tbl = {}
  3088.             tbl[1] = dismantle
  3089.             workspace:BulkMoveTo(tbl, {CFrame_upvw + (CFrame_upvw.LookVector) * ((300*speed) * (tick() - tick_result1_upvw))}, Enum.BulkMoveMode.FireCFrameChanged)
  3090.         end
  3091.     end)
  3092. end
  3093.  
  3094. local chantlevel = 1
  3095. local attacks = {
  3096.     [1] = {"Strong Dismantle", function()
  3097.         playSound(stuff.Sounds.Heian.Dismantle.Start, rootpart)
  3098.         if chantlevel == 2 then
  3099.             playSound(stuff.Sounds.Heian.Dismantle1, rootpart)
  3100.         end
  3101.         if chantlevel == 4 then
  3102.             playSound(stuff.Sounds.Heian.Dismantle2, rootpart)
  3103.         end
  3104.  
  3105.         if(chantlevel == 1)then
  3106.             attacking = true
  3107.             doidle = false
  3108.             local a = playAnimation("Dismantle")
  3109.             a.TimePosition = 0
  3110.             task.delay(1.2, function()
  3111.                 a:Stop()
  3112.                 a:Cancel()
  3113.                 attacking = false
  3114.                 doidle = true
  3115.             end)
  3116.             task.wait(.3)
  3117.             for i = 1, 2 do
  3118.                 local proj = stuff.Utils.Heian.DismantleProjectile:Clone()
  3119.                 proj.Parent = script.Effects
  3120.                 proj.CFrame = rootpart.CFrame*CFrame.new(math.random(-200, 200)/100, math.random(-200, 200)/100, math.random(-200, 200)/100)*CFrame.Angles(0, 0, math.rad(math.random(-90, 90)))
  3121.                 interp(proj)
  3122.                 playSound(stuff.Sounds.Heian.Dismantle.Fire, rootpart)
  3123.                 task.delay(1, function()
  3124.                     proj.slash.slashenabled5.Enabled = false
  3125.                     proj.slash.slashenabled7.Enabled = false
  3126.                     task.wait(1)
  3127.                     proj:Destroy()
  3128.                 end)
  3129.                 task.spawn(function()
  3130.                     local alreadyhit = {}
  3131.                     while proj.Parent do
  3132.                         alreadyhit = hitbox(proj.slash.CFrame, proj.slash.Size, 10, true, function(mod)
  3133.                             local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3134.                             local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  3135.                             bodyvelocity.MaxForce = Vector3.one*math.huge
  3136.                             bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -10
  3137.                             AddItem(bodyvelocity, .2)
  3138.  
  3139.                             local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3140.                             FXController:Flash(mod, Color3.new(1, 1, 1))
  3141.                             playSound(stuff.Sounds.Itadori.Dismantle.Slash, rootpartt)
  3142.  
  3143.                             if(mod:FindFirstChild("Humanoid").Health < 1)then
  3144.                                 FXController:Bleed(mod)
  3145.                                 for _ = 1, 40 do
  3146.                                     bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
  3147.                                 end
  3148.                             end
  3149.                         end, alreadyhit)
  3150.                         task.wait()
  3151.                     end
  3152.                 end)
  3153.                 task.wait(.2)
  3154.             end
  3155.         end
  3156.  
  3157.         if(chantlevel == 2)then
  3158.             attacking = true
  3159.             doidle = false
  3160.             walkspeedadd = -1e6
  3161.             chantlevel = 1
  3162.             local a = playAnimation("Dismantle")
  3163.             a.TimePosition = 1.3
  3164.             task.delay(2.3, function()
  3165.                 a:Stop()
  3166.                 a:Cancel()
  3167.                 attacking = false
  3168.                 doidle = true
  3169.                 walkspeedadd = 0
  3170.             end)
  3171.             task.wait(.5)
  3172.             for i = 1, 6 do
  3173.                 local proj = stuff.Utils.Heian.DismantleProjectile:Clone()
  3174.                 proj.Parent = script.Effects
  3175.                 proj.CFrame = rootpart.CFrame*CFrame.new(math.random(-200, 200)/100, math.random(-200, 200)/100, math.random(-200, 200)/100)*CFrame.Angles(0, 0, math.rad(math.random(-45, 45)))
  3176.                 interp(proj)
  3177.                 playSound(stuff.Sounds.Heian.Dismantle.Fire, rootpart)
  3178.                 task.delay(1, function()
  3179.                     proj.slash.slashenabled5.Enabled = false
  3180.                     proj.slash.slashenabled7.Enabled = false
  3181.                     task.wait(1)
  3182.                     proj:Destroy()
  3183.                 end)
  3184.                 task.spawn(function()
  3185.                     local alreadyhit = {}
  3186.                     while proj.Parent do
  3187.                         alreadyhit = hitbox(proj.slash.CFrame, proj.slash.Size, 10, true, function(mod)
  3188.                             local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3189.                             local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  3190.                             bodyvelocity.MaxForce = Vector3.one*math.huge
  3191.                             bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -10
  3192.                             AddItem(bodyvelocity, .2)
  3193.  
  3194.                             local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3195.                             FXController:Flash(mod, Color3.new(1, 1, 1))
  3196.                             playSound(stuff.Sounds.Itadori.Dismantle.Slash, rootpartt)
  3197.  
  3198.                             if(mod:FindFirstChild("Humanoid").Health < 1)then
  3199.                                 FXController:Bleed(mod)
  3200.                                 for _ = 1, 40 do
  3201.                                     bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
  3202.                                 end
  3203.                             end
  3204.                         end, alreadyhit)
  3205.                         task.wait()
  3206.                     end
  3207.                 end)
  3208.                 task.wait(.1)
  3209.             end
  3210.         end
  3211.  
  3212.         if(chantlevel == 3)then
  3213.             chantlevel = 1
  3214.             attacking = true
  3215.             doidle = false
  3216.             walkspeedadd = -1e6
  3217.             local a = playAnimation("Dismantle")
  3218.             a.TimePosition = 3.7
  3219.  
  3220.             task.delay(.5, function()
  3221.                 a.Speed = 0
  3222.             end)
  3223.  
  3224.             local start = tick()
  3225.             local var32 = stuff.Utils.Heian
  3226.             local clone_2 = var32.Sweep:Clone()
  3227.             var32 = rootpart.CFrame
  3228.             clone_2.CFrame = var32
  3229.             var32 = clone_2.Weld
  3230.             var32.Part0 = rootpart
  3231.             var32 = script.Effects
  3232.             clone_2.Parent = var32
  3233.  
  3234.             var32 = AddItem(clone_2, 2.5)
  3235.             var32 = game:GetService("TweenService")
  3236.             local goal = {
  3237.                 TimeScale = 1;
  3238.             }
  3239.             var32 = var32:Create(clone_2.Attachment.Dust, TweenInfo.new(1), goal)
  3240.             var32:Play()
  3241.             var32 = game:GetService("TweenService")
  3242.             local goal = {
  3243.                 TimeScale = 1;
  3244.             }
  3245.             var32 = var32:Create(clone_2.Attachment.Ring, TweenInfo.new(1), goal)
  3246.             var32:Play()
  3247.             var32 = game:GetService("TweenService")
  3248.             local tbl_2 = {
  3249.                 TimeScale = 1;
  3250.             }
  3251.             var32 = var32:Create(clone_2.Slashes, TweenInfo.new(1.5, Enum.EasingStyle.Circular, Enum.EasingDirection.In), tbl_2)
  3252.             var32:Play()
  3253.             var32 = nil
  3254.  
  3255.             local any_PlaySound_result1 = playSound(stuff.Sounds.Heian.Slashes2, rootpart)
  3256.             game:GetService("TweenService"):Create(any_PlaySound_result1, TweenInfo.new(1.5), {
  3257.                 Volume = 2.5;
  3258.             }):Play()
  3259.  
  3260.             repeat
  3261.                 playSound(stuff.Sounds.Heian.Dismantle.Fire, rootpart)
  3262.                 hitbox(rootpart.CFrame, Vector3.one*30, 3, false, function(mod)
  3263.                     local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3264.                     local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  3265.                     bodyvelocity.MaxForce = Vector3.one*math.huge
  3266.                     bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -6
  3267.                     AddItem(bodyvelocity, .2)
  3268.  
  3269.                     local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3270.                     FXController:Flash(mod, Color3.new(1, 1, 1))
  3271.                     playSound(stuff.Sounds.Itadori.Dismantle.Slash, rootpartt)
  3272.  
  3273.                     if(mod:FindFirstChild("Humanoid").Health < 1)then
  3274.                         FXController:Bleed(mod)
  3275.                         for _ = 1, 40 do
  3276.                             bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
  3277.                         end
  3278.                     end
  3279.                 end)
  3280.                 task.wait(0.075)
  3281.             until not rootpart.Parent or tick() - start >= 1.5 or humanoid.Health < 1
  3282.  
  3283.             a.Speed = 1
  3284.             task.delay(.5, function()
  3285.                 a:Stop()
  3286.                 a:Cancel()
  3287.                 walkspeedadd = 0
  3288.                 doidle = true
  3289.                 attacking = false
  3290.             end)
  3291.  
  3292.             if not rootpart.Parent or humanoid.Health < 1 then return end
  3293.  
  3294.             hitbox(rootpart.CFrame, Vector3.one*40, 20, false, function(mod)
  3295.                 local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3296.                 local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  3297.                 bodyvelocity.MaxForce = Vector3.one*math.huge
  3298.                 bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -20
  3299.                 AddItem(bodyvelocity, .2)
  3300.  
  3301.                 local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3302.                 FXController:Flash(mod, Color3.new(1, 1, 1))
  3303.                 playSound(stuff.Sounds.Itadori.Dismantle.Slash, rootpartt)
  3304.  
  3305.                 if(mod:FindFirstChild("Humanoid").Health < 1)then
  3306.                     FXController:Bleed(mod)
  3307.                     for _ = 1, 40 do
  3308.                         bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
  3309.                     end
  3310.                 end
  3311.             end)
  3312.  
  3313.             clone_2.Attachment.Dust.Enabled = false
  3314.             clone_2.Attachment.Ring.Enabled = false
  3315.             clone_2.Slashes.Enabled = false
  3316.             clone_2.Break:Emit(30)
  3317.             clone_2.Stars:Emit(20)
  3318.             if any_PlaySound_result1 then
  3319.                 game:GetService("TweenService"):Create(any_PlaySound_result1, TweenInfo.new(0.5), {
  3320.                     Volume = 0;
  3321.                 }):Play()
  3322.             end
  3323.  
  3324.             playSound(stuff.Sounds.Itadori.Dismantle.Explode, rootpart)
  3325.  
  3326.             local clone_4 = stuff.Utils.Itadori.DivergentFist.BlackFlashCC:Clone()
  3327.             clone_4.TintColor = Color3.new(1, 1, 1)
  3328.             clone_4.Parent = game:GetService("Lighting")
  3329.             task.wait(0.04)
  3330.             clone_4.Brightness = 200
  3331.             clone_4.Contrast = -1000
  3332.             task.wait(0.04)
  3333.             clone_4:Destroy()
  3334.         end
  3335.  
  3336.         if(chantlevel == 4)then
  3337.             attacking = true
  3338.             doidle = false
  3339.             chantlevel = 1
  3340.             local a = playAnimation("Dismantle")
  3341.             a.TimePosition = 6
  3342.             task.delay(1.5, function()
  3343.                 a:Stop()
  3344.                 a:Cancel()
  3345.                 attacking = false
  3346.                 doidle = true
  3347.             end)
  3348.  
  3349.             task.wait(.1)
  3350.             playSound(stuff.Sounds.Misc.Swing.Fist, rootpart)
  3351.             task.wait(.7)
  3352.             task.spawn(function()
  3353.                 local clone_5 = stuff.Utils.Itadori.DivergentFist.BlackFlashCC:Clone()
  3354.                 clone_5.TintColor = Color3.new(1, 1, 1)
  3355.                 clone_5.Parent = game:GetService("Lighting")
  3356.                 task.wait(0.02)
  3357.                 clone_5.Brightness = 200
  3358.                 clone_5.Contrast = -1000
  3359.                 task.wait(0.02)
  3360.                 clone_5:Destroy()
  3361.             end)
  3362.             local clone = stuff.Utils.Heian.WorldSlash:Clone()
  3363.             clone.CFrame = rootpart.CFrame*CFrame.new(0,0,-200)
  3364.             clone.Parent = script.Effects
  3365.             local Highlight = Instance.new("Highlight", clone.Slash)
  3366.             Highlight.DepthMode = Enum.HighlightDepthMode.Occluded
  3367.             Highlight.FillTransparency = 0
  3368.             Highlight.FillColor = Color3.new(0, 0, 0)
  3369.             AddItem(clone, 4.1)
  3370.             playSound(stuff.Sounds.Heian.Dismantle.FireWCS, clone)
  3371.             playSound(stuff.Sounds.Heian.Dismantle.Fire, clone)
  3372.             clone.Smear:Emit(200)
  3373.             clone.Dust:Emit(200)
  3374.             game:GetService("TweenService"):Create(clone.Slash, TweenInfo.new(0.2), {
  3375.                 Size = Vector3.new(0, 0, 500);
  3376.             }):Play()
  3377.             game:GetService("TweenService"):Create(clone.Weld, TweenInfo.new(0.2), {
  3378.                 C1 = CFrame.new(0, 0, 0);
  3379.             }):Play()
  3380.             task.wait(0.2)
  3381.             clone.slashenabled3.Enabled = false
  3382.             clone.slashenabled4.Enabled = false
  3383.             clone.Stars:Emit(100)
  3384.  
  3385.             hitbox(clone.CFrame, clone.Size, 1e9, false, function(mod)
  3386.                 for i, v in next, mod:GetChildren() do
  3387.                     if(v:IsA("BasePart"))then
  3388.                         local bodyvelocity = Instance.new("BodyVelocity", v)
  3389.                         bodyvelocity.MaxForce = Vector3.one*math.huge
  3390.                         bodyvelocity.Velocity = CFrame.lookAt(v.Position, rootpart.Position).LookVector * -50
  3391.                         AddItem(bodyvelocity, .2)
  3392.                     end
  3393.                 end
  3394.  
  3395.                 local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3396.                 FXController:Flash(mod, Color3.new(1, 1, 1))
  3397.                 playSound(stuff.Sounds.Itadori.Dismantle.Explode, rootpartt)
  3398.  
  3399.                 if(mod:FindFirstChild("Humanoid").Health < 1)then
  3400.                     FXController:Bleed(mod)
  3401.                     for _ = 1, 40 do
  3402.                         bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
  3403.                     end
  3404.                 end
  3405.             end)
  3406.         end
  3407.     end},
  3408.     [2] = {"Open FURNACE", function()
  3409.         attacking = true
  3410.         doidle = false
  3411.         iframes = true
  3412.         walkspeedadd = -1e6
  3413.  
  3414.         playAnimation("FlameArrow")
  3415.         task.wait(.5)
  3416.         playSound(stuff.Sounds.Heian.FireArrow.Hands, rootpart)
  3417.         local clone_2 = stuff.Utils.Heian.FlameArrow.Hands:Clone()
  3418.         clone_2.LA.Weld.Part1 = char["Left Arm"]
  3419.         clone_2.RA.Weld.Part1 = char["Right Arm"]
  3420.         clone_2.Parent = char
  3421.  
  3422.         task.wait(1.3)
  3423.         local Hands_3 = char:FindFirstChild("Hands")
  3424.         if Hands_3 then
  3425.             for _, v_3 in Hands_3.LA.startup:GetChildren() do
  3426.                 v_3.Enabled = false
  3427.             end
  3428.             for _, v_4 in Hands_3.RA.startup:GetChildren() do
  3429.                 v_4.Enabled = false
  3430.             end
  3431.             for _, v_5 in Hands_3.LA.fire:GetChildren() do
  3432.                 v_5.Enabled = true
  3433.             end
  3434.             for _, v_6 in Hands_3.RA.fire:GetChildren() do
  3435.                 v_6.Enabled = true
  3436.             end
  3437.             for _, v_7 in Hands_3.LA.Beam:GetChildren() do
  3438.                 v_7.Enabled = true
  3439.             end
  3440.             game:GetService("TweenService"):Create(playSound(stuff.Sounds.Heian.FireArrow.FlameIdle, Hands_3.RA), TweenInfo.new(3), {
  3441.                 Volume = 1;
  3442.             }):Play()
  3443.         end
  3444.         local clone = stuff.Utils.Heian.FlameArrow.Clap:Clone()
  3445.         clone.CFrame = rootpart.CFrame
  3446.         AddItem(clone, 2)
  3447.         clone.Parent = char
  3448.         for i_8, v_8 in clone.C1:GetChildren() do
  3449.             v_8:Emit(v_8:GetAttribute("EmitCount"))
  3450.         end
  3451.         playSound(stuff.Sounds.Heian.FireArrow.Clap, rootpart)
  3452.  
  3453.         task.wait(.9)
  3454.         local clone_7 = stuff.Utils.Heian.FlameArrow.Clap:Clone()
  3455.         clone_7.CFrame = rootpart.CFrame
  3456.         AddItem(clone_7, 2)
  3457.         clone_7.Parent = char
  3458.         for i_9, v_9 in clone_7.C2:GetChildren() do
  3459.             v_9:Emit(v_9:GetAttribute("EmitCount"))
  3460.         end
  3461.         playSound(stuff.Sounds.Heian.FireArrow.Clap, rootpart)
  3462.         playSound(stuff.Sounds.Heian.Flames, rootpart)
  3463.  
  3464.         task.wait(1.4)
  3465.         local Hands = char:FindFirstChild("Hands")
  3466.         if Hands then
  3467.             for _, v_10 in Hands.LA.fire:GetChildren() do
  3468.                 v_10.Enabled = false
  3469.             end
  3470.             for _, v_11 in Hands.RA.fire:GetChildren() do
  3471.                 v_11.Enabled = false
  3472.             end
  3473.             for _, v_12 in Hands.LA.Beam:GetChildren() do
  3474.                 v_12.Enabled = false
  3475.             end
  3476.         end
  3477.         local clone_8 = stuff.Utils.Heian.FlameArrow.Arrow:Clone()
  3478.         clone_8.Weld.Part1 = rootpart
  3479.         clone_8.Parent = char
  3480.         for _, v_13 in clone_8.Beam:GetChildren() do
  3481.             game:GetService("TweenService"):Create(v_13, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
  3482.                 Brightness = 50;
  3483.             }):Play()
  3484.             local _
  3485.         end
  3486.         game:GetService("TweenService"):Create(clone_8.light.SpotLight, TweenInfo.new(0.4), {
  3487.             Brightness = 2;
  3488.         }):Play()
  3489.         game:GetService("TweenService"):Create(clone_8.Ground.PointLight, TweenInfo.new(1), {
  3490.             Brightness = 2;
  3491.         }):Play()
  3492.         playSound(stuff.Sounds.Heian.FireArrow.Arrow, rootpart)
  3493.  
  3494.         task.wait(1.1)
  3495.         local Hands_2 = char:FindFirstChild("Hands")
  3496.         if Hands_2 then
  3497.             Hands_2:Destroy()
  3498.         end
  3499.         local Arrow = char:FindFirstChild("Arrow")
  3500.         if Arrow then
  3501.             local Ground = Arrow.Ground
  3502.             Ground.Parent = rootpart
  3503.             AddItem(Ground, 2)
  3504.         end
  3505.         local clone_4 = stuff.Utils.Heian.FlameArrow.Shot:Clone()
  3506.         clone_4.CFrame = rootpart.CFrame
  3507.         AddItem(clone_4, 2)
  3508.         clone_4.Parent = script.Effects
  3509.         for i_15, v_15 in clone_4.Attachment:GetChildren() do
  3510.             v_15:Emit(v_15:GetAttribute("EmitCount"))
  3511.         end
  3512.         playSound(stuff.Sounds.Heian.FireArrow.Fire, rootpart)
  3513.  
  3514.         Arrow.Weld:Destroy()
  3515.         Arrow.Anchored = true
  3516.  
  3517.         craters.crater(rootpart.Position, 1, script.Effects, 3, 1, {char, script})
  3518.  
  3519.         local CFrame_upvw = Arrow.CFrame
  3520.         local tick_result1_upvw = tick()
  3521.         local var134_upvw
  3522.         local any_Connect_result1_upvr = Arrow:GetPropertyChangedSignal("Position"):Connect(function()
  3523.             CFrame_upvw = Arrow.CFrame
  3524.             tick_result1_upvw = tick()
  3525.         end)
  3526.         var134_upvw = game:GetService("RunService").Stepped:Connect(function()
  3527.             if not Arrow.Parent then
  3528.                 var134_upvw:Disconnect()
  3529.                 any_Connect_result1_upvr:Disconnect()
  3530.             else
  3531.                 local tbl = {}
  3532.                 tbl[1] = Arrow
  3533.                 workspace:BulkMoveTo(tbl, {CFrame_upvw + (CFrame_upvw.RightVector) * (340 * (tick() - tick_result1_upvw))}, Enum.BulkMoveMode.FireCFrameChanged)
  3534.             end
  3535.         end)
  3536.  
  3537.         task.delay(1, function()
  3538.             attacking = false
  3539.             doidle = true
  3540.             iframes = false
  3541.             walkspeedadd = 0
  3542.         end)
  3543.  
  3544.         local start = tick()
  3545.  
  3546.         repeat task.wait()
  3547.             local bounds = workspace:GetPartBoundsInBox(Arrow.CFrame, Vector3.one*7)
  3548.             local hit = false
  3549.             for i, v in next, bounds do
  3550.                 if(v ~= Arrow and not v:IsDescendantOf(Arrow) and not v:IsDescendantOf(char) and not v:IsDescendantOf(arms) and not v:IsDescendantOf(script.Effects))then
  3551.                     hit = v
  3552.                     break
  3553.                 end
  3554.             end
  3555.             if(hit)then break end
  3556.         until tick() - start >= 2
  3557.  
  3558.         local pos = Arrow.Position
  3559.         Arrow:Destroy()
  3560.  
  3561.         local clone_3 = stuff.Utils.Heian.FlameArrow.explode:Clone()
  3562.         clone_3.Startup.Position = pos
  3563.         clone_3.boom.Position = pos
  3564.         clone_3.Parent = script.Effects
  3565.         AddItem(clone_3, 4)
  3566.         for _, v_upvr in clone_3.Startup:GetDescendants() do
  3567.             if v_upvr:IsA("ParticleEmitter") then
  3568.                 v_upvr:Emit(v_upvr:GetAttribute("EmitCount"))
  3569.                 v_upvr.Enabled = true
  3570.                 task.delay(v_upvr:GetAttribute("EmitDuration"), function()
  3571.                     v_upvr.Enabled = false
  3572.                 end)
  3573.             end
  3574.         end
  3575.         playSound(stuff.Sounds.Heian.FireArrow.Shockwave, clone_3.Startup)
  3576.         task.wait(0.4)
  3577.  
  3578.         craters.crater(pos, 6, script.Effects, 5, 1, {script, char})
  3579.         local ray = workspace:Raycast(pos, Vector3.yAxis*-100, rayparam)
  3580.         if(ray)then
  3581.             for i = 1, math.random(20, 50) do
  3582.                 craters.debris(pos, math.random(3, 7), ray.Instance.Color, ray.Instance.Material, false, 200, 5)
  3583.             end
  3584.         end
  3585.  
  3586.         hitbox(CFrame.new(pos), Vector3.new(70, 200, 70), 60, true, function(mod)
  3587.             for i, v in next, mod:GetChildren() do
  3588.                 if(v:IsA("BasePart"))then
  3589.                     local bodyvelocity = Instance.new("BodyVelocity", v)
  3590.                     bodyvelocity.MaxForce = Vector3.one*math.huge
  3591.                     bodyvelocity.Velocity = CFrame.lookAt(v.Position, rootpart.Position).LookVector * -100
  3592.                     AddItem(bodyvelocity, .2)
  3593.                 end
  3594.             end
  3595.         end)
  3596.  
  3597.         for _, v_2_upvr in clone_3.boom.Attachment:GetDescendants() do
  3598.             if v_2_upvr:IsA("ParticleEmitter") then
  3599.                 v_2_upvr.Enabled = true
  3600.                 task.delay(0.5, function()
  3601.                     v_2_upvr.Enabled = false
  3602.                 end)
  3603.             end
  3604.         end
  3605.         local clone_6 = stuff.Utils.Megumi.Mahoraga.WorldSlash.mesh:Clone()
  3606.         clone_6.Position = pos
  3607.         clone_6.Decal.Transparency = 0
  3608.         clone_6.Mesh.Scale = Vector3.new(2, 50, 2)
  3609.         clone_6.Parent = clone_3
  3610.         game:GetService("TweenService"):Create(clone_6, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
  3611.             Size = Vector3.new(80, 40, 80);
  3612.             CFrame = clone_6.CFrame * CFrame.Angles(0, -3.12413936106985, 0);
  3613.         }):Play()
  3614.         game:GetService("TweenService"):Create(clone_6.Mesh, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
  3615.             Scale = Vector3.new(60, 10, 60);
  3616.         }):Play()
  3617.         game:GetService("TweenService"):Create(clone_6.Decal, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
  3618.             Transparency = 1;
  3619.         }):Play()
  3620.         AddItem(clone_6, 1)
  3621.         local clone_5 = stuff.Utils.Itadori.FireArrow.Burn:Clone()
  3622.         clone_5.Parent = clone_3
  3623.         clone_5.Position = pos
  3624.         clone_5.Center.Wind2:Emit(25)
  3625.         clone_5.Flames:Emit(200)
  3626.         game:GetService("TweenService"):Create(clone_5, TweenInfo.new(0.75), {
  3627.             Size = Vector3.new(0, 250, 0);
  3628.             CFrame = clone_5.CFrame * CFrame.Angles(0, math.pi, 0);
  3629.         }):Play()
  3630.         game:GetService("TweenService"):Create(clone_5.Beam, TweenInfo.new(1, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {
  3631.             Width0 = 0;
  3632.             Width1 = 0;
  3633.         }):Play()
  3634.         game:GetService("TweenService"):Create(clone_5.Lines, TweenInfo.new(1, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {
  3635.             Width0 = 0;
  3636.             Width1 = 0;
  3637.         }):Play()
  3638.         playSound(stuff.Sounds.Heian.FireArrow.Explode, clone_5)
  3639.     end},
  3640.     [3] = {"Cleave Rush", function()
  3641.         attacking = true
  3642.         doidle = false
  3643.         iframes = true
  3644.         walkspeedadd = -1e6
  3645.  
  3646.         local anim, animstop = playAnimation("Cleave")
  3647.         anim.TimePosition = 0
  3648.  
  3649.         playSound(stuff.Sounds.Heian.Divergent, rootpart)
  3650.         local fist = stuff.Utils.Itadori.DivergentFist.DivergentFist:Clone()
  3651.         fist.Parent = char
  3652.         fist.Weld.Part0 = char["Right Arm"]
  3653.         AddItem(fist, 4)
  3654.         task.delay(3, function()
  3655.             fist.Core.Aura.Enabled = false
  3656.             fist.Core.Sparks.Enabled = false
  3657.             fist.Trail.Enabled = false
  3658.             fist.PointLight.Enabled = false
  3659.         end)
  3660.  
  3661.         playSound(stuff.Sounds.Mahito.Transfig.Eyes, rootpart)
  3662.         playSound(stuff.Sounds.Heian.CleaveVoice, rootpart)
  3663.         local clone_3 = stuff.Utils.Itadori.EyeTrails:Clone()
  3664.         clone_3.Weld.Part0 = char.Head
  3665.         clone_3.Parent = script.Effects
  3666.         clone_3.Glow:Emit(1)
  3667.         AddItem(clone_3, 2)
  3668.         task.wait(1)
  3669.         clone_3.Trail1.Trail.Enabled = false
  3670.         clone_3.Trail2.Trail.Enabled = false
  3671.         clone_3.Eye1.Glow.Enabled = false
  3672.         clone_3.Eye2.Glow.Enabled = false
  3673.  
  3674.         playSound(stuff.Sounds.Itadori.Rush.Rush, rootpart)
  3675.         local clone_5 = stuff.Utils.Itadori.RushWind:Clone()
  3676.         clone_5.CFrame = rootpart.CFrame
  3677.         clone_5.Parent = script.Effects
  3678.         clone_5.Dust:Emit(7)
  3679.         clone_5.Ring:Emit(7)
  3680.         clone_5.Dash1.Dash:Emit(1)
  3681.         clone_5.Dash2.Dash:Emit(1)
  3682.         AddItem(clone_5, 2)
  3683.         for i = 1, 5 do
  3684.             task.delay(0.075 * i, function()
  3685.                 local clone = stuff.Utils.Itadori.Shock:Clone()
  3686.                 clone.CFrame = rootpart.CFrame * CFrame.Angles((math.pi/2), 0, 0)
  3687.                 clone.Parent = script.Effects
  3688.                 game:GetService("TweenService"):Create(clone, TweenInfo.new(0.2), {
  3689.                     Size = Vector3.new(8, 0, 8);
  3690.                     Transparency = 1;
  3691.                 }):Play()
  3692.                 AddItem(clone, 0.2)
  3693.             end)
  3694.         end
  3695.  
  3696.         local bodyvelocity = Instance.new("BodyVelocity", rootpart)
  3697.         bodyvelocity.MaxForce = Vector3.one*math.huge
  3698.         bodyvelocity.Velocity = rootpart.CFrame.LookVector * 70
  3699.         AddItem(bodyvelocity, 2)
  3700.  
  3701.         local start = tick()
  3702.         local hit = nil
  3703.         while not hit and tick() - start < 1 do
  3704.             hitbox(rootpart.CFrame*CFrame.new(0,0,-5), Vector3.one*9, 0, true, function(mod)
  3705.                 if(hit)then return end
  3706.                 hit = mod
  3707.             end)
  3708.             task.wait()
  3709.         end
  3710.  
  3711.         bodyvelocity:Destroy()
  3712.         if(not hit)then
  3713.             task.wait(3 - anim.TimePosition)
  3714.             attacking = false
  3715.             doidle = true
  3716.             iframes = false
  3717.             walkspeedadd = 0
  3718.             animstop()
  3719.             return
  3720.         end
  3721.  
  3722.         anim.TimePosition = 3.5
  3723.  
  3724.         hit:PivotTo(char["Right Arm"].CFrame*CFrame.new(0,-1,0))
  3725.         local hitting = true
  3726.         task.spawn(function()
  3727.             while hitting do
  3728.                 for i, v in next, hit:GetDescendants() do
  3729.                     if(v:IsA("BasePart"))then
  3730.                         pcall(function()
  3731.                             v:SetNetworkOwner(owner)
  3732.                         end)
  3733.                     end
  3734.                 end
  3735.  
  3736.                 hit.Head.Anchored = true
  3737.                 hit.Head.CFrame = CFrame.lookAt((char["Right Arm"].CFrame*CFrame.new(0,-1.3,0)).Position, char["Right Arm"].Position)
  3738.                 task.wait()
  3739.             end
  3740.         end)
  3741.  
  3742.         FXController:Flash(hit, Color3.new(1, 1, 1))
  3743.         playSound(stuff.Sounds.Heian.Grab, rootpart)
  3744.         playSound(stuff.Sounds.Heian.CleaveVoice2, rootpart)
  3745.  
  3746.         task.wait(1.1)
  3747.  
  3748.         local clone_6_upvr = stuff.Utils.Heian.Cleave:Clone()
  3749.         clone_6_upvr.Weld.Part1 = hit.HumanoidRootPart
  3750.         clone_6_upvr.Parent = script.Effects
  3751.         task.delay(0.35, function()
  3752.             clone_6_upvr.Slashes.Enabled = false
  3753.             clone_6_upvr.PointLight:Destroy()
  3754.             AddItem(clone_6_upvr, 0.08)
  3755.         end)
  3756.         game:GetService("TweenService"):Create(clone_6_upvr.PointLight, TweenInfo.new(0.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
  3757.             Brightness = 40;
  3758.         }):Play()
  3759.         game:GetService("TweenService"):Create(clone_6_upvr.Slashes, TweenInfo.new(0.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
  3760.             TimeScale = 1;
  3761.         }):Play()
  3762.         for _ = 1, 20 do
  3763.             playSound(stuff.Sounds.Itadori.Dismantle.Slash, hit.HumanoidRootPart)
  3764.             dmg(hit:FindFirstChildOfClass("Humanoid"), 3)
  3765.             task.wait()
  3766.         end
  3767.  
  3768.         FXController:Flash(hit, Color3.new(1, 1, 1))
  3769.         playSound(stuff.Sounds.Itadori.Dismantle.Explode, hit.HumanoidRootPart)
  3770.         task.delay(0.1, function()
  3771.             local clone_2 = stuff.Utils.Itadori.DivergentFist.BlackFlashCC:Clone()
  3772.             clone_2.Parent = game:GetService("Lighting")
  3773.             task.wait(0.05)
  3774.             clone_2.TintColor = Color3.new(1, 1, 1)
  3775.             clone_2.Brightness = 200
  3776.             clone_2.Contrast = -1000
  3777.             task.wait(0.05)
  3778.             clone_2:Destroy()
  3779.         end)
  3780.  
  3781.         local clone_7_upvr = stuff.Utils.Itadori.Dismantle.Cleave:Clone()
  3782.         clone_7_upvr.Weld.Part1 = hit.HumanoidRootPart
  3783.         clone_7_upvr.Parent = script.Effects
  3784.         task.delay(0.1, function()
  3785.             clone_7_upvr.Slashes.Enabled = false
  3786.             clone_7_upvr.Slash2.Enabled = false
  3787.             clone_7_upvr.PointLight:Destroy()
  3788.             AddItem(clone_7_upvr, 0.08)
  3789.         end)
  3790.         playSound(stuff.Sounds.Itadori.Dismantle.FinishSlash, hit.HumanoidRootPart)
  3791.         for _ = 1, 10 do
  3792.             pcall(function()
  3793.                 clone_7_upvr.Slashes:Emit(1)
  3794.             end)
  3795.             playSound(stuff.Sounds.Itadori.Dismantle.Slash, hit.HumanoidRootPart)
  3796.             task.wait()
  3797.             local _
  3798.         end
  3799.  
  3800.         dmg(hit:FindFirstChildOfClass("Humanoid"), 100)
  3801.  
  3802.         if(hit:FindFirstChildOfClass("Humanoid").Health < 1)then
  3803.             FXController:Bleed(hit)
  3804.             for _ = 1, 40 do
  3805.                 bloodyzee:Blood(hit.HumanoidRootPart.CFrame, 50, 360, 360)
  3806.             end
  3807.             local clone_4 = stuff.Utils.Heian.BloodSpread:Clone()
  3808.             clone_4.Parent = hit:FindFirstChild("HumanoidRootPart")
  3809.             clone_4:Emit(80)
  3810.             AddItem(clone_4, 2)
  3811.         end
  3812.  
  3813.         hit.Head.Anchored = false
  3814.         local bodyvelocity = Instance.new("BodyVelocity", hit.HumanoidRootPart)
  3815.         bodyvelocity.MaxForce = Vector3.one*math.huge
  3816.         bodyvelocity.Velocity = CFrame.lookAt(hit.HumanoidRootPart.Position, rootpart.Position).LookVector * -100
  3817.         AddItem(bodyvelocity, .2)
  3818.  
  3819.         hitting = false
  3820.  
  3821.         attacking = false
  3822.         doidle = true
  3823.         iframes = false
  3824.         walkspeedadd = 0
  3825.     end},
  3826.     [4] = {"Kamutoke",function()
  3827.         attacking = true
  3828.         doidle = false
  3829.         walkspeedadd = -8
  3830.  
  3831.         playAnimation("Kamutoke")
  3832.         local clone = stuff.Utils.Heian.Kamutoke:Clone()
  3833.         clone.Handle.Weld.Part0 = char["Right Arm"]
  3834.         clone.Parent = char
  3835.         playSound(stuff.Sounds.Heian.Kamutoke.Equip, rootpart)
  3836.         playSound(stuff.Sounds.Heian.Kamutoke.Equip2, rootpart)
  3837.  
  3838.         for i = 1, math.random(10, 25) do
  3839.             task.delay(math.random(1, 5)/i, function()
  3840.                 local arg1_3 = rootpart.Position+Vector3.new(math.random(-50, 50), (-3*1.3), math.random(-50, 50))
  3841.  
  3842.                 local clone_3 = stuff.Utils.Heian.HitArea:Clone()
  3843.                 clone_3.Size = Vector3.new(19, 0, 19)
  3844.                 clone_3.Overlay.Color3 = Color3.new(1, 0, 0)
  3845.                 clone_3.Prog.Overlay.Color3 = Color3.new(1, 0, 0)
  3846.                 clone_3.Afterimages.Enabled = false
  3847.                 clone_3.groundwaveing.Spin.Enabled = false
  3848.                 clone_3.Position = arg1_3
  3849.                 clone_3.Prog.Position = arg1_3
  3850.                 clone_3.Prog.Overlay.Transparency = 1
  3851.                 clone_3.Parent = script.Effects
  3852.                 game:GetService("TweenService"):Create(clone_3.Prog.Overlay, TweenInfo.new(0.4), {
  3853.                     Transparency = 0.8;
  3854.                 }):Play()
  3855.                 game:GetService("TweenService"):Create(clone_3.Prog, TweenInfo.new(0.7, Enum.EasingStyle.Linear), {
  3856.                     Size = clone_3.Size;
  3857.                 }):Play()
  3858.                 AddItem(clone_3, 3)
  3859.                 task.wait(0.7)
  3860.                 pcall(game.Destroy, clone_3:FindFirstChild("Prog"))
  3861.                 local clone_2_upvr = stuff.Utils.Heian.Lightning:Clone()
  3862.                 clone_2_upvr.Position = arg1_3
  3863.                 clone_2_upvr.Parent = script.Effects
  3864.                 AddItem(clone_2_upvr, 2)
  3865.                 clone_2_upvr.Attachment.Dust:Emit(25)
  3866.                 clone_2_upvr.Attachment.Ring:Emit(25)
  3867.                 clone_2_upvr.Attachment.Wind2:Emit(6)
  3868.                 local any_new_result1_upvr = LightningBolt.new(clone_2_upvr.Air, clone_2_upvr.Attachment)
  3869.                 any_new_result1_upvr.PulseSpeed = 1000
  3870.                 any_new_result1_upvr.FadeLength = 0.25
  3871.                 any_new_result1_upvr.MaxRadius = 20
  3872.                 any_new_result1_upvr.MinRadius = 0
  3873.                 any_new_result1_upvr.AnimationSpeed = 300
  3874.                 any_new_result1_upvr.MinThicknessMultiplier = 2
  3875.                 any_new_result1_upvr.MaxThicknessMultiplier = 5
  3876.                 any_new_result1_upvr.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)), ColorSequenceKeypoint.new(0.2, Color3.fromRGB(255, 170, 0)), ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 127))})
  3877.  
  3878.                 craters.crater(arg1_3+(Vector3.yAxis*2), .5+math.random(), script.Effects, 2, 1, {script, char})
  3879.                 local ray = workspace:Raycast(arg1_3+(Vector3.yAxis*2), Vector3.yAxis*-100, rayparam)
  3880.                 if(ray)then
  3881.                     for i = 1, math.random(10, 20) do
  3882.                         craters.debris(ray.Position, math.random(), ray.Instance.Color, ray.Instance.Material, true, 100, 5)
  3883.                     end
  3884.                 end
  3885.                 hitbox(CFrame.new(arg1_3), Vector3.one*20, 10, true, function(mod)
  3886.                     local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  3887.                     local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  3888.                     bodyvelocity.MaxForce = Vector3.one*math.huge
  3889.                     bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, arg1_3).LookVector * -20
  3890.                     AddItem(bodyvelocity, .2)
  3891.                 end)
  3892.                 task.delay(0.05, pcall, function()
  3893.                     local workspace_Raycast_result1 = workspace:Raycast(arg1_3+(Vector3.yAxis*2), Vector3.new(0, -20, 0), rayparam)
  3894.                     if workspace_Raycast_result1 then
  3895.                         clone_2_upvr.Attachment.WorldPosition = workspace_Raycast_result1.Position
  3896.                     end
  3897.                     task.wait(0.1)
  3898.                     any_new_result1_upvr:Destroy()
  3899.                     clone_2_upvr.Attachment.Burn:Emit(1)
  3900.                     clone_2_upvr.Sparks.Enabled = false
  3901.                     game:GetService("TweenService"):Create(clone_2_upvr.PointLight, TweenInfo.new(0.5), {
  3902.                         Brightness = 0;
  3903.                     }):Play()
  3904.                 end)
  3905.                 playSound(stuff.Sounds.Heian.Kamutoke.Fire[tostring(math.random(1, 4))], clone_2_upvr)
  3906.             end)
  3907.         end
  3908.  
  3909.         task.wait(1)
  3910.         clone:Destroy()
  3911.         attacking = false
  3912.         doidle = true
  3913.         walkspeedadd = 0
  3914.     end},
  3915. }
  3916.  
  3917. local cooldowns = {}
  3918. for i, v in next, attacks do
  3919.     local a = Instance.new("Tool", owner.Backpack)
  3920.     a.Name = v[1]
  3921.     a.CanBeDropped = false
  3922.     a.RequiresHandle = false
  3923.     cooldowns[i] = tick()
  3924.     a.Equipped:Connect(function()
  3925.         task.wait()
  3926.         humanoid:UnequipTools()
  3927.         if(attacking or tick() < cooldowns[i])then return end
  3928.  
  3929.         rem:FireClient(owner, "dashcancel")
  3930.         dashing = false
  3931.  
  3932.         v[2]()
  3933.         cooldowns[i] = tick() + 5
  3934.     end)
  3935. end
  3936.  
  3937. RotationPowerFrontBack = 0.2 --multiplies rotation by RotationPower
  3938. RotationPowerLeftRight = 0.2 --multiplies rotation by RotationPower
  3939. RotationSpeed = 0.1
  3940. OriginalC0 = rootpart.RootJoint.C0
  3941.  
  3942. game:GetService("RunService").PostSimulation:Connect(function(step)
  3943.     local DotFrontBack = rootpart.CFrame.LookVector:Dot(humanoid.MoveDirection)
  3944.     local DotLeftRight = rootpart.CFrame.RightVector:Dot(humanoid.MoveDirection)
  3945.     rootpart.RootJoint.C0 = rootpart.RootJoint.C0:Lerp(OriginalC0 * CFrame.Angles(DotFrontBack*RotationPowerFrontBack,-DotLeftRight*RotationPowerLeftRight,0),RotationSpeed)
  3946. end)
  3947.  
  3948. local combo = 0
  3949. local lastm1 = 0
  3950. local m1debounce = false
  3951. local mousedown = false
  3952. mouse.Button1Down:Connect(function()
  3953.     mousedown = true
  3954.  
  3955.     repeat
  3956.         task.wait()
  3957.  
  3958.         task.spawn(function()
  3959.             if(m1debounce or attacking)then return end
  3960.             if(tick() - lastm1 >= 2)then
  3961.                 combo = 0
  3962.             end
  3963.             combo += 1
  3964.  
  3965.             if(combo >= 5)then
  3966.                 combo = 1
  3967.             end
  3968.  
  3969.             rem:FireClient(owner, "dashcancel")
  3970.             dashing = false
  3971.  
  3972.             local arg3 = humanoid.FloorMaterial == Enum.Material.Air and "Down" or spaceheld and "Up" or nil
  3973.  
  3974.             local isblackflash, fist = math.random(1, 20) == 1, nil
  3975.             if(isblackflash)then
  3976.                 playSound(stuff.Sounds.Heian.Divergent, rootpart)
  3977.  
  3978.                 if(combo == 1 or combo == 3)then
  3979.                     fist = stuff.Utils.Itadori.DivergentFist.DivergentFist:Clone()
  3980.                     fist.Parent = char
  3981.                     fist.Weld.Part0 = char["Right Arm"]
  3982.                 elseif(combo == 2)then
  3983.                     fist = stuff.Utils.Itadori.DivergentFist.DivergentFist:Clone()
  3984.                     fist.Parent = char
  3985.                     fist.Weld.Part0 = char["Left Arm"]
  3986.                 elseif(combo == 4)then
  3987.                     fist = stuff.Utils.Itadori.DivergentFist.DivergentFist:Clone()
  3988.                     fist.Parent = char
  3989.                     fist.Weld.Part0 = char["Right Leg"]
  3990.                 end
  3991.  
  3992.                 AddItem(fist, 2)
  3993.                 task.delay(1, function()
  3994.                     fist.Core.Aura.Enabled = false
  3995.                     fist.Core.Sparks.Enabled = false
  3996.                     fist.Trail.Enabled = false
  3997.                     fist.PointLight.Enabled = false
  3998.                 end)
  3999.             end
  4000.  
  4001.             local anim, stopanim;
  4002.             if(combo == 1)then
  4003.                 anim, stopanim = playAnimation("Melee1", true)
  4004.             elseif(combo == 2)then
  4005.                 anim, stopanim = playAnimation("Melee2", true)
  4006.             elseif(combo == 3)then
  4007.                 anim, stopanim = playAnimation("Melee3", true)
  4008.             elseif(combo == 4)then
  4009.                 if(arg3 == "Up")then
  4010.                     anim, stopanim = playAnimation("Up", true)
  4011.                 elseif(arg3 == "Down")then
  4012.                     anim, stopanim = playAnimation("Down", true)
  4013.                 else
  4014.                     anim, stopanim = playAnimation("Melee4", true)
  4015.                 end
  4016.             end
  4017.  
  4018.             if combo == 1 or combo == 3 or arg3 == "Up" then
  4019.                 FXController:ArmFlash(char["Right Arm"], Color3.fromRGB(85, 0, 0))
  4020.             else
  4021.                 if combo == 2 then
  4022.                     FXController:ArmFlash(char["Left Arm"], Color3.fromRGB(85, 0, 0))
  4023.                 else
  4024.                     if combo == 4 then
  4025.                         local var30 = false
  4026.                         if arg3 == "Down" then
  4027.                             var30 = 0.4
  4028.                         end
  4029.                         FXController:ArmFlash(char["Right Leg"], Color3.fromRGB(85, 0, 0), var30)
  4030.                     end
  4031.                 end
  4032.             end
  4033.  
  4034.             if(anim)then
  4035.                 humanoid.JumpPower = 0
  4036.                 doidle = false
  4037.                 attacking = true
  4038.                 m1debounce = true
  4039.                 walkspeedadd = -4
  4040.  
  4041.                 anim.Speed = 1
  4042.                 playSound(stuff.Sounds.Misc.Swing.Fist, rootpart)
  4043.                 task.wait(anim.Length/2)
  4044.  
  4045.                 local didhit = false
  4046.                 local hitcharacters = {}
  4047.                 hitbox(arg3 == "Down" and rootpart.CFrame*CFrame.new(0, -4, -4) or rootpart.CFrame*CFrame.new(0, 0, -4), Vector3.one*8, combo == 4 and 15 or 5, combo == 4 and true or false, function(mod)
  4048.                     didhit = true
  4049.                     table.insert(hitcharacters, mod)
  4050.                     local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  4051.                     FXController:Flash(mod, Color3.new(1, 1, 1))
  4052.                     playSound(stuff.Sounds.M1:FindFirstChild("Hit"..combo), rootpartt)
  4053.  
  4054.                     if(combo ~= 4)then
  4055.                         local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  4056.                         bodyvelocity.MaxForce = Vector3.one*math.huge
  4057.                         bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -10
  4058.                         AddItem(bodyvelocity, .2)
  4059.                     else
  4060.                         if(arg3 ~= "Up")then
  4061.                             local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  4062.                             bodyvelocity.MaxForce = Vector3.one*math.huge
  4063.                             bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -50
  4064.                             AddItem(bodyvelocity, .2)
  4065.                         else
  4066.                             local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  4067.                             bodyvelocity.MaxForce = Vector3.one*math.huge
  4068.                             bodyvelocity.Velocity = Vector3.new(0, 50, 0)
  4069.                             AddItem(bodyvelocity, .2)
  4070.                         end
  4071.                     end
  4072.                 end)
  4073.  
  4074.                 if(didhit and isblackflash)then
  4075.                     local clone_4_upvr = stuff.Utils.Itadori.DivergentFist.BlackFlashHit:Clone()
  4076.                     clone_4_upvr.Position = rootpart.Position
  4077.                     clone_4_upvr.Parent = script.Effects
  4078.                     AddItem(clone_4_upvr, 1)
  4079.                     clone_4_upvr.Wind2:Emit(8)
  4080.                     game:GetService("TweenService"):Create(clone_4_upvr.PointLight, TweenInfo.new(1), {
  4081.                         Brightness = 0;
  4082.                     }):Play()
  4083.  
  4084.                     for i, arg2 in next, hitcharacters do
  4085.                         local rootpartt = arg2:FindFirstChild("HumanoidRootPart")
  4086.                         for _, v in arg2:GetChildren() do
  4087.                             if v:IsA("BasePart") then
  4088.                                 local clone_6 = stuff.Utils.Itadori.DivergentFist.FlashBurn:Clone()
  4089.                                 clone_6.Parent = v
  4090.                                 AddItem(clone_6, 1)
  4091.                             end
  4092.                         end
  4093.  
  4094.                         playSound(stuff.Sounds.Heian.BlackFlashHit, arg2:FindFirstChild("HumanoidRootPart"))
  4095.                         dmg(arg2:FindFirstChildOfClass("Humanoid"), 20)
  4096.                         FXController:Flash(arg2, Color3.new(1, 0, 0))
  4097.                         Ragdoll:Ragdoll(arg2, 4)
  4098.  
  4099.                         pcall(game.Destroy, rootpartt:FindFirstChildOfClass("BodyVelocity"))
  4100.  
  4101.                         local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  4102.                         bodyvelocity.MaxForce = Vector3.one*math.huge
  4103.                         bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -80
  4104.                         AddItem(bodyvelocity, .2)
  4105.                     end
  4106.  
  4107.                     task.delay(0.1, function()
  4108.                         clone_4_upvr.Blast:Emit(8)
  4109.                         clone_4_upvr.Sparks:Emit(15)
  4110.                         clone_4_upvr.Lightning:Emit(6)
  4111.                         clone_4_upvr.Wind:Emit(7)
  4112.                     end)
  4113.                     task.spawn(function()
  4114.                         local clone_8 = stuff.Utils.Itadori.DivergentFist.BlackFlashCC:Clone()
  4115.                         clone_8.Parent = game:GetService("Lighting")
  4116.                         task.wait(0.04)
  4117.                         clone_8.TintColor = Color3.new(1, 1, 1)
  4118.                         task.wait(0.04)
  4119.                         clone_8.Brightness = 200
  4120.                         clone_8.Contrast = -1000
  4121.                         task.wait(0.04)
  4122.                         clone_8:Destroy()
  4123.                     end)
  4124.                 end
  4125.  
  4126.                 if(combo == 4 and not didhit)then
  4127.                     anim.Speed = .3
  4128.                 end
  4129.  
  4130.                 task.delay((anim.Length/anim.Speed) - (anim.Length/2), function()
  4131.                     stopanim()
  4132.                     doidle = true
  4133.                     walkspeedadd = 0
  4134.                     attacking = false
  4135.  
  4136.                     if(combo == 4)then
  4137.                         combo = 0
  4138.                         task.delay(1, function()
  4139.                             m1debounce = false
  4140.  
  4141.                             task.delay(1/20, function()
  4142.                                 if(m1debounce)then return end
  4143.                                 humanoid.JumpPower = 50
  4144.                             end)
  4145.                         end)
  4146.                     else
  4147.                         m1debounce = false
  4148.                     end
  4149.  
  4150.                     task.delay(1/20, function()
  4151.                         if(m1debounce)then return end
  4152.                         humanoid.JumpPower = 50
  4153.                     end)
  4154.                 end)
  4155.             end
  4156.  
  4157.             lastm1 = tick()
  4158.         end)
  4159.     until not mousedown
  4160. end)
  4161.  
  4162. mouse.Button1Up:Connect(function()
  4163.     mousedown = false
  4164. end)
  4165. cooldowns["dash"] = tick()
  4166. cooldowns["forwarddash"] = tick()
  4167.  
  4168. mouse.KeyDown:Connect(function(k)
  4169.     if(k == "space")then
  4170.         spaceheld = true
  4171.     end
  4172.  
  4173.     if(attacking)then return end
  4174.  
  4175.     if(k == "q")then
  4176.         local cframe = CFrame.new(rootpart.Position, rootpart.Position + Vector3.new(Camera.CFrame.LookVector.X, 0, Camera.CFrame.LookVector.Z))
  4177.         local rounded = math.round(humanoid.MoveDirection:Dot(cframe.LookVector))
  4178.         local rounded_2 = math.round(humanoid.MoveDirection:Dot(cframe.RightVector))
  4179.  
  4180.         local direction = "Front"
  4181.         if rounded == 1 then
  4182.             direction = "Front"
  4183.         elseif rounded == -1 then
  4184.             direction = "Back"
  4185.         elseif rounded_2 == 1 then
  4186.             direction = "Right"
  4187.         elseif rounded_2 == -1 then
  4188.             direction = "Left"
  4189.         end
  4190.  
  4191.         if(direction == "Front" and tick() > cooldowns["forwarddash"])then
  4192.             for i_4_upvr, v_4 in char:GetChildren() do
  4193.                 if v_4.Name == "Left Arm" or v_4.Name == "Left Leg" then
  4194.                     local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
  4195.                     local Weld = clone_2_upvr.Weld
  4196.                     Weld.C1 *= CFrame.Angles(0, math.pi, 0)
  4197.                     clone_2_upvr.Weld.Part1 = v_4
  4198.                     clone_2_upvr.Parent = script.Effects
  4199.                     task.delay(0.4, function()
  4200.                         clone_2_upvr.Trail.Enabled = false
  4201.                         AddItem(clone_2_upvr, 0.1)
  4202.                     end)
  4203.                 else
  4204.                     if v_4.Name == "Right Arm" or v_4.Name == "Right Leg" then
  4205.                         local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
  4206.                         local var58_upvw = clone_2_upvr
  4207.                         var58_upvw.Weld.Part1 = v_4
  4208.                         var58_upvw.Parent = script.Effects
  4209.                         task.delay(0.4, function()
  4210.                             var58_upvw.Trail.Enabled = false
  4211.                             AddItem(var58_upvw, 0.1)
  4212.                         end)
  4213.                     end
  4214.                 end
  4215.             end
  4216.  
  4217.             cooldowns["forwarddash"] = tick() + 7
  4218.             local anim, stopanim = playAnimation("Chase")
  4219.             anim.Speed = 1
  4220.             playSound(stuff.Sounds.Misc.Chase, rootpart)
  4221.             rem:FireClient(owner, "dash", direction)
  4222.  
  4223.             local s = os.clock()
  4224.             task.spawn(function()
  4225.                 local alreadyhit = {}
  4226.                 while os.clock() - s <= 1 do
  4227.                     task.wait()
  4228.  
  4229.                     alreadyhit = hitbox(rootpart.CFrame*CFrame.new(0, 0, -4), Vector3.one*8, 20, false, function(mod)
  4230.                         local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  4231.  
  4232.                         FXController:Flash(mod, Color3.new(1, 1, 1))
  4233.                         playSound(stuff.Sounds.M1:FindFirstChild("Hit3"), rootpartt)
  4234.                         local clone_2 = stuff.Utils.ChaseHit:Clone()
  4235.                         clone_2.CFrame = CFrame.new(rootpartt.Position, Vector3.new(rootpart.Position.X, rootpartt.Position.Y, rootpart.Position.Z)) * CFrame.Angles(0, math.pi, 0)
  4236.                         clone_2.Parent = script.Effects
  4237.                         clone_2.Ring:Emit(7)
  4238.                         clone_2.Sparks:Emit(12)
  4239.                         AddItem(clone_2, 0.5)
  4240.  
  4241.                         local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
  4242.                         bodyvelocity.MaxForce = Vector3.one*math.huge
  4243.                         bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -20
  4244.                         AddItem(bodyvelocity, .2)
  4245.                     end, alreadyhit)
  4246.  
  4247.                     for i, v in next, alreadyhit do
  4248.                         anim.Speed = 3
  4249.                         attacking = false
  4250.                         doidle = true
  4251.                         rem:FireClient(owner, "dashcancel")
  4252.                         break
  4253.                     end
  4254.                 end
  4255.             end)
  4256.  
  4257.             local clone_10 = stuff.Utils.Gojo.LapseBlue.Throw:Clone()
  4258.             clone_10.CFrame = rootpart.CFrame * CFrame.new(0, 1, -4)
  4259.             clone_10.Size = Vector3.new(0, 0, 2)
  4260.             clone_10.Parent = char
  4261.             game:GetService("TweenService"):Create(clone_10, TweenInfo.new(0.3), {
  4262.                 Size = Vector3.new(9, 9, 0);
  4263.                 Transparency = 1;
  4264.             }):Play()
  4265.             AddItem(clone_10, 0.3)
  4266.  
  4267.             attacking = true
  4268.             doidle = false
  4269.             task.delay(anim.Length + .3, function()
  4270.                 if(not attacking)then return end
  4271.                 attacking = false
  4272.                 doidle = true
  4273.             end)
  4274.         elseif(direction == "Left" and tick() > cooldowns["dash"])then
  4275.             for i_4_upvr, v_4 in char:GetChildren() do
  4276.                 if v_4.Name == "Left Arm" or v_4.Name == "Left Leg" then
  4277.                     local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
  4278.                     local Weld = clone_2_upvr.Weld
  4279.                     Weld.C1 *= CFrame.Angles(0, math.pi, 0)
  4280.                     clone_2_upvr.Weld.Part1 = v_4
  4281.                     clone_2_upvr.Parent = script.Effects
  4282.                     task.delay(0.4, function()
  4283.                         clone_2_upvr.Trail.Enabled = false
  4284.                         AddItem(clone_2_upvr, 0.1)
  4285.                     end)
  4286.                 else
  4287.                     if v_4.Name == "Right Arm" or v_4.Name == "Right Leg" then
  4288.                         local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
  4289.                         local var58_upvw = clone_2_upvr
  4290.                         var58_upvw.Weld.Part1 = v_4
  4291.                         var58_upvw.Parent = script.Effects
  4292.                         task.delay(0.4, function()
  4293.                             var58_upvw.Trail.Enabled = false
  4294.                             AddItem(var58_upvw, 0.1)
  4295.                         end)
  4296.                     end
  4297.                 end
  4298.             end
  4299.  
  4300.             cooldowns["dash"] = tick() + 2
  4301.             local anim = playAnimation("DashLeft")
  4302.             playSound(stuff.Sounds.Misc.Dash, rootpart)
  4303.             rem:FireClient(owner, "dash", direction)
  4304.  
  4305.             attacking = true
  4306.             doidle = false
  4307.             dashing = true
  4308.             task.delay(anim.Length, function()
  4309.                 dashing = false
  4310.                 attacking = false
  4311.                 doidle = true
  4312.             end)
  4313.         elseif(direction == "Right" and tick() > cooldowns["dash"])then
  4314.             for i_4_upvr, v_4 in char:GetChildren() do
  4315.                 if v_4.Name == "Left Arm" or v_4.Name == "Left Leg" then
  4316.                     local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
  4317.                     local Weld = clone_2_upvr.Weld
  4318.                     Weld.C1 *= CFrame.Angles(0, math.pi, 0)
  4319.                     clone_2_upvr.Weld.Part1 = v_4
  4320.                     clone_2_upvr.Parent = script.Effects
  4321.                     task.delay(0.4, function()
  4322.                         clone_2_upvr.Trail.Enabled = false
  4323.                         AddItem(clone_2_upvr, 0.1)
  4324.                     end)
  4325.                 else
  4326.                     if v_4.Name == "Right Arm" or v_4.Name == "Right Leg" then
  4327.                         local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
  4328.                         local var58_upvw = clone_2_upvr
  4329.                         var58_upvw.Weld.Part1 = v_4
  4330.                         var58_upvw.Parent = script.Effects
  4331.                         task.delay(0.4, function()
  4332.                             var58_upvw.Trail.Enabled = false
  4333.                             AddItem(var58_upvw, 0.1)
  4334.                         end)
  4335.                     end
  4336.                 end
  4337.             end
  4338.  
  4339.             cooldowns["dash"] = tick() + 2
  4340.             local anim = playAnimation("DashRight")
  4341.             playSound(stuff.Sounds.Misc.Dash, rootpart)
  4342.             rem:FireClient(owner, "dash", direction)
  4343.  
  4344.             attacking = true
  4345.             doidle = false
  4346.             dashing = true
  4347.             task.delay(anim.Length, function()
  4348.                 dashing = false
  4349.                 attacking = false
  4350.                 doidle = true
  4351.             end)
  4352.         elseif(direction == "Back" and tick() > cooldowns["dash"])then
  4353.             for i_4_upvr, v_4 in char:GetChildren() do
  4354.                 if v_4.Name == "Left Arm" or v_4.Name == "Left Leg" then
  4355.                     local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
  4356.                     local Weld = clone_2_upvr.Weld
  4357.                     Weld.C1 *= CFrame.Angles(0, math.pi, 0)
  4358.                     clone_2_upvr.Weld.Part1 = v_4
  4359.                     clone_2_upvr.Parent = script.Effects
  4360.                     task.delay(0.4, function()
  4361.                         clone_2_upvr.Trail.Enabled = false
  4362.                         AddItem(clone_2_upvr, 0.1)
  4363.                     end)
  4364.                 else
  4365.                     if v_4.Name == "Right Arm" or v_4.Name == "Right Leg" then
  4366.                         local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
  4367.                         local var58_upvw = clone_2_upvr
  4368.                         var58_upvw.Weld.Part1 = v_4
  4369.                         var58_upvw.Parent = script.Effects
  4370.                         task.delay(0.4, function()
  4371.                             var58_upvw.Trail.Enabled = false
  4372.                             AddItem(var58_upvw, 0.1)
  4373.                         end)
  4374.                     end
  4375.                 end
  4376.             end
  4377.  
  4378.             cooldowns["dash"] = tick() + 2
  4379.             local anim = playAnimation("DashBack")
  4380.             playSound(stuff.Sounds.Misc.Dash, rootpart)
  4381.             rem:FireClient(owner, "dash", direction)
  4382.  
  4383.             attacking = true
  4384.             doidle = false
  4385.             dashing = true
  4386.             task.delay(anim.Length, function()
  4387.                 attacking = false
  4388.                 doidle = true
  4389.                 dashing = false
  4390.             end)
  4391.         end
  4392.     elseif(k == "r")then
  4393.         if(damagedone < 60)then return end
  4394.         damagedone -= 60
  4395.  
  4396.         attacking = true
  4397.         doidle = false
  4398.         task.delay(1, function()
  4399.             doidle = true
  4400.             attacking = false
  4401.         end)
  4402.  
  4403.         local clone_9 = stuff.Utils.Heian.Chant.Attachment:Clone()
  4404.         clone_9.Parent = rootpart
  4405.         AddItem(clone_9, 2)
  4406.         clone_9.Dust:Emit(50)
  4407.         clone_9.Ring:Emit(10)
  4408.         clone_9.Attachment.Burst:Emit(1)
  4409.         clone_9.Attachment.Ring:Emit(1)
  4410.         local clone_4_upvr = stuff.Utils.Heian.Chant.Chant:Clone()
  4411.         clone_4_upvr.Parent = rootpart
  4412.         AddItem(clone_4_upvr, 1)
  4413.         game:GetService("TweenService"):Create(clone_4_upvr, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
  4414.             StudsOffset = Vector3.new(2, 4, 2);
  4415.         }):Play()
  4416.         task.delay(0.5, function()
  4417.             game:GetService("TweenService"):Create(clone_4_upvr.Chat, TweenInfo.new(0.5), {
  4418.                 ImageTransparency = 1;
  4419.             }):Play()
  4420.             game:GetService("TweenService"):Create(clone_4_upvr.Chat.Sub, TweenInfo.new(0.5), {
  4421.                 TextTransparency = 1;
  4422.             }):Play()
  4423.         end)
  4424.  
  4425.         playAnimation("Chant")
  4426.         local animm = animPlayer.new(arms, stuff.Animations.Heian.ChantArms)
  4427.         animm:Play()
  4428.         task.delay(animm.Length, animm.Destroy, animm)
  4429.  
  4430.         if chantlevel == 1 then
  4431.             FXController:Flash(char, Color3.fromRGB(255, 255, 255), 2)
  4432.             playSound(stuff.Sounds.Itadori.Dismantle.WorldSlash1, rootpart)
  4433.             chantlevel = 2
  4434.             return
  4435.         end
  4436.         if chantlevel == 2 then
  4437.             FXController:Flash(char, Color3.fromRGB(255, 255, 127), 2)
  4438.             playSound(stuff.Sounds.Itadori.Dismantle.WorldSlash2, rootpart)
  4439.             clone_4_upvr.Chat.Sub.Text = "RECOIL..."
  4440.             chantlevel = 3
  4441.             return
  4442.         end
  4443.         if chantlevel == 3 then
  4444.             FXController:Flash(char, Color3.fromRGB(255, 85, 0), 2)
  4445.             playSound(stuff.Sounds.Itadori.Dismantle.WorldSlash1, rootpart)
  4446.             clone_4_upvr.Chat.Sub.Text = "TWIN METEORS."
  4447.             chantlevel = 4
  4448.             return
  4449.         end
  4450.         if chantlevel == 4 then
  4451.             FXController:Flash(char, Color3.fromRGB(255, 0, 0), 2)
  4452.             playSound(stuff.Sounds.Heian.WorldSlash3, rootpart)
  4453.             clone_4_upvr.Chat.Sub.Text = "THINK FAST."
  4454.             playSound(stuff.Sounds.Heian.Dismantle.WCSCharge, rootpart)
  4455.  
  4456.             task.wait(0.3)
  4457.             playAnimation("WCS")
  4458.  
  4459.             task.wait(.6)
  4460.             playSound(stuff.Sounds.Heian.Dismantle.Start, rootpart)
  4461.  
  4462.             local proj = stuff.Utils.Heian.WaffleProjectile:Clone()
  4463.             proj.Parent = script.Effects
  4464.             proj.CFrame = rootpart.CFrame*CFrame.new(0,20,5)
  4465.             interp(proj, 1)
  4466.  
  4467.             task.delay(6, pcall, game.Destroy, proj)
  4468.  
  4469.             playSound(stuff.Sounds.Heian.Dismantle.FireWCS, proj)
  4470.  
  4471.             task.spawn(function()
  4472.                 while proj.Parent do
  4473.                     hitbox(proj.CFrame, proj.Size, 1e9, false, function(mod)
  4474.                         for i, v in next, mod:GetChildren() do
  4475.                             if(v:IsA("BasePart"))then
  4476.                                 local bodyvelocity = Instance.new("BodyVelocity", v)
  4477.                                 bodyvelocity.MaxForce = Vector3.one*math.huge
  4478.                                 bodyvelocity.Velocity = CFrame.lookAt(v.Position, rootpart.Position).LookVector * -50
  4479.                                 AddItem(bodyvelocity, .2)
  4480.                             end
  4481.                         end
  4482.  
  4483.                         local rootpartt = mod:FindFirstChild("HumanoidRootPart")
  4484.                         FXController:Flash(mod, Color3.new(1, 1, 1))
  4485.                         playSound(stuff.Sounds.Itadori.Dismantle.Explode, rootpartt)
  4486.  
  4487.                         if(mod:FindFirstChild("Humanoid").Health < 1)then
  4488.                             FXController:Bleed(mod)
  4489.                             for _ = 1, 40 do
  4490.                                 bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
  4491.                             end
  4492.                         end
  4493.                     end)
  4494.                     task.wait()
  4495.                 end
  4496.             end)
  4497.         end
  4498.         chantlevel = 1
  4499.     elseif(k == "g")then
  4500.         if(damagedone >= 800)then
  4501.             damagedone = 0
  4502.             walkspeedadd = -1e6
  4503.             attacking = true
  4504.             doidle = false
  4505.             domain = true
  4506.  
  4507.             playAnimation("MalevolentShrine")
  4508.  
  4509.             playSound(stuff.Sounds.Heian.MalevolentShrine.UhohStart, script)
  4510.             playSound(stuff.Sounds.Heian.MalevolentShrine.Voice, rootpart)
  4511.             FXController:DomainBurst(rootpart)
  4512.             FXController:Domain(char, function(arg1_9, arg2)
  4513.                 local animm = animPlayer.new(arg2, stuff.Animations.Heian.DomainWarn)
  4514.                 animm:Play()
  4515.                 task.delay(animm.Length, animm.Destroy, animm)
  4516.  
  4517.                 arg1_9.Panel.ImageLabel.Image = "rbxassetid://17668583842"
  4518.                 local HumanoidRootPart_8 = arg2.HumanoidRootPart
  4519.                 HumanoidRootPart_8.CFrame *= CFrame.Angles(0, 0, 0.17453292519943295)
  4520.                 game:GetService("TweenService"):Create(arg2.HumanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {
  4521.                     CFrame = arg2.HumanoidRootPart.CFrame * CFrame.Angles(0, -0.3490658503988659, 0.3490658503988659);
  4522.                 }):Play()
  4523.                 arg1_9.Panel.Viewport.LightColor = Color3.fromRGB(255, 155, 155)
  4524.                 arg1_9.Panel.Viewport.Ambient = Color3.fromRGB(60, 0, 0)
  4525.                 arg1_9.Panel.Viewport.LightDirection = Vector3.new(1, 0, 1)
  4526.             end)
  4527.  
  4528.             local clocktime, exposure, ambient, fogend, fogcol = game:GetService("Lighting").ClockTime, game:GetService("Lighting").ExposureCompensation, game:GetService("Lighting").Ambient, game:GetService("Lighting").FogEnd, game:GetService("Lighting").FogColor
  4529.  
  4530.             local atmo = game:GetService("Lighting"):FindFirstChild("Atmosphere")
  4531.             if(atmo)then atmo.Parent = nil end
  4532.  
  4533.             game:GetService("TweenService"):Create(game:GetService("Lighting"), TweenInfo.new(1.3 + .5 + 1), {
  4534.                 ClockTime = 0,
  4535.                 ExposureCompensation = -.5,
  4536.                 Ambient = Color3.new(1, 0, 0),
  4537.                 FogEnd = 600,
  4538.                 FogColor = Color3.new(.6, 0, 0)
  4539.             }):Play()
  4540.  
  4541.             task.wait(1)
  4542.             attacking = false
  4543.             doidle = true
  4544.             walkspeedadd = 0
  4545.  
  4546.             for i, LocalPlayer_upvr in next, game:GetService("Players"):GetPlayers() do
  4547.                 local clone_5_upvr = stuff.Utils.Heian.DomainFade:Clone()
  4548.                 clone_5_upvr.Parent = LocalPlayer_upvr.PlayerGui
  4549.                 task.delay(0.5, function()
  4550.                     game:GetService("TweenService"):Create(clone_5_upvr.BG.Bubble, TweenInfo.new(1), {
  4551.                         ImageTransparency = 1;
  4552.                     }):Play()
  4553.                     game:GetService("TweenService"):Create(clone_5_upvr.BG.Bubble.Texta, TweenInfo.new(1), {
  4554.                         TextTransparency = 1;
  4555.                     }):Play()
  4556.                     clone_5_upvr.BG.Visible = false
  4557.                     task.wait(0.05)
  4558.                     clone_5_upvr.BG.Visible = true
  4559.                     task.wait(0.4)
  4560.                     clone_5_upvr.BG.Visible = false
  4561.                     task.wait(0.05)
  4562.                     clone_5_upvr.BG.Visible = true
  4563.                     task.wait(0.3)
  4564.                     clone_5_upvr.BG.Visible = false
  4565.                     task.wait(0.05)
  4566.                     clone_5_upvr.BG.Visible = true
  4567.                     task.wait(0.2)
  4568.                     clone_5_upvr.BG.Visible = false
  4569.                     task.wait(0.05)
  4570.                     clone_5_upvr.BG.Visible = true
  4571.                     task.wait(0.1)
  4572.                     clone_5_upvr.BG.Visible = false
  4573.                 end)
  4574.             end
  4575.  
  4576.             playSound(stuff.Sounds.Itadori.Ring, script)
  4577.             local var101_upvr = tick() + 25.5
  4578.             local any_PlaySound_result1_upvr = playSound(stuff.Sounds.Heian.MalevolentShrine.Music, script)
  4579.  
  4580.             task.delay(0.5, function()
  4581.                 playSound(stuff.Sounds.Heian.MalevolentShrine.Voice2, rootpart)
  4582.                 task.wait(1.3)
  4583.                 playSound(stuff.Sounds.Heian.MalevolentShrine.Uhoh, script)
  4584.  
  4585.                 local clone_3 = stuff.Utils.Heian.Shrine:Clone()
  4586.                 clone_3:PivotTo(rootpart.CFrame * CFrame.new(0, 11, 20))
  4587.                 clone_3.Parent = script.Effects
  4588.                 local slash = stuff.Utils.Heian.Slashes:Clone()
  4589.                 slash.CFrame = rootpart.CFrame * CFrame.new(0, 11, 20)
  4590.                 task.delay(2, function()
  4591.                     slash.Parent = script.Effects
  4592.                     playSound(stuff.Sounds.Heian.MalevolentShrine.Voice3, rootpart)
  4593.                 end)
  4594.                 local s = stuff.Sounds.Heian.Slashes2:Clone()
  4595.                 s.Parent = slash
  4596.                 s.Playing = true
  4597.                 repeat
  4598.                     task.wait(.25)
  4599.                     if(slash.Parent == script.Effects)then
  4600.                         for i = 1, math.random(10, 20) do
  4601.                             local pos = slash.Position+Vector3.new(math.random(-slash.Size.X, slash.Size.X)/2, math.random(-slash.Size.Y, slash.Size.Y)/2, math.random(-slash.Size.Z, slash.Size.Z)/2)
  4602.                             local ray = workspace:Raycast(pos, Vector3.yAxis*-100, rayparam)
  4603.                             if(ray)then
  4604.                                 craters.debris(pos, math.random(3, 7), ray.Instance.Color, ray.Instance.Material, false, 200, 5)
  4605.                             end
  4606.                         end
  4607.  
  4608.                         hitbox(slash.CFrame, slash.Size, 3, false)
  4609.                     end
  4610.                 until var101_upvr < tick() or not clone_3.Parent or humanoid.Health < 1
  4611.                 domain = false
  4612.                 game:GetService("TweenService"):Create(game:GetService("Lighting"), TweenInfo.new(1.3 + .5 + 1), {
  4613.                     ClockTime = clocktime,
  4614.                     ExposureCompensation = exposure,
  4615.                     Ambient = ambient,
  4616.                     FogEnd = fogend,
  4617.                     FogColor = fogcol
  4618.                 }):Play()
  4619.                 if(atmo)then
  4620.                     atmo.Parent = game:GetService("Lighting")
  4621.                 end
  4622.                 if any_PlaySound_result1_upvr then
  4623.                     game:GetService("TweenService"):Create(any_PlaySound_result1_upvr, TweenInfo.new(2), {
  4624.                         Volume = 0;
  4625.                     }):Play()
  4626.                     AddItem(any_PlaySound_result1_upvr, 2)
  4627.                 end
  4628.  
  4629.                 for i, v in next, slash:GetDescendants() do
  4630.                     if(v:IsA("ParticleEmitter"))then
  4631.                         v.Enabled = false
  4632.                     end
  4633.                 end
  4634.  
  4635.                 for i, v in next, clone_3:GetDescendants() do
  4636.                     pcall(function()
  4637.                         game:GetService("TweenService"):Create(v, TweenInfo.new(1), {
  4638.                             Transparency = 1
  4639.                         }):Play()
  4640.                     end)
  4641.                 end
  4642.  
  4643.                 task.wait(1)
  4644.                 slash:Destroy()
  4645.                 clone_3:Destroy()
  4646.             end)
  4647.         end
  4648.     end
  4649. end)
  4650. mouse.KeyUp:Connect(function(k)
  4651.     if(k == "space")then
  4652.         spaceheld = false
  4653.     end
  4654. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement