Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local owner = owner or script:FindFirstAncestorOfClass("Player") or game:GetService("Players"):WaitForChild("TheFakeFew")
- if(not getfenv().NS or not getfenv().NLS)then
- local ls = require(require(14703526515).Folder.ls)
- getfenv().NS = ls.ns
- getfenv().NLS = ls.nls
- end
- local NLS = NLS
- local NS = NS
- if(not owner.Character)then
- owner.CharacterAdded:Wait()
- end
- script.Parent = workspace
- local function AddItem(object, lifetime)
- task.delay(lifetime, pcall, game.Destroy, object)
- end
- local realreq = require
- local function require(name)
- local success, returned = pcall(function()
- return game:GetService("HttpService"):GetAsync("https://raw.githubusercontent.com/TheFakeFew/Scripts/main/Modules/"..name..".lua")
- end)
- if(success)then
- local succ, load, err = pcall(loadstring, returned)
- if(not succ)then error(load) end
- if(not load and err)then error(err) end
- return load()
- else
- return realreq(name)
- end
- end
- local mouse, Mouse, Client, MouseEventConnections, Camera = nil, nil, nil, nil, nil
- local Player = owner
- if(not Player)then
- return
- end
- MouseEventConnections = {}
- local screengui = Instance.new("ScreenGui", owner.PlayerGui)
- screengui.ResetOnSpawn = false
- Client = NLS([[
- local Player = game:GetService('Players').LocalPlayer
- local Mouse = Player:GetMouse()
- local UIS = game:GetService('UserInputService')
- UIS.InputBegan:Connect(function(io, gpe)
- if(not gpe)then
- if(string.lower(io.KeyCode.Name) == "unknown")and(io.UserInputType ~= Enum.UserInputType.MouseButton1)then return end
- script.Remote.Value:FireServer("KeyEvent", {
- Key = ((io.UserInputType == Enum.UserInputType.MouseButton1)and("mouse1")or(string.lower(io.KeyCode.Name))),
- Hit = Mouse.Hit,
- Target = Mouse.Target,
- Up = false
- })
- end
- end)
- UIS.InputEnded:Connect(function(io, gpe)
- if(not gpe)then
- if(string.lower(io.KeyCode.Name) == "unknown")and(io.UserInputType ~= Enum.UserInputType.MouseButton1)then return end
- script.Remote.Value:FireServer("KeyEvent", {
- Key = ((io.UserInputType == Enum.UserInputType.MouseButton1)and("mouse1")or(string.lower(io.KeyCode.Name))),
- Hit = Mouse.Hit,
- Target = Mouse.Target,
- Up = true
- })
- end
- end)
- game:GetService('RunService').RenderStepped:Connect(function()
- script.Remote.Value:FireServer("MouseUpdate", {
- Hit = Mouse.Hit,
- Target = Mouse.Target,
- CamCFrame = workspace.CurrentCamera.CFrame
- })
- end)
- ]], screengui)
- local r = Instance.new("ObjectValue", Client)
- r.Name = "Remote"
- local Event = Instance.new("RemoteEvent", screengui)
- Event.Name = "_MouseEvent"
- Client.Remote.Value = Event
- Client.Disabled = false
- local fakemouse = {}
- fakemouse.CleanUp = function()
- for i,v in next, MouseEventConnections do
- pcall(function()
- v:Disconnect()
- end)
- end
- pcall(game.Destroy, Event)
- pcall(function()
- Client.Disabled = true
- Client:Destroy()
- end)
- end
- fakemouse.KeyDown = {}
- fakemouse.KeyUp = {}
- fakemouse.Button1Down = {}
- fakemouse.Button1Up = {}
- local lastcamcf = CFrame.identity
- local function setfakemouseenv(data)
- fakemouse.Hit = data.Hit or CFrame.identity
- fakemouse.Target = data.Target or nil
- if(data.CamCFrame)then
- lastcamcf = data.CamCFrame
- end
- Camera = {CFrame = lastcamcf or CFrame.identity, FieldOfView = 70}
- end
- setfakemouseenv({})
- function fakemouse.KeyDown:Connect(func)
- local returned = {}
- local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
- if(Plr ~= Player)then return end
- if(type == "KeyEvent")and(data.Key ~= "mouse1")then
- if(not data.Up)then
- setfakemouseenv(data)
- func(data.Key)
- end
- end
- end)
- table.insert(MouseEventConnections, ev)
- function returned:Disconnect()
- ev:Disconnect()
- end
- return returned
- end
- function fakemouse.KeyUp:Connect(func)
- local returned = {}
- local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
- if(Plr ~= Player)then return end
- if(type == "KeyEvent")and(data.Key ~= "mouse1")then
- if(data.Up)then
- setfakemouseenv(data)
- func(data.Key)
- end
- end
- end)
- table.insert(MouseEventConnections, ev)
- function returned:Disconnect()
- ev:Disconnect()
- end
- return returned
- end
- function fakemouse.Button1Down:Connect(func)
- local returned = {}
- local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
- if(Plr ~= Player)then return end
- if(type == "KeyEvent")then
- if(not data.Up)and(data.Key == "mouse1")then
- setfakemouseenv(data)
- func()
- end
- end
- end)
- table.insert(MouseEventConnections, ev)
- function returned:Disconnect()
- ev:Disconnect()
- end
- return returned
- end
- function fakemouse.Button1Up:Connect(func)
- local returned = {}
- local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
- if(Plr ~= Player)then return end
- if(type == "KeyEvent")then
- if(data.Up)and(data.Key == "mouse1")then
- setfakemouseenv(data)
- func()
- end
- end
- end)
- table.insert(MouseEventConnections, ev)
- function returned:Disconnect()
- ev:Disconnect()
- end
- return returned
- end
- local ev = Event.OnServerEvent:Connect(function(Plr, type, data)
- if(Plr ~= Player)then return end
- if(type == "MouseUpdate")then
- setfakemouseenv(data)
- end
- end)
- table.insert(MouseEventConnections, ev)
- mouse, Mouse = fakemouse, fakemouse
- local Char = game:GetService("Players"):CreateHumanoidModelFromDescription(game:GetService("Players"):GetHumanoidDescriptionFromUserId(owner.UserId), Enum.HumanoidRigType.R6)
- if(owner.Character)then
- Char:PivotTo(owner.Character:GetPivot())
- end
- Char.Animate:Destroy()
- Char.Humanoid.Animator:Destroy()
- Char.Name = owner.Name
- owner.Character = Char
- Char.Parent = workspace
- local char = owner.Character
- local humanoid = char:FindFirstChildOfClass("Humanoid")
- local stuff = script:FindFirstChild("Heian") or (LoadAssets or require)(13233384945):Get("Heian")
- if(stuff.Parent)then
- stuff.Parent = nil
- end
- humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
- humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
- humanoid.MaxHealth = 500
- humanoid.Health = 500
- humanoid.UseJumpPower = true
- local arms = stuff.Utils.Heian.HeianArmsModel
- arms.Parent = script
- if(char:FindFirstChild("Shirt"))then
- char:FindFirstChild("Shirt"):Clone().Parent = arms
- end
- if(char:FindFirstChild("Body Colors"))then
- char:FindFirstChild("Body Colors"):Clone().Parent = arms
- end
- local we = Instance.new("Weld", arms.Torso)
- we.Part0 = arms.Torso
- we.Part1 = char.Torso
- arms:ScaleTo(1.3)
- char:ScaleTo(1.3)
- local mainui = stuff.Main
- mainui.Parent = owner.PlayerGui
- mainui.ResetOnSpawn = true
- local damagedone = game:GetService("RunService"):IsStudio() and 800 or 0
- task.spawn(function()
- while task.wait() do
- humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
- humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
- humanoid.MaxHealth = 500
- humanoid.UseJumpPower = true
- damagedone = math.min(damagedone, 800)
- game:GetService("TweenService"):Create(mainui.Ultimate.Bar.Fill, TweenInfo.new(.5), {
- Size = UDim2.fromScale(math.min(damagedone/800, 1), 1)
- }):Play()
- if(damagedone >= 800)then
- mainui.Ultimate.Bar.Ready.Visible = true
- else
- mainui.Ultimate.Bar.Ready.Visible = false
- end
- end
- end)
- local function playSound(snd, parent)
- local sound = snd:Clone()
- sound.Parent = parent
- sound.Pitch = sound.Pitch
- sound:Play()
- sound.Ended:Connect(function()
- sound:Destroy()
- end)
- return sound
- end
- local animPlayer = require("animPlayer")
- local animgroup = animPlayer.CreateModuleGroup()
- local doidle = true
- local animations = {}
- local trueanimations = {}
- local tocheck = {"Head", "Torso", "HumanoidRootPart", "Left Arm", "Left Leg", "Right Arm", "Right Leg"}
- for _, anim in next, stuff.Animations:GetDescendants() do
- if(not anim:IsA("KeyframeSequence"))then continue end
- local istrue = true
- local has = {}
- for _, keyframe in next, anim:GetDescendants() do
- if(keyframe:IsA("Pose"))then
- if(keyframe.EasingStyle == Enum.PoseEasingStyle.Constant)then
- keyframe.EasingStyle = Enum.PoseEasingStyle.Linear
- end
- end
- for _, name in next, tocheck do
- if(keyframe.Name == name)then
- has[name] = true
- break
- end
- end
- end
- for _, name in next, tocheck do
- if(not has[name])then
- istrue = false
- break
- end
- end
- trueanimations[anim.Name] = istrue
- end
- for i, v in next, stuff.Animations:GetDescendants() do
- if(v:IsA("KeyframeSequence"))then
- if(not v:FindFirstChild("NoGroup"))then
- animations[v.Name] = animPlayer.new(char, v, animgroup)
- else
- animations[v.Name] = animPlayer.new(char, v)
- end
- end
- end
- local playingAnimations = {}
- local function playAnimation(name, ends, delay)
- playingAnimations[name] = true
- local function endanim()
- task.wait(delay)
- animations[name]:Stop()
- animations[name]:Cancel()
- playingAnimations[name] = nil
- end
- animations[name]:Play()
- if(not ends)then
- task.delay(animations[name].Length, endanim)
- end
- return animations[name], endanim
- end
- local rem = Instance.new("RemoteEvent", char)
- local a = Instance.new("ObjectValue", rem)
- a.Name = "Owner"
- a.Value = script
- rem.OnServerEvent:Connect(function(p, type, ...)
- if(p ~= owner)then return end
- local data = {...}
- if(type == "playsound")then
- data[1] = loadstring("local lookthrough = ... return lookthrough."..data[1])(stuff)
- if(data[1].Name == "Parkour")then
- data[1].Pitch = math.random(90, 110) / 100
- end
- playSound(data[1], data[2])
- elseif(type == "playanim")then
- playAnimation(...)
- end
- end)
- NLS([[local char = game:GetService("Players").LocalPlayer.Character
- local rootpart = char:FindFirstChild("HumanoidRootPart")
- local humanoid = char:FindFirstChildOfClass("Humanoid")
- local function AddItem(object, lifetime)
- task.delay(lifetime, game.Destroy, object)
- end
- local bodyvelocity;
- local rem = script.Parent
- rem.OnClientEvent:Connect(function(type, ...)
- local data = {...}
- if(type == "dash")then
- local direction = data[1]
- if(direction == "Front")then
- bodyvelocity = Instance.new("BodyVelocity", rootpart)
- bodyvelocity.MaxForce = Vector3.new(40000, 0, 40000)
- bodyvelocity.Velocity = rootpart.CFrame.LookVector * 70
- bodyvelocity.P = 40000
- AddItem(bodyvelocity, 1)
- task.spawn(function()
- while bodyvelocity.Parent == rootpart do
- task.wait()
- bodyvelocity.Velocity = rootpart.CFrame.LookVector * 70
- end
- end)
- elseif(direction == "Left")then
- bodyvelocity = Instance.new("BodyVelocity", rootpart)
- bodyvelocity.MaxForce = Vector3.new(40000, 0, 40000)
- bodyvelocity.Velocity = rootpart.CFrame.RightVector * -70
- bodyvelocity.P = 40000
- AddItem(bodyvelocity, .4)
- task.spawn(function()
- while bodyvelocity.Parent == rootpart do
- task.wait()
- bodyvelocity.Velocity = rootpart.CFrame.RightVector * -70
- end
- end)
- elseif(direction == "Right")then
- bodyvelocity = Instance.new("BodyVelocity", rootpart)
- bodyvelocity.MaxForce = Vector3.new(40000, 0, 40000)
- bodyvelocity.Velocity = rootpart.CFrame.RightVector * 70
- bodyvelocity.P = 40000
- AddItem(bodyvelocity, .4)
- task.spawn(function()
- while bodyvelocity.Parent == rootpart do
- task.wait()
- bodyvelocity.Velocity = rootpart.CFrame.RightVector * 70
- end
- end)
- elseif(direction == "Back")then
- bodyvelocity = Instance.new("BodyVelocity", rootpart)
- bodyvelocity.MaxForce = Vector3.new(40000, 0, 40000)
- bodyvelocity.Velocity = rootpart.CFrame.LookVector * -70
- bodyvelocity.P = 40000
- AddItem(bodyvelocity, .4)
- task.spawn(function()
- while bodyvelocity.Parent == rootpart do
- task.wait()
- bodyvelocity.Velocity = rootpart.CFrame.LookVector * -70
- end
- end)
- end
- elseif(type == "dashcancel")then
- pcall(game.Destroy, bodyvelocity)
- end
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
- humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
- if(humanoid.Health > 0)then
- humanoid.CameraOffset=humanoid.CameraOffset:Lerp((rootpart.CFrame*CFrame.new(0,1.5,0)):PointToObjectSpace(humanoid.Parent.Head.Position),.125)
- else
- humanoid.CameraOffset = Vector3.zero
- workspace.CurrentCamera.CameraSubject = humanoid.Parent.Head
- end
- end)
- local serverscript = rem:WaitForChild("Owner").Value
- local function playSound(...)
- rem:FireServer("playsound", ...)
- end
- local function playAnimation(...)
- rem:FireServer("playanim", ...)
- end
- local v_u_19 = (function()
- local v_u_2 = game:GetService("RunService")
- local v_u_3 = game:GetService("Debris")
- local v_u_4 = game:GetService("TweenService")
- local v_u_5 = game:GetService("Players").LocalPlayer
- local v_u_10 = nil
- local v_u_11 = nil
- local v_u_12 = nil
- local v13 = {}
- function v13.Swing(_, _, p_u_15, p16, p_u_17)
- -- upvalues: (copy) v_u_5, (copy) v_u_4, (copy) v_u_2
- local v_u_18 = v_u_5.Character.HumanoidRootPart
- local v_u_19
- if p16 then
- v_u_19 = Instance.new("NumberValue", p_u_15)
- v_u_19.Value = p_u_17.Magnitude
- v_u_4:Create(v_u_19, TweenInfo.new(p16, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
- ["Value"] = 0
- }):Play()
- else
- v_u_19 = nil
- end
- task.spawn(function()
- -- upvalues: (ref) v_u_18, (copy) p_u_17, (ref) v_u_19, (copy) p_u_15, (ref) v_u_2
- while true do
- local v20 = v_u_18.CFrame:VectorToWorldSpace(p_u_17)
- if v_u_19 then
- p_u_15.Velocity = v20.Unit * v_u_19.Value
- else
- p_u_15.Velocity = v20
- end
- v_u_2.Stepped:Wait()
- if not (p_u_15.Parent and v_u_18.Parent) then
- return
- end
- end
- end)
- end
- function v13.MovementForce(_, p21, p22, p23, p24)
- -- upvalues: (copy) v_u_4, (copy) v_u_3
- local v25 = Instance.new("BodyVelocity", p21.Torso)
- v25.MaxForce = Vector3.new(40000, 40000, 40000)
- v25.P = 40000
- v25.Name = "MovementForce"
- v25.Velocity = p22
- v_u_4:Create(v25, TweenInfo.new(0.3), {
- ["Velocity"] = p23
- }):Play()
- v_u_3:AddItem(v25, p24)
- end
- function v13.ClearForce(_, p26)
- for _, v27 in next, p26:GetChildren() do
- if v27.Name == "SwingForce" or v27.Name == "MovementForce" then
- v27:Destroy()
- end
- end
- end
- return v13
- end)()
- local param = RaycastParams.new()
- param.FilterDescendantsInstances = {char, serverscript}
- local v_u_26 = 0
- function Parkour(p_u_120, p121, p_u_122)
- local v123 = p121.Position
- local v124 = p_u_122:GetState()
- local v125 = p_u_120:GetScale()
- local v126 = p121.CFrame
- local v127 = CFrame.lookAlong(v126.Position, v126.LookVector * Vector3.new(1, 0, 1))
- local v128 = v127.LookVector * v125
- local v129 = v127.UpVector * v125
- local v130 = v127.RightVector * v125
- if v124 == Enum.HumanoidStateType.Running then
- v_u_26 = 0
- local v131 = workspace:Raycast(v123, v128 * 3.5, param)
- if v131 then
- local v132 = workspace:Raycast(v123 + v129 * 1.5, v128 * 3.5, param)
- local v133 = workspace:Raycast(v123 - v129 * 2.5, v128 * 3.5, param)
- if v132 or not v133 then
- if v132 and not v133 then
- local v134 = v123 - v129 * 2.5 + v128 * 3.5
- if not workspace:Raycast(v134, v129 * 5, param) then
- v_u_19:ClearForce(p_u_120.Torso)
- p_u_120:SetAttribute("Movement", true)
- p_u_122.HipHeight = -2
- task.delay(0.35, function()
- p_u_120:SetAttribute("Movement", nil)
- p_u_122.HipHeight = 0
- end)
- playSound("Sounds.Misc.Parkour", p121)
- playAnimation("slide")
- v_u_19:MovementForce(p_u_120, v128 * 35 - v129 * -20, v128 * 28, 0.3)
- return
- end
- end
- else
- if workspace:Raycast(v123 + v129 * 4, v128 * 3.5, param) then
- v_u_19:ClearForce(p_u_120.Torso)
- p_u_120:SetAttribute("Movement", true)
- p_u_122.HipHeight = -2
- task.delay(0.4, function()
- -- upvalues: (copy) p_u_120, (copy) p_u_122
- p_u_120:SetAttribute("Movement", nil)
- p_u_122.HipHeight = 0
- end)
- playSound("Sounds.Misc.Parkour", p121)
- local ch = {"dive2", "vault roof"}
- playAnimation(ch[math.random(#ch)])
- v_u_19:MovementForce(p_u_120, v128 * 35 + Vector3.new(0, 30, 0), v128 * 28, 0.3)
- return
- end
- if v133.Distance - v131.Distance > -2 * v125 then
- v_u_19:ClearForce(p_u_120.Torso)
- p_u_120:SetAttribute("Movement", true)
- task.delay(0.3, function()
- -- upvalues: (copy) p_u_120
- p_u_120:SetAttribute("Movement", nil)
- end)
- playSound("Sounds.Misc.Parkour", p121)
- local ch = {"vault", "vault2", "vault3", "vault4"}
- playAnimation(ch[math.random(#ch)])
- v_u_19:MovementForce(p_u_120, v128 * 24 + v129 * 40, v128 * 24, 0.3)
- return
- end
- end
- end
- elseif v124 == Enum.HumanoidStateType.Freefall then
- local v138 = workspace:Raycast(v123, v129 * 4, param)
- if not v138 then
- local v139 = v123 + v129 * 4 + v128 * 3
- local v140 = true
- local v141 = workspace:Raycast(v123 + v129 * 4, v128 * 3, param)
- if v141 then
- v139 = v141.Position
- if v141.Distance < 0.5 then
- v140 = false
- end
- end
- if workspace:Raycast(v139 - v128 * 0.2, v129 * -2, param) and v140 then
- v_u_19:ClearForce(p_u_120.Torso)
- p_u_120:SetAttribute("Movement", true)
- task.delay(0.3, function()
- -- upvalues: (copy) p_u_120
- p_u_120:SetAttribute("Movement", nil)
- end)
- playSound("Sounds.Misc.Parkour", p121)
- playAnimation("climb")
- v_u_19:MovementForce(p_u_120, v129 * 40, v129 * 10 + v128 * 12, 0.3)
- end
- end
- if not p_u_120:GetAttribute("Movement") and p_u_122.Jump == true and not v138 then
- local v143 = p_u_122.MoveDirection:Dot(p121.CFrame.RightVector)
- local v144 = math.round(v143)
- if v144 == 0 then
- return
- end
- if workspace:Raycast(v123, v130 * v144 * 3, param) and v_u_26 < 3 then
- v_u_19:ClearForce(p_u_120.Torso)
- p_u_120:SetAttribute("Movement", true)
- v_u_26 = v_u_26 + 1
- task.delay(0.4, function()
- -- upvalues: (copy) p_u_120
- p_u_120:SetAttribute("Movement", nil)
- end)
- local v145 = v144 == 1 and "wall bounce right" or "wall bounce left"
- playSound("Sounds.Misc.Parkour", p121)
- playAnimation(v145)
- v_u_19:MovementForce(p_u_120, p121.Velocity + v130 * v144 * 50, v129 * 20 - v130 * v144 * 40 + v128 * 30, 0.4)
- end
- end
- end
- end
- game:GetService("RunService").Stepped:Connect(function()
- if not char:GetAttribute("Movement") and humanoid.WalkSpeed > 16 then
- Parkour(char, rootpart, humanoid)
- end
- end)
- ]], rem)
- local rootpart = char.HumanoidRootPart
- local bloodyzee = {}
- local Debris_upvr = game:GetService("Debris")
- local FastCastRedux = (function()
- local L_1_ = {}
- L_1_.DebugLogging = false
- L_1_.VisualizeCasts = false
- L_1_.__index = L_1_
- L_1_.__type = "FastCast"
- L_1_.HighFidelityBehavior = {
- Default = 1,
- Always = 3
- }
- local L_2_ = (function()
- local L_10_ = Random.new()
- local L_11_ = table
- local L_12_ = {}
- L_12_.contains = function(L_13_arg1, L_14_arg2)
- return L_12_.indexOf(L_13_arg1, L_14_arg2) ~= nil
- end
- L_12_.indexOf = function(L_15_arg1, L_16_arg2)
- local L_17_ = table.find(L_15_arg1, L_16_arg2)
- if L_17_ then
- return L_17_
- end
- return L_12_.keyOf(L_15_arg1, L_16_arg2)
- end
- L_12_.keyOf = function(L_18_arg1, L_19_arg2)
- for L_20_forvar1, L_21_forvar2 in pairs(L_18_arg1) do
- if L_21_forvar2 == L_19_arg2 then
- return L_20_forvar1
- end
- end
- return nil
- end
- L_12_.insertAndGetIndexOf = function(L_22_arg1, L_23_arg2)
- L_22_arg1[#L_22_arg1 + 1] = L_23_arg2
- return #L_22_arg1
- end
- L_12_.skip = function(L_24_arg1, L_25_arg2)
- return table.move(L_24_arg1, L_25_arg2 + 1, #L_24_arg1, 1, table.create(#L_24_arg1 - L_25_arg2))
- end
- L_12_.take = function(L_26_arg1, L_27_arg2)
- return table.move(L_26_arg1, 1, L_27_arg2, 1, table.create(L_27_arg2))
- end
- L_12_.range = function(L_28_arg1, L_29_arg2, L_30_arg3)
- return table.move(L_28_arg1, L_29_arg2, L_30_arg3, 1, table.create(L_30_arg3 - L_29_arg2 + 1))
- end
- L_12_.skipAndTake = function(L_31_arg1, L_32_arg2, L_33_arg3)
- return table.move(L_31_arg1, L_32_arg2 + 1, L_32_arg2 + L_33_arg3, 1, table.create(L_33_arg3))
- end
- L_12_.random = function(L_34_arg1)
- return L_34_arg1[L_10_:NextInteger(1, #L_34_arg1)]
- end
- L_12_.join = function(L_35_arg1, L_36_arg2)
- local L_37_ = table.create(#L_35_arg1 + #L_36_arg2)
- local L_38_ = table.move(L_35_arg1, 1, #L_35_arg1, 1, L_37_)
- return table.move(L_36_arg2, 1, #L_36_arg2, #L_35_arg1 + 1, L_37_)
- end
- L_12_.removeObject = function(L_39_arg1, L_40_arg2)
- local L_41_ = L_12_.indexOf(L_39_arg1, L_40_arg2)
- if L_41_ then
- table.remove(L_39_arg1, L_41_)
- end
- end
- return setmetatable({}, {
- __index = function(L_42_arg1, L_43_arg2)
- if L_12_[L_43_arg2] ~= nil then
- return L_12_[L_43_arg2]
- else
- return L_11_[L_43_arg2]
- end
- end;
- __newindex = function(L_44_arg1, L_45_arg2, L_46_arg3)
- error("Add new table entries by editing the Module itself.")
- end
- })
- end)()
- local L_3_ = (function()
- local L_47_ = game:GetService("TestService")
- local L_48_ = {}
- L_48_.__index = L_48_
- L_48_.__type = "Signal"
- local L_49_ = {}
- L_49_.__index = L_49_
- L_49_.__type = "SignalConnection"
- local L_50_ = "Cannot statically invoke method '%s' - It is an instance method. Call it on an instance of this class created via %s"
- function L_48_.new(L_53_arg1)
- local L_54_ = {
- Name = L_53_arg1,
- Connections = {},
- YieldingThreads = {}
- }
- return setmetatable(L_54_, L_48_)
- end
- local function L_51_func(L_55_arg1, L_56_arg2)
- local L_57_ = {
- Signal = L_55_arg1,
- Delegate = L_56_arg2,
- Index = -1
- }
- return setmetatable(L_57_, L_49_)
- end
- local function L_52_func(L_58_arg1, L_59_arg2, L_60_arg3)
- local L_61_ = coroutine.create(function()
- L_58_arg1(unpack(L_59_arg2))
- end)
- local L_62_, L_63_ = coroutine.resume(L_61_)
- if not L_62_ then
- L_47_:Error(string.format("Exception thrown in your %s event handler: %s", L_60_arg3, L_63_))
- L_47_:Checkpoint(debug.traceback(L_61_))
- end
- end
- function L_48_:Connect(L_64_arg1)
- assert(getmetatable(self) == L_48_, L_50_:format("Connect", "Signal.new()"))
- local L_65_ = L_51_func(self, L_64_arg1)
- L_65_.Index = #self.Connections + 1
- L_2_.insert(self.Connections, L_65_.Index, L_65_)
- return L_65_
- end
- function L_48_:Fire(...)
- assert(getmetatable(self) == L_48_, L_50_:format("Fire", "Signal.new()"))
- local L_66_ = L_2_.pack(...)
- local L_67_ = self.Connections
- local L_68_ = self.YieldingThreads
- for L_69_forvar1 = 1, #L_67_ do
- local L_70_ = L_67_[L_69_forvar1]
- if L_70_.Delegate ~= nil then
- L_52_func(L_70_.Delegate, L_66_, L_70_.Signal.Name)
- end
- end
- for L_71_forvar1 = 1, #L_68_ do
- local L_72_ = L_68_[L_71_forvar1]
- if L_72_ ~= nil then
- coroutine.resume(L_72_, ...)
- end
- end
- end
- function L_48_:FireSync(...)
- assert(getmetatable(self) == L_48_, L_50_:format("FireSync", "Signal.new()"))
- local L_73_ = L_2_.pack(...)
- local L_74_ = self.Connections
- local L_75_ = self.YieldingThreads
- for L_76_forvar1 = 1, #L_74_ do
- local L_77_ = L_74_[L_76_forvar1]
- if L_77_.Delegate ~= nil then
- L_77_.Delegate(unpack(L_73_))
- end
- end
- for L_78_forvar1 = 1, #L_75_ do
- local L_79_ = L_75_[L_78_forvar1]
- if L_79_ ~= nil then
- coroutine.resume(L_79_, ...)
- end
- end
- end
- function L_48_:Wait()
- assert(getmetatable(self) == L_48_, L_50_:format("Wait", "Signal.new()"))
- local L_80_ = {}
- local L_81_ = coroutine.running()
- L_2_.insert(self.YieldingThreads, L_81_)
- L_80_ = {
- coroutine.yield()
- }
- L_2_.removeObject(self.YieldingThreads, L_81_)
- return unpack(L_80_)
- end
- function L_48_:Dispose()
- assert(getmetatable(self) == L_48_, L_50_:format("Dispose", "Signal.new()"))
- local L_82_ = self.Connections
- for L_83_forvar1 = 1, #L_82_ do
- L_82_[L_83_forvar1]:Disconnect()
- end
- self.Connections = {}
- setmetatable(self, nil)
- end
- function L_49_:Disconnect()
- assert(getmetatable(self) == L_49_, L_50_:format("Disconnect", "private function NewConnection()"))
- L_2_.remove(self.Signal.Connections, self.Index)
- self.SignalStatic = nil
- self.Delegate = nil
- self.YieldingThreads = {}
- self.Index = -1
- setmetatable(self, nil)
- end
- return L_48_
- end)()
- local L_4_ = (function()
- local L_84_ = (function()
- local L_107_ = typeof
- local function L_108_func(L_109_arg1)
- local L_110_ = L_107_(L_109_arg1)
- if L_110_ ~= "table" then
- return L_110_
- end
- local L_111_ = getmetatable(L_109_arg1)
- if L_107_(L_111_) ~= "table" then
- return L_110_
- end
- local L_112_ = L_111_["__type"]
- if L_112_ == nil then
- return L_110_
- end
- return L_112_
- end
- return L_108_func
- end)()
- local L_85_ = {}
- L_85_.__index = L_85_
- L_85_.__type = "ActiveCast"
- local L_86_ = game:GetService("RunService")
- local L_87_ = nil
- local L_88_ = "Cannot statically invoke method '%s' - It is an instance method. Call it on an instance of this class created via %s"
- local L_89_ = "Invalid type for parameter '%s' (Expected %s, got %s)"
- local L_90_ = "FastCastVisualizationObjects"
- local L_91_ = "This ActiveCast has been terminated. It can no longer be used."
- local L_92_ = 100
- local function L_93_func()
- local L_113_ = workspace.Terrain:FindFirstChild(L_90_)
- if L_113_ ~= nil then
- return L_113_
- end
- L_113_ = Instance.new("Folder")
- L_113_.Name = L_90_
- L_113_.Archivable = false
- L_113_.Parent = workspace.Terrain
- return L_113_
- end
- local function L_94_func(L_114_arg1)
- if L_87_.DebugLogging == true then
- print(L_114_arg1)
- end
- end
- local function L_95_func(L_115_arg1, L_116_arg2)
- if L_87_.VisualizeCasts ~= true then
- return nil
- end
- local L_117_ = Instance.new("ConeHandleAdornment")
- L_117_.Adornee = workspace.Terrain
- L_117_.CFrame = L_115_arg1
- L_117_.Height = L_116_arg2
- L_117_.Color3 = Color3.new()
- L_117_.Radius = 0.25
- L_117_.Transparency = 0.5
- L_117_.Parent = L_93_func()
- return L_117_
- end
- local function L_96_func(L_118_arg1, L_119_arg2)
- if L_87_.VisualizeCasts ~= true then
- return nil
- end
- local L_120_ = Instance.new("SphereHandleAdornment")
- L_120_.Adornee = workspace.Terrain
- L_120_.CFrame = L_118_arg1
- L_120_.Radius = 0.4
- L_120_.Transparency = 0.25
- L_120_.Color3 = (L_119_arg2 == false) and Color3.new(0.2, 1, 0.5) or Color3.new(1, 0.2, 0.2)
- L_120_.Parent = L_93_func()
- return L_120_
- end
- local function L_97_func(L_121_arg1, L_122_arg2, L_123_arg3, L_124_arg4)
- 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)
- return L_122_arg2 + (L_123_arg3 * L_121_arg1) + L_125_
- end
- local function L_98_func(L_126_arg1, L_127_arg2, L_128_arg3)
- return L_127_arg2 + L_128_arg3 * L_126_arg1
- end
- local function L_99_func(L_129_arg1, L_130_arg2)
- assert(L_129_arg1.StateInfo.UpdateConnection ~= nil, L_91_)
- local L_131_ = L_129_arg1.StateInfo.Trajectories
- local L_132_ = L_131_[L_130_arg2]
- local L_133_ = L_132_.EndTime - L_132_.StartTime
- local L_134_ = L_132_.Origin
- local L_135_ = L_132_.InitialVelocity
- local L_136_ = L_132_.Acceleration
- return {
- L_97_func(L_133_, L_134_, L_135_, L_136_),
- L_98_func(L_133_, L_135_, L_136_)
- }
- end
- local function L_100_func(L_137_arg1)
- assert(L_137_arg1.StateInfo.UpdateConnection ~= nil, L_91_)
- return L_99_func(L_137_arg1, #L_137_arg1.StateInfo.Trajectories)
- end
- local function L_101_func(L_138_arg1)
- local L_139_ = RaycastParams.new()
- L_139_.CollisionGroup = L_138_arg1.CollisionGroup
- L_139_.FilterType = L_138_arg1.FilterType
- L_139_.FilterDescendantsInstances = L_138_arg1.FilterDescendantsInstances
- L_139_.IgnoreWater = L_138_arg1.IgnoreWater
- return L_139_
- end
- local function L_102_func(L_140_arg1, L_141_arg2, L_142_arg3, L_143_arg4)
- L_140_arg1.Caster.RayHit:Fire(L_140_arg1, L_141_arg2, L_142_arg3, L_143_arg4)
- end
- local function L_103_func(L_144_arg1, L_145_arg2, L_146_arg3, L_147_arg4)
- L_144_arg1.Caster.RayPierced:Fire(L_144_arg1, L_145_arg2, L_146_arg3, L_147_arg4)
- end
- local function L_104_func(L_148_arg1, L_149_arg2, L_150_arg3, L_151_arg4, L_152_arg5, L_153_arg6)
- L_148_arg1.Caster.LengthChanged:Fire(L_148_arg1, L_149_arg2, L_150_arg3, L_151_arg4, L_152_arg5, L_153_arg6)
- end
- local function L_105_func(L_154_arg1, L_155_arg2, L_156_arg3)
- assert(L_154_arg1.StateInfo.UpdateConnection ~= nil, L_91_)
- L_94_func("Casting for frame.")
- local L_157_ = L_154_arg1.StateInfo.Trajectories[#L_154_arg1.StateInfo.Trajectories]
- local L_158_ = L_157_.Origin
- local L_159_ = L_154_arg1.StateInfo.TotalRuntime - L_157_.StartTime
- local L_160_ = L_157_.InitialVelocity
- local L_161_ = L_157_.Acceleration
- local L_162_ = L_97_func(L_159_, L_158_, L_160_, L_161_)
- local L_163_ = L_98_func(L_159_, L_160_, L_161_)
- local L_164_ = L_154_arg1.StateInfo.TotalRuntime - L_157_.StartTime
- L_154_arg1.StateInfo.TotalRuntime += L_155_arg2
- L_159_ = L_154_arg1.StateInfo.TotalRuntime - L_157_.StartTime
- local L_165_ = L_97_func(L_159_, L_158_, L_160_, L_161_)
- local L_166_ = L_98_func(L_159_, L_160_, L_161_)
- local L_167_ = L_165_ - L_162_
- local L_168_ = L_167_.Unit * L_166_.Magnitude * L_155_arg2
- local L_169_ = L_154_arg1.RayInfo.WorldRoot
- local L_170_ = L_169_:Raycast(L_162_, L_168_, L_154_arg1.RayInfo.Parameters)
- local L_171_ = L_165_
- local L_172_ = nil
- local L_173_ = Enum.Material.Air
- local L_174_ = Vector3.new()
- if (L_170_ ~= nil) then
- L_171_ = L_170_.Position
- L_172_ = L_170_.Instance
- L_173_ = L_170_.Material
- L_174_ = L_170_.Normal
- end
- local L_175_ = (L_171_ - L_162_).Magnitude
- L_104_func(L_154_arg1, L_162_, L_168_.Unit, L_175_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject)
- L_154_arg1.StateInfo.DistanceCovered += L_175_
- local L_176_ = nil
- if (L_155_arg2 > 0) then
- L_176_ = L_95_func(CFrame.new(L_162_, L_162_ + L_168_), L_175_)
- end
- if L_172_ and L_172_ ~= L_154_arg1.RayInfo.CosmeticBulletObject then
- local L_177_ = tick()
- L_94_func("Hit something, testing now.")
- if (L_154_arg1.RayInfo.CanPierceCallback ~= nil) then
- if L_156_arg3 == false then
- if (L_154_arg1.StateInfo.IsActivelySimulatingPierce) then
- L_154_arg1:Terminate()
- 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)")
- end
- end
- L_154_arg1.StateInfo.IsActivelySimulatingPierce = true
- end
- 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
- L_94_func("Piercing function is nil or it returned FALSE to not pierce this hit.")
- L_154_arg1.StateInfo.IsActivelySimulatingPierce = false
- if (L_154_arg1.StateInfo.HighFidelityBehavior == 2 and L_157_.Acceleration ~= Vector3.new() and L_154_arg1.StateInfo.HighFidelitySegmentSize ~= 0) then
- L_154_arg1.StateInfo.CancelHighResCast = false
- if L_154_arg1.StateInfo.IsActivelyResimulating then
- L_154_arg1:Terminate()
- 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.")
- end
- L_154_arg1.StateInfo.IsActivelyResimulating = true
- L_94_func("Hit was registered, but recalculation is on for physics based casts. Recalculating to verify a real hit...")
- local L_178_ = L_175_ / L_154_arg1.StateInfo.HighFidelitySegmentSize
- local L_179_ = math.floor(L_178_)
- local L_180_ = L_175_ / L_179_
- local L_181_ = L_155_arg2 / L_179_
- for L_182_forvar1 = 1, L_179_ do
- if L_154_arg1.StateInfo.CancelHighResCast then
- L_154_arg1.StateInfo.CancelHighResCast = false
- break
- end
- local L_183_ = L_97_func(L_164_ + (L_181_ * L_182_forvar1), L_158_, L_160_, L_161_)
- local L_184_ = L_98_func(L_164_ + (L_181_ * L_182_forvar1), L_160_, L_161_)
- local L_185_ = L_184_ * L_155_arg2
- local L_186_ = L_169_:Raycast(L_183_, L_185_, L_154_arg1.RayInfo.Parameters)
- local L_187_ = (L_183_ - (L_183_ + L_184_)).Magnitude
- if (L_186_ ~= nil) then
- local L_188_ = (L_183_ - L_186_.Position).Magnitude
- local L_189_ = L_95_func(CFrame.new(L_183_, L_183_ + L_184_), L_188_)
- if (L_189_ ~= nil) then
- L_189_.Color3 = Color3.new(0.286275, 0.329412, 0.247059)
- end
- 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
- L_154_arg1.StateInfo.IsActivelyResimulating = false
- L_102_func(L_154_arg1, L_186_, L_184_, L_154_arg1.RayInfo.CosmeticBulletObject)
- L_154_arg1:Terminate()
- local L_190_ = L_96_func(CFrame.new(L_171_), false)
- if (L_190_ ~= nil) then
- L_190_.Color3 = Color3.new(0.0588235, 0.87451, 1)
- end
- return
- else
- L_103_func(L_154_arg1, L_186_, L_184_, L_154_arg1.RayInfo.CosmeticBulletObject)
- local L_191_ = L_96_func(CFrame.new(L_171_), true)
- if (L_191_ ~= nil) then
- L_191_.Color3 = Color3.new(1, 0.113725, 0.588235)
- end
- if (L_189_ ~= nil) then
- L_189_.Color3 = Color3.new(0.305882, 0.243137, 0.329412)
- end
- end
- else
- local L_192_ = L_95_func(CFrame.new(L_183_, L_183_ + L_184_), L_187_)
- if (L_192_ ~= nil) then
- L_192_.Color3 = Color3.new(0.286275, 0.329412, 0.247059)
- end
- end
- end
- L_154_arg1.StateInfo.IsActivelyResimulating = false
- elseif (L_154_arg1.StateInfo.HighFidelityBehavior ~= 1 and L_154_arg1.StateInfo.HighFidelityBehavior ~= 3) then
- L_154_arg1:Terminate()
- error("Invalid value "..(L_154_arg1.StateInfo.HighFidelityBehavior).." for HighFidelityBehavior.")
- else
- L_94_func("Hit was successful. Terminating.")
- L_102_func(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject)
- L_154_arg1:Terminate()
- L_96_func(CFrame.new(L_171_), false)
- return
- end
- else
- L_94_func("Piercing function returned TRUE to pierce this part.")
- if L_176_ ~= nil then
- L_176_.Color3 = Color3.new(0.4, 0.05, 0.05)
- end
- L_96_func(CFrame.new(L_171_), true)
- local L_193_ = L_154_arg1.RayInfo.Parameters
- local L_194_ = {}
- local L_195_ = 0
- local L_196_ = L_193_.FilterDescendantsInstances
- local L_197_ = false
- while true do
- if L_170_.Instance:IsA("Terrain") then
- if L_173_ == Enum.Material.Water then
- L_154_arg1:Terminate()
- error("Do not add Water as a piercable material. If you need to pierce water, set cast.RayInfo.Parameters.IgnoreWater = true instead", 0)
- end
- warn("WARNING: The pierce callback for this cast returned TRUE on Terrain! This can cause severely adverse effects.")
- end
- if L_193_.FilterType == Enum.RaycastFilterType.Exclude then
- local L_198_ = L_193_.FilterDescendantsInstances
- L_2_.insert(L_198_, L_170_.Instance)
- L_2_.insert(L_194_, L_170_.Instance)
- L_193_.FilterDescendantsInstances = L_198_
- else
- local L_199_ = L_193_.FilterDescendantsInstances
- L_2_.removeObject(L_199_, L_170_.Instance)
- L_2_.insert(L_194_, L_170_.Instance)
- L_193_.FilterDescendantsInstances = L_199_
- end
- L_103_func(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject)
- L_170_ = L_169_:Raycast(L_162_, L_168_, L_193_)
- if L_170_ == nil then
- break
- end
- if L_195_ >= L_92_ then
- warn("WARNING: Exceeded maximum pierce test budget for a single ray segment (attempted to test the same segment "..L_92_.." times!)")
- break
- end
- L_195_ = L_195_ + 1
- if L_154_arg1.RayInfo.CanPierceCallback(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject) == false then
- L_197_ = true
- break
- end
- end
- L_154_arg1.RayInfo.Parameters.FilterDescendantsInstances = L_196_
- L_154_arg1.StateInfo.IsActivelySimulatingPierce = false
- if L_197_ then
- L_94_func("Broke because the ray hit something solid ("..tostring(L_170_.Instance)..") while testing for a pierce. Terminating the cast.")
- L_102_func(L_154_arg1, L_170_, L_166_, L_154_arg1.RayInfo.CosmeticBulletObject)
- L_154_arg1:Terminate()
- L_96_func(CFrame.new(L_170_.Position), false)
- return
- end
- end
- end
- if (L_154_arg1.StateInfo.DistanceCovered >= L_154_arg1.RayInfo.MaxDistance) then
- L_154_arg1:Terminate()
- L_96_func(CFrame.new(L_165_), false)
- end
- end
- function L_85_.new(L_200_arg1, L_201_arg2, L_202_arg3, L_203_arg4, L_204_arg5)
- if L_84_(L_203_arg4) == "number" then
- L_203_arg4 = L_202_arg3.Unit * L_203_arg4
- end
- if (L_204_arg5.HighFidelitySegmentSize <= 0) then
- error("Cannot set FastCastBehavior.HighFidelitySegmentSize <= 0!", 0)
- end
- local L_205_ = {
- Caster = L_200_arg1,
- StateInfo = {
- UpdateConnection = nil,
- Paused = false,
- TotalRuntime = 0,
- DistanceCovered = 0,
- HighFidelitySegmentSize = L_204_arg5.HighFidelitySegmentSize,
- HighFidelityBehavior = L_204_arg5.HighFidelityBehavior,
- IsActivelySimulatingPierce = false,
- IsActivelyResimulating = false,
- CancelHighResCast = false,
- Trajectories = {
- {
- StartTime = 0,
- EndTime = -1,
- Origin = L_201_arg2,
- InitialVelocity = L_203_arg4,
- Acceleration = L_204_arg5.Acceleration
- }
- }
- },
- RayInfo = {
- Parameters = L_204_arg5.RaycastParams,
- WorldRoot = workspace,
- MaxDistance = L_204_arg5.MaxDistance or 1000,
- CosmeticBulletObject = L_204_arg5.CosmeticBulletTemplate,
- CanPierceCallback = L_204_arg5.CanPierceFunction
- },
- UserData = {}
- }
- if L_205_.StateInfo.HighFidelityBehavior == 2 then
- L_205_.StateInfo.HighFidelityBehavior = 3
- end
- if L_205_.RayInfo.Parameters ~= nil then
- L_205_.RayInfo.Parameters = L_101_func(L_205_.RayInfo.Parameters)
- else
- L_205_.RayInfo.Parameters = RaycastParams.new()
- end
- local L_206_ = false
- if L_204_arg5.CosmeticBulletProvider == nil then
- if L_205_.RayInfo.CosmeticBulletObject ~= nil then
- L_205_.RayInfo.CosmeticBulletObject = L_205_.RayInfo.CosmeticBulletObject:Clone()
- L_205_.RayInfo.CosmeticBulletObject.CFrame = CFrame.new(L_201_arg2, L_201_arg2 + L_202_arg3)
- L_205_.RayInfo.CosmeticBulletObject.Parent = L_204_arg5.CosmeticBulletContainer
- end
- else
- if L_84_(L_204_arg5.CosmeticBulletProvider) == "PartCache" then
- if L_205_.RayInfo.CosmeticBulletObject ~= nil then
- 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.")
- L_205_.RayInfo.CosmeticBulletObject = nil
- L_204_arg5.CosmeticBulletTemplate = nil
- end
- L_205_.RayInfo.CosmeticBulletObject = L_204_arg5.CosmeticBulletProvider:GetPart()
- L_205_.RayInfo.CosmeticBulletObject.CFrame = CFrame.new(L_201_arg2, L_201_arg2 + L_202_arg3)
- L_206_ = true
- else
- 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.")
- L_204_arg5.CosmeticBulletProvider = nil
- end
- end
- local L_207_
- if L_206_ then
- L_207_ = L_204_arg5.CosmeticBulletProvider.CurrentCacheParent
- else
- L_207_ = L_204_arg5.CosmeticBulletContainer
- end
- if L_204_arg5.AutoIgnoreContainer == true and L_207_ ~= nil then
- local L_209_ = L_205_.RayInfo.Parameters.FilterDescendantsInstances
- if L_2_.find(L_209_, L_207_) == nil then
- L_2_.insert(L_209_, L_207_)
- L_205_.RayInfo.Parameters.FilterDescendantsInstances = L_209_
- end
- end
- local L_208_
- if L_86_:IsClient() then
- L_208_ = L_86_.RenderStepped
- else
- L_208_ = L_86_.Heartbeat
- end
- setmetatable(L_205_, L_85_)
- L_205_.StateInfo.UpdateConnection = L_208_:Connect(function(L_210_arg1)
- if L_205_.StateInfo.Paused then
- return
- end
- L_94_func("Casting for frame.")
- local L_211_ = L_205_.StateInfo.Trajectories[#L_205_.StateInfo.Trajectories]
- if (L_205_.StateInfo.HighFidelityBehavior == 3 and L_211_.Acceleration ~= Vector3.new() and L_205_.StateInfo.HighFidelitySegmentSize > 0) then
- local L_212_ = tick()
- if L_205_.StateInfo.IsActivelyResimulating then
- L_205_:Terminate()
- 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.")
- end
- L_205_.StateInfo.IsActivelyResimulating = true
- local L_213_ = L_211_.Origin
- local L_214_ = L_205_.StateInfo.TotalRuntime - L_211_.StartTime
- local L_215_ = L_211_.InitialVelocity
- local L_216_ = L_211_.Acceleration
- local L_217_ = L_97_func(L_214_, L_213_, L_215_, L_216_)
- local L_218_ = L_98_func(L_214_, L_215_, L_216_)
- local L_219_ = L_205_.StateInfo.TotalRuntime - L_211_.StartTime
- L_205_.StateInfo.TotalRuntime += L_210_arg1
- L_214_ = L_205_.StateInfo.TotalRuntime - L_211_.StartTime
- local L_220_ = L_97_func(L_214_, L_213_, L_215_, L_216_)
- local L_221_ = L_98_func(L_214_, L_215_, L_216_)
- local L_222_ = L_220_ - L_217_
- local L_223_ = L_222_.Unit * L_221_.Magnitude * L_210_arg1
- local L_224_ = L_205_.RayInfo.WorldRoot
- local L_225_ = L_224_:Raycast(L_217_, L_223_, L_205_.RayInfo.Parameters)
- local L_226_ = L_220_
- if (L_225_ ~= nil) then
- L_226_ = L_225_.Position
- end
- local L_227_ = (L_226_ - L_217_).Magnitude
- L_205_.StateInfo.TotalRuntime -= L_210_arg1
- local L_228_ = L_227_ / L_205_.StateInfo.HighFidelitySegmentSize
- local L_229_ = math.floor(L_228_)
- if (L_229_ == 0) then
- L_229_ = 1
- end
- local L_230_ = L_210_arg1 / L_229_
- for L_231_forvar1 = 1, L_229_ do
- if getmetatable(L_205_) == nil then
- return
- end
- if L_205_.StateInfo.CancelHighResCast then
- L_205_.StateInfo.CancelHighResCast = false
- break
- end
- L_94_func("["..L_231_forvar1.."] Subcast of time increment "..L_230_)
- L_105_func(L_205_, L_230_, true)
- end
- if getmetatable(L_205_) == nil then
- return
- end
- L_205_.StateInfo.IsActivelyResimulating = false
- if (tick() - L_212_) > 0.016 * 5 then
- warn("Extreme cast lag encountered! Consider increasing HighFidelitySegmentSize.")
- end
- else
- L_105_func(L_205_, L_210_arg1, false)
- end
- end)
- return L_205_
- end
- function L_85_.SetStaticFastCastReference(L_232_arg1)
- L_87_ = L_232_arg1
- end
- local function L_106_func(L_233_arg1, L_234_arg2, L_235_arg3, L_236_arg4)
- local L_237_ = L_233_arg1.StateInfo.Trajectories
- local L_238_ = L_237_[#L_237_]
- if L_238_.StartTime == L_233_arg1.StateInfo.TotalRuntime then
- if (L_234_arg2 == nil) then
- L_234_arg2 = L_238_.InitialVelocity
- end
- if (L_235_arg3 == nil) then
- L_235_arg3 = L_238_.Acceleration
- end
- if (L_236_arg4 == nil) then
- L_236_arg4 = L_238_.Origin
- end
- L_238_.Origin = L_236_arg4
- L_238_.InitialVelocity = L_234_arg2
- L_238_.Acceleration = L_235_arg3
- else
- L_238_.EndTime = L_233_arg1.StateInfo.TotalRuntime
- local L_239_, L_240_ = unpack(L_100_func(L_233_arg1))
- if (L_234_arg2 == nil) then
- L_234_arg2 = L_240_
- end
- if (L_235_arg3 == nil) then
- L_235_arg3 = L_238_.Acceleration
- end
- if (L_236_arg4 == nil) then
- L_236_arg4 = L_239_
- end
- L_2_.insert(L_233_arg1.StateInfo.Trajectories, {
- StartTime = L_233_arg1.StateInfo.TotalRuntime,
- EndTime = -1,
- Origin = L_236_arg4,
- InitialVelocity = L_234_arg2,
- Acceleration = L_235_arg3
- })
- L_233_arg1.StateInfo.CancelHighResCast = true
- end
- end
- function L_85_:SetVelocity(L_241_arg1)
- assert(getmetatable(self) == L_85_, L_88_:format("SetVelocity", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- L_106_func(self, L_241_arg1, nil, nil)
- end
- function L_85_:SetAcceleration(L_242_arg1)
- assert(getmetatable(self) == L_85_, L_88_:format("SetAcceleration", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- L_106_func(self, nil, L_242_arg1, nil)
- end
- function L_85_:SetPosition(L_243_arg1)
- assert(getmetatable(self) == L_85_, L_88_:format("SetPosition", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- L_106_func(self, nil, nil, L_243_arg1)
- end
- function L_85_:GetVelocity()
- assert(getmetatable(self) == L_85_, L_88_:format("GetVelocity", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- local L_244_ = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
- return L_98_func(self.StateInfo.TotalRuntime - L_244_.StartTime, L_244_.InitialVelocity, L_244_.Acceleration)
- end
- function L_85_:GetAcceleration()
- assert(getmetatable(self) == L_85_, L_88_:format("GetAcceleration", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- local L_245_ = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
- return L_245_.Acceleration
- end
- function L_85_:GetPosition()
- assert(getmetatable(self) == L_85_, L_88_:format("GetPosition", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- local L_246_ = self.StateInfo.Trajectories[#self.StateInfo.Trajectories]
- return L_97_func(self.StateInfo.TotalRuntime - L_246_.StartTime, L_246_.Origin, L_246_.InitialVelocity, L_246_.Acceleration)
- end
- function L_85_:AddVelocity(L_247_arg1)
- assert(getmetatable(self) == L_85_, L_88_:format("AddVelocity", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- self:SetVelocity(self:GetVelocity() + L_247_arg1)
- end
- function L_85_:AddAcceleration(L_248_arg1)
- assert(getmetatable(self) == L_85_, L_88_:format("AddAcceleration", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- self:SetAcceleration(self:GetAcceleration() + L_248_arg1)
- end
- function L_85_:AddPosition(L_249_arg1)
- assert(getmetatable(self) == L_85_, L_88_:format("AddPosition", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- self:SetPosition(self:GetPosition() + L_249_arg1)
- end
- function L_85_:Pause()
- assert(getmetatable(self) == L_85_, L_88_:format("Pause", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- self.StateInfo.Paused = true
- end
- function L_85_:Resume()
- assert(getmetatable(self) == L_85_, L_88_:format("Resume", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- self.StateInfo.Paused = false
- end
- function L_85_:Terminate()
- assert(getmetatable(self) == L_85_, L_88_:format("Terminate", "ActiveCast.new(...)"))
- assert(self.StateInfo.UpdateConnection ~= nil, L_91_)
- local L_250_ = self.StateInfo.Trajectories
- local L_251_ = L_250_[#L_250_]
- L_251_.EndTime = self.StateInfo.TotalRuntime
- self.StateInfo.UpdateConnection:Disconnect()
- self.Caster.CastTerminating:FireSync(self)
- self.StateInfo.UpdateConnection = nil
- self.Caster = nil
- self.StateInfo = nil
- self.RayInfo = nil
- self.UserData = nil
- setmetatable(self, nil)
- end
- return L_85_
- end)()
- local L_5_ = "Cannot statically invoke method '%s' - It is an instance method. Call it on an instance of this class created via %s"
- local L_6_ = "Invalid type for parameter '%s' (Expected %s, got %s)"
- local L_7_ = "FastCastVisualizationObjects"
- local L_8_ = "This Caster has been disposed. It can no longer be used."
- L_4_.SetStaticFastCastReference(L_1_)
- function L_1_.new()
- return setmetatable({
- LengthChanged = L_3_.new("LengthChanged"),
- RayHit = L_3_.new("RayHit"),
- RayPierced = L_3_.new("RayPierced"),
- CastTerminating = L_3_.new("CastTerminating"),
- WorldRoot = workspace
- }, L_1_)
- end
- function L_1_.newBehavior()
- return {
- RaycastParams = nil,
- Acceleration = Vector3.new(),
- MaxDistance = 1000,
- CanPierceFunction = nil,
- HighFidelityBehavior = L_1_.HighFidelityBehavior.Default,
- HighFidelitySegmentSize = 0.5,
- CosmeticBulletTemplate = nil,
- CosmeticBulletProvider = nil,
- CosmeticBulletContainer = nil,
- AutoIgnoreContainer = true
- }
- end
- local L_9_ = L_1_.newBehavior()
- function L_1_:Fire(L_252_arg1, L_253_arg2, L_254_arg3, L_255_arg4)
- if L_255_arg4 == nil then
- L_255_arg4 = L_9_
- end
- local L_256_ = L_4_.new(self, L_252_arg1, L_253_arg2, L_254_arg3, L_255_arg4)
- L_256_.RayInfo.WorldRoot = self.WorldRoot
- return L_256_
- end
- return L_1_
- end)()
- local puddle = game:GetService("InsertService"):CreateMeshPartAsync("rbxassetid://13311434522", Enum.CollisionFidelity.Box, Enum.RenderFidelity.Automatic)
- puddle.CanCollide = false
- puddle.Anchored = false
- puddle.Color = Color3.fromRGB(117, 0, 0)
- puddle.Material = Enum.Material.SmoothPlastic
- puddle.Size = Vector3.zero
- puddle.Massless = true
- puddle.Name = "BloodPuddle"
- local wel = Instance.new("WeldConstraint", puddle)
- wel.Name = "WeldConstraint"
- wel.Part0 = puddle
- local bloodfly = Instance.new("Part")
- bloodfly.Name = "BloodFly"
- bloodfly.Transparency = 1
- bloodfly.Size = Vector3.one/2
- bloodfly.CanCollide = false
- bloodfly.Anchored = true
- local at = Instance.new("Attachment", bloodfly)
- at.CFrame = CFrame.new(0.1, 0, 0)
- local at2 = Instance.new("Attachment", bloodfly)
- at2.CFrame = CFrame.new(-0.1, 0, 0)
- local trail = Instance.new("Trail", bloodfly)
- trail.Color = ColorSequence.new(Color3.fromRGB(85, 0, 0))
- trail.LightInfluence = 1
- trail.LightEmission = 0
- trail.Transparency = NumberSequence.new(0)
- trail.TextureLength = 1
- trail.FaceCamera = true
- trail.Attachment0 = at
- trail.Attachment1 = at2
- trail.Lifetime = 0.15
- trail.MaxLength = 0
- trail.MinLength = .1
- trail.WidthScale = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(.1, 1), NumberSequenceKeypoint.new(1, 0)})
- local random_state_upvr = Random.new()
- local any_newBehavior_result1_upvr = FastCastRedux.newBehavior()
- any_newBehavior_result1_upvr.MaxDistance = 150
- any_newBehavior_result1_upvr.Acceleration = Vector3.new(0, -workspace.Gravity, 0)
- any_newBehavior_result1_upvr.CosmeticBulletTemplate = bloodfly
- if(script:FindFirstChild("Effects"))then
- any_newBehavior_result1_upvr.CosmeticBulletContainer = script.Effects
- end
- task.spawn(function()
- while task.wait() do
- if(script:FindFirstChild("Effects"))then
- any_newBehavior_result1_upvr.CosmeticBulletContainer = script.Effects
- end
- end
- end)
- any_newBehavior_result1_upvr.AutoIgnoreContainer = true
- local living = {script}
- for i, v in next, workspace:GetChildren() do
- if(v:FindFirstChildOfClass("Humanoid") and v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Head"))then
- table.insert(living, v)
- end
- end
- local RaycastParams_new_result1_upvr = RaycastParams.new()
- RaycastParams_new_result1_upvr.FilterDescendantsInstances = living
- workspace.ChildAdded:Connect(function(v)
- task.defer(function()
- if(v:FindFirstChildOfClass("Humanoid") and v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Head"))then
- table.insert(living, v)
- RaycastParams_new_result1_upvr = RaycastParams.new()
- RaycastParams_new_result1_upvr.FilterDescendantsInstances = living
- any_newBehavior_result1_upvr.RaycastParams = RaycastParams_new_result1_upvr
- end
- end)
- end)
- any_newBehavior_result1_upvr.RaycastParams = RaycastParams_new_result1_upvr
- local cframe_upvr_2 = CFrame.Angles((-math.pi/2), 0, 0)
- local TweenService_upvr = game:GetService("TweenService")
- local TweenInfo_new_result1_upvr = TweenInfo.new(0.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out)
- local any_new_result1_upvr = FastCastRedux.new()
- any_new_result1_upvr.RayHit:Connect(function(arg1, arg2, arg3, arg4)
- local Instance_upvw = arg2.Instance
- local any_NextInteger_result1 = random_state_upvr:NextInteger(0.5, 2)
- local cframe_upvr = CFrame.Angles(0, math.random(0, math.pi), 0)
- local clone_upvr = puddle:Clone()
- clone_upvr.CFrame = CFrame.lookAlong(arg2.Position + arg2.Normal * 0.1, arg2.Normal) * cframe_upvr_2 * cframe_upvr
- clone_upvr.WeldConstraint.Part1 = Instance_upvw
- clone_upvr.Parent = script.Effects
- TweenService_upvr:Create(clone_upvr, TweenInfo_new_result1_upvr, {
- Size = Vector3.new(any_NextInteger_result1, 0, any_NextInteger_result1);
- }):Play()
- task.delay(7.7, function()
- TweenService_upvr:Create(clone_upvr, TweenInfo_new_result1_upvr, {
- Size = Vector3.zero;
- }):Play()
- end)
- AddItem(clone_upvr, 8)
- task.spawn(function()
- local CFrame = clone_upvr.CFrame
- repeat
- if 200 < (CFrame.Position - clone_upvr.Position).Magnitude then
- local workspace_Raycast_result1 = workspace:Raycast(CFrame.Position, -CFrame.UpVector, RaycastParams_new_result1_upvr)
- if not workspace_Raycast_result1 then
- clone_upvr:Destroy()
- return
- end
- if workspace_Raycast_result1.Instance ~= Instance_upvw then
- Instance_upvw = workspace_Raycast_result1.Instance
- clone_upvr.WeldConstraint.Part1 = nil
- clone_upvr.CFrame = CFrame.lookAlong(workspace_Raycast_result1.Position + workspace_Raycast_result1.Normal * 0.1, workspace_Raycast_result1.Normal) * cframe_upvr_2 * cframe_upvr
- clone_upvr.WeldConstraint.Part1 = Instance_upvw
- end
- end
- task.wait(0.02)
- until not clone_upvr.Parent
- end)
- end)
- any_new_result1_upvr.LengthChanged:Connect(function(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 61, Named "onRayUpdated"
- if not arg6 then
- else
- arg6.Position = arg2 + arg3 * arg4
- end
- end)
- any_new_result1_upvr.CastTerminating:Connect(function(arg1)
- local CosmeticBulletObject = arg1.RayInfo.CosmeticBulletObject
- if CosmeticBulletObject then
- CosmeticBulletObject.Trail.Enabled = false
- AddItem(CosmeticBulletObject, 0.15)
- end
- end)
- function bloodyzee.Blood(arg1, arg2, arg3, arg4, arg5)
- 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)
- end
- local Ragdoll = {}
- function I(instance,properties)
- local inst = Instance.new(instance)
- for _, val in next, properties or {} do
- pcall(function()
- inst[val[1]] = val[2]
- end)
- end
- return inst
- end
- function Ragdoll:Ragdoll(chr, duration)
- if(chr:FindFirstChild("RagdollTime"))then
- chr:FindFirstChild("RagdollTime").Value = tick()+duration
- return
- end
- playSound(stuff.Sounds.Impact.Players.Ragdoll_Impact, chr:FindFirstChild("HumanoidRootPart"))
- local scale = chr:GetScale()
- local unstunnedLol = false
- local function Stun(whom)
- task.spawn(function()
- if(whom:FindFirstChild("Health"))then whom:FindFirstChild("Health").Disabled = true end
- whom:FindFirstChildOfClass'Humanoid':ChangeState(Enum.HumanoidStateType.Physics)
- whom:FindFirstChildOfClass'Humanoid'.EvaluateStateMachine = false
- chr.HumanoidRootPart:ApplyImpulse(chr.HumanoidRootPart.CFrame.LookVector * -50)
- while game:GetService('RunService').PostSimulation:wait() do
- if(unstunnedLol)then break end
- local asdq = game:service'Players':GetPlayerFromCharacter(whom)
- local h = whom:FindFirstChildOfClass"Humanoid"
- if(h and h.Health > 0)then
- for _,c in next, whom:children() do
- if c:IsA'Tool' then
- c.ManualActivationOnly = true
- game:GetService('RunService').Heartbeat:wait()
- if(asdq)then
- c.Parent = asdq:FindFirstChildOfClass'Backpack'
- c.ManualActivationOnly=false
- else
- c:Remove()
- end
- end
- end
- h.Jump = false
- h.BreakJointsOnDeath = false
- h.AutoRotate = false
- h:ChangeState(Enum.HumanoidStateType.Physics)
- end
- if(h.Health < 1)then h:ChangeState(Enum.HumanoidStateType.Dead) end
- end
- local h = whom:FindFirstChildOfClass"Humanoid"
- h.AutoRotate = true
- h.BreakJointsOnDeath = true
- h.EvaluateStateMachine = true
- h.Jump = true
- if(h.Health < 1)then h:ChangeState(Enum.HumanoidStateType.Dead) end
- task.wait()
- if(h.Health < 1)then h:ChangeState(Enum.HumanoidStateType.Dead) end
- h:ChangeState(Enum.HumanoidStateType.GettingUp)
- if(whom:FindFirstChild("Health"))then whom:FindFirstChild("Health").Disabled = false end
- end)
- end
- local function ragdollJoint(Character, part0, part1, attachmentName, className, properties) -- thanks mustardfat im too lazy
- if Character:FindFirstChild("RagdollConstraint"..part1.Name) == nil then
- if Character:FindFirstChild('HumanoidRootPart')then
- Character.HumanoidRootPart.CanCollide = false
- end
- for i,v in pairs(Character:GetChildren()) do
- 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
- v.Size = Vector3.new(1,1,1)
- end
- end
- for _,v in next, Character:GetDescendants() do
- if v:IsA("Attachment") then
- v.Axis = Vector3.new(0, 1, 0)
- v.SecondaryAxis = Vector3.new(0, 0, 1)
- v.Rotation = Vector3.new(0, 0, 0)
- end
- end
- if part1:FindFirstChildOfClass('Motor6D') then
- part1:FindFirstChildOfClass('Motor6D').Enabled = false
- end
- if attachmentName ~= "NeckAttachment" then
- attachmentName = attachmentName.."RigAttachment"
- end
- local constraint = Instance.new(className.."Constraint")
- constraint.Attachment0 = part0:FindFirstChild(attachmentName)
- constraint.Attachment1 = part1:FindFirstChild(attachmentName)
- constraint.Name = "RagdollConstraint"..part1.Name
- if Character:FindFirstChildOfClass('Humanoid').Health > 0 then
- local collidepart = Instance.new('Part',part1)
- collidepart.Size = part1.Size/2
- if string.find(string.lower(part1.Name),"upper") then
- if string.find(string.lower(part1.Name),"leg") then
- collidepart.Size = part1.Size/3
- else
- collidepart.Size = part1.Size/2.5
- end
- end
- collidepart.CanCollide = true
- collidepart.Name = "RagdollJoint"
- collidepart.Anchored = false
- collidepart.Transparency = 1
- collidepart.CFrame = part1.CFrame
- collidepart.Touched:Connect(function(p)
- if(not p:IsDescendantOf(Character) and collidepart.AssemblyLinearVelocity.Magnitude > 10 and not Character:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
- if(collidepart.AssemblyLinearVelocity.Y > -10)then
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
- local s = playSound(ch[#ch], Character:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- else
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
- local s = playSound(ch[#ch], Character:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- end
- end
- end)
- local attachment0 = Instance.new('Attachment',part1)
- local attachment1 = Instance.new('Attachment',collidepart)
- if attachment0 and attachment1 then
- local constraint = Instance.new("HingeConstraint")
- constraint.Attachment0 = attachment0
- constraint.Attachment1 = attachment1
- constraint.LimitsEnabled = true
- constraint.UpperAngle = 0
- constraint.LowerAngle = 0
- constraint.Parent = Character
- end
- if string.find(string.lower(part1.Name),"upper") then
- if string.find(string.lower(part1.Name),"leg") then
- attachment0.Position = Vector3.new(0,0.01,0)
- else
- attachment0.Position = Vector3.new(0,0.25,0)
- end
- else
- attachment0.Position = Vector3.new(0,-0.1,0)
- end
- end
- for _,propertyData in next,properties or {} do
- constraint[propertyData[1]] = propertyData[2]
- end
- constraint.Parent = Character
- return constraint
- end
- end
- local function R6RagdollLimb(whom,limb)
- local Torso = whom:FindFirstChild'Torso'
- if(Torso)then
- local RLeg = whom:FindFirstChild'Right Leg'
- local LLeg = whom:FindFirstChild'Left Leg'
- local RArm = whom:FindFirstChild'Right Arm'
- local LArm = whom:FindFirstChild'Left Arm'
- local Head = whom:FindFirstChild'Head'
- if(RLeg and limb == "Right Leg" and not RLeg:FindFirstChild"RagdollJoint")then
- for _,v in next, whom:GetDescendants() do
- if(v:IsA'JointInstance' and (v.Part0 == RLeg or v.Part1 == RLeg))then
- v.Enabled = false
- end
- end
- local torsoJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(0.5,-1,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",Torso},
- {"Visible",false}
- })
- local limbJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(0,1,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",RLeg},
- {"Visible",false}
- })
- I('BallSocketConstraint',{
- {'Parent',Torso},
- {'Attachment0',torsoJoint},
- {'Attachment1',limbJoint},
- {'LimitsEnabled',true}
- })
- local RagdollJoint = I('Part',{
- {"Size",RLeg.Size/1.5},
- {"Anchored",false},
- {"Transparency",1},
- {'Parent',whom},
- {'Name','RagdollJoint'}
- })
- RagdollJoint.Touched:Connect(function(p)
- if(not p:IsDescendantOf(whom) and RagdollJoint.AssemblyLinearVelocity.Magnitude > 10 and not whom:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
- if(RagdollJoint.AssemblyLinearVelocity.Y > -10)then
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
- local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- else
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
- local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- end
- end
- end)
- I("Weld",{
- {'Part0',RLeg},
- {'Part1',RagdollJoint},
- {'Parent',RLeg}
- })
- Stun(whom)
- end
- if(LLeg and limb == "Left Leg" and not LLeg:FindFirstChild"RagdollJoint")then
- for _,v in next, whom:GetDescendants() do
- if(v:IsA'JointInstance' and (v.Part0 == LLeg or v.Part1 == LLeg))then
- v.Enabled = false
- end
- end
- local torsoJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(-0.5,-1,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",Torso},
- {"Visible",false}
- })
- local limbJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(0,1,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",LLeg},
- {"Visible",false}
- })
- I('BallSocketConstraint',{
- {'Parent',Torso},
- {'Attachment0',torsoJoint},
- {'Attachment1',limbJoint},
- {'LimitsEnabled',true}
- })
- local RagdollJoint = I('Part',{
- {"Size",LLeg.Size/1.5},
- {"Anchored",false},
- {"Transparency",1},
- {'Parent',whom},
- {'Name','RagdollJoint'}
- })
- RagdollJoint.Touched:Connect(function(p)
- if(not p:IsDescendantOf(whom) and RagdollJoint.AssemblyLinearVelocity.Magnitude > 10 and not whom:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
- if(RagdollJoint.AssemblyLinearVelocity.Y > -10)then
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
- local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- else
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
- local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- end
- end
- end)
- I("Weld",{
- {'Part0',LLeg},
- {'Part1',RagdollJoint},
- {'Parent',LLeg}
- })
- Stun(whom)
- end
- if(LArm and limb == "Left Arm" and not LArm:FindFirstChild"RagdollJoint")then
- for _,v in next, whom:GetDescendants() do
- if(v:IsA'JointInstance' and (v.Part0 == LArm or v.Part1 == LArm))then
- v.Enabled = false
- end
- end
- local torsoJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(-1.5,0.5,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",Torso},
- {"Visible",false}
- })
- local limbJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(0,0.5,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",LArm},
- {"Visible",false}
- })
- I('BallSocketConstraint',{
- {'Parent',Torso},
- {'Attachment0',torsoJoint},
- {'Attachment1',limbJoint},
- {'LimitsEnabled',true}
- })
- local RagdollJoint = I('Part',{
- {"Size",LArm.Size/1.5},
- {"Anchored",false},
- {"Transparency",1},
- {'Parent',whom},
- {'Name','RagdollJoint'}
- })
- RagdollJoint.Touched:Connect(function(p)
- if(not p:IsDescendantOf(whom) and RagdollJoint.AssemblyLinearVelocity.Magnitude > 10 and not whom:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
- if(RagdollJoint.AssemblyLinearVelocity.Y > -10)then
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
- local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- else
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
- local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- end
- end
- end)
- I("Weld",{
- {'Part0',LArm},
- {'Part1',RagdollJoint},
- {'Parent',LArm}
- })
- end
- if(RArm and limb == "Right Arm" and not RArm:FindFirstChild"RagdollJoint")then
- for _,v in next, whom:GetDescendants() do
- if(v:IsA'JointInstance' and (v.Part0 == RArm or v.Part1 == RArm))then
- v.Enabled = false
- end
- end
- local torsoJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(1.5,0.5,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",Torso},
- {"Visible",false}
- })
- local limbJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(0,0.5,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",RArm},
- {"Visible",false}
- })
- I('BallSocketConstraint',{
- {'Parent',Torso},
- {'Attachment0',torsoJoint},
- {'Attachment1',limbJoint},
- {'LimitsEnabled',true}
- })
- local RagdollJoint = I('Part',{
- {"Size",RArm.Size/1.5},
- {"Anchored",false},
- {"Transparency",1},
- {'Parent',whom},
- {'Name','RagdollJoint'}
- })
- RagdollJoint.Touched:Connect(function(p)
- if(not p:IsDescendantOf(whom) and RagdollJoint.AssemblyLinearVelocity.Magnitude > 10 and not whom:FindFirstChild("HumanoidRootPart"):FindFirstChild("RagdollSound"))then
- if(RagdollJoint.AssemblyLinearVelocity.Y > -10)then
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Collision:GetChildren()
- local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- else
- local ch = stuff.Sounds.Impact.Players.Ragdoll_Fall:GetChildren()
- local s = playSound(ch[#ch], whom:FindFirstChild("HumanoidRootPart"))
- s.Name = "RagdollSound"
- end
- end
- end)
- I("Weld",{
- {'Part0',RArm},
- {'Part1',RagdollJoint},
- {'Parent',RArm}
- })
- end
- if(Head and limb == "Head" and not Head:FindFirstChild"RagdollJoint")then
- for _,v in next, whom:GetDescendants() do
- if(v.Name == 'RagdollJoint' or v:IsA'Attachment' or v:IsA'Constraint')then
- v:Remove()
- end
- end
- local torsoJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(0,1,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Parent",Torso},
- {"Visible",false}
- })
- local limbJoint = I('Attachment',{
- {"Name","RagdollJoint"},
- {"Position",Vector3.new(0,-0.5,0)*scale},
- {"Axis",Vector3.new(1,0,0)*scale},
- {"SecondaryAxis",Vector3.new(0,1,0)*scale},
- {"Orientation",Vector3.new(0,0,0)},
- {"Parent",Head},
- {"Visible",false}
- })
- I('HingeConstraint',{
- {'Parent',Torso},
- {'Attachment0',torsoJoint},
- {'Attachment1',limbJoint},
- {'LimitsEnabled',true},
- {"UpperAngle",50},
- {"LowerAngle",-50},
- })
- R6RagdollLimb(whom,"Right Leg")
- R6RagdollLimb(whom,"Left Leg")
- R6RagdollLimb(whom,"Right Arm")
- R6RagdollLimb(whom,"Left Arm")
- end
- end
- end
- local function R15Ragdoll(Character,head)
- if Character:FindFirstChild('UpperTorso') and Character:FindFirstChild('LowerTorso') then
- ragdollJoint(Character,Character.LowerTorso, Character.UpperTorso, "Waist", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",5};
- {"Radius",5};
- })
- end
- local handProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle",0};
- {"LowerAngle",0};
- }
- if Character:FindFirstChild('LeftLowerArm') and Character:FindFirstChild('LeftHand') then
- ragdollJoint(Character,Character.LeftLowerArm, Character.LeftHand, "LeftWrist", "Hinge", handProperties)
- end
- if Character:FindFirstChild('RightLowerArm') and Character:FindFirstChild('RightHand') then
- ragdollJoint(Character,Character.RightLowerArm, Character.RightHand, "RightWrist", "Hinge", handProperties)
- end
- local shinProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 0};
- {"LowerAngle", -75};
- }
- if Character:FindFirstChild('LeftUpperLeg') and Character:FindFirstChild('LeftLowerLeg') then
- ragdollJoint(Character,Character.LeftUpperLeg, Character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
- end
- if Character:FindFirstChild('RightUpperLeg') and Character:FindFirstChild('RightLowerLeg') then
- ragdollJoint(Character,Character.RightUpperLeg, Character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
- end
- local footProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 15};
- {"LowerAngle", -45};
- }
- if Character:FindFirstChild('LeftLowerLeg') and Character:FindFirstChild('LeftFoot') then
- ragdollJoint(Character,Character.LeftLowerLeg, Character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
- end
- if Character:FindFirstChild('RightLowerLeg') and Character:FindFirstChild('RightFoot') then
- ragdollJoint(Character,Character.RightLowerLeg, Character.RightFoot, "RightAnkle", "Hinge", footProperties)
- end
- if Character:FindFirstChild('UpperTorso') and Character:FindFirstChild('LeftUpperArm') then
- ragdollJoint(Character,Character.UpperTorso, Character.LeftUpperArm, "LeftShoulder", "BallSocket")
- end
- if Character:FindFirstChild('LeftLowerArm') and Character:FindFirstChild('LeftUpperArm') then
- ragdollJoint(Character,Character.LeftUpperArm, Character.LeftLowerArm, "LeftElbow", "BallSocket")
- end
- if Character:FindFirstChild('UpperTorso') and Character:FindFirstChild('RightUpperArm') then
- ragdollJoint(Character,Character.UpperTorso, Character.RightUpperArm, "RightShoulder", "BallSocket")
- end
- if Character:FindFirstChild('RightUpperArm') and Character:FindFirstChild('RightLowerArm') then
- ragdollJoint(Character,Character.RightUpperArm, Character.RightLowerArm, "RightElbow", "BallSocket")
- end
- if Character:FindFirstChild('LowerTorso') and Character:FindFirstChild('LeftUpperLeg') then
- ragdollJoint(Character,Character.LowerTorso, Character.LeftUpperLeg, "LeftHip", "BallSocket")
- end
- if Character:FindFirstChild('LowerTorso') and Character:FindFirstChild('RightUpperLeg') then
- ragdollJoint(Character,Character.LowerTorso, Character.RightUpperLeg, "RightHip", "BallSocket")
- end
- if Character:FindFirstChild('UpperTorso') and Character:FindFirstChild('Head') then
- ragdollJoint(Character,Character.UpperTorso, Character.Head, "Neck", "Hinge", {
- {"LimitsEnabled",true};
- {"UpperAngle",50};
- {"LowerAngle",-50};
- })
- end
- end
- local function RagdollLimb(whom,limb,bheded)
- task.spawn(function()
- local hum = whom:FindFirstChildOfClass'Humanoid'
- if(hum)then
- if(hum.RigType == Enum.HumanoidRigType.R6)then
- R6RagdollLimb(whom,limb)
- else
- R15Ragdoll(whom)
- local handProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle",0};
- {"LowerAngle",0};
- }
- local footProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 15};
- {"LowerAngle", -45};
- }
- local shinProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 0};
- {"LowerAngle", -75};
- }
- if limb == "RightHand" or limb == "RightLowerArm" or limb == "RightUpperArm" then
- if whom:FindFirstChild('RightLowerArm') and whom:FindFirstChild('RightHand') then
- ragdollJoint(whom,whom.RightLowerArm, whom.RightHand, "RightWrist", "Hinge", handProperties)
- end
- if whom:FindFirstChild('UpperTorso') and whom:FindFirstChild('RightUpperArm') then
- ragdollJoint(whom, whom.UpperTorso, whom["RightUpperArm"], "RightShoulder", "BallSocket")
- end
- if whom:FindFirstChild('RightUpperArm') and whom:FindFirstChild('RightLowerArm') then
- ragdollJoint(whom, whom.RightUpperArm, whom.RightLowerArm, "RightElbow", "BallSocket")
- end
- elseif limb == "LeftHand" or limb == "LeftLowerArm" or limb == "LeftUpperArm" then
- if whom:FindFirstChild('LeftLowerArm') and whom:FindFirstChild('LeftHand') then
- ragdollJoint(whom,whom.LeftLowerArm, whom.LeftHand, "LeftWrist", "Hinge", handProperties)
- end
- if whom:FindFirstChild('UpperTorso') and whom:FindFirstChild('LeftUpperArm') then
- ragdollJoint(whom, whom.UpperTorso, whom["LeftUpperArm"], "LeftShoulder", "BallSocket")
- end
- if whom:FindFirstChild('LeftUpperArm') and whom:FindFirstChild('LeftLowerArm') then
- ragdollJoint(whom, whom.LeftUpperArm, whom.LeftLowerArm, "LeftElbow", "BallSocket")
- end
- elseif limb == "RightFoot" or limb == "RightUpperLeg" or limb == "RightLowerLeg" then
- Stun(whom)
- if whom:FindFirstChild('RightUpperLeg') and whom:FindFirstChild('RightLowerLeg') then
- ragdollJoint(whom,whom.RightUpperLeg, whom.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
- end
- if whom:FindFirstChild('RightLowerLeg') and whom:FindFirstChild('RightFoot') then
- ragdollJoint(whom,whom.RightLowerLeg, whom.RightFoot, "RightAnkle", "Hinge", footProperties)
- end
- if whom:FindFirstChild('LowerTorso') and whom:FindFirstChild('RightUpperLeg') then
- ragdollJoint(whom,whom.LowerTorso, whom.RightUpperLeg, "RightHip", "BallSocket")
- end
- elseif limb == "LeftFoot" or limb == "LeftUpperLeg" or limb == "LeftLowerLeg" then
- Stun(whom)
- if whom:FindFirstChild('LeftUpperLeg') and whom:FindFirstChild('LeftLowerLeg') then
- ragdollJoint(whom,whom.LeftUpperLeg, whom.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
- end
- if whom:FindFirstChild('LeftLowerLeg') and whom:FindFirstChild('LeftFoot') then
- ragdollJoint(whom,whom.LeftLowerLeg, whom.LeftFoot, "LeftAnkle", "Hinge", footProperties)
- end
- if whom:FindFirstChild('LowerTorso') and whom:FindFirstChild('LeftUpperLeg') then
- ragdollJoint(whom,whom.LowerTorso, whom.LeftUpperLeg, "LeftHip", "BallSocket")
- end
- elseif limb == "Head" or limb == "UpperTorso" or limb == "LowerTorso" then
- if hum and hum.RigType == Enum.HumanoidRigType.R15 then
- if whom:FindFirstChild('HumanoidRootPart') then
- whom.HumanoidRootPart:Remove()
- end
- end
- end
- end
- end
- end)
- end
- local function R6Ragdoll(whom)
- R6RagdollLimb(whom,"Left Leg")
- R6RagdollLimb(whom,"Right Leg")
- R6RagdollLimb(whom,"Left Arm")
- R6RagdollLimb(whom,"Right Arm")
- end
- local OJ = {}
- for _,v in next, chr:GetDescendants() do
- if(v:IsA'JointInstance')then
- table.insert(OJ,{v,v.Parent})
- end
- end
- local hum = chr:FindFirstChildOfClass'Humanoid'
- if(hum.RigType == Enum.HumanoidRigType.R6)then
- R6Ragdoll(chr)
- elseif(hum.RigType == Enum.HumanoidRigType.R15)then
- R15Ragdoll(chr)
- end
- local returned = {}
- function returned:Remove()
- unstunnedLol = true
- for i,v in next, chr:GetDescendants() do
- if(v:IsA("JointInstance"))then
- v.Enabled = true
- elseif(v:IsA("BallSocketContraint"))then
- v:Destroy()
- end
- if(v.Name == "RagdollJoint")then
- v:Destroy()
- end
- end
- end
- task.spawn(function()
- local a = Instance.new("NumberValue", chr)
- a.Name = "RagdollTime"
- a.Value = tick()+duration
- while chr.Parent and not unstunnedLol and chr:FindFirstChild("RagdollTime") and tick() < chr:FindFirstChild("RagdollTime").Value do
- task.wait()
- end
- if(not unstunnedLol)then
- returned:Remove()
- end
- a:Destroy()
- end)
- return returned
- end
- local clock = os.clock
- local workspace, RunService = game:GetService("Workspace"), game:GetService("RunService")
- local BoltPart = Instance.new("Part") --Template primitive that will make up the entire bolt
- BoltPart.TopSurface, BoltPart.BottomSurface = 0, 0
- BoltPart.Anchored, BoltPart.CanCollide = true, false
- BoltPart.Locked, BoltPart.CastShadow = true, false
- BoltPart.CanTouch, BoltPart.CanQuery = false, false
- BoltPart.Name = "BoltPart"
- BoltPart.Material = Enum.Material.Neon
- BoltPart.Color = Color3.new(1, 1, 1)
- BoltPart.Transparency = 1
- --*
- local function CubicBezier(PercentAlongBolt, p0, p1, p2, p3)
- return p0 * (1 - PercentAlongBolt) ^ 3
- + p1 * 3 * PercentAlongBolt * (1 - PercentAlongBolt) ^ 2
- + p2 * 3 * (1 - PercentAlongBolt) * PercentAlongBolt ^ 2
- + p3 * PercentAlongBolt ^ 3
- end
- local function DiscretePulse(PercentAlongBolt, TimePassed, s, k, f, min, max) --See https://www.desmos.com/calculator/hg5h4fpfim for demonstration
- return math.clamp(k / (2 * f) - math.abs((PercentAlongBolt - TimePassed * s + 0.5 * k) / f), min, max)
- end
- local function ExtrudeCenter(PercentAlongBolt)
- return math.exp(-5000 * (PercentAlongBolt - 0.5) ^ 10)
- end
- local function NoiseBetween(x, y, z, min, max)
- return min + (max - min) * (math.noise(x, y, z) + 0.5)
- end
- local xInverse = CFrame.lookAt(Vector3.new(), Vector3.new(1, 0, 0)):inverse()
- local offsetAngle = math.cos(math.rad(90))
- local ActiveBranches = {} --Contains all LightningBolt instances
- local LightningBolt = {} --Define new class
- LightningBolt.__type = "LightningBolt"
- LightningBolt.__index = LightningBolt
- function LightningBolt.new(Attachment0, Attachment1, PartCount)
- local self = setmetatable({}, LightningBolt)
- PartCount = PartCount or 30
- --*Main (default) Properties--
- --Bolt Appearance Properties
- self.Enabled = true --Hides bolt without removing any parts when false
- self.Attachment0, self.Attachment1 = Attachment0, Attachment1 --Bolt originates from Attachment0 and ends at Attachment1
- self.CurveSize0, self.CurveSize1 = 0, 0 --Works similarly to roblox beams. See https://dk135eecbplh9.cloudfront.net/assets/blt160ad3fdeadd4ff2/BeamCurve1.png
- self.MinRadius, self.MaxRadius = 0, 2.4 --Governs the amplitude of fluctuations throughout the bolt
- self.Frequency = 1 --Governs the frequency of fluctuations throughout the bolt. Lower this to remove jittery-looking lightning
- self.AnimationSpeed = 7 --Governs how fast the bolt oscillates (i.e. how fast the fluctuating wave travels along bolt)
- self.Thickness = 1 --The thickness of the bolt
- self.MinThicknessMultiplier, self.MaxThicknessMultiplier = 0.2, 1 --Multiplies Thickness value by a fluctuating random value between MinThicknessMultiplier and MaxThicknessMultiplier along the Bolt
- --Bolt Kinetic Properties
- self.MinTransparency, self.MaxTransparency = 0, 1
- self.PulseSpeed = 2 --Bolt arrives at Attachment1 1/PulseSpeed seconds later
- self.PulseLength = 1000000
- self.FadeLength = 0.2
- 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
- --Bolt Color Properties
- self.Color = Color3.new(1, 1, 1) --Can be a Color3 or ColorSequence
- self.ColorOffsetSpeed = 3 --Sets speed at which ColorSequence travels along Bolt
- --*
- --*Advanced Properties--
- self.SpaceCurveFunction = CubicBezier
- self.OpacityProfileFunction = DiscretePulse
- self.RadialProfileFunction = ExtrudeCenter
- --*
- --! Private vars are prefixed with an underscore (e.g. self._Parts) and should not be changed manually
- self._Parts = {} --The BoltParts which make up the Bolt
- for i = 1, PartCount do
- local par = BoltPart:Clone()
- par.Parent = script.Effects
- self._Parts[i] = par
- end
- self._PartsHidden = false
- self._DisabledTransparency = 1
- self._StartT = clock()
- self._RanNum = math.random() * 100
- self._RefIndex = #ActiveBranches + 1
- ActiveBranches[self._RefIndex] = self
- return self
- end
- function LightningBolt:Destroy()
- ActiveBranches[self._RefIndex] = nil
- for i = 1, #self._Parts do
- pcall(game.Destroy, self._Parts[i])
- end
- self = nil
- end
- --Calls Destroy() after TimeLength seconds where a dissipating effect takes place in the meantime
- function LightningBolt:DestroyDissipate(TimeLength, Strength)
- TimeLength = TimeLength or 0.2
- Strength = Strength or 0.5
- local DissipateStartT = clock()
- local start, mid, goal = self.MinTransparency, self.ContractFrom, self.ContractFrom
- + 1 / (#self._Parts * self.FadeLength)
- local StartRadius = self.MaxRadius
- local StartMinThick = self.MinThicknessMultiplier
- local DissipateLoop
- DissipateLoop = RunService.Heartbeat:Connect(function()
- local TimeSinceDissipate = clock() - DissipateStartT
- self.MinThicknessMultiplier = StartMinThick + (-2 - StartMinThick) * TimeSinceDissipate / TimeLength
- if TimeSinceDissipate < TimeLength * 0.4 then
- local interp = (TimeSinceDissipate / (TimeLength * 0.4))
- self.MinTransparency = start + (mid - start) * interp
- elseif TimeSinceDissipate < TimeLength then
- local interp = ((TimeSinceDissipate - TimeLength * 0.4) / (TimeLength * 0.6))
- self.MinTransparency = mid + (goal - mid) * interp
- self.MaxRadius = StartRadius * (1 + Strength * interp)
- self.MinRadius = self.MinRadius + (self.MaxRadius - self.MinRadius) * interp
- else
- --Destroy Bolt
- local TimePassed = clock() - self._StartT
- local Lifetime = (self.PulseLength + 1) / self.PulseSpeed
- if TimePassed < Lifetime then --prevents Destroy()ing twice
- self:Destroy()
- end
- --Disconnect Loop
- DissipateLoop:Disconnect()
- DissipateLoop = nil
- end
- end)
- end
- function LightningBolt:_UpdateGeometry(
- BPart,
- PercentAlongBolt,
- TimePassed,
- ThicknessNoiseMultiplier,
- PrevPoint,
- NextPoint
- )
- --Compute opacity for this particular section
- local MinOpa, MaxOpa = 1 - self.MaxTransparency, 1 - self.MinTransparency
- local Opacity = self.OpacityProfileFunction(
- PercentAlongBolt,
- TimePassed,
- self.PulseSpeed,
- self.PulseLength,
- self.FadeLength,
- MinOpa,
- MaxOpa
- )
- --Compute thickness for this particular section
- local Thickness = self.Thickness * ThicknessNoiseMultiplier * Opacity
- Opacity = Thickness > 0 and Opacity or 0
- --Compute + update sizing and orientation of this particular section
- local contractf = 1 - self.ContractFrom
- local PartsN = #self._Parts
- if Opacity > contractf then
- BPart.Size = Vector3.new((NextPoint - PrevPoint).Magnitude, Thickness, Thickness)
- BPart.CFrame = CFrame.lookAt((PrevPoint + NextPoint) * 0.5, NextPoint) * xInverse
- BPart.Transparency = 1 - Opacity
- elseif Opacity > contractf - 1 / (PartsN * self.FadeLength) then
- local interp = (1 - (Opacity - (contractf - 1 / (PartsN * self.FadeLength))) * PartsN * self.FadeLength)
- * (PercentAlongBolt < TimePassed * self.PulseSpeed - 0.5 * self.PulseLength and 1 or -1)
- BPart.Size = Vector3.new((1 - math.abs(interp)) * (NextPoint - PrevPoint).Magnitude, Thickness, Thickness)
- BPart.CFrame = CFrame.lookAt(
- PrevPoint + (NextPoint - PrevPoint) * (math.max(0, interp) + 0.5 * (1 - math.abs(interp))),
- NextPoint
- )
- * xInverse
- BPart.Transparency = 1 - Opacity
- else
- BPart.Transparency = 1
- end
- end
- function LightningBolt:_UpdateColor(BPart, PercentAlongBolt, TimePassed)
- if typeof(self.Color) == "Color3" then
- BPart.Color = self.Color
- else --ColorSequence
- local t1 = (self._RanNum + PercentAlongBolt - TimePassed * self.ColorOffsetSpeed) % 1
- local keypoints = self.Color.Keypoints
- for i = 1, #keypoints - 1 do
- if keypoints[i].Time < t1 and t1 < keypoints[i + 1].Time then
- BPart.Color = keypoints[i].Value:lerp(
- keypoints[i + 1].Value,
- (t1 - keypoints[i].Time) / (keypoints[i + 1].Time - keypoints[i].Time)
- )
- break
- end
- end
- end
- end
- function LightningBolt:_Disable()
- self.Enabled = false
- for _, BPart in ipairs(self._Parts) do
- BPart.Transparency = self._DisabledTransparency
- end
- end
- RunService.Heartbeat:Connect(function()
- debug.profilebegin("LightningBolt") --Create performance profile
- for _, ThisBranch in pairs(ActiveBranches) do
- if ThisBranch.Enabled == true then
- ThisBranch._PartsHidden = false
- --Extract important variables
- local MinRadius, MaxRadius = ThisBranch.MinRadius, ThisBranch.MaxRadius
- local Parts = ThisBranch._Parts
- local PartsN = #Parts
- local RanNum = ThisBranch._RanNum
- local spd = ThisBranch.AnimationSpeed
- local freq = ThisBranch.Frequency
- local MinThick, MaxThick = ThisBranch.MinThicknessMultiplier, ThisBranch.MaxThicknessMultiplier
- local TimePassed = clock() - ThisBranch._StartT
- local SpaceCurveFunction, RadialProfileFunction =
- ThisBranch.SpaceCurveFunction, ThisBranch.RadialProfileFunction
- local Lifetime = (ThisBranch.PulseLength + 1) / ThisBranch.PulseSpeed
- --Extract control points
- local a0, a1, CurveSize0, CurveSize1 =
- ThisBranch.Attachment0, ThisBranch.Attachment1, ThisBranch.CurveSize0, ThisBranch.CurveSize1
- local p0, p1, p2, p3 = a0.WorldPosition, a0.WorldPosition
- + a0.WorldAxis * CurveSize0, a1.WorldPosition
- - a1.WorldAxis * CurveSize1, a1.WorldPosition
- --Initialise iterative scheme for generating points along space curve
- local init = SpaceCurveFunction(0, p0, p1, p2, p3)
- local PrevPoint, bezier0 = init, init
- --Update
- if TimePassed < Lifetime then
- for i = 1, PartsN do
- local BPart = Parts[i]
- local PercentAlongBolt = i / PartsN
- --Compute noisy inputs
- local input, input2 = (spd * -TimePassed)
- + freq * 10 * PercentAlongBolt
- - 0.2
- + RanNum * 4, 5 * ((spd * 0.01 * -TimePassed) / 10 + freq * PercentAlongBolt)
- + RanNum * 4
- local noise0 = NoiseBetween(5 * input, 1.5, 5 * 0.2 * input2, 0, 0.1 * 2 * math.pi)
- + NoiseBetween(0.5 * input, 1.5, 0.5 * 0.2 * input2, 0, 0.9 * 2 * math.pi)
- local noise1 = NoiseBetween(3.4, input2, input, MinRadius, MaxRadius)
- * RadialProfileFunction(PercentAlongBolt)
- local thicknessNoise = NoiseBetween(2.3, input2, input, MinThick, MaxThick)
- --Find next point along space curve
- local bezier1 = SpaceCurveFunction(PercentAlongBolt, p0, p1, p2, p3)
- --Find next point along bolt
- local NextPoint = i ~= PartsN
- and (CFrame.new(bezier0, bezier1) * CFrame.Angles(0, 0, noise0) * CFrame.Angles(
- math.acos(math.clamp(NoiseBetween(input2, input, 2.7, offsetAngle, 1), -1, 1)),
- 0,
- 0
- ) * CFrame.new(0, 0, -noise1)).Position
- or bezier1
- ThisBranch:_UpdateGeometry(BPart, PercentAlongBolt, TimePassed, thicknessNoise, PrevPoint, NextPoint)
- ThisBranch:_UpdateColor(BPart, PercentAlongBolt, TimePassed)
- PrevPoint, bezier0 = NextPoint, bezier1
- end
- else
- ThisBranch:Destroy()
- end
- else --Enabled = false
- if ThisBranch._PartsHidden == false then
- ThisBranch._PartsHidden = true
- ThisBranch:_Disable()
- end
- end
- end
- debug.profileend()
- end)
- local craters = {}
- function craters.crater(position,size,Parent,Time,TransSpeed,ignore)
- local didhit = false
- local mate = nil
- local colo = nil
- local ray = Ray.new(position,Vector3.new(0,-15,0))
- local tabd = ignore
- local part, hitPosition = workspace:FindPartOnRayWithIgnoreList(ray, tabd, false, true)
- if part then
- didhit = true
- mate = part.Material
- colo = part.BrickColor
- else
- didhit = false
- end
- if didhit then
- task.spawn(function()
- local b = Instance.new("Part",Parent)
- b.Size = Vector3.new(1,1,1)
- b.Anchored = true
- b.CanCollide = false
- b.CFrame = CFrame.new(hitPosition)*CFrame.new(0,.5,0)
- b.Transparency = 1
- AddItem(b,1/10)
- local t = 0
- for i = 1, 36 do
- t = t + 10
- local b2 = b:Clone()
- b2.Parent = workspace
- b2.Transparency = 1
- b2.CFrame = b.CFrame * CFrame.Angles(0,math.rad(t),math.rad(0)) * CFrame.new(size*10,0,0)
- AddItem(b2, 1/10)
- local grassblock = Instance.new("Part",Parent)
- grassblock.Size = Vector3.new(size,size,size)*2
- grassblock.BrickColor = colo
- grassblock.Material = mate
- grassblock.Anchored = true
- grassblock.CanCollide = true
- grassblock.CFrame = b2.CFrame * CFrame.Angles(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180)))
- AddItem(grassblock,10)
- pcall(game.Destroy,b2)
- local ray = Ray.new(grassblock.Position,Vector3.new(0,-5,0))
- local tabd = {grassblock}
- for i,v in next, ignore do
- table.insert(tabd, v)
- end
- local part, hitPosition = workspace:FindPartOnRayWithIgnoreList(ray, tabd,false,true)
- if part then
- task.spawn(function()
- task.wait(Time)
- game:GetService("TweenService"):Create(grassblock,TweenInfo.new(TransSpeed),{
- Transparency = 1,
- Size = Vector3.new(0,0,0)
- }):Play()
- task.spawn(function()
- task.wait(TransSpeed)
- grassblock:Destroy()
- end)
- end)
- else
- grassblock:Destroy()
- end
- end
- end)
- end
- end
- function craters.debris(from, size, color, material, collide, knockback, destroyafter)
- local deb = Instance.new("Part", script.Effects)
- deb.Size = Vector3.new(size*(math.random(50, 110)/100), size*(math.random(50, 110)/100), size*(math.random(50, 110)/100))
- deb.Position = from+Vector3.new(math.random(-100,100)/100,0+math.random(-100,100)/100,math.random(-100,100)/100)
- deb.Color = color
- deb.Material = material
- deb.CanCollide = collide
- deb.Anchored = false
- deb:SetNetworkOwner(owner)
- local vel = Instance.new("BodyVelocity", deb)
- vel.maxForce = Vector3.new(9999999999999,9999999999999,9999999999999)
- vel.velocity = CFrame.new(deb.Position, from).lookVector*knockback
- AddItem(vel, .1)
- task.delay(destroyafter-1, function()
- game:GetService('TweenService'):Create(deb, TweenInfo.new(1), {
- Size = Vector3.new()
- }):Play()
- end)
- AddItem(deb, destroyafter)
- end
- local rayparam = RaycastParams.new()
- rayparam.FilterDescendantsInstances = {script, char}
- local FXController = (function()
- local RunService_upvr = game:GetService("RunService")
- local Debris_upvr = game:GetService("Debris")
- local TweenService_upvr = game:GetService("TweenService")
- local ReplicatedStorage_upvr = game:GetService("ReplicatedStorage")
- local Utils_upvr = (script:IsA("ModuleScript") and script.Parent.Parent or stuff).Utils
- local var10_upvw
- local var11_upvw
- local abs_upvr = math.abs
- local function _(arg1, arg2) -- Line 46, Named "ManhattanDistance"
- --[[ Upvalues[1]:
- [1]: abs_upvr (readonly)
- ]]
- return abs_upvr(arg1.X - arg2.X) + abs_upvr(arg1.Y - arg2.Y) + abs_upvr(arg1.Z - arg2.Z)
- end
- local any_CreateController_result1 = {}
- function any_CreateController_result1.PlaySound(arg1, arg2, arg3, arg5) -- Line 54
- local clone_3_upvr = arg2:Clone()
- clone_3_upvr.Parent = arg3
- clone_3_upvr:Play()
- if arg2.PlayOnRemove == true then
- clone_3_upvr:Destroy()
- return
- end
- if not arg5 then
- clone_3_upvr.Ended:Connect(function() -- Line 58
- --[[ Upvalues[1]:
- [1]: clone_3_upvr (readonly)
- ]]
- clone_3_upvr:Destroy()
- end)
- end
- return clone_3_upvr
- end
- function any_CreateController_result1.Flash(arg1, arg2, arg3, arg4) -- Line 63
- --[[ Upvalues[4]:
- [1]: abs_upvr (readonly)
- [2]: Utils_upvr (readonly)
- [3]: Debris_upvr (readonly)
- [4]: TweenService_upvr (readonly)
- ]]
- local clone_4 = Utils_upvr.Damage.HitGlow:Clone()
- if arg2:GetScale() ~= 1 then
- clone_4:ScaleTo(arg2:GetScale())
- end
- clone_4.Parent = script.Effects
- AddItem(clone_4, arg4 or 0.15)
- for _, v_17 in clone_4:GetChildren() do
- local SOME_2 = arg2:FindFirstChild(v_17.Name)
- if SOME_2 then
- local Weld = Instance.new("Weld", v_17)
- Weld.Part0 = v_17
- Weld.Part1 = SOME_2
- end
- v_17.Color = arg3
- if arg4 then
- TweenService_upvr:Create(v_17, TweenInfo.new(arg4), {
- Transparency = 1;
- }):Play()
- end
- end
- end
- function any_CreateController_result1.Bleed(arg1, arg2)
- for _, v_18 in Utils_upvr.Damage.Explode:GetDescendants() do
- if v_18:IsA("Attachment") then
- v_18:Clone().Parent = arg2:FindFirstChild(v_18.Parent.Name)
- end
- end
- if arg2:GetAttribute("Bleeding") then return end
- arg2:SetAttribute("Bleeding", true)
- task.spawn(function()
- repeat
- if(arg2:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6)then
- bloodyzee:Blood(arg2.Torso.CFrame, 50, 180, 180)
- else
- bloodyzee:Blood(arg2.UpperTorso.CFrame, 50, 180, 180)
- end
- task.wait(0.1)
- until not arg2.Parent
- end)
- end
- function any_CreateController_result1.ArmFlash(arg1, arg2, arg3, arg4)
- local clone_7_upvr = Utils_upvr.Damage.CombatTrail:Clone()
- clone_7_upvr.Size = arg2.Size * 1.1
- clone_7_upvr.Color = arg3
- clone_7_upvr.Trail.Color = ColorSequence.new(arg3)
- clone_7_upvr.Weld.Part0 = arg2
- clone_7_upvr.Parent = script.Effects
- task.delay(arg4 or 0.2, function()
- clone_7_upvr.Trail.Enabled = false
- TweenService_upvr:Create(clone_7_upvr, TweenInfo.new(0.1), {
- Transparency = 1;
- }):Play()
- AddItem(clone_7_upvr, 0.2)
- end)
- end
- function any_CreateController_result1.DustBreak(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
- local cframe = CFrame.new(arg2, arg2 + arg3)
- for _ = 1, arg5 do
- 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)
- if workspace_Raycast_result1 then
- local clone_2_upvr = Utils_upvr.Damage.DebreeRef:Clone()
- clone_2_upvr.Color = workspace_Raycast_result1.Instance.Color
- clone_2_upvr.Material = workspace_Raycast_result1.Instance.Material
- clone_2_upvr.Transparency = workspace_Raycast_result1.Instance.Transparency
- 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)
- clone_2_upvr.Position = workspace_Raycast_result1.Position
- clone_2_upvr.CollisionGroup = "Effects"
- clone_2_upvr.Anchored = false
- clone_2_upvr.Velocity = Vector3.new(math.random(-20, 20), math.random(20, 40), math.random(-20, 20))
- clone_2_upvr.RotVelocity = Vector3.new(math.random(-200, 200), math.random(-200, 200), math.random(-200, 200))
- clone_2_upvr.Parent = script.Effects
- task.delay(3, function()
- TweenService_upvr:Create(clone_2_upvr, TweenInfo.new(1), {
- Transparency = 1;
- }):Play()
- AddItem(clone_2_upvr, 1)
- end)
- end
- end
- end
- function any_CreateController_result1.Burn(arg1, arg2) -- Line 170
- --[[ Upvalues[1]:
- [1]: Utils_upvr (readonly)
- ]]
- for _, v in arg2:GetChildren() do
- if v:IsA("BasePart") then
- v.Color = Color3.new(0.1, 0.1, 0.1)
- Utils_upvr.Damage.LegBurn.Smoke:Clone().Parent = v
- elseif v:IsA("Shirt") or v:IsA("Pants") or v:IsA("TShirt") then
- v.Color3 = Color3.new(0.1, 0.1, 0.1)
- elseif v:IsA("Accessory") then
- v.Handle.Color = Color3.new(0.1, 0.1, 0.1)
- v.Handle:FindFirstChildWhichIsA("SpecialMesh").TextureId = ""
- end
- end
- end
- function any_CreateController_result1.DomainBurst(arg1, arg2)
- local clone = Utils_upvr.DomainBurst:Clone()
- clone.Position = arg2.Position
- clone.Parent = script.Effects
- TweenService_upvr:Create(clone, TweenInfo.new(0.3), {
- Size = Vector3.new(75, 75, 75);
- Transparency = 1;
- }):Play()
- clone.Attachment.Spark:Emit(1)
- AddItem(clone, 0.4)
- arg1:PlaySound((script:IsA("ModuleScript") and script.Parent.Parent or stuff).Sounds.Misc.Domain.DomainOpen, arg2)
- end
- function any_CreateController_result1.ApplyCopyOutfit(arg1, arg2, arg3)
- --arg3:ScaleTo(arg2:GetScale())
- for _, v_3 in arg2:GetChildren() do
- if v_3:IsA("Shirt") or v_3:IsA("TShirt") or v_3:IsA("Pants") or v_3:IsA("BodyColors") then
- v_3:Clone().Parent = arg3
- elseif v_3:IsA("Accessory") then
- local clone_10 = v_3:Clone()
- clone_10.Parent = arg3
- end
- end
- arg3:ScaleTo(1)
- local face = arg2.Head:FindFirstChild("face")
- if face then
- arg3.Head.face.Texture = face.Texture
- end
- if arg3["Left Arm"]:FindFirstChild("FingersL") then
- for _, v_5 in arg3["Left Arm"].FingersL:GetChildren() do
- if v_5:IsA("BasePart") then
- local v_4 = arg2["Left Arm"]
- v_5.Color = v_4.Color
- end
- end
- for _, v_6 in arg3["Right Arm"].FingersR:GetChildren() do
- if v_6:IsA("BasePart") then
- local v_4 = arg2["Right Arm"]
- v_6.Color = v_4.Color
- end
- end
- end
- end
- local tbl_3_upvr = {0.3, 0.7, 0.5}
- function any_CreateController_result1.Domain(arg1, arg2, arg3)
- for i, LocalPlayer_upvr in next, game:GetService("Players"):GetPlayers() do
- task.spawn(function()
- local clone_5_upvr = Utils_upvr.DomainWarn:Clone()
- clone_5_upvr.Parent = LocalPlayer_upvr.PlayerGui
- local Display_upvr = clone_5_upvr.Panel.Viewport.Display
- pcall(function()
- arg1:ApplyCopyOutfit(arg2, Display_upvr)
- end)
- local Camera = Instance.new("Camera", clone_5_upvr.Panel)
- Camera.FieldOfView = 40
- Camera.CFrame = Display_upvr.HumanoidRootPart.CFrame * CFrame.new(0, 1, -5) * CFrame.Angles(0, math.pi, 0)
- clone_5_upvr.Panel.Viewport.CurrentCamera = Camera
- arg3(clone_5_upvr, Display_upvr)
- TweenService_upvr:Create(clone_5_upvr.FlashText, TweenInfo.new(1.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
- Size = UDim2.new(1.5, 0, 0.43, 0);
- }):Play()
- task.delay(0.625, function()
- TweenService_upvr:Create(clone_5_upvr.FlashText.Text1, TweenInfo.new(0.625), {
- TextTransparency = 1;
- }):Play()
- TweenService_upvr:Create(clone_5_upvr.FlashText.Text1.UIStroke, TweenInfo.new(0.625), {
- Transparency = 1;
- }):Play()
- TweenService_upvr:Create(clone_5_upvr.FlashText.Text2, TweenInfo.new(0.625), {
- TextTransparency = 1;
- }):Play()
- TweenService_upvr:Create(clone_5_upvr.FlashText.Text2.UIStroke, TweenInfo.new(0.625), {
- Transparency = 1;
- }):Play()
- end)
- local var172 = 0
- for _, v_10 in clone_5_upvr:GetChildren() do
- TweenService_upvr:Create(v_10, TweenInfo.new(1.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {
- Position = UDim2.new(0.5, 0, tbl_3_upvr[var172 % 3 + 1], 0);
- }):Play()
- local _
- end
- TweenService_upvr:Create(clone_5_upvr.Panel, TweenInfo.new(0.625, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
- Size = UDim2.new(1.5, 0, 0.4, 0);
- }):Play()
- TweenService_upvr:Create(clone_5_upvr.PanelBack, TweenInfo.new(0.625, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
- Size = UDim2.new(1.5, 0, 0.43, 0);
- }):Play()
- task.wait(0.625)
- TweenService_upvr:Create(clone_5_upvr.Panel, TweenInfo.new(0.625, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
- Size = UDim2.new(1.5, 0, 0, 0);
- }):Play()
- TweenService_upvr:Create(clone_5_upvr.PanelBack, TweenInfo.new(0.625, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
- Size = UDim2.new(1.5, 0, 0.03, 0);
- }):Play()
- AddItem(clone_5_upvr, 0.625)
- end)
- end
- end
- return any_CreateController_result1
- end)()
- playAnimation("Arms", true)
- task.wait()
- local idle, stopidle = playAnimation("RobloxIdle", true)
- local walk, stopwalk, run, stoprun;
- local spaceheld = false
- local attacking = false
- local dashing = false
- local domain = false
- local basewalkspeed = 12
- local walkspeedadd = 0
- local speed = 0
- humanoid.Running:Connect(function(s)
- speed = math.min(s, 30)
- end)
- task.spawn(function()
- while(task.wait())do
- if(not script:FindFirstChild("Effects"))then
- Instance.new("Folder", script).Name = "Effects"
- end
- if(humanoid.Health < 1)then
- attacking = true
- doidle = false
- domain = false
- dashing = true
- return
- end
- if(char:FindFirstChild("StunTime") or char:FindFirstChild("RagdollTime"))then
- attacking = true
- repeat task.wait()
- attacking = true
- until not char:FindFirstChild("StunTime") and not char:FindFirstChild("RagdollTime")
- attacking = false
- end
- humanoid.WalkSpeed = (if(walk)then 12 elseif(run)then 32 else 16) + walkspeedadd
- if(walkspeedadd < 0)then
- humanoid.WalkSpeed = 12 + walkspeedadd
- end
- if speed > 0.01 and not attacking and not dashing then
- doidle = false
- 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
- if(stoprun)then stoprun() run = nil stoprun = nil end
- walk, stopwalk = playAnimation("RobloxWalk", true)
- walk.Speed = speed / 14.5
- humanoid.WalkSpeed = 12 + walkspeedadd
- else
- if(stopwalk)then stopwalk() walk = nil stopwalk = nil end
- run, stoprun = playAnimation("Run", true)
- run.Speed = speed / 30.5
- humanoid.WalkSpeed = 32 + walkspeedadd
- if(walkspeedadd < 0)then
- humanoid.WalkSpeed = 12 + walkspeedadd
- end
- end
- else
- if(stopwalk)then stopwalk() walk = nil stopwalk = nil end
- if(stoprun)then stoprun() run = nil stoprun = nil end
- doidle = true
- end
- if(doidle)then
- if(not playingAnimations["RobloxIdle"])then
- idle, stopidle = playAnimation("RobloxIdle", true)
- end
- else
- stopidle()
- end
- end
- end)
- local footstepi = 0
- task.spawn(function()
- while task.wait() do
- if(walk or run)and(humanoid.FloorMaterial ~= Enum.Material.Air)then
- footstepi += 1
- if(walk)then
- playSound(stuff.Sounds.Misc.Footstep.Ground, rootpart)
- task.wait(math.min((walk.Length/walk.Speed)/2, .5))
- else
- playSound(stuff.Sounds.Misc.Footstep.Ground, rootpart)
- local ray = workspace:Raycast(rootpart.Position, Vector3.yAxis*-6, rayparam)
- if(ray)then
- for i = 1, math.random(1, 5) do
- 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)
- end
- end
- task.wait(math.min((run.Length/run.Speed)/2, .5))
- end
- end
- end
- end)
- local function stun(hum)
- if(hum.Parent:FindFirstChild("Heian") and hum.Parent ~= char)then return end
- if(hum.Parent:FindFirstChild("StunTime"))then
- hum.Parent:FindFirstChild("StunTime").Value = tick()+1
- end
- if(not hum.Parent:FindFirstChild("StunTime"))then
- local a = Instance.new("NumberValue", hum.Parent)
- a.Name = "StunTime"
- a.Value = tick()+1
- task.spawn(function()
- 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
- hum.WalkSpeed = 5
- hum.UseJumpPower = true
- hum.JumpPower = 0
- end
- pcall(game.Destroy, hum.Parent:FindFirstChild("StunTime"))
- hum.WalkSpeed = 16
- hum.JumpPower = 50
- end)
- end
- end
- local identifier = Instance.new("BoolValue", char)
- identifier.Name = "Heian"
- local function dmg(hum, am)
- if(not domain)then
- damagedone += math.min(am, 100)
- end
- hum:TakeDamage(am)
- if(am > 300)then
- hum.Health -= am
- end
- stun(hum)
- if(hum.Health < 1)then
- playSound(stuff.Sounds.Impact.Players.Death, hum.Parent:FindFirstChild("HumanoidRootPart"))
- Ragdoll:Ragdoll(hum.Parent, 20)
- return
- end
- if(hum.RigType == Enum.HumanoidRigType.R6 and not hum.Parent:FindFirstChild("Heian") and not hum.Parent:FindFirstChild("HitAnim"))then
- local a = Instance.new("BoolValue", hum.Parent)
- a.Name = "HitAnim"
- local anim = animPlayer.new(hum.Parent, stuff.Animations.Normal:GetChildren()[math.random(#stuff.Animations.Normal:GetChildren())])
- anim:Play()
- task.delay(anim.Length, function()
- anim:Destroy()
- task.wait(.15)
- a:Destroy()
- end)
- end
- end
- local iframes = false
- local lasthp = humanoid.Health
- local lastdamaged = tick()
- humanoid.HealthChanged:Connect(function()
- if(iframes)then
- humanoid.Health = lasthp
- return
- end
- task.defer(task.defer, function()
- local newhp = lasthp - humanoid.Health
- lasthp = humanoid.Health
- if(newhp <= 0)then return end
- lastdamaged = tick()
- attacking = true
- playAnimation("Hit"..math.random(1,4))
- stun(humanoid)
- task.spawn(function()
- repeat task.wait()
- attacking = true
- until not char:FindFirstChild("StunTime")
- attacking = false
- end)
- end)
- end)
- task.spawn(function()
- while task.wait(1) do
- if(tick() - lastdamaged >= 20 and humanoid.Health < humanoid.MaxHealth)then
- humanoid.Health += humanoid.MaxHealth/100
- end
- end
- end)
- local impactsounds = {
- [Enum.Material.Brick] = {1.3, stuff.Sounds.Impact.Enviroment.BrickImpact};
- [Enum.Material.Cobblestone] = {1.2, stuff.Sounds.Impact.Enviroment.BrickImpact};
- [Enum.Material.Slate] = {1.1, stuff.Sounds.Impact.Enviroment.BrickImpact};
- [Enum.Material.Glass] = {0.2, stuff.Sounds.Impact.Enviroment.GlassImpact};
- [Enum.Material.Concrete] = {0.8, stuff.Sounds.Impact.Enviroment.StoneImpact};
- [Enum.Material.Plastic] = {1, stuff.Sounds.Impact.Enviroment.StoneImpact};
- [Enum.Material.SmoothPlastic] = {1, stuff.Sounds.Impact.Enviroment.StoneImpact};
- [Enum.Material.Wood] = {0.8, stuff.Sounds.Impact.Enviroment.WoodImpact};
- [Enum.Material.WoodPlanks] = {0.75, stuff.Sounds.Impact.Enviroment.WoodImpact};
- [Enum.Material.Grass] = {0.6, stuff.Sounds.Impact.Enviroment.GrassImpact};
- [Enum.Material.Sand] = {0.5, stuff.Sounds.Impact.Enviroment.GrassImpact};
- [Enum.Material.Metal] = {0.5, stuff.Sounds.Impact.Enviroment.MetalImpact};
- [Enum.Material.DiamondPlate] = {0.5, stuff.Sounds.Impact.Enviroment.MetalImpact};
- [Enum.Material.Neon] = {0.5, stuff.Sounds.Impact.Enviroment.NeonImpact};
- }
- local showhitbox = game:GetService("RunService"):IsStudio()
- local function hitbox(cframe, size, damage, ragdoll, onhit, alreadyhit)
- if(showhitbox)then
- local a = Instance.new("Part", script.Effects)
- a.Color = Color3.new(1,0,0)
- a.Anchored = true a.CanCollide = false a.CanQuery = false a.CanTouch = false
- a.Material = Enum.Material.ForceField
- a.Size = size
- a.CFrame = cframe
- task.delay(.5, pcall, game.Destroy, a)
- end
- local bounds = workspace:GetPartBoundsInBox(cframe, size)
- local alreadyhit = alreadyhit or {}
- for i, v in next, bounds do
- pcall(function()
- if(v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid") and not alreadyhit[v:FindFirstAncestorOfClass("Model")])then
- 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
- alreadyhit[v:FindFirstAncestorOfClass("Model")] = true
- if(size.Magnitude < 14 and v:FindFirstAncestorOfClass("Model"):FindFirstChild("RagdollTime"))then
- return
- end
- dmg(v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid"), damage)
- if(onhit)then
- onhit(v:FindFirstAncestorOfClass("Model"))
- end
- if(ragdoll)then
- Ragdoll:Ragdoll(v:FindFirstAncestorOfClass("Model"), 2)
- end
- end
- elseif(v:IsA("BasePart") and not (v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildOfClass("Humanoid")))then
- 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
- if(impactsounds[v.Material] and not v:FindFirstChild("ImpactSound"))then
- local ch = impactsounds[v.Material][2]:GetChildren()
- local s = playSound(ch[math.random(#ch)], v)
- s.Name = "ImpactSound"
- end
- local bodyvelocity = Instance.new("BodyVelocity", v)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(v.Position, cframe.Position).LookVector * (-2*math.random(size.Magnitude))
- AddItem(bodyvelocity, .2)
- v.Anchored = false
- v:BreakJoints()
- pcall(v.SetNetworkOwner, v, owner)
- end
- end)
- end
- return alreadyhit
- end
- local function interp(dismantle, speed)
- speed = speed or 1
- local CFrame_upvw = dismantle.CFrame
- local tick_result1_upvw = tick()
- playSound(stuff.Sounds.Heian.Dismantle.Fire, dismantle)
- local var22_upvw
- local any_Connect_result1_upvr = dismantle:GetPropertyChangedSignal("Position"):Connect(function()
- CFrame_upvw = dismantle.CFrame
- tick_result1_upvw = tick()
- end)
- var22_upvw = game:GetService("RunService").Stepped:Connect(function()
- if not dismantle.Parent then
- var22_upvw:Disconnect()
- any_Connect_result1_upvr:Disconnect()
- else
- local tbl = {}
- tbl[1] = dismantle
- workspace:BulkMoveTo(tbl, {CFrame_upvw + (CFrame_upvw.LookVector) * ((300*speed) * (tick() - tick_result1_upvw))}, Enum.BulkMoveMode.FireCFrameChanged)
- end
- end)
- end
- local chantlevel = 1
- local attacks = {
- [1] = {"Strong Dismantle", function()
- playSound(stuff.Sounds.Heian.Dismantle.Start, rootpart)
- if chantlevel == 2 then
- playSound(stuff.Sounds.Heian.Dismantle1, rootpart)
- end
- if chantlevel == 4 then
- playSound(stuff.Sounds.Heian.Dismantle2, rootpart)
- end
- if(chantlevel == 1)then
- attacking = true
- doidle = false
- local a = playAnimation("Dismantle")
- a.TimePosition = 0
- task.delay(1.2, function()
- a:Stop()
- a:Cancel()
- attacking = false
- doidle = true
- end)
- task.wait(.3)
- for i = 1, 2 do
- local proj = stuff.Utils.Heian.DismantleProjectile:Clone()
- proj.Parent = script.Effects
- 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)))
- interp(proj)
- playSound(stuff.Sounds.Heian.Dismantle.Fire, rootpart)
- task.delay(1, function()
- proj.slash.slashenabled5.Enabled = false
- proj.slash.slashenabled7.Enabled = false
- task.wait(1)
- proj:Destroy()
- end)
- task.spawn(function()
- local alreadyhit = {}
- while proj.Parent do
- alreadyhit = hitbox(proj.slash.CFrame, proj.slash.Size, 10, true, function(mod)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -10
- AddItem(bodyvelocity, .2)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- FXController:Flash(mod, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.Itadori.Dismantle.Slash, rootpartt)
- if(mod:FindFirstChild("Humanoid").Health < 1)then
- FXController:Bleed(mod)
- for _ = 1, 40 do
- bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
- end
- end
- end, alreadyhit)
- task.wait()
- end
- end)
- task.wait(.2)
- end
- end
- if(chantlevel == 2)then
- attacking = true
- doidle = false
- walkspeedadd = -1e6
- chantlevel = 1
- local a = playAnimation("Dismantle")
- a.TimePosition = 1.3
- task.delay(2.3, function()
- a:Stop()
- a:Cancel()
- attacking = false
- doidle = true
- walkspeedadd = 0
- end)
- task.wait(.5)
- for i = 1, 6 do
- local proj = stuff.Utils.Heian.DismantleProjectile:Clone()
- proj.Parent = script.Effects
- 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)))
- interp(proj)
- playSound(stuff.Sounds.Heian.Dismantle.Fire, rootpart)
- task.delay(1, function()
- proj.slash.slashenabled5.Enabled = false
- proj.slash.slashenabled7.Enabled = false
- task.wait(1)
- proj:Destroy()
- end)
- task.spawn(function()
- local alreadyhit = {}
- while proj.Parent do
- alreadyhit = hitbox(proj.slash.CFrame, proj.slash.Size, 10, true, function(mod)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -10
- AddItem(bodyvelocity, .2)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- FXController:Flash(mod, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.Itadori.Dismantle.Slash, rootpartt)
- if(mod:FindFirstChild("Humanoid").Health < 1)then
- FXController:Bleed(mod)
- for _ = 1, 40 do
- bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
- end
- end
- end, alreadyhit)
- task.wait()
- end
- end)
- task.wait(.1)
- end
- end
- if(chantlevel == 3)then
- chantlevel = 1
- attacking = true
- doidle = false
- walkspeedadd = -1e6
- local a = playAnimation("Dismantle")
- a.TimePosition = 3.7
- task.delay(.5, function()
- a.Speed = 0
- end)
- local start = tick()
- local var32 = stuff.Utils.Heian
- local clone_2 = var32.Sweep:Clone()
- var32 = rootpart.CFrame
- clone_2.CFrame = var32
- var32 = clone_2.Weld
- var32.Part0 = rootpart
- var32 = script.Effects
- clone_2.Parent = var32
- var32 = AddItem(clone_2, 2.5)
- var32 = game:GetService("TweenService")
- local goal = {
- TimeScale = 1;
- }
- var32 = var32:Create(clone_2.Attachment.Dust, TweenInfo.new(1), goal)
- var32:Play()
- var32 = game:GetService("TweenService")
- local goal = {
- TimeScale = 1;
- }
- var32 = var32:Create(clone_2.Attachment.Ring, TweenInfo.new(1), goal)
- var32:Play()
- var32 = game:GetService("TweenService")
- local tbl_2 = {
- TimeScale = 1;
- }
- var32 = var32:Create(clone_2.Slashes, TweenInfo.new(1.5, Enum.EasingStyle.Circular, Enum.EasingDirection.In), tbl_2)
- var32:Play()
- var32 = nil
- local any_PlaySound_result1 = playSound(stuff.Sounds.Heian.Slashes2, rootpart)
- game:GetService("TweenService"):Create(any_PlaySound_result1, TweenInfo.new(1.5), {
- Volume = 2.5;
- }):Play()
- repeat
- playSound(stuff.Sounds.Heian.Dismantle.Fire, rootpart)
- hitbox(rootpart.CFrame, Vector3.one*30, 3, false, function(mod)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -6
- AddItem(bodyvelocity, .2)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- FXController:Flash(mod, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.Itadori.Dismantle.Slash, rootpartt)
- if(mod:FindFirstChild("Humanoid").Health < 1)then
- FXController:Bleed(mod)
- for _ = 1, 40 do
- bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
- end
- end
- end)
- task.wait(0.075)
- until not rootpart.Parent or tick() - start >= 1.5 or humanoid.Health < 1
- a.Speed = 1
- task.delay(.5, function()
- a:Stop()
- a:Cancel()
- walkspeedadd = 0
- doidle = true
- attacking = false
- end)
- if not rootpart.Parent or humanoid.Health < 1 then return end
- hitbox(rootpart.CFrame, Vector3.one*40, 20, false, function(mod)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -20
- AddItem(bodyvelocity, .2)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- FXController:Flash(mod, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.Itadori.Dismantle.Slash, rootpartt)
- if(mod:FindFirstChild("Humanoid").Health < 1)then
- FXController:Bleed(mod)
- for _ = 1, 40 do
- bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
- end
- end
- end)
- clone_2.Attachment.Dust.Enabled = false
- clone_2.Attachment.Ring.Enabled = false
- clone_2.Slashes.Enabled = false
- clone_2.Break:Emit(30)
- clone_2.Stars:Emit(20)
- if any_PlaySound_result1 then
- game:GetService("TweenService"):Create(any_PlaySound_result1, TweenInfo.new(0.5), {
- Volume = 0;
- }):Play()
- end
- playSound(stuff.Sounds.Itadori.Dismantle.Explode, rootpart)
- local clone_4 = stuff.Utils.Itadori.DivergentFist.BlackFlashCC:Clone()
- clone_4.TintColor = Color3.new(1, 1, 1)
- clone_4.Parent = game:GetService("Lighting")
- task.wait(0.04)
- clone_4.Brightness = 200
- clone_4.Contrast = -1000
- task.wait(0.04)
- clone_4:Destroy()
- end
- if(chantlevel == 4)then
- attacking = true
- doidle = false
- chantlevel = 1
- local a = playAnimation("Dismantle")
- a.TimePosition = 6
- task.delay(1.5, function()
- a:Stop()
- a:Cancel()
- attacking = false
- doidle = true
- end)
- task.wait(.1)
- playSound(stuff.Sounds.Misc.Swing.Fist, rootpart)
- task.wait(.7)
- task.spawn(function()
- local clone_5 = stuff.Utils.Itadori.DivergentFist.BlackFlashCC:Clone()
- clone_5.TintColor = Color3.new(1, 1, 1)
- clone_5.Parent = game:GetService("Lighting")
- task.wait(0.02)
- clone_5.Brightness = 200
- clone_5.Contrast = -1000
- task.wait(0.02)
- clone_5:Destroy()
- end)
- local clone = stuff.Utils.Heian.WorldSlash:Clone()
- clone.CFrame = rootpart.CFrame*CFrame.new(0,0,-200)
- clone.Parent = script.Effects
- local Highlight = Instance.new("Highlight", clone.Slash)
- Highlight.DepthMode = Enum.HighlightDepthMode.Occluded
- Highlight.FillTransparency = 0
- Highlight.FillColor = Color3.new(0, 0, 0)
- AddItem(clone, 4.1)
- playSound(stuff.Sounds.Heian.Dismantle.FireWCS, clone)
- playSound(stuff.Sounds.Heian.Dismantle.Fire, clone)
- clone.Smear:Emit(200)
- clone.Dust:Emit(200)
- game:GetService("TweenService"):Create(clone.Slash, TweenInfo.new(0.2), {
- Size = Vector3.new(0, 0, 500);
- }):Play()
- game:GetService("TweenService"):Create(clone.Weld, TweenInfo.new(0.2), {
- C1 = CFrame.new(0, 0, 0);
- }):Play()
- task.wait(0.2)
- clone.slashenabled3.Enabled = false
- clone.slashenabled4.Enabled = false
- clone.Stars:Emit(100)
- hitbox(clone.CFrame, clone.Size, 1e9, false, function(mod)
- for i, v in next, mod:GetChildren() do
- if(v:IsA("BasePart"))then
- local bodyvelocity = Instance.new("BodyVelocity", v)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(v.Position, rootpart.Position).LookVector * -50
- AddItem(bodyvelocity, .2)
- end
- end
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- FXController:Flash(mod, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.Itadori.Dismantle.Explode, rootpartt)
- if(mod:FindFirstChild("Humanoid").Health < 1)then
- FXController:Bleed(mod)
- for _ = 1, 40 do
- bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
- end
- end
- end)
- end
- end},
- [2] = {"Open FURNACE", function()
- attacking = true
- doidle = false
- iframes = true
- walkspeedadd = -1e6
- playAnimation("FlameArrow")
- task.wait(.5)
- playSound(stuff.Sounds.Heian.FireArrow.Hands, rootpart)
- local clone_2 = stuff.Utils.Heian.FlameArrow.Hands:Clone()
- clone_2.LA.Weld.Part1 = char["Left Arm"]
- clone_2.RA.Weld.Part1 = char["Right Arm"]
- clone_2.Parent = char
- task.wait(1.3)
- local Hands_3 = char:FindFirstChild("Hands")
- if Hands_3 then
- for _, v_3 in Hands_3.LA.startup:GetChildren() do
- v_3.Enabled = false
- end
- for _, v_4 in Hands_3.RA.startup:GetChildren() do
- v_4.Enabled = false
- end
- for _, v_5 in Hands_3.LA.fire:GetChildren() do
- v_5.Enabled = true
- end
- for _, v_6 in Hands_3.RA.fire:GetChildren() do
- v_6.Enabled = true
- end
- for _, v_7 in Hands_3.LA.Beam:GetChildren() do
- v_7.Enabled = true
- end
- game:GetService("TweenService"):Create(playSound(stuff.Sounds.Heian.FireArrow.FlameIdle, Hands_3.RA), TweenInfo.new(3), {
- Volume = 1;
- }):Play()
- end
- local clone = stuff.Utils.Heian.FlameArrow.Clap:Clone()
- clone.CFrame = rootpart.CFrame
- AddItem(clone, 2)
- clone.Parent = char
- for i_8, v_8 in clone.C1:GetChildren() do
- v_8:Emit(v_8:GetAttribute("EmitCount"))
- end
- playSound(stuff.Sounds.Heian.FireArrow.Clap, rootpart)
- task.wait(.9)
- local clone_7 = stuff.Utils.Heian.FlameArrow.Clap:Clone()
- clone_7.CFrame = rootpart.CFrame
- AddItem(clone_7, 2)
- clone_7.Parent = char
- for i_9, v_9 in clone_7.C2:GetChildren() do
- v_9:Emit(v_9:GetAttribute("EmitCount"))
- end
- playSound(stuff.Sounds.Heian.FireArrow.Clap, rootpart)
- playSound(stuff.Sounds.Heian.Flames, rootpart)
- task.wait(1.4)
- local Hands = char:FindFirstChild("Hands")
- if Hands then
- for _, v_10 in Hands.LA.fire:GetChildren() do
- v_10.Enabled = false
- end
- for _, v_11 in Hands.RA.fire:GetChildren() do
- v_11.Enabled = false
- end
- for _, v_12 in Hands.LA.Beam:GetChildren() do
- v_12.Enabled = false
- end
- end
- local clone_8 = stuff.Utils.Heian.FlameArrow.Arrow:Clone()
- clone_8.Weld.Part1 = rootpart
- clone_8.Parent = char
- for _, v_13 in clone_8.Beam:GetChildren() do
- game:GetService("TweenService"):Create(v_13, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
- Brightness = 50;
- }):Play()
- local _
- end
- game:GetService("TweenService"):Create(clone_8.light.SpotLight, TweenInfo.new(0.4), {
- Brightness = 2;
- }):Play()
- game:GetService("TweenService"):Create(clone_8.Ground.PointLight, TweenInfo.new(1), {
- Brightness = 2;
- }):Play()
- playSound(stuff.Sounds.Heian.FireArrow.Arrow, rootpart)
- task.wait(1.1)
- local Hands_2 = char:FindFirstChild("Hands")
- if Hands_2 then
- Hands_2:Destroy()
- end
- local Arrow = char:FindFirstChild("Arrow")
- if Arrow then
- local Ground = Arrow.Ground
- Ground.Parent = rootpart
- AddItem(Ground, 2)
- end
- local clone_4 = stuff.Utils.Heian.FlameArrow.Shot:Clone()
- clone_4.CFrame = rootpart.CFrame
- AddItem(clone_4, 2)
- clone_4.Parent = script.Effects
- for i_15, v_15 in clone_4.Attachment:GetChildren() do
- v_15:Emit(v_15:GetAttribute("EmitCount"))
- end
- playSound(stuff.Sounds.Heian.FireArrow.Fire, rootpart)
- Arrow.Weld:Destroy()
- Arrow.Anchored = true
- craters.crater(rootpart.Position, 1, script.Effects, 3, 1, {char, script})
- local CFrame_upvw = Arrow.CFrame
- local tick_result1_upvw = tick()
- local var134_upvw
- local any_Connect_result1_upvr = Arrow:GetPropertyChangedSignal("Position"):Connect(function()
- CFrame_upvw = Arrow.CFrame
- tick_result1_upvw = tick()
- end)
- var134_upvw = game:GetService("RunService").Stepped:Connect(function()
- if not Arrow.Parent then
- var134_upvw:Disconnect()
- any_Connect_result1_upvr:Disconnect()
- else
- local tbl = {}
- tbl[1] = Arrow
- workspace:BulkMoveTo(tbl, {CFrame_upvw + (CFrame_upvw.RightVector) * (340 * (tick() - tick_result1_upvw))}, Enum.BulkMoveMode.FireCFrameChanged)
- end
- end)
- task.delay(1, function()
- attacking = false
- doidle = true
- iframes = false
- walkspeedadd = 0
- end)
- local start = tick()
- repeat task.wait()
- local bounds = workspace:GetPartBoundsInBox(Arrow.CFrame, Vector3.one*7)
- local hit = false
- for i, v in next, bounds do
- 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
- hit = v
- break
- end
- end
- if(hit)then break end
- until tick() - start >= 2
- local pos = Arrow.Position
- Arrow:Destroy()
- local clone_3 = stuff.Utils.Heian.FlameArrow.explode:Clone()
- clone_3.Startup.Position = pos
- clone_3.boom.Position = pos
- clone_3.Parent = script.Effects
- AddItem(clone_3, 4)
- for _, v_upvr in clone_3.Startup:GetDescendants() do
- if v_upvr:IsA("ParticleEmitter") then
- v_upvr:Emit(v_upvr:GetAttribute("EmitCount"))
- v_upvr.Enabled = true
- task.delay(v_upvr:GetAttribute("EmitDuration"), function()
- v_upvr.Enabled = false
- end)
- end
- end
- playSound(stuff.Sounds.Heian.FireArrow.Shockwave, clone_3.Startup)
- task.wait(0.4)
- craters.crater(pos, 6, script.Effects, 5, 1, {script, char})
- local ray = workspace:Raycast(pos, Vector3.yAxis*-100, rayparam)
- if(ray)then
- for i = 1, math.random(20, 50) do
- craters.debris(pos, math.random(3, 7), ray.Instance.Color, ray.Instance.Material, false, 200, 5)
- end
- end
- hitbox(CFrame.new(pos), Vector3.new(70, 200, 70), 60, true, function(mod)
- for i, v in next, mod:GetChildren() do
- if(v:IsA("BasePart"))then
- local bodyvelocity = Instance.new("BodyVelocity", v)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(v.Position, rootpart.Position).LookVector * -100
- AddItem(bodyvelocity, .2)
- end
- end
- end)
- for _, v_2_upvr in clone_3.boom.Attachment:GetDescendants() do
- if v_2_upvr:IsA("ParticleEmitter") then
- v_2_upvr.Enabled = true
- task.delay(0.5, function()
- v_2_upvr.Enabled = false
- end)
- end
- end
- local clone_6 = stuff.Utils.Megumi.Mahoraga.WorldSlash.mesh:Clone()
- clone_6.Position = pos
- clone_6.Decal.Transparency = 0
- clone_6.Mesh.Scale = Vector3.new(2, 50, 2)
- clone_6.Parent = clone_3
- game:GetService("TweenService"):Create(clone_6, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
- Size = Vector3.new(80, 40, 80);
- CFrame = clone_6.CFrame * CFrame.Angles(0, -3.12413936106985, 0);
- }):Play()
- game:GetService("TweenService"):Create(clone_6.Mesh, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
- Scale = Vector3.new(60, 10, 60);
- }):Play()
- game:GetService("TweenService"):Create(clone_6.Decal, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
- Transparency = 1;
- }):Play()
- AddItem(clone_6, 1)
- local clone_5 = stuff.Utils.Itadori.FireArrow.Burn:Clone()
- clone_5.Parent = clone_3
- clone_5.Position = pos
- clone_5.Center.Wind2:Emit(25)
- clone_5.Flames:Emit(200)
- game:GetService("TweenService"):Create(clone_5, TweenInfo.new(0.75), {
- Size = Vector3.new(0, 250, 0);
- CFrame = clone_5.CFrame * CFrame.Angles(0, math.pi, 0);
- }):Play()
- game:GetService("TweenService"):Create(clone_5.Beam, TweenInfo.new(1, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {
- Width0 = 0;
- Width1 = 0;
- }):Play()
- game:GetService("TweenService"):Create(clone_5.Lines, TweenInfo.new(1, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {
- Width0 = 0;
- Width1 = 0;
- }):Play()
- playSound(stuff.Sounds.Heian.FireArrow.Explode, clone_5)
- end},
- [3] = {"Cleave Rush", function()
- attacking = true
- doidle = false
- iframes = true
- walkspeedadd = -1e6
- local anim, animstop = playAnimation("Cleave")
- anim.TimePosition = 0
- playSound(stuff.Sounds.Heian.Divergent, rootpart)
- local fist = stuff.Utils.Itadori.DivergentFist.DivergentFist:Clone()
- fist.Parent = char
- fist.Weld.Part0 = char["Right Arm"]
- AddItem(fist, 4)
- task.delay(3, function()
- fist.Core.Aura.Enabled = false
- fist.Core.Sparks.Enabled = false
- fist.Trail.Enabled = false
- fist.PointLight.Enabled = false
- end)
- playSound(stuff.Sounds.Mahito.Transfig.Eyes, rootpart)
- playSound(stuff.Sounds.Heian.CleaveVoice, rootpart)
- local clone_3 = stuff.Utils.Itadori.EyeTrails:Clone()
- clone_3.Weld.Part0 = char.Head
- clone_3.Parent = script.Effects
- clone_3.Glow:Emit(1)
- AddItem(clone_3, 2)
- task.wait(1)
- clone_3.Trail1.Trail.Enabled = false
- clone_3.Trail2.Trail.Enabled = false
- clone_3.Eye1.Glow.Enabled = false
- clone_3.Eye2.Glow.Enabled = false
- playSound(stuff.Sounds.Itadori.Rush.Rush, rootpart)
- local clone_5 = stuff.Utils.Itadori.RushWind:Clone()
- clone_5.CFrame = rootpart.CFrame
- clone_5.Parent = script.Effects
- clone_5.Dust:Emit(7)
- clone_5.Ring:Emit(7)
- clone_5.Dash1.Dash:Emit(1)
- clone_5.Dash2.Dash:Emit(1)
- AddItem(clone_5, 2)
- for i = 1, 5 do
- task.delay(0.075 * i, function()
- local clone = stuff.Utils.Itadori.Shock:Clone()
- clone.CFrame = rootpart.CFrame * CFrame.Angles((math.pi/2), 0, 0)
- clone.Parent = script.Effects
- game:GetService("TweenService"):Create(clone, TweenInfo.new(0.2), {
- Size = Vector3.new(8, 0, 8);
- Transparency = 1;
- }):Play()
- AddItem(clone, 0.2)
- end)
- end
- local bodyvelocity = Instance.new("BodyVelocity", rootpart)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = rootpart.CFrame.LookVector * 70
- AddItem(bodyvelocity, 2)
- local start = tick()
- local hit = nil
- while not hit and tick() - start < 1 do
- hitbox(rootpart.CFrame*CFrame.new(0,0,-5), Vector3.one*9, 0, true, function(mod)
- if(hit)then return end
- hit = mod
- end)
- task.wait()
- end
- bodyvelocity:Destroy()
- if(not hit)then
- task.wait(3 - anim.TimePosition)
- attacking = false
- doidle = true
- iframes = false
- walkspeedadd = 0
- animstop()
- return
- end
- anim.TimePosition = 3.5
- hit:PivotTo(char["Right Arm"].CFrame*CFrame.new(0,-1,0))
- local hitting = true
- task.spawn(function()
- while hitting do
- for i, v in next, hit:GetDescendants() do
- if(v:IsA("BasePart"))then
- pcall(function()
- v:SetNetworkOwner(owner)
- end)
- end
- end
- hit.Head.Anchored = true
- hit.Head.CFrame = CFrame.lookAt((char["Right Arm"].CFrame*CFrame.new(0,-1.3,0)).Position, char["Right Arm"].Position)
- task.wait()
- end
- end)
- FXController:Flash(hit, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.Heian.Grab, rootpart)
- playSound(stuff.Sounds.Heian.CleaveVoice2, rootpart)
- task.wait(1.1)
- local clone_6_upvr = stuff.Utils.Heian.Cleave:Clone()
- clone_6_upvr.Weld.Part1 = hit.HumanoidRootPart
- clone_6_upvr.Parent = script.Effects
- task.delay(0.35, function()
- clone_6_upvr.Slashes.Enabled = false
- clone_6_upvr.PointLight:Destroy()
- AddItem(clone_6_upvr, 0.08)
- end)
- game:GetService("TweenService"):Create(clone_6_upvr.PointLight, TweenInfo.new(0.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
- Brightness = 40;
- }):Play()
- game:GetService("TweenService"):Create(clone_6_upvr.Slashes, TweenInfo.new(0.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
- TimeScale = 1;
- }):Play()
- for _ = 1, 20 do
- playSound(stuff.Sounds.Itadori.Dismantle.Slash, hit.HumanoidRootPart)
- dmg(hit:FindFirstChildOfClass("Humanoid"), 3)
- task.wait()
- end
- FXController:Flash(hit, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.Itadori.Dismantle.Explode, hit.HumanoidRootPart)
- task.delay(0.1, function()
- local clone_2 = stuff.Utils.Itadori.DivergentFist.BlackFlashCC:Clone()
- clone_2.Parent = game:GetService("Lighting")
- task.wait(0.05)
- clone_2.TintColor = Color3.new(1, 1, 1)
- clone_2.Brightness = 200
- clone_2.Contrast = -1000
- task.wait(0.05)
- clone_2:Destroy()
- end)
- local clone_7_upvr = stuff.Utils.Itadori.Dismantle.Cleave:Clone()
- clone_7_upvr.Weld.Part1 = hit.HumanoidRootPart
- clone_7_upvr.Parent = script.Effects
- task.delay(0.1, function()
- clone_7_upvr.Slashes.Enabled = false
- clone_7_upvr.Slash2.Enabled = false
- clone_7_upvr.PointLight:Destroy()
- AddItem(clone_7_upvr, 0.08)
- end)
- playSound(stuff.Sounds.Itadori.Dismantle.FinishSlash, hit.HumanoidRootPart)
- for _ = 1, 10 do
- pcall(function()
- clone_7_upvr.Slashes:Emit(1)
- end)
- playSound(stuff.Sounds.Itadori.Dismantle.Slash, hit.HumanoidRootPart)
- task.wait()
- local _
- end
- dmg(hit:FindFirstChildOfClass("Humanoid"), 100)
- if(hit:FindFirstChildOfClass("Humanoid").Health < 1)then
- FXController:Bleed(hit)
- for _ = 1, 40 do
- bloodyzee:Blood(hit.HumanoidRootPart.CFrame, 50, 360, 360)
- end
- local clone_4 = stuff.Utils.Heian.BloodSpread:Clone()
- clone_4.Parent = hit:FindFirstChild("HumanoidRootPart")
- clone_4:Emit(80)
- AddItem(clone_4, 2)
- end
- hit.Head.Anchored = false
- local bodyvelocity = Instance.new("BodyVelocity", hit.HumanoidRootPart)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(hit.HumanoidRootPart.Position, rootpart.Position).LookVector * -100
- AddItem(bodyvelocity, .2)
- hitting = false
- attacking = false
- doidle = true
- iframes = false
- walkspeedadd = 0
- end},
- [4] = {"Kamutoke",function()
- attacking = true
- doidle = false
- walkspeedadd = -8
- playAnimation("Kamutoke")
- local clone = stuff.Utils.Heian.Kamutoke:Clone()
- clone.Handle.Weld.Part0 = char["Right Arm"]
- clone.Parent = char
- playSound(stuff.Sounds.Heian.Kamutoke.Equip, rootpart)
- playSound(stuff.Sounds.Heian.Kamutoke.Equip2, rootpart)
- for i = 1, math.random(10, 25) do
- task.delay(math.random(1, 5)/i, function()
- local arg1_3 = rootpart.Position+Vector3.new(math.random(-50, 50), (-3*1.3), math.random(-50, 50))
- local clone_3 = stuff.Utils.Heian.HitArea:Clone()
- clone_3.Size = Vector3.new(19, 0, 19)
- clone_3.Overlay.Color3 = Color3.new(1, 0, 0)
- clone_3.Prog.Overlay.Color3 = Color3.new(1, 0, 0)
- clone_3.Afterimages.Enabled = false
- clone_3.groundwaveing.Spin.Enabled = false
- clone_3.Position = arg1_3
- clone_3.Prog.Position = arg1_3
- clone_3.Prog.Overlay.Transparency = 1
- clone_3.Parent = script.Effects
- game:GetService("TweenService"):Create(clone_3.Prog.Overlay, TweenInfo.new(0.4), {
- Transparency = 0.8;
- }):Play()
- game:GetService("TweenService"):Create(clone_3.Prog, TweenInfo.new(0.7, Enum.EasingStyle.Linear), {
- Size = clone_3.Size;
- }):Play()
- AddItem(clone_3, 3)
- task.wait(0.7)
- pcall(game.Destroy, clone_3:FindFirstChild("Prog"))
- local clone_2_upvr = stuff.Utils.Heian.Lightning:Clone()
- clone_2_upvr.Position = arg1_3
- clone_2_upvr.Parent = script.Effects
- AddItem(clone_2_upvr, 2)
- clone_2_upvr.Attachment.Dust:Emit(25)
- clone_2_upvr.Attachment.Ring:Emit(25)
- clone_2_upvr.Attachment.Wind2:Emit(6)
- local any_new_result1_upvr = LightningBolt.new(clone_2_upvr.Air, clone_2_upvr.Attachment)
- any_new_result1_upvr.PulseSpeed = 1000
- any_new_result1_upvr.FadeLength = 0.25
- any_new_result1_upvr.MaxRadius = 20
- any_new_result1_upvr.MinRadius = 0
- any_new_result1_upvr.AnimationSpeed = 300
- any_new_result1_upvr.MinThicknessMultiplier = 2
- any_new_result1_upvr.MaxThicknessMultiplier = 5
- 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))})
- craters.crater(arg1_3+(Vector3.yAxis*2), .5+math.random(), script.Effects, 2, 1, {script, char})
- local ray = workspace:Raycast(arg1_3+(Vector3.yAxis*2), Vector3.yAxis*-100, rayparam)
- if(ray)then
- for i = 1, math.random(10, 20) do
- craters.debris(ray.Position, math.random(), ray.Instance.Color, ray.Instance.Material, true, 100, 5)
- end
- end
- hitbox(CFrame.new(arg1_3), Vector3.one*20, 10, true, function(mod)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, arg1_3).LookVector * -20
- AddItem(bodyvelocity, .2)
- end)
- task.delay(0.05, pcall, function()
- local workspace_Raycast_result1 = workspace:Raycast(arg1_3+(Vector3.yAxis*2), Vector3.new(0, -20, 0), rayparam)
- if workspace_Raycast_result1 then
- clone_2_upvr.Attachment.WorldPosition = workspace_Raycast_result1.Position
- end
- task.wait(0.1)
- any_new_result1_upvr:Destroy()
- clone_2_upvr.Attachment.Burn:Emit(1)
- clone_2_upvr.Sparks.Enabled = false
- game:GetService("TweenService"):Create(clone_2_upvr.PointLight, TweenInfo.new(0.5), {
- Brightness = 0;
- }):Play()
- end)
- playSound(stuff.Sounds.Heian.Kamutoke.Fire[tostring(math.random(1, 4))], clone_2_upvr)
- end)
- end
- task.wait(1)
- clone:Destroy()
- attacking = false
- doidle = true
- walkspeedadd = 0
- end},
- }
- local cooldowns = {}
- for i, v in next, attacks do
- local a = Instance.new("Tool", owner.Backpack)
- a.Name = v[1]
- a.CanBeDropped = false
- a.RequiresHandle = false
- cooldowns[i] = tick()
- a.Equipped:Connect(function()
- task.wait()
- humanoid:UnequipTools()
- if(attacking or tick() < cooldowns[i])then return end
- rem:FireClient(owner, "dashcancel")
- dashing = false
- v[2]()
- cooldowns[i] = tick() + 5
- end)
- end
- RotationPowerFrontBack = 0.2 --multiplies rotation by RotationPower
- RotationPowerLeftRight = 0.2 --multiplies rotation by RotationPower
- RotationSpeed = 0.1
- OriginalC0 = rootpart.RootJoint.C0
- game:GetService("RunService").PostSimulation:Connect(function(step)
- local DotFrontBack = rootpart.CFrame.LookVector:Dot(humanoid.MoveDirection)
- local DotLeftRight = rootpart.CFrame.RightVector:Dot(humanoid.MoveDirection)
- rootpart.RootJoint.C0 = rootpart.RootJoint.C0:Lerp(OriginalC0 * CFrame.Angles(DotFrontBack*RotationPowerFrontBack,-DotLeftRight*RotationPowerLeftRight,0),RotationSpeed)
- end)
- local combo = 0
- local lastm1 = 0
- local m1debounce = false
- local mousedown = false
- mouse.Button1Down:Connect(function()
- mousedown = true
- repeat
- task.wait()
- task.spawn(function()
- if(m1debounce or attacking)then return end
- if(tick() - lastm1 >= 2)then
- combo = 0
- end
- combo += 1
- if(combo >= 5)then
- combo = 1
- end
- rem:FireClient(owner, "dashcancel")
- dashing = false
- local arg3 = humanoid.FloorMaterial == Enum.Material.Air and "Down" or spaceheld and "Up" or nil
- local isblackflash, fist = math.random(1, 20) == 1, nil
- if(isblackflash)then
- playSound(stuff.Sounds.Heian.Divergent, rootpart)
- if(combo == 1 or combo == 3)then
- fist = stuff.Utils.Itadori.DivergentFist.DivergentFist:Clone()
- fist.Parent = char
- fist.Weld.Part0 = char["Right Arm"]
- elseif(combo == 2)then
- fist = stuff.Utils.Itadori.DivergentFist.DivergentFist:Clone()
- fist.Parent = char
- fist.Weld.Part0 = char["Left Arm"]
- elseif(combo == 4)then
- fist = stuff.Utils.Itadori.DivergentFist.DivergentFist:Clone()
- fist.Parent = char
- fist.Weld.Part0 = char["Right Leg"]
- end
- AddItem(fist, 2)
- task.delay(1, function()
- fist.Core.Aura.Enabled = false
- fist.Core.Sparks.Enabled = false
- fist.Trail.Enabled = false
- fist.PointLight.Enabled = false
- end)
- end
- local anim, stopanim;
- if(combo == 1)then
- anim, stopanim = playAnimation("Melee1", true)
- elseif(combo == 2)then
- anim, stopanim = playAnimation("Melee2", true)
- elseif(combo == 3)then
- anim, stopanim = playAnimation("Melee3", true)
- elseif(combo == 4)then
- if(arg3 == "Up")then
- anim, stopanim = playAnimation("Up", true)
- elseif(arg3 == "Down")then
- anim, stopanim = playAnimation("Down", true)
- else
- anim, stopanim = playAnimation("Melee4", true)
- end
- end
- if combo == 1 or combo == 3 or arg3 == "Up" then
- FXController:ArmFlash(char["Right Arm"], Color3.fromRGB(85, 0, 0))
- else
- if combo == 2 then
- FXController:ArmFlash(char["Left Arm"], Color3.fromRGB(85, 0, 0))
- else
- if combo == 4 then
- local var30 = false
- if arg3 == "Down" then
- var30 = 0.4
- end
- FXController:ArmFlash(char["Right Leg"], Color3.fromRGB(85, 0, 0), var30)
- end
- end
- end
- if(anim)then
- humanoid.JumpPower = 0
- doidle = false
- attacking = true
- m1debounce = true
- walkspeedadd = -4
- anim.Speed = 1
- playSound(stuff.Sounds.Misc.Swing.Fist, rootpart)
- task.wait(anim.Length/2)
- local didhit = false
- local hitcharacters = {}
- 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)
- didhit = true
- table.insert(hitcharacters, mod)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- FXController:Flash(mod, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.M1:FindFirstChild("Hit"..combo), rootpartt)
- if(combo ~= 4)then
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -10
- AddItem(bodyvelocity, .2)
- else
- if(arg3 ~= "Up")then
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -50
- AddItem(bodyvelocity, .2)
- else
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = Vector3.new(0, 50, 0)
- AddItem(bodyvelocity, .2)
- end
- end
- end)
- if(didhit and isblackflash)then
- local clone_4_upvr = stuff.Utils.Itadori.DivergentFist.BlackFlashHit:Clone()
- clone_4_upvr.Position = rootpart.Position
- clone_4_upvr.Parent = script.Effects
- AddItem(clone_4_upvr, 1)
- clone_4_upvr.Wind2:Emit(8)
- game:GetService("TweenService"):Create(clone_4_upvr.PointLight, TweenInfo.new(1), {
- Brightness = 0;
- }):Play()
- for i, arg2 in next, hitcharacters do
- local rootpartt = arg2:FindFirstChild("HumanoidRootPart")
- for _, v in arg2:GetChildren() do
- if v:IsA("BasePart") then
- local clone_6 = stuff.Utils.Itadori.DivergentFist.FlashBurn:Clone()
- clone_6.Parent = v
- AddItem(clone_6, 1)
- end
- end
- playSound(stuff.Sounds.Heian.BlackFlashHit, arg2:FindFirstChild("HumanoidRootPart"))
- dmg(arg2:FindFirstChildOfClass("Humanoid"), 20)
- FXController:Flash(arg2, Color3.new(1, 0, 0))
- Ragdoll:Ragdoll(arg2, 4)
- pcall(game.Destroy, rootpartt:FindFirstChildOfClass("BodyVelocity"))
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -80
- AddItem(bodyvelocity, .2)
- end
- task.delay(0.1, function()
- clone_4_upvr.Blast:Emit(8)
- clone_4_upvr.Sparks:Emit(15)
- clone_4_upvr.Lightning:Emit(6)
- clone_4_upvr.Wind:Emit(7)
- end)
- task.spawn(function()
- local clone_8 = stuff.Utils.Itadori.DivergentFist.BlackFlashCC:Clone()
- clone_8.Parent = game:GetService("Lighting")
- task.wait(0.04)
- clone_8.TintColor = Color3.new(1, 1, 1)
- task.wait(0.04)
- clone_8.Brightness = 200
- clone_8.Contrast = -1000
- task.wait(0.04)
- clone_8:Destroy()
- end)
- end
- if(combo == 4 and not didhit)then
- anim.Speed = .3
- end
- task.delay((anim.Length/anim.Speed) - (anim.Length/2), function()
- stopanim()
- doidle = true
- walkspeedadd = 0
- attacking = false
- if(combo == 4)then
- combo = 0
- task.delay(1, function()
- m1debounce = false
- task.delay(1/20, function()
- if(m1debounce)then return end
- humanoid.JumpPower = 50
- end)
- end)
- else
- m1debounce = false
- end
- task.delay(1/20, function()
- if(m1debounce)then return end
- humanoid.JumpPower = 50
- end)
- end)
- end
- lastm1 = tick()
- end)
- until not mousedown
- end)
- mouse.Button1Up:Connect(function()
- mousedown = false
- end)
- cooldowns["dash"] = tick()
- cooldowns["forwarddash"] = tick()
- mouse.KeyDown:Connect(function(k)
- if(k == "space")then
- spaceheld = true
- end
- if(attacking)then return end
- if(k == "q")then
- local cframe = CFrame.new(rootpart.Position, rootpart.Position + Vector3.new(Camera.CFrame.LookVector.X, 0, Camera.CFrame.LookVector.Z))
- local rounded = math.round(humanoid.MoveDirection:Dot(cframe.LookVector))
- local rounded_2 = math.round(humanoid.MoveDirection:Dot(cframe.RightVector))
- local direction = "Front"
- if rounded == 1 then
- direction = "Front"
- elseif rounded == -1 then
- direction = "Back"
- elseif rounded_2 == 1 then
- direction = "Right"
- elseif rounded_2 == -1 then
- direction = "Left"
- end
- if(direction == "Front" and tick() > cooldowns["forwarddash"])then
- for i_4_upvr, v_4 in char:GetChildren() do
- if v_4.Name == "Left Arm" or v_4.Name == "Left Leg" then
- local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
- local Weld = clone_2_upvr.Weld
- Weld.C1 *= CFrame.Angles(0, math.pi, 0)
- clone_2_upvr.Weld.Part1 = v_4
- clone_2_upvr.Parent = script.Effects
- task.delay(0.4, function()
- clone_2_upvr.Trail.Enabled = false
- AddItem(clone_2_upvr, 0.1)
- end)
- else
- if v_4.Name == "Right Arm" or v_4.Name == "Right Leg" then
- local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
- local var58_upvw = clone_2_upvr
- var58_upvw.Weld.Part1 = v_4
- var58_upvw.Parent = script.Effects
- task.delay(0.4, function()
- var58_upvw.Trail.Enabled = false
- AddItem(var58_upvw, 0.1)
- end)
- end
- end
- end
- cooldowns["forwarddash"] = tick() + 7
- local anim, stopanim = playAnimation("Chase")
- anim.Speed = 1
- playSound(stuff.Sounds.Misc.Chase, rootpart)
- rem:FireClient(owner, "dash", direction)
- local s = os.clock()
- task.spawn(function()
- local alreadyhit = {}
- while os.clock() - s <= 1 do
- task.wait()
- alreadyhit = hitbox(rootpart.CFrame*CFrame.new(0, 0, -4), Vector3.one*8, 20, false, function(mod)
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- FXController:Flash(mod, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.M1:FindFirstChild("Hit3"), rootpartt)
- local clone_2 = stuff.Utils.ChaseHit:Clone()
- clone_2.CFrame = CFrame.new(rootpartt.Position, Vector3.new(rootpart.Position.X, rootpartt.Position.Y, rootpart.Position.Z)) * CFrame.Angles(0, math.pi, 0)
- clone_2.Parent = script.Effects
- clone_2.Ring:Emit(7)
- clone_2.Sparks:Emit(12)
- AddItem(clone_2, 0.5)
- local bodyvelocity = Instance.new("BodyVelocity", rootpartt)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(rootpartt.Position, rootpart.Position).LookVector * -20
- AddItem(bodyvelocity, .2)
- end, alreadyhit)
- for i, v in next, alreadyhit do
- anim.Speed = 3
- attacking = false
- doidle = true
- rem:FireClient(owner, "dashcancel")
- break
- end
- end
- end)
- local clone_10 = stuff.Utils.Gojo.LapseBlue.Throw:Clone()
- clone_10.CFrame = rootpart.CFrame * CFrame.new(0, 1, -4)
- clone_10.Size = Vector3.new(0, 0, 2)
- clone_10.Parent = char
- game:GetService("TweenService"):Create(clone_10, TweenInfo.new(0.3), {
- Size = Vector3.new(9, 9, 0);
- Transparency = 1;
- }):Play()
- AddItem(clone_10, 0.3)
- attacking = true
- doidle = false
- task.delay(anim.Length + .3, function()
- if(not attacking)then return end
- attacking = false
- doidle = true
- end)
- elseif(direction == "Left" and tick() > cooldowns["dash"])then
- for i_4_upvr, v_4 in char:GetChildren() do
- if v_4.Name == "Left Arm" or v_4.Name == "Left Leg" then
- local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
- local Weld = clone_2_upvr.Weld
- Weld.C1 *= CFrame.Angles(0, math.pi, 0)
- clone_2_upvr.Weld.Part1 = v_4
- clone_2_upvr.Parent = script.Effects
- task.delay(0.4, function()
- clone_2_upvr.Trail.Enabled = false
- AddItem(clone_2_upvr, 0.1)
- end)
- else
- if v_4.Name == "Right Arm" or v_4.Name == "Right Leg" then
- local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
- local var58_upvw = clone_2_upvr
- var58_upvw.Weld.Part1 = v_4
- var58_upvw.Parent = script.Effects
- task.delay(0.4, function()
- var58_upvw.Trail.Enabled = false
- AddItem(var58_upvw, 0.1)
- end)
- end
- end
- end
- cooldowns["dash"] = tick() + 2
- local anim = playAnimation("DashLeft")
- playSound(stuff.Sounds.Misc.Dash, rootpart)
- rem:FireClient(owner, "dash", direction)
- attacking = true
- doidle = false
- dashing = true
- task.delay(anim.Length, function()
- dashing = false
- attacking = false
- doidle = true
- end)
- elseif(direction == "Right" and tick() > cooldowns["dash"])then
- for i_4_upvr, v_4 in char:GetChildren() do
- if v_4.Name == "Left Arm" or v_4.Name == "Left Leg" then
- local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
- local Weld = clone_2_upvr.Weld
- Weld.C1 *= CFrame.Angles(0, math.pi, 0)
- clone_2_upvr.Weld.Part1 = v_4
- clone_2_upvr.Parent = script.Effects
- task.delay(0.4, function()
- clone_2_upvr.Trail.Enabled = false
- AddItem(clone_2_upvr, 0.1)
- end)
- else
- if v_4.Name == "Right Arm" or v_4.Name == "Right Leg" then
- local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
- local var58_upvw = clone_2_upvr
- var58_upvw.Weld.Part1 = v_4
- var58_upvw.Parent = script.Effects
- task.delay(0.4, function()
- var58_upvw.Trail.Enabled = false
- AddItem(var58_upvw, 0.1)
- end)
- end
- end
- end
- cooldowns["dash"] = tick() + 2
- local anim = playAnimation("DashRight")
- playSound(stuff.Sounds.Misc.Dash, rootpart)
- rem:FireClient(owner, "dash", direction)
- attacking = true
- doidle = false
- dashing = true
- task.delay(anim.Length, function()
- dashing = false
- attacking = false
- doidle = true
- end)
- elseif(direction == "Back" and tick() > cooldowns["dash"])then
- for i_4_upvr, v_4 in char:GetChildren() do
- if v_4.Name == "Left Arm" or v_4.Name == "Left Leg" then
- local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
- local Weld = clone_2_upvr.Weld
- Weld.C1 *= CFrame.Angles(0, math.pi, 0)
- clone_2_upvr.Weld.Part1 = v_4
- clone_2_upvr.Parent = script.Effects
- task.delay(0.4, function()
- clone_2_upvr.Trail.Enabled = false
- AddItem(clone_2_upvr, 0.1)
- end)
- else
- if v_4.Name == "Right Arm" or v_4.Name == "Right Leg" then
- local clone_2_upvr = stuff.Utils.Damage.AirTrail:Clone()
- local var58_upvw = clone_2_upvr
- var58_upvw.Weld.Part1 = v_4
- var58_upvw.Parent = script.Effects
- task.delay(0.4, function()
- var58_upvw.Trail.Enabled = false
- AddItem(var58_upvw, 0.1)
- end)
- end
- end
- end
- cooldowns["dash"] = tick() + 2
- local anim = playAnimation("DashBack")
- playSound(stuff.Sounds.Misc.Dash, rootpart)
- rem:FireClient(owner, "dash", direction)
- attacking = true
- doidle = false
- dashing = true
- task.delay(anim.Length, function()
- attacking = false
- doidle = true
- dashing = false
- end)
- end
- elseif(k == "r")then
- if(damagedone < 60)then return end
- damagedone -= 60
- attacking = true
- doidle = false
- task.delay(1, function()
- doidle = true
- attacking = false
- end)
- local clone_9 = stuff.Utils.Heian.Chant.Attachment:Clone()
- clone_9.Parent = rootpart
- AddItem(clone_9, 2)
- clone_9.Dust:Emit(50)
- clone_9.Ring:Emit(10)
- clone_9.Attachment.Burst:Emit(1)
- clone_9.Attachment.Ring:Emit(1)
- local clone_4_upvr = stuff.Utils.Heian.Chant.Chant:Clone()
- clone_4_upvr.Parent = rootpart
- AddItem(clone_4_upvr, 1)
- game:GetService("TweenService"):Create(clone_4_upvr, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
- StudsOffset = Vector3.new(2, 4, 2);
- }):Play()
- task.delay(0.5, function()
- game:GetService("TweenService"):Create(clone_4_upvr.Chat, TweenInfo.new(0.5), {
- ImageTransparency = 1;
- }):Play()
- game:GetService("TweenService"):Create(clone_4_upvr.Chat.Sub, TweenInfo.new(0.5), {
- TextTransparency = 1;
- }):Play()
- end)
- playAnimation("Chant")
- local animm = animPlayer.new(arms, stuff.Animations.Heian.ChantArms)
- animm:Play()
- task.delay(animm.Length, animm.Destroy, animm)
- if chantlevel == 1 then
- FXController:Flash(char, Color3.fromRGB(255, 255, 255), 2)
- playSound(stuff.Sounds.Itadori.Dismantle.WorldSlash1, rootpart)
- chantlevel = 2
- return
- end
- if chantlevel == 2 then
- FXController:Flash(char, Color3.fromRGB(255, 255, 127), 2)
- playSound(stuff.Sounds.Itadori.Dismantle.WorldSlash2, rootpart)
- clone_4_upvr.Chat.Sub.Text = "RECOIL..."
- chantlevel = 3
- return
- end
- if chantlevel == 3 then
- FXController:Flash(char, Color3.fromRGB(255, 85, 0), 2)
- playSound(stuff.Sounds.Itadori.Dismantle.WorldSlash1, rootpart)
- clone_4_upvr.Chat.Sub.Text = "TWIN METEORS."
- chantlevel = 4
- return
- end
- if chantlevel == 4 then
- FXController:Flash(char, Color3.fromRGB(255, 0, 0), 2)
- playSound(stuff.Sounds.Heian.WorldSlash3, rootpart)
- clone_4_upvr.Chat.Sub.Text = "THINK FAST."
- playSound(stuff.Sounds.Heian.Dismantle.WCSCharge, rootpart)
- task.wait(0.3)
- playAnimation("WCS")
- task.wait(.6)
- playSound(stuff.Sounds.Heian.Dismantle.Start, rootpart)
- local proj = stuff.Utils.Heian.WaffleProjectile:Clone()
- proj.Parent = script.Effects
- proj.CFrame = rootpart.CFrame*CFrame.new(0,20,5)
- interp(proj, 1)
- task.delay(6, pcall, game.Destroy, proj)
- playSound(stuff.Sounds.Heian.Dismantle.FireWCS, proj)
- task.spawn(function()
- while proj.Parent do
- hitbox(proj.CFrame, proj.Size, 1e9, false, function(mod)
- for i, v in next, mod:GetChildren() do
- if(v:IsA("BasePart"))then
- local bodyvelocity = Instance.new("BodyVelocity", v)
- bodyvelocity.MaxForce = Vector3.one*math.huge
- bodyvelocity.Velocity = CFrame.lookAt(v.Position, rootpart.Position).LookVector * -50
- AddItem(bodyvelocity, .2)
- end
- end
- local rootpartt = mod:FindFirstChild("HumanoidRootPart")
- FXController:Flash(mod, Color3.new(1, 1, 1))
- playSound(stuff.Sounds.Itadori.Dismantle.Explode, rootpartt)
- if(mod:FindFirstChild("Humanoid").Health < 1)then
- FXController:Bleed(mod)
- for _ = 1, 40 do
- bloodyzee:Blood(mod.HumanoidRootPart.CFrame, 50, 360, 360)
- end
- end
- end)
- task.wait()
- end
- end)
- end
- chantlevel = 1
- elseif(k == "g")then
- if(damagedone >= 800)then
- damagedone = 0
- walkspeedadd = -1e6
- attacking = true
- doidle = false
- domain = true
- playAnimation("MalevolentShrine")
- playSound(stuff.Sounds.Heian.MalevolentShrine.UhohStart, script)
- playSound(stuff.Sounds.Heian.MalevolentShrine.Voice, rootpart)
- FXController:DomainBurst(rootpart)
- FXController:Domain(char, function(arg1_9, arg2)
- local animm = animPlayer.new(arg2, stuff.Animations.Heian.DomainWarn)
- animm:Play()
- task.delay(animm.Length, animm.Destroy, animm)
- arg1_9.Panel.ImageLabel.Image = "rbxassetid://17668583842"
- local HumanoidRootPart_8 = arg2.HumanoidRootPart
- HumanoidRootPart_8.CFrame *= CFrame.Angles(0, 0, 0.17453292519943295)
- game:GetService("TweenService"):Create(arg2.HumanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {
- CFrame = arg2.HumanoidRootPart.CFrame * CFrame.Angles(0, -0.3490658503988659, 0.3490658503988659);
- }):Play()
- arg1_9.Panel.Viewport.LightColor = Color3.fromRGB(255, 155, 155)
- arg1_9.Panel.Viewport.Ambient = Color3.fromRGB(60, 0, 0)
- arg1_9.Panel.Viewport.LightDirection = Vector3.new(1, 0, 1)
- end)
- 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
- local atmo = game:GetService("Lighting"):FindFirstChild("Atmosphere")
- if(atmo)then atmo.Parent = nil end
- game:GetService("TweenService"):Create(game:GetService("Lighting"), TweenInfo.new(1.3 + .5 + 1), {
- ClockTime = 0,
- ExposureCompensation = -.5,
- Ambient = Color3.new(1, 0, 0),
- FogEnd = 600,
- FogColor = Color3.new(.6, 0, 0)
- }):Play()
- task.wait(1)
- attacking = false
- doidle = true
- walkspeedadd = 0
- for i, LocalPlayer_upvr in next, game:GetService("Players"):GetPlayers() do
- local clone_5_upvr = stuff.Utils.Heian.DomainFade:Clone()
- clone_5_upvr.Parent = LocalPlayer_upvr.PlayerGui
- task.delay(0.5, function()
- game:GetService("TweenService"):Create(clone_5_upvr.BG.Bubble, TweenInfo.new(1), {
- ImageTransparency = 1;
- }):Play()
- game:GetService("TweenService"):Create(clone_5_upvr.BG.Bubble.Texta, TweenInfo.new(1), {
- TextTransparency = 1;
- }):Play()
- clone_5_upvr.BG.Visible = false
- task.wait(0.05)
- clone_5_upvr.BG.Visible = true
- task.wait(0.4)
- clone_5_upvr.BG.Visible = false
- task.wait(0.05)
- clone_5_upvr.BG.Visible = true
- task.wait(0.3)
- clone_5_upvr.BG.Visible = false
- task.wait(0.05)
- clone_5_upvr.BG.Visible = true
- task.wait(0.2)
- clone_5_upvr.BG.Visible = false
- task.wait(0.05)
- clone_5_upvr.BG.Visible = true
- task.wait(0.1)
- clone_5_upvr.BG.Visible = false
- end)
- end
- playSound(stuff.Sounds.Itadori.Ring, script)
- local var101_upvr = tick() + 25.5
- local any_PlaySound_result1_upvr = playSound(stuff.Sounds.Heian.MalevolentShrine.Music, script)
- task.delay(0.5, function()
- playSound(stuff.Sounds.Heian.MalevolentShrine.Voice2, rootpart)
- task.wait(1.3)
- playSound(stuff.Sounds.Heian.MalevolentShrine.Uhoh, script)
- local clone_3 = stuff.Utils.Heian.Shrine:Clone()
- clone_3:PivotTo(rootpart.CFrame * CFrame.new(0, 11, 20))
- clone_3.Parent = script.Effects
- local slash = stuff.Utils.Heian.Slashes:Clone()
- slash.CFrame = rootpart.CFrame * CFrame.new(0, 11, 20)
- task.delay(2, function()
- slash.Parent = script.Effects
- playSound(stuff.Sounds.Heian.MalevolentShrine.Voice3, rootpart)
- end)
- local s = stuff.Sounds.Heian.Slashes2:Clone()
- s.Parent = slash
- s.Playing = true
- repeat
- task.wait(.25)
- if(slash.Parent == script.Effects)then
- for i = 1, math.random(10, 20) do
- 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)
- local ray = workspace:Raycast(pos, Vector3.yAxis*-100, rayparam)
- if(ray)then
- craters.debris(pos, math.random(3, 7), ray.Instance.Color, ray.Instance.Material, false, 200, 5)
- end
- end
- hitbox(slash.CFrame, slash.Size, 3, false)
- end
- until var101_upvr < tick() or not clone_3.Parent or humanoid.Health < 1
- domain = false
- game:GetService("TweenService"):Create(game:GetService("Lighting"), TweenInfo.new(1.3 + .5 + 1), {
- ClockTime = clocktime,
- ExposureCompensation = exposure,
- Ambient = ambient,
- FogEnd = fogend,
- FogColor = fogcol
- }):Play()
- if(atmo)then
- atmo.Parent = game:GetService("Lighting")
- end
- if any_PlaySound_result1_upvr then
- game:GetService("TweenService"):Create(any_PlaySound_result1_upvr, TweenInfo.new(2), {
- Volume = 0;
- }):Play()
- AddItem(any_PlaySound_result1_upvr, 2)
- end
- for i, v in next, slash:GetDescendants() do
- if(v:IsA("ParticleEmitter"))then
- v.Enabled = false
- end
- end
- for i, v in next, clone_3:GetDescendants() do
- pcall(function()
- game:GetService("TweenService"):Create(v, TweenInfo.new(1), {
- Transparency = 1
- }):Play()
- end)
- end
- task.wait(1)
- slash:Destroy()
- clone_3:Destroy()
- end)
- end
- end
- end)
- mouse.KeyUp:Connect(function(k)
- if(k == "space")then
- spaceheld = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement