Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local a = game:GetService("StarterGui")
- a:SetCore("SendNotification", { Title = "KJ HUB V2"; Text = "MADE BY KJ HUB AND EPICEDITEMPORIUM."; Duration = 5; Icon = "rbxassetid://17140853847" })
- game.StarterGui:SetCore("SendNotification", {
- Title = "NOTIFICATION";
- Text = "This Character is based on KJ's Final Ride & KJ Kills Day Credits to Kilojoule & Stealth";
- Duration = 5;
- Icon = "rbxassetid://0"; -- leave it like that if you don't want the icon
- })
- -- remove this script at bottom if you don't wan tsb notification sound
- s= Instance.new("Sound")
- s.SoundId = "rbxassetid://3398620867"
- s:Play()
- s.Volume = 1
- local Animation = 17325160621
- -- dont change anything here
- local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local function isLookingAt(target, distance) local head = character:WaitForChild("Head") local direction = (target.Position - head.Position).unit local lookVector = head.CFrame.LookVector local dotThreshold = 0 if distance <= 2.5 then dotThreshold = 0 elseif distance <= 4.1 then dotThreshold = 0.6 end return direction:Dot(lookVector) > dotThreshold end for _, m in pairs(workspace.Live:GetChildren()) do if m:IsA("Model") and m:FindFirstChild("Humanoid") then local distance = (m.HumanoidRootPart.Position - character.HumanoidRootPart.Position).Magnitude if distance <= 6 and isLookingAt(m.HumanoidRootPart, distance) then local origin = character.Head.Position local direction = (m.HumanoidRootPart.Position - origin) local raycastParams = RaycastParams.new() raycastParams.FilterDescendantsInstances = {character} local result = workspace:Raycast(origin, direction, raycastParams) if result and result.Instance == m.HumanoidRootPart then local a = Instance.new("Animation") a.AnimationId = "rbxassetid://" .. Animation local e = m.Humanoid:LoadAnimation(a) e:Play() end end end end
- local p = game.Players.LocalPlayer
- local s = function(c)
- local r = game:GetService("ReplicatedStorage")
- local t = r:FindFirstChild("Resources")
- if t then
- local u = t:FindFirstChild("le phone")
- if u then
- local v = u:Clone()
- v.Parent = c
- local w = c:FindFirstChild("RightHand") or c:FindFirstChild("Right Arm")
- if w then
- if not v.PrimaryPart then
- local basePart = v:FindFirstChildWhichIsA("BasePart")
- if basePart then
- v.PrimaryPart = basePart
- else
- return
- end
- end
- local x = Instance.new("Weld")
- x.Part0 = w
- x.Part1 = v.PrimaryPart
- x.C0 = CFrame.new(0, -1, 0)
- x.Parent = w
- v:SetPrimaryPartCFrame(w.CFrame * CFrame.new(0, -1, 0))
- -- Play the animation
- local anim = Instance.new("Animation")
- anim.AnimationId = "rbxassetid://17325160621"
- local animTrack = c.Humanoid:LoadAnimation(anim)
- animTrack:Play()
- -- Create and play the sound
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://17325174223"
- sound.Parent = c.Torso or c:FindFirstChild("UpperTorso") -- Adjust if using R6 or R15
- sound:Play()
- -- Delete the model after 1.0 seconds
- delay(1.0, function()
- if v and v.Parent then
- v:Destroy()
- local p = game.Players.LocalPlayer
- local a = p.Character
- local x = game:GetService("ReplicatedStorage")
- local v = game:GetService("Workspace")
- local function r()
- local s = x:FindFirstChild("Resources")
- if not s then return end
- local m = s:FindFirstChild("PhonePhysicsTest")
- if not m then return end
- local c = m:Clone()
- local h = a:FindFirstChild("Head")
- if not h then return end
- local d = h.CFrame.LookVector
- local o = h.Position + d * 0.5
- c:SetPrimaryPartCFrame(CFrame.new(o))
- c.Parent = v
- wait(5.3)
- if c and c.Parent then
- c:Destroy()
- end
- end
- r()
- end
- end)
- end
- end
- end
- end
- p.CharacterAdded:Connect(s)
- if p.Character then
- s(p.Character)
- end
- local Sound = 17325174223
- local Volume = 1
- local Speed = 1
- s= Instance.new("Sound", game.Players.LocalPlayer.Character.HumanoidRootPart)
- s.SoundId = "rbxassetid://" .. Sound
- s:Play()
- s.Volume = Volume
- s.PlaybackSpeed = Speed
- local Sound = 17325206534
- local Volume = 1
- local Speed = 1
- s= Instance.new("Sound", game.Players.LocalPlayer.Character.HumanoidRootPart)
- s.SoundId = "rbxassetid://" .. Sound
- s:Play()
- s.Volume = Volume
- s.PlaybackSpeed = Speed
- local OriginalAnimation = 10469493270
- local Sound = 17325528680
- local Volume = 2
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. OriginalAnimation then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- local s = Instance.new("Sound", p.Character.Torso)
- s.SoundId = "rbxassetid://" .. Sound
- s:Play()
- s.Volume = Volume
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local OriginalAnimation = 10469630950
- local Sound = 17325528583
- local Volume = 2
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. OriginalAnimation then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- local s = Instance.new("Sound", p.Character.Torso)
- s.SoundId = "rbxassetid://" .. Sound
- s:Play()
- s.Volume = Volume
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local OriginalAnimation = 10469639222
- local Sound = 17325528509
- local Volume = 2
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. OriginalAnimation then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- local s = Instance.new("Sound", p.Character.Torso)
- s.SoundId = "rbxassetid://" .. Sound
- s:Play()
- s.Volume = Volume
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local OriginalAnimation = 10469643643
- local Sound = 17325528401
- local Volume = 2
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function onAnimationPlayed(animationTrack)
- if animationTrack.Animation.AnimationId == "rbxassetid://" .. OriginalAnimation then
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- for _, animTrack in pairs(Humanoid:GetPlayingAnimationTracks()) do
- animTrack:Stop()
- end
- local s = Instance.new("Sound", p.Character.Torso)
- s.SoundId = "rbxassetid://" .. Sound
- s:Play()
- s.Volume = Volume
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- local function handleAnimationDetection(animIdsToStop, replacementAnimId)
- local humanoid = game.Players.LocalPlayer.Character.Humanoid
- local function onAnimPlayed(animationTrack)
- local animId = tonumber(string.match(animationTrack.Animation.AnimationId, "%d+"))
- for _, stopId in ipairs(animIdsToStop) do
- if animId == stopId then
- animationTrack:Stop()
- local player = game.Players.LocalPlayer
- repeat wait() until player.Character.Humanoid
- local humanoid = player.Character.Humanoid
- local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
- local UserInputService = game:GetService("UserInputService")
- debounce = false -- Activate debounce
- local anim = Instance.new("Animation")
- anim.AnimationId = "rbxassetid://" .. replacementAnimId
- local playAnim = humanoid:LoadAnimation(anim)
- anim.AnimationId = "rbxassetid://0" -- don't change anything here
- spawn(function()
- wait(1)
- debounce = true
- end)
- playAnim:Play()
- playAnim:AdjustSpeed(1)
- local Players = game:GetService("Players")
- local Character = Players.LocalPlayer.Character or Players.LocalPlayer.CharacterAdded:Wait()
- local animationPlayed = false -- Flag to track if the animation has already been played
- end
- end
- end
- humanoid.AnimationPlayed:Connect(onAnimPlayed)
- end
- -- First set of animations
- local firstAnimIdsToStop = {10469493270, 13532562418, 13491635433, 13370310513, 14004222985, 15259161390, 16515503507, 17889458563}
- local m1 = 17325510002
- handleAnimationDetection(firstAnimIdsToStop, m1)
- -- Second set of animations
- local secondAnimIdsToStop = {10469630950, 13532600125, 13296577783, 13390230973, 13997092940, 15240216931, 16515520431, 17889461810}
- local m2 = 17325513870
- handleAnimationDetection(secondAnimIdsToStop, m2)
- -- Third set of animations
- local thirdAnimIdsToStop = {10469639222, 13532604085, 13295919399, 13378751717, 14001963401, 15240176873, 16515448089, 17889471098}
- local m3 = 17325522388
- handleAnimationDetection(thirdAnimIdsToStop, m3)
- -- Fourth set of animations
- local fourthAnimIdsToStop = {10469643643, 13294471966, 13295936866, 13378708199, 14136436157, 15162694192, 16552234590, 17889290569}
- local m4 = 17325537719
- handleAnimationDetection(fourthAnimIdsToStop, m4)
- for _, tools in ipairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
- if tools:IsA("Tool") then
- tools:Destroy()
- end
- end
- local UltBarName = "20 SERIES"
- -- don't chabge anything here
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- local function findGuiAndSetText()
- local screenGui = playerGui:FindFirstChild("ScreenGui")
- if screenGui then
- local magicHealthFrame = screenGui:FindFirstChild("MagicHealth")
- if magicHealthFrame then
- local textLabel = magicHealthFrame:FindFirstChild("TextLabel")
- if textLabel then
- textLabel.Text = UltBarName
- end
- end
- end
- end
- playerGui.DescendantAdded:Connect(function(descendant)
- if descendant:IsDescendantOf(playerGui:FindFirstChild("ScreenGui")) then
- findGuiAndSetText()
- end
- end)
- findGuiAndSetText()
- local p = game.Players.LocalPlayer
- local r = p.Backpack:FindFirstChild("Ravage")
- if r then
- local a = r:Destroy()
- end
- local p = game.Players.LocalPlayer
- local b = p.Backpack
- local t = Instance.new("Tool")
- t.Name = "Ravage"
- t.RequiresHandle = false
- t.Parent = b
- local clr = Color3.fromRGB(70, 166, 255)
- local c = true
- local function rv()
- if not c then
- return
- end
- c = false
- delay(18, function()
- c = true
- end)
- for _, a in ipairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
- if a:IsA("Tool") then
- a.RequiresHandle = true
- end
- end
- local c = game.Players.LocalPlayer
- local d = c:WaitForChild("PlayerGui")
- local e = d:WaitForChild("Hotbar")
- local f = e:WaitForChild("Backpack")
- local g = f:WaitForChild("Hotbar")
- local ToolNumber = 1
- local cooldownTime = 18
- -- Get the player and the GUI elements
- local player = game.Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- local hotbar = playerGui:WaitForChild("Hotbar")
- local backpack = hotbar:WaitForChild("Backpack")
- local localScript = backpack:WaitForChild("LocalScript")
- -- Get the Cooldown from the LocalScript
- local cooldown = localScript:WaitForChild("Cooldown")
- -- Clone the Cooldown object
- local clonedCooldown = cooldown:Clone()
- -- Get the destination path where the cloned object will be moved
- local hotbarSlot1 = hotbar:WaitForChild("Backpack"):WaitForChild("Hotbar"):WaitForChild(ToolNumber):WaitForChild("Base")
- -- Move the cloned Cooldown to the desired location
- clonedCooldown.Parent = hotbarSlot1
- clonedCooldown.BackgroundColor3 = clr
- local startSize = clonedCooldown.Size
- local endSize = UDim2.new(startSize.X.Scale, startSize.X.Offset, 0, 0) -- Fully hidden (height is zero)
- -- Animate the cooldown to resize downwards
- spawn(function()
- local startTime = tick()
- local initialSize = clonedCooldown.Size
- while tick() - startTime < cooldownTime do
- local elapsed = tick() - startTime
- local progress = elapsed / cooldownTime
- -- Calculate the new size based on progress
- local newSize = UDim2.new(
- initialSize.X.Scale, -- Keep X size the same
- initialSize.X.Offset,
- initialSize.Y.Scale * (1 - progress), -- Decrease height
- initialSize.Y.Offset * (1 - progress)
- )
- -- Update the Cooldown's size
- clonedCooldown.Size = newSize
- wait()
- end
- -- Ensure final size is set and destroy the cooldown
- clonedCooldown.Size = endSize
- clonedCooldown:Destroy()
- end)
- local p = game.Players.LocalPlayer
- local c = p.Character or p.CharacterAdded:Wait()
- local h = c:WaitForChild("HumanoidRootPart")
- h.Anchored = true
- delay(0.9, function()
- local p = game.Players.LocalPlayer
- local c = p.Character or p.CharacterAdded:Wait()
- local h = c:WaitForChild("HumanoidRootPart")
- h.Anchored = false
- end)
- local a = "rbxassetid://7815618175"
- local b = game.Players.LocalPlayer
- local c = b.Character or b.CharacterAdded:Wait()
- local d = c:WaitForChild("Humanoid")
- local e = game:GetService("RunService")
- local f
- local function checkAnimation()
- for _, g in ipairs(d:GetPlayingAnimationTracks()) do
- if g.Animation.AnimationId == a then
- g:Stop()
- end
- end
- end
- f = e.RenderStepped:Connect(checkAnimation)
- task.delay(0.9, function()
- f:Disconnect()
- end)
- local P = game.Players.LocalPlayer
- local H = P.Character:WaitForChild("Humanoid")
- local A = Instance.new("Animation")
- A.AnimationId = "rbxassetid://16945573694"
- local T = H:LoadAnimation(A)
- A.AnimationId = "rbxassetid://0"
- T:Play()
- local k = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
- k.Name = "start"
- k.SoundId = "rbxassetid://16945495411"
- k.Volume = 2
- k:Play()
- task.delay(0.67, function()
- local p = game.Players.LocalPlayer
- local c = p.Character or p.CharacterAdded:Wait()
- local r = c:WaitForChild("HumanoidRootPart")
- local params = RaycastParams.new()
- params.FilterDescendantsInstances = {c}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- local rayCount = 36
- local radius = 4
- local m
- local function checkAllDirections()
- for i = 1, rayCount do
- local angle = math.rad((i / rayCount) * 360)
- local direction = Vector3.new(math.cos(angle), 0, math.sin(angle)) * radius
- local result = workspace:Raycast(r.Position, direction, params)
- if result and result.Instance.Parent:FindFirstChild("HumanoidRootPart") then
- m = result.Instance.Parent
- local enemyPosition = m:FindFirstChild("HumanoidRootPart").Position
- local lookDirection = (enemyPosition - r.Position).Unit
- r.CFrame = CFrame.lookAt(r.Position, r.Position + lookDirection)
- return m
- end
- end
- return nil
- end
- local mr = checkAllDirections()
- if mr then
- local h = m:FindFirstChild("HumanoidRootPart")
- local hu = m:FindFirstChild("Humanoid")
- m.HumanoidRootPart.Anchored = true
- if h and hu then
- h.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -3)
- h.CFrame = CFrame.lookAt(h.Position, game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
- local a = Instance.new("Animation")
- a.AnimationId = "rbxassetid://16945557433"
- local t = hu:LoadAnimation(a)
- t:Play()
- t.Stopped:Connect(function()
- m.HumanoidRootPart.Anchored = false
- for _, al in ipairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
- if al:IsA("Tool") then
- al.RequiresHandle = false
- end
- end
- wait(0.5)
- game.Workspace.Live["Weakest Dummy"].HumanoidRootPart.CFrame = game.Workspace.Live["Weakest Dummy"].Part.CFrame
- game.Workspace.Live["Weakest Dummy"].HumanoidRootPart.CFrame = game.Workspace.Live["Weakest Dummy"].Part.CFrame * CFrame.Angles(math.rad(-90), 0, 0)
- end)
- local P = game.Players.LocalPlayer
- local H = P.Character:WaitForChild("Humanoid")
- local A = Instance.new("Animation")
- A.AnimationId = "rbxassetid://16945550029"
- local T = H:LoadAnimation(A)
- A.AnimationId = "rbxassetid://0"
- T:Play()
- local a = "rbxassetid://7815618175"
- local b = game.Players.LocalPlayer
- local c = b.Character or b.CharacterAdded:Wait()
- local d = c:WaitForChild("Humanoid")
- local e = game:GetService("RunService")
- local f
- local function checkAnimation()
- for _, g in ipairs(d:GetPlayingAnimationTracks()) do
- if g.Animation.AnimationId == a then
- g:Stop()
- end
- end
- end
- f = e.RenderStepped:Connect(checkAnimation)
- task.delay(6.2, function()
- f:Disconnect()
- end)
- task.spawn(function()
- if game.Players.LocalPlayer:GetAttribute("S_ReducedCamshake") == false then
- local RunService = game:GetService("RunService")
- local player = game.Players.LocalPlayer
- local camera = workspace.CurrentCamera
- local shakeMagnitude = 1
- local shakeDuration = 0.1
- local shakeSpeed = 100
- local resetDelay = 0
- local originalCFrame = camera.CFrame
- local function shakeCamera(duration, magnitude, delayAfter)
- local startTime = tick()
- local connection
- connection = RunService.RenderStepped:Connect(function()
- local elapsed = tick() - startTime
- if elapsed < duration then
- local shakeX = math.sin(elapsed * shakeSpeed) * magnitude
- local shakeY = math.cos(elapsed * shakeSpeed) * magnitude
- camera.CFrame = camera.CFrame * CFrame.Angles(math.rad(shakeX), math.rad(shakeY), 0)
- else
- connection:Disconnect()
- wait(delayAfter)
- camera.CFrame = originalCFrame
- end
- end)
- end
- shakeCamera(shakeDuration, shakeMagnitude, resetDelay)
- wait(5.5)
- local RunService = game:GetService("RunService")
- local player = game.Players.LocalPlayer
- local camera = workspace.CurrentCamera
- local shakeMagnitude = 1
- local shakeDuration = 0.1
- local shakeSpeed = 100
- local resetDelay = 0
- local originalCFrame = camera.CFrame
- local function shakeCamera(duration, magnitude, delayAfter)
- local startTime = tick()
- local connection
- connection = RunService.RenderStepped:Connect(function()
- local elapsed = tick() - startTime
- if elapsed < duration then
- local shakeX = math.sin(elapsed * shakeSpeed) * magnitude
- local shakeY = math.cos(elapsed * shakeSpeed) * magnitude
- camera.CFrame = camera.CFrame * CFrame.Angles(math.rad(shakeX), math.rad(shakeY), 0)
- else
- connection:Disconnect()
- wait(delayAfter)
- camera.CFrame = originalCFrame
- end
- end)
- end
- shakeCamera(shakeDuration, shakeMagnitude, resetDelay)
- else
- wait()
- end
- end)
- task.spawn(function()
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- -- Function to check if the player is looking at the target
- local function isLookingAt(target)
- local head = character:WaitForChild("Head")
- local direction = (target.Position - head.Position).unit
- local lookVector = head.CFrame.LookVector
- return (direction:Dot(lookVector) > 0.7) -- Adjust the threshold for how "looking at" is defined
- end
- -- Function to update the health text in the BillboardGui for Weakest Dummy
- local function updateHealthText(dummyHumanoid)
- local billboardGui = dummyHumanoid.Parent:FindFirstChild("Head"):FindFirstChild("BillboardGui")
- if billboardGui then
- local textLabel = billboardGui:FindFirstChild("TextLabel")
- if textLabel then
- local currentHealth = dummyHumanoid.Health
- local maxHealth = dummyHumanoid.MaxHealth
- local healthPercentage = math.floor((currentHealth / maxHealth) * 100) -- Calculate the percentage
- textLabel.Text = healthPercentage .. "%" -- Update the TextLabel to show the percentage
- -- Change color to red
- textLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- -- Wait for 1 second, then change color back to white
- wait(1)
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- -- Reset the health text to 100% if it reaches 0
- if currentHealth == 0 then
- dummyHumanoid.Health = maxHealth
- textLabel.Text = "100%"
- end
- end
- end
- end
- -- Function to check for nearby characters and reduce health
- local function checkForNearbyCharacters()
- for _, targetCharacter in pairs(workspace.Live:GetChildren()) do
- if targetCharacter:IsA("Model") and targetCharacter:FindFirstChild("Humanoid") then
- local targetHumanoid = targetCharacter:FindFirstChild("Humanoid")
- local distance = (targetCharacter.HumanoidRootPart.Position - character.HumanoidRootPart.Position).magnitude
- -- Check if the target is nearby and the player is looking at it
- if distance <= 6 and isLookingAt(targetCharacter.HumanoidRootPart) then
- -- Reduce health by 1
- targetHumanoid.Health = math.max(0, targetHumanoid.Health - 2)
- if targetHumanoid.Health == 0 then
- targetHumanoid.Health = targetHumanoid.MaxHealth
- end
- -- Check if the character is the "Weakest Dummy" for updating the text label
- if targetCharacter.Name == "Weakest Dummy" then
- -- Update the health text in the BillboardGui for Weakest Dummy
- updateHealthText(targetHumanoid)
- end
- -- Break after reducing health once
- return
- end
- end
- end
- end
- -- Call the function once when the script runs
- checkForNearbyCharacters()
- wait(0.15)
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- -- Function to update the health text in the BillboardGui for Weakest Dummy
- local function updateHealthText(dummyHumanoid)
- local billboardGui = dummyHumanoid.Parent:FindFirstChild("Head"):FindFirstChild("BillboardGui")
- if billboardGui then
- local textLabel = billboardGui:FindFirstChild("TextLabel")
- if textLabel then
- local currentHealth = dummyHumanoid.Health
- local maxHealth = dummyHumanoid.MaxHealth
- local healthPercentage = math.floor((currentHealth / maxHealth) * 100) -- Calculate the percentage
- textLabel.Text = healthPercentage .. "%" -- Update the TextLabel to show the percentage
- -- Change color to red
- textLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- -- Wait for 1 second, then change color back to white
- task.delay(1, function()
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- end)
- -- Reset the health text to 100% if it reaches 0
- if currentHealth == 0 then
- dummyHumanoid.Health = maxHealth
- textLabel.Text = "100%"
- end
- end
- end
- end
- -- Function to check for nearby characters and reduce health
- local function checkForNearbCharacters()
- for _, targetCharacter in pairs(workspace.Live:GetChildren()) do
- if targetCharacter:IsA("Model") and targetCharacter:FindFirstChild("Humanoid") then
- local targetHumanoid = targetCharacter:FindFirstChild("Humanoid")
- local distance = (targetCharacter.HumanoidRootPart.Position - character.HumanoidRootPart.Position).magnitude
- -- Check if the target is nearby and the player is looking at it
- if targetCharacter ~= character and distance <= 6 then
- -- Reduce health by 2
- targetHumanoid.Health = math.max(0, targetHumanoid.Health - 2)
- if targetHumanoid.Health == 0 then
- targetHumanoid.Health = targetHumanoid.MaxHealth
- end
- -- Check if the character is the "Weakest Dummy" for updating the text label
- if targetCharacter.Name == "Weakest Dummy" then
- -- Update the health text in the BillboardGui for Weakest Dummy
- updateHealthText(targetHumanoid)
- end
- -- Break after reducing health once
- return
- end
- end
- end
- end
- -- Call the function twice, once after the other
- checkForNearbCharacters()
- wait(0.4) -- Wait before executing again
- checkForNearbCharacters()
- wait(0.5)
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local camera = workspace.CurrentCamera
- local speed = 0.06595 -- How fast the health reduces (seconds between each health reduction)
- local duration = 1.3 -- Total time to keep reducing health (in seconds)
- local damageAmount = 1 -- The amount of health to reduce on each hit
- -- Function to update the health text in the BillboardGui for Weakest Dummy
- local function updateHealthText(dummyHumanoid)
- local billboardGui = dummyHumanoid.Parent:FindFirstChild("Head"):FindFirstChild("BillboardGui")
- if billboardGui then
- local textLabel = billboardGui:FindFirstChild("TextLabel")
- if textLabel then
- local currentHealth = dummyHumanoid.Health
- local maxHealth = dummyHumanoid.MaxHealth
- local healthPercentage = math.floor((currentHealth / maxHealth) * 100) -- Calculate the percentage
- textLabel.Text = healthPercentage .. "%" -- Update the TextLabel to show the percentage
- -- Change color to red for the entire barrage duration
- textLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- end
- end
- end
- -- Function to revert the text color back to white after the barrage ends
- local function revertTextColor(dummyHumanoid)
- local billboardGui = dummyHumanoid.Parent:FindFirstChild("Head"):FindFirstChild("BillboardGui")
- if billboardGui then
- local textLabel = billboardGui:FindFirstChild("TextLabel")
- if textLabel then
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- Revert back to white
- end
- end
- end
- -- Function to reset the health to 100 if it reaches 0
- local function resetHealthIfZero(dummyHumanoid)
- if dummyHumanoid.Health <= 0 then
- dummyHumanoid.Health = dummyHumanoid.MaxHealth -- Reset to 100
- updateHealthText(dummyHumanoid) -- Update the TextLabel to show 100%
- end
- end
- -- Function to check for nearby characters and reduce health
- local function checkForNearbyCharacters()
- for _, targetCharacter in pairs(workspace.Live:GetChildren()) do
- if targetCharacter:IsA("Model") and targetCharacter:FindFirstChild("Humanoid") then
- local targetHumanoid = targetCharacter:FindFirstChild("Humanoid")
- local distance = (targetCharacter.HumanoidRootPart.Position - character.HumanoidRootPart.Position).magnitude
- -- Check if the target is nearby and the player is looking at it
- if targetCharacter ~= character and distance <= 10 then
- -- Reduce health by the specified amount
- targetHumanoid.Health = math.max(0, targetHumanoid.Health - damageAmount)
- if targetHumanoid.Health == 0 then
- targetHumanoid.Health = targetHumanoid.MaxHealth
- end
- -- If the character is "Weakest Dummy", update the text label
- if targetCharacter.Name == "Weakest Dummy" then
- updateHealthText(targetHumanoid)
- resetHealthIfZero(targetHumanoid)
- end
- end
- end
- end
- end
- -- Function to repeatedly reduce health over the given duration
- local function barrageAttack()
- local startTime = tick() -- Record the start time
- -- Loop while the total time has not yet reached the duration
- while tick() - startTime < duration do
- checkForNearbyCharacters() -- Reduce health
- wait(speed) -- Wait for the speed interval before reducing health again
- end
- -- After the barrage ends, revert the color for "Weakest Dummy"
- for _, targetCharacter in pairs(workspace.Live:GetChildren()) do
- if targetCharacter:IsA("Model") and targetCharacter.Name == "Weakest Dummy" and targetCharacter:FindFirstChild("Humanoid") then
- local targetHumanoid = targetCharacter:FindFirstChild("Humanoid")
- revertTextColor(targetHumanoid)
- end
- end
- end
- -- Execute the barrage attack
- barrageAttack()
- wait(2)
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- -- Function to update the health text in the BillboardGui for Weakest Dummy
- local function updateHealthText(dummyHumanoid)
- local billboardGui = dummyHumanoid.Parent:FindFirstChild("Head"):FindFirstChild("BillboardGui")
- if billboardGui then
- local textLabel = billboardGui:FindFirstChild("TextLabel")
- if textLabel then
- local currentHealth = dummyHumanoid.Health
- local maxHealth = dummyHumanoid.MaxHealth
- local healthPercentage = math.floor((currentHealth / maxHealth) * 100) -- Calculate the percentage
- textLabel.Text = healthPercentage .. "%" -- Update the TextLabel to show the percentage
- -- Change color to red
- textLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- -- Wait for 1 second, then change color back to white
- wait(1)
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- -- Reset the health text to 100% if it reaches 0
- if currentHealth == 0 then
- dummyHumanoid.Health = maxHealth
- textLabel.Text = "100%"
- end
- end
- end
- end
- -- Function to check for nearby characters and reduce health
- local function checkForNearbyCharacters()
- for _, targetCharacter in pairs(workspace.Live:GetChildren()) do
- if targetCharacter:IsA("Model") and targetCharacter:FindFirstChild("Humanoid") then
- local targetHumanoid = targetCharacter:FindFirstChild("Humanoid")
- local distance = (targetCharacter.HumanoidRootPart.Position - character.HumanoidRootPart.Position).magnitude
- -- Check if the target is nearby and the player is looking at it
- if targetCharacter ~= character and distance <= 10 then
- -- Reduce health by 1
- targetHumanoid.Health = math.max(0, targetHumanoid.Health - 2)
- if targetHumanoid.Health == 0 then
- targetHumanoid.Health = targetHumanoid.MaxHealth
- end
- -- Check if the character is the "Weakest Dummy" for updating the text label
- if targetCharacter.Name == "Weakest Dummy" then
- -- Update the health text in the BillboardGui for Weakest Dummy
- updateHealthText(targetHumanoid)
- end
- -- Break after reducing health once
- return
- end
- end
- end
- end
- -- Call the function once when the script runs
- checkForNearbyCharacters()
- end)
- task.spawn(function()
- task.delay(5.1, function()
- task.spawn(function()
- local Attachment = game.ReplicatedStorage.Resources.KJEffects["lastkick"].Attachment:Clone()
- Attachment.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, child in ipairs(Attachment:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(7)
- end
- end
- local smoker = game.ReplicatedStorage.Resources.KJEffects["lastkick"].smoker:Clone()
- smoker.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, child in ipairs(smoker:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(8)
- end
- end
- end)
- local r = game:GetService("ReplicatedStorage")
- local p = game.Players.LocalPlayer
- local c = p.Character or p.CharacterAdded:Wait()
- local h = c:WaitForChild("HumanoidRootPart")
- local e = r:WaitForChild("Resources"):WaitForChild("KJEffects")
- local s = {"Start", "End", "KickShockwave", "KickShockwave2"}
- for _, v in ipairs(s) do
- local f = e:WaitForChild(v):Clone()
- f.Parent = workspace
- f.CFrame = h.CFrame * CFrame.new(0, 0, -5) * CFrame.Angles(math.rad(-90), 0, 0)
- task.delay(0.05, function()
- f:Destroy()
- end)
- end
- end)
- delay(5.4, function()
- local k = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
- k.Name = "explode"
- k.SoundId = "rbxassetid://16945723339"
- k.Volume = 2
- k:Play()
- task.delay(0.8, function()
- local p = game.Workspace:FindFirstChild("NoRotation")
- if p then
- p:Destroy()
- end
- end)
- end)
- local k = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
- k.Name = "hit (1)"
- k.SoundId = "rbxassetid://16945517708"
- k.Volume = 2
- k:Play()
- local k = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
- k.Name = "consecutive"
- k.SoundId = "rbxassetid://16945593216"
- k.Volume = 2
- k:Play()
- local k = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
- k.Name = "wind"
- k.SoundId = "rbxassetid://16945691441"
- k.Volume = 2
- k:Play()
- local p = game.Players.LocalPlayer
- local c = p.Character or p.CharacterAdded:Wait()
- local h = c:WaitForChild("HumanoidRootPart")
- local a = Instance.new("Part")
- a.Size = Vector3.new(1, 1, 1)
- a.Anchored = true
- a.CanCollide = true
- a.Position = h.Position
- a.Transparency = 1
- a.Name = "NoRotation"
- a.Parent = workspace
- local w = Instance.new("WeldConstraint")
- w.Part0 = a
- w.Part1 = h
- w.Parent = a
- end)
- local rs = game:GetService("ReplicatedStorage")
- local ws = game:GetService("Workspace")
- local plr = game.Players.LocalPlayer
- local r = rs:WaitForChild("Resources")
- local k = r:WaitForChild("KJEffects")
- local p = k:WaitForChild("Ultikwind1")
- local c = p:Clone()
- c.Parent = ws:WaitForChild("Thrown")
- local char = plr.Character or plr.CharacterAdded:Wait()
- local hrp = char:WaitForChild("HumanoidRootPart")
- local pos = hrp.Position + (hrp.CFrame.LookVector * 2)
- c.Position = pos
- c.CFrame = CFrame.new(pos, hrp.Position) * CFrame.Angles(0, math.rad(-90), 0)
- for _, v in ipairs(c:GetChildren()) do
- if v:IsA("SpecialMesh") then
- v.Scale = Vector3.new(0.14, 0.30, 0.30)
- end
- end
- task.delay(0.04, function()
- c:Destroy()
- end)
- task.delay(1.19, function()
- local p = game.Players.LocalPlayer
- local c = p.Character or p.CharacterAdded:Wait()
- local h = c:WaitForChild("HumanoidRootPart")
- local r = game:GetService("ReplicatedStorage")
- local rs = r.Resources
- local ke = rs.KJEffects
- local p1 = ke["1and2"]
- local p2 = ke["1and2smoke"]
- local p1_c = p1:Clone()
- p1_c.CFrame = h.CFrame * CFrame.new(0, 0, -3)
- local p2_c = p2:Clone()
- p2_c.CFrame = h.CFrame * CFrame.new(0, 0, -5)
- local t = c:FindFirstChild("Thrown") or Instance.new("Folder", c)
- t.Name = "Thrown"
- p1_c.Parent = t
- p2_c.Parent = t
- local a1 = p1_c:FindFirstChild("1and2")
- if a1 then
- for _, e in pairs(a1:GetDescendants()) do
- if e:IsA("ParticleEmitter") then
- e:Emit(28)
- end
- end
- end
- local a2 = p2_c:FindFirstChild("1and2smoke")
- if a2 then
- for _, e in pairs(a2:GetDescendants()) do
- if e:IsA("ParticleEmitter") then
- e:Emit(18)
- end
- end
- end
- task.delay(0.48, function()
- local p = game.Players.LocalPlayer
- local c = p.Character or p.CharacterAdded:Wait()
- local h = c:WaitForChild("HumanoidRootPart")
- local r = game:GetService("ReplicatedStorage")
- local rs = r.Resources
- local ke = rs.KJEffects
- local p1 = ke["1and2"]
- local p2 = ke["1and2smoke"]
- local p1_c = p1:Clone()
- p1_c.CFrame = h.CFrame * CFrame.new(0, 0, -3)
- local p2_c = p2:Clone()
- p2_c.CFrame = h.CFrame * CFrame.new(0, 0, -5)
- local t = c:FindFirstChild("Thrown") or Instance.new("Folder", c)
- t.Name = "Thrown"
- p1_c.Parent = t
- p2_c.Parent = t
- local a1 = p1_c:FindFirstChild("1and2")
- if a1 then
- for _, e in pairs(a1:GetDescendants()) do
- if e:IsA("ParticleEmitter") then
- e:Emit(28)
- end
- end
- end
- local a2 = p2_c:FindFirstChild("1and2smoke")
- if a2 then
- for _, e in pairs(a2:GetDescendants()) do
- if e:IsA("ParticleEmitter") then
- e:Emit(18)
- end
- end
- end
- delay(0.5, function()
- local BARRAGESMOKE = game.ReplicatedStorage.Resources.KJEffects["BARRAGESMOKE"].BARRAGESMOKE:Clone()
- BARRAGESMOKE.Parent = game.Players.LocalPlayer.Character["Torso"]
- for _, child in ipairs(BARRAGESMOKE:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(50)
- child.Enabled = true
- child.Rate = 10000
- end
- end
- local a = game:GetService("ReplicatedStorage")
- local b = game:GetService("Workspace")
- local c = game:GetService("Players")
- local d = c.LocalPlayer
- local e = d.Character
- if not e then
- e = d.CharacterAdded:Wait()
- end
- local f = e:WaitForChild("HumanoidRootPart")
- local g = a:FindFirstChild("Resources")
- if not g then
- return
- end
- local h = g:FindFirstChild("KJEffects")
- if not h then
- return
- end
- local i = h:FindFirstChild("barrage")
- if not i then
- return
- end
- local j = i:Clone()
- j.Parent = b
- local k = f.CFrame.LookVector * 3
- local l = f.CFrame + k
- local m = CFrame.Angles(math.rad(47), 0, 0)
- j.CFrame = l * m
- local r = game:GetService("RunService")
- local function n(o)
- for _, p in pairs(o:GetDescendants()) do
- if p:IsA("ParticleEmitter") then
- p.Enabled = true
- local delay = math.random() * 0.2 + 0.2
- r.Heartbeat:Connect(function()
- if delay <= 0 then
- p:Emit(7)
- delay = math.random() * 0.2 + 0.2
- else
- delay = delay - r.Heartbeat:Wait()
- end
- end)
- end
- end
- end
- n(j)
- delay(1.21, function()
- j:Destroy()
- local p = game.Players.LocalPlayer
- local c = p.Character or p.CharacterAdded:Wait()
- local function d()
- local t = c:WaitForChild("Torso")
- local a = t:FindFirstChild("BARRAGESMOKE")
- if a then
- a:Destroy()
- end
- end
- d()
- local TweenService = game:GetService("TweenService")
- local v820 = {
- Character = game.Players.LocalPlayer.Character,
- ShowaveCF = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 9, 0) * CFrame.Angles(0, 0, math.rad(90)),
- CF = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame,
- }
- local function v483(params)
- local origin = params.orig
- local direction = params.dir
- local ray = Ray.new(origin, direction)
- local part, position = workspace:FindPartOnRay(ray)
- return part, position
- end
- local _ = v820.Character.PrimaryPart
- local v1398 = game.ReplicatedStorage:WaitForChild("Resources"):WaitForChild("KJEffects")
- local l_CF_0 = v820.CF
- local l_ShowaveCF_0 = v820.ShowaveCF
- local v1402 = v1398:WaitForChild("uppercutimpact"):Clone()
- local v3 = TweenService
- v1402.CFrame = l_CF_0
- v1402.Parent = workspace:WaitForChild("Thrown")
- v3:Create(v1402, TweenInfo.new(0.06, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
- CFrame = v1402.CFrame * CFrame.new(0, 7.076, 0)
- }):Play()
- v3:Create(v1402:FindFirstChild("Mesh"), TweenInfo.new(0.06, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
- Scale = Vector3.new(0.7, 0, 0)
- }):Play()
- local v1403 = v1398:WaitForChild("uppercutmesh"):Clone()
- v1403.CFrame = l_ShowaveCF_0
- v1403.Parent = workspace:WaitForChild("Thrown")
- v3:Create(v1403, TweenInfo.new(0.25, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
- CFrame = v1403.CFrame * CFrame.new(-11.931, 0, 0) * CFrame.Angles(-math.pi, 0, 0)
- }):Play()
- v3:Create(v1403:FindFirstChild("Mesh"), TweenInfo.new(0.25, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
- Scale = Vector3.new(0, 0.6, 0.6)
- }):Play()
- v3:Create(v1403:FindFirstChild("Decal"), TweenInfo.new(0.25, Enum.EasingStyle.Circular, Enum.EasingDirection.Out), {
- Transparency = 1
- }):Play()
- local v1404, v1405 = v483({
- orig = l_CF_0.Position + Vector3.yAxis,
- dir = Vector3.new(0, -50, 0)
- })
- if v1404 then
- local l_Color_0 = v1404.Color
- local v1407 = v1398:WaitForChild("UPPERCUTSMOKE"):Clone()
- v1407.Size = Vector3.new(5, 5, 5)
- v1407.Position = v1405
- v1407.Parent = workspace:WaitForChild("Thrown")
- v1407.UPPERCUTSMOKE["1"].Color = ColorSequence.new(l_Color_0)
- v1407.UPPERCUTSMOKE["2"].Color = ColorSequence.new(l_Color_0)
- for _, child in ipairs(v1407:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(6)
- end
- end
- game:GetService("Debris"):AddItem(v1407, 2)
- end
- game:GetService("Debris"):AddItem(v1403, 1)
- game:GetService("Debris"):AddItem(v1402, 1)
- local UPPERCUTSMOKE = game.ReplicatedStorage.Resources.KJEffects["UPPERCUTSMOKE"].UPPERCUTSMOKE:Clone()
- UPPERCUTSMOKE.Parent = game.Players.LocalPlayer.Character:WaitForChild("Torso")
- for _, child in ipairs(UPPERCUTSMOKE:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(6)
- end
- end
- task.delay(0.7, function()
- local r = game.ReplicatedStorage.Resources.KJEffects
- local s = r["Left Leg"].speedlines:Clone()
- local t = r["Left Leg"].starries:Clone()
- s.Parent = game.Players.LocalPlayer.Character["Left Leg"]
- t.Parent = game.Players.LocalPlayer.Character["Left Leg"]
- if s:IsA("ParticleEmitter") then
- s.Enabled = true
- s.Rate = 10
- s:Emit(11)
- end
- if t:IsA("ParticleEmitter") then
- t.Enabled = true
- t.Rate = 10
- t:Emit(11)
- task.delay(1.2, function()
- t.Rate = 0
- t:Emit(11)
- s.Rate = 0
- s:Emit(11)
- end)
- end
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local torso = character:WaitForChild("HumanoidRootPart")
- local function createRock(size)
- local rock = Instance.new("Part")
- rock.Size = size
- rock.Shape = Enum.PartType.Block
- rock.Anchored = false
- rock.CanCollide = true
- rock.Material = Enum.Material.Slate
- rock.BrickColor = BrickColor.Gray()
- rock.Parent = workspace
- local bodyAngularVelocity = Instance.new("BodyAngularVelocity")
- bodyAngularVelocity.MaxTorque = Vector3.new(4000, 4000, 4000)
- bodyAngularVelocity.P = 3000
- bodyAngularVelocity.Parent = rock
- local randomDirection = Vector3.new(
- math.random() * 2 - 1,
- math.random() * 2 - 1,
- math.random() * 2 - 1
- ).unit
- local spinSpeed = math.random(50, 150)
- bodyAngularVelocity.AngularVelocity = randomDirection * spinSpeed
- return rock, bodyAngularVelocity
- end
- local function rotateRocks(rotationSpeed, fallDelay, launchSpeed, verticalForce, spinSpeed, slideSpeed, slideDuration, shrinkDuration)
- local rocks = {}
- local numberOfRocks = 12
- local radius = 10
- local rockHeight = 0.3
- for i = 1, numberOfRocks do
- local angle = (i / numberOfRocks) * math.pi * 2
- local size = Vector3.new(0.3, 0.3, 0.3)
- if i % 2 == 0 then
- size = Vector3.new(0.65, 0.65, 0.65)
- end
- local rock, bodyAngularVelocity = createRock(size)
- local offsetX = math.cos(angle) * radius
- local offsetZ = math.sin(angle) * radius
- rock.Position = torso.Position + Vector3.new(offsetX, rockHeight, offsetZ)
- table.insert(rocks, { rock = rock, bodyAngularVelocity = bodyAngularVelocity })
- end
- local runService = game:GetService("RunService")
- local startTime = tick()
- local connection
- connection = runService.RenderStepped:Connect(function()
- local elapsed = tick() - startTime
- local angleStep = (elapsed * rotationSpeed) % (math.pi * 2)
- if elapsed >= 0.6 then
- rotationSpeed = math.max(rotationSpeed * 0.95, 1)
- end
- for i, rockData in ipairs(rocks) do
- local rock = rockData.rock
- local angle = (i / numberOfRocks) * math.pi * 2 + angleStep
- local offsetX = math.cos(angle) * radius
- local offsetZ = math.sin(angle) * radius
- rock.Position = torso.Position + Vector3.new(offsetX, rockHeight, offsetZ)
- end
- if elapsed >= fallDelay then
- connection:Disconnect()
- for _, rockData in ipairs(rocks) do
- local rock = rockData.rock
- local bodyAngularVelocity = rockData.bodyAngularVelocity
- if bodyAngularVelocity then
- bodyAngularVelocity:Destroy()
- end
- local tangentialVelocity = launchSpeed * (1 + math.random(-10, 10) / 100)
- local bodyVelocity = Instance.new("BodyVelocity")
- local outwardDirection = (rock.Position - torso.Position).unit
- local randomHorizontal = Vector3.new(math.random(-1, 1), 0, math.random(-1, 1)) * 0.3
- bodyVelocity.Velocity = (outwardDirection + randomHorizontal).unit * tangentialVelocity + Vector3.new(0, verticalForce, 0)
- bodyVelocity.P = 1000
- bodyVelocity.Parent = rock
- local dust = Instance.new("ParticleEmitter")
- dust.Texture = "rbxassetid://3527866534"
- dust.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 2), NumberSequenceKeypoint.new(1, 0)})
- dust.Lifetime = NumberRange.new(0.5, 1)
- dust.Rate = 100
- dust.Speed = NumberRange.new(5, 10)
- dust.Parent = rock
- dust:Emit(50)
- rock.Touched:Connect(function(hit)
- if hit:IsA("Terrain") or (hit:IsA("BasePart") and hit.CanCollide) then
- bodyVelocity:Destroy()
- local glideVelocity = outwardDirection * slideSpeed
- local glideStartTime = tick()
- local glideConnection
- glideConnection = runService.RenderStepped:Connect(function()
- local glideElapsed = tick() - glideStartTime
- if glideElapsed >= slideDuration then
- glideConnection:Disconnect()
- rock.Velocity = Vector3.new(0, 0, 0)
- local shrinkStartTime = tick()
- local shrinkConnection
- shrinkConnection = runService.RenderStepped:Connect(function()
- local shrinkElapsed = tick() - shrinkStartTime
- local scale = math.max(0, rock.Size.X * (1 - (shrinkElapsed / shrinkDuration)))
- rock.Size = Vector3.new(scale, scale, scale)
- rock.Position = rock.Position - Vector3.new(0, (rock.Size.Y - scale) / 2, 0)
- if scale <= 0 then
- shrinkConnection:Disconnect()
- rock:Destroy()
- end
- end)
- else
- rock.Velocity = glideVelocity * (1 - (glideElapsed / slideDuration))
- end
- end)
- end
- end)
- end
- end
- end)
- end
- local rotationSpeed = 12
- local fallDelay = 0.65
- local launchSpeed = 25
- local verticalForce = -10
- local spinSpeed = 1200
- local slideSpeed = 30
- local slideDuration = 0.7
- local shrinkDuration = 2.5
- rotateRocks(rotationSpeed, fallDelay, launchSpeed, verticalForce, spinSpeed, slideSpeed, slideDuration, shrinkDuration)
- local a = game.ReplicatedStorage.Resources.KJEffects["RUNAROUNDWIND"].RUNAROUNDWIND:Clone()
- a.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, b in ipairs(a:GetChildren()) do
- if b:IsA("ParticleEmitter") then
- b:Emit(5)
- b.Rate = 145
- b.Enabled = true
- task.delay(0.6, function()
- b.Rate = 0
- end)
- end
- end
- local r = game.ReplicatedStorage:FindFirstChild("Resources")
- if r then
- local k = r:FindFirstChild("KJEffects")
- if k then
- local p = k:FindFirstChild("spinbeam")
- if p then
- local d = p:Clone()
- local c = game.Players.LocalPlayer.Character
- local hrp = c and c:FindFirstChild("HumanoidRootPart")
- if hrp then
- d.Parent = game.Workspace:FindFirstChild("Thrown") or Instance.new("Folder", game.Workspace)
- d.CFrame = hrp.CFrame * CFrame.new(0, -2, 11)
- local b = d:FindFirstChild("beam2")
- if b then
- local beams = b:GetDescendants()
- for _, beam in ipairs(beams) do
- if beam:IsA("Beam") then
- beam.Enabled = true
- beam.Transparency = NumberSequence.new(1)
- local g = 0.8
- local s = (1 - g) / 10
- local ct = 1
- local rs = game:GetService("RunService")
- for i = 1, 10 do
- rs.Heartbeat:Wait()
- ct = ct - s
- beam.Transparency = NumberSequence.new(ct)
- end
- task.delay(0.28, function()
- local f = (1 - g) / 10
- for i = 1, 10 do
- rs.Heartbeat:Wait()
- g = g + f
- beam.Transparency = NumberSequence.new(math.min(g, 1))
- end
- end)
- end
- end
- end
- end
- end
- end
- end
- end)
- end)
- end)
- end)
- end)
- end
- end
- end)
- end
- local isActivatedEnabled = false
- local isEquippedConnected = false
- local isUnequippedConnected = false
- t.Activated:Connect(function()
- if isActivatedEnabled then
- rv()
- end
- end)
- local equipConnection, unequipConnection
- local function connectEquipAndUnequip()
- if not isEquippedConnected then
- equipConnection = t.Equipped:Connect(function()
- rv()
- end)
- isEquippedConnected = true
- end
- if not isUnequippedConnected then
- unequipConnection = t.Unequipped:Connect(function()
- rv()
- end)
- isUnequippedConnected = true
- end
- end
- local function disconnectEquipAndUnequip()
- if isEquippedConnected and equipConnection then
- equipConnection:Disconnect()
- isEquippedConnected = false
- end
- if isUnequippedConnected and unequipConnection then
- unequipConnection:Disconnect()
- isUnequippedConnected = false
- end
- end
- local function updateEventsBasedOnImage(iconImage)
- local player = game.Players.LocalPlayer
- local autoUnequip = player:GetAttribute("S_AutoUnequip")
- if autoUnequip == false then
- isActivatedEnabled = true
- disconnectEquipAndUnequip()
- clr = Color3.fromRGB(70, 166, 255)
- elseif autoUnequip == true then
- isActivatedEnabled = false
- connectEquipAndUnequip()
- clr = Color3.fromRGB(255, 78, 78)
- end
- end
- game:GetService("RunService").Heartbeat:Connect(function()
- local character = game.Players.LocalPlayer.Character
- if not character or not character.Parent then return end
- updateEventsBasedOnImage(iconImage)
- end)
- local ToolName = "Swift Sweep"
- local function Script()
- local h = game.Players.LocalPlayer.Character.HumanoidRootPart
- h.Anchored = true
- task.delay(1, function()
- h.Anchored = false
- end)
- local Original = "rbxassetid://7815618175" -- The animation ID you're detecting
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local detectionActive = true -- Flag to control detection
- -- Function to handle animation detection
- local function onAnimationPlayed(animationTrack)
- -- Check if detection is active and the animation ID matches
- if detectionActive and animationTrack.Animation.AnimationId == Original then
- -- Stop the detected animation
- animationTrack:Stop()
- -- Disable further detection after 7 seconds
- task.delay(0.65, function()
- detectionActive = false
- end)
- end
- end
- -- Connect the function to humanoid's AnimationPlayed event
- humanoid.AnimationPlayed:Connect(onAnimationPlayed)
- task.spawn(function()
- wait(0.2535)
- local l_Character_12 = game.Players.LocalPlayer.Character;
- local _ = l_Character_12.PrimaryPart;
- local v1627 = {};
- local v874 = {
- FollowUpKick = {
- Length = 0.383,
- CF = {
- {
- Time = 0,
- Value = CFrame.new(-0.4329986572265625, -0.7049999237060547, -0.173004150390625) * CFrame.Angles(-2.931734264329995, 0.7261442352922407, -0.56327010949613)
- },
- {
- Time = 0.05,
- Value = CFrame.new(-0.4329986572265625, -0.7049999237060547, -0.173004150390625) * CFrame.Angles(-2.931734264329995, 0.7261442352922407, -0.56327010949613)
- },
- {
- Time = 0.25,
- Value = CFrame.new(-0.4329986572265625, -0.7049999237060547, -0.173004150390625) * CFrame.Angles(0.37625808014493756, -0.8867843396457988, -2.6789756820561763)
- },
- {
- Time = 0.383,
- Value = CFrame.new(-0.4329986572265625, -0.7049999237060547, -0.173004150390625) * CFrame.Angles(-2.5432239728360573, 1.085315542060154, -0.6489657757690516)
- }
- },
- Transparency = {
- {
- Time = 0,
- Value = 1
- },
- {
- Time = 0.35,
- Value = 0.5
- },
- {
- Time = 0.383,
- Value = 1
- }
- }
- }
- };
- local function v873(v854, v855, v856)
- local v857 = {};
- for _, v859 in pairs(v854:GetChildren()) do
- v857[v859.Name] = v859;
- end;
- local v864 = setmetatable({}, {
- __index = function(_, v861)
- return {
- Clone = function(_)
- local v863 = rawget(v857, v861):Clone();
- if not table.find(v855, v863) then
- table.insert(v855, v863);
- end;
- return v863;
- end
- };
- end
- });
- local v865 = {
- _maid = {}
- };
- v865._maid.give = function(_, v867)
- if not table.find(v855, v867) then
- table.insert(v855, v867);
- end;
- return v867;
- end;
- v865._maid.giveTask = function(_, v869)
- if not table.find(v855, v869) then
- table.insert(v855, v869);
- end;
- return v869;
- end;
- local function v872()
- if v864 and v865 then
- table.clear(v864);
- table.clear(v865);
- end;
- if v857 then
- table.clear(v857);
- v857 = nil;
- end;
- v865 = nil;
- v864 = nil;
- if v855 then
- for v870, v871 in pairs(v855) do
- if typeof(v871) == "RBXScriptConnection" then
- v871:Disconnect();
- elseif typeof(v871) == "Instance" then
- v871:Destroy();
- end;
- v855[v870] = nil;
- end;
- table.clear(v855);
- end;
- v855 = nil;
- end;
- task.delay(v856 or 10, v872);
- return v864, v865, v872;
- end;
- local function v890(v875, v876, v877, v878)
- local v879 = v877 or 1;
- local v880 = v874[v876];
- local v881 = v878:Clone();
- v881.Parent = workspace.Thrown;
- v881:WaitForChild("Weld").Part0 = v875:WaitForChild("HumanoidRootPart");
- v881.Decal.Transparency = 1;
- v881.Weld.C0 = v880.CF[1].Value;
- for v882, v883 in pairs(v880.CF) do
- local v884 = v883.Time - (v880.CF[v882 - 1] and v880.CF[v882 - 1].Time or 0);
- local v885 = v880.CF[v882 - 1] and v880.CF[v882 - 1].Time or 0;
- task.delay(v885 / v879, function()
- game:GetService("TweenService"):Create(v881.Weld, TweenInfo.new(v884 / v879, Enum.EasingStyle.Linear), {
- C0 = v883.Value
- }):Play();
- end);
- end;
- for v886, v887 in pairs(v880.Transparency) do
- local v888 = v887.Time - (v880.Transparency[v886 - 1] and v880.Transparency[v886 - 1].Time or 0);
- local v889 = v880.Transparency[v886 - 1] and v880.Transparency[v886 - 1].Time or 0;
- task.delay(v889 / v879, function()
- game:GetService("TweenService"):Create(v881.Decal, TweenInfo.new(v888 / v879, Enum.EasingStyle.Linear), {
- Transparency = v887.Value
- }):Play();
- end);
- end;
- task.delay(v880.Length / v879, function()
- v881:Destroy();
- end);
- end;
- local v1628, _ = v873(game.ReplicatedStorage.Resources.KJEffects, v1627, 5);
- local v1633 = v1628.SweepCresc:Clone();
- v1633.CFrame = l_Character_12.HumanoidRootPart.CFrame * CFrame.new(0, -2.632, 0) * CFrame.Angles(0, 0.6981317007977318, 3.141592653589793);
- v1633.Parent = workspace.Thrown;
- game:GetService("TweenService"):Create(v1633.Decal, TweenInfo.new(0.133, Enum.EasingStyle.Linear), {
- Transparency = 0.8
- }):Play();
- task.delay(0.133, function()
- game:GetService("TweenService"):Create(v1633.Decal, TweenInfo.new(0.217, Enum.EasingStyle.Linear), {
- Transparency = 1
- }):Play();
- end);
- game:GetService("TweenService"):Create(v1633, TweenInfo.new(0.183, Enum.EasingStyle.Linear), {
- CFrame = l_Character_12.HumanoidRootPart.CFrame * CFrame.new(0, -2.632, 0) * CFrame.Angles(0, 2.6179938779914944, 3.141592653589793)
- }):Play();
- task.delay(0.183, function()
- game:GetService("TweenService"):Create(v1633, TweenInfo.new(0.167, Enum.EasingStyle.Linear), {
- CFrame = l_Character_12.HumanoidRootPart.CFrame * CFrame.new(0, -2.632, 0) * CFrame.Angles(0, 4.886921905584122, 3.141592653589793)
- }):Play();
- end);
- task.delay(0.033, function()
- local v1634 = v1628.particlespinner:Clone();
- v1634.CFrame = l_Character_12.HumanoidRootPart.CFrame * CFrame.new(0, -3, 0) * CFrame.Angles(0, 0.1484577061746377, 0);
- v1634.Parent = workspace.Thrown;
- v1634.Attachment.ParticleEmitter.Enabled = true;
- v1634.Attachment.rocks.Enabled = true;
- game:GetService("TweenService"):Create(v1634, TweenInfo.new(0.167, Enum.EasingStyle.Linear), {
- CFrame = l_Character_12.HumanoidRootPart.CFrame * CFrame.new(0, -2.632, 0) * CFrame.Angles(0, 2.9670597283903604, 0)
- }):Play();
- task.delay(0.167, function()
- v1634.Attachment.ParticleEmitter.Enabled = false;
- v1634.Attachment.rocks.Enabled = false;
- game:GetService("Debris"):AddItem(v1634, 9);
- end);
- end);
- end)
- local player = game.Players.LocalPlayer
- repeat wait() until player.Character.Humanoid
- local humanoid = player.Character.Humanoid
- local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
- local UserInputService = game:GetService("UserInputService")
- debounce = false -- Activate debounce
- local anim = Instance.new("Animation")
- anim.AnimationId = "rbxassetid://16944265635"
- local playAnim = humanoid:LoadAnimation(anim)
- anim.AnimationId = "rbxassetid://0" -- don't change anything here
- spawn(function()
- wait(1)
- debounce = true
- end)
- playAnim:Play()
- playAnim:AdjustSpeed(1)
- local Players = game:GetService("Players")
- local Character = Players.LocalPlayer.Character or Players.LocalPlayer.CharacterAdded:Wait()
- local animationPlayed = false
- local s = Instance.new("Sound")
- s.SoundId = "rbxassetid://16944636115"
- s.Volume = 1
- s.Parent = Character.HumanoidRootPart
- s:Play()
- wait(0.38)
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local replicatedStorage = game:GetService("ReplicatedStorage")
- local floatingRock = game.ReplicatedStorage.Resources.KJEffects.particlespinner
- -- Clone the FloatingRock part
- local rockClone = floatingRock:Clone()
- -- Set the rock's parent to Workspace
- rockClone.Parent = workspace
- rockClone.CanCollide = false
- rockClone.Anchored = false
- rockClone.Size = Vector3.new(1, 1, 1)
- -- Position the rock a little bit forward and left of the player
- local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
- rockClone.CFrame = humanoidRootPart.CFrame * CFrame.new(-6, -2.5, 0)
- -- Create a weld to attach the rock to the character
- local weld = Instance.new("WeldConstraint")
- weld.Part0 = humanoidRootPart
- weld.Part1 = rockClone
- weld.Parent = rockClone
- -- Function to fade out the ParticleEmitters and then destroy the particlespinner
- local function fadeOutAndDestroy()
- -- Find the Attachment in the rockClone
- local attachment = rockClone:FindFirstChild("Attachment")
- if attachment then
- -- Find all ParticleEmitters inside the Attachment
- local particleEmitters = attachment:GetChildren()
- for _, emitter in ipairs(particleEmitters) do
- if emitter:IsA("ParticleEmitter") then
- -- Fade out each ParticleEmitter from 0.3 to 1
- for i = 7, 10 do
- emitter.Transparency = NumberSequence.new(0.98 + (i / 10) * (1 - 0.98)) -- Fade from 0.3 to 1
- wait() -- Adjust duration for speed of fade out
- end
- end
- end
- end
- -- Destroy the entire particlespinner after fading out
- rockClone:Destroy()
- end
- -- Start the fade out process
- fadeOutAndDestroy()
- end
- local t = Instance.new("Tool")
- t.Name = ToolName
- t.RequiresHandle = false -- like holding an object if not add anything you will hold invisible thing
- t.CanBeDropped = false
- t.Parent = game.Players.LocalPlayer.Backpack
- t.Activated:Connect(function() -- instead of Activated you can do Equipped or Unequipped
- Script()
- end)
- local ToolName = "Collateral Ruin"
- local function Script()
- local k = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
- k.SoundId = "rbxassetid://17344162331"
- k:Play()
- local k = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
- k.SoundId = "rbxassetid://17325303798"
- k:Play()
- k.Volume = 2
- local p = game.Players.LocalPlayer
- local Humanoid = p.Character:WaitForChild("Humanoid")
- local AnimAnim = Instance.new("Animation")
- AnimAnim.AnimationId = "rbxassetid://17325254223"
- local Anim = Humanoid:LoadAnimation(AnimAnim)
- AnimAnim.AnimationId = "rbxassetid://0"
- Anim:Play()
- delay(1.2, function()
- local v = game.ReplicatedStorage.Resources.KJEffects.spinnerthing.spinningparty:Clone()
- v.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, c in ipairs(v:GetChildren()) do
- if c:IsA("ParticleEmitter") then
- c.Enabled = true
- delay(0.45, function()
- v:Destroy()
- end)
- end
- end
- local v = game.ReplicatedStorage.Resources.KJEffects.spinnerthing.spinningpartysmoke:Clone()
- v.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, c in ipairs(v:GetChildren()) do
- if c:IsA("ParticleEmitter") then
- c.Enabled = true
- delay(0.45, function()
- v:Destroy()
- end)
- end
- end
- end)
- wait(1.7)
- local boom1 = game.ReplicatedStorage.Resources.KJEffects["spinnerthing"].spinningpartysmoke:Clone()
- boom1.Parent = game.Players.LocalPlayer.Character:FindFirstChild("Torso") or game.Players.LocalPlayer.Character:FindFirstChild("UpperTorso")
- for _, child in ipairs(boom1:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(9) -- Emit particles
- end
- end
- local collateral1 = game.ReplicatedStorage.Resources.KJEffects["spinnyweenyspinner"].Attachment:Clone()
- collateral1.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, child in ipairs(collateral1:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(9)
- end
- end
- -- Clone spinnyweenyspinner's Emit and parent it to HumanoidRootPart
- local collateral2 = game.ReplicatedStorage.Resources.KJEffects["spinnyweenyspinner"].Emit:Clone()
- collateral2.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, child in ipairs(collateral2:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(9)
- end
- end
- -- (Complete this section based on the desired object you're cloning)
- local collateral4 = game.ReplicatedStorage.Resources.KJEffects["spinnerthing"].spinningpartysmoke:Clone() -- Assuming it’s this
- collateral4.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, child in ipairs(collateral4:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(10)
- end
- end
- local location = game.ReplicatedStorage.Resources.KJEffects.SpinnerEndWind.spinningemit
- local vfx = location:Clone()
- vfx.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, child in ipairs(vfx:GetChildren()) do
- if child:IsA("ParticleEmitter") then
- child:Emit(20)
- child.Enabled = true
- end
- end
- local fine3 = game.ReplicatedStorage.Resources.KJEffects["fine...Emit"].EmitBatch2:Clone()
- fine3.Parent = game.Players.LocalPlayer.Character["HumanoidRootPart"]
- for _, child in ipairs(fine3:GetChildren()) do
- if child:IsA("ParticleEmitter") then -- Check if the child is a ParticleEmitter
- child:Emit(1) -- Emit 20 particles
- end
- end
- local Sound = 17344162159
- local Volume = 1
- local Speed = 1
- s= Instance.new("Sound", game.Players.LocalPlayer.Character.HumanoidRootPart)
- s.SoundId = "rbxassetid://" .. Sound
- s:Play()
- s.Volume = Volume
- s.PlaybackSpeed = Speed
- end
- local t = Instance.new("Tool")
- t.Name = ToolName
- t.RequiresHandle = false -- like holding an object if not add anything you will hold invisible thing
- t.CanBeDropped = false
- t.Parent = game.Players.LocalPlayer.Backpack
- t.Activated:Connect(function() -- instead of Activated you can do Equipped or Unequipped
- Script()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement