Client:
local Players = game:GetService("Players")
local TS = game:GetService("TweenService")
local plr = Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local humanoid = char.Humanoid
local hoverSound = game.SoundService.SoundEffects.hover
local clickSound = game.SoundService.SoundEffects.click
humanoid.BreakJointsOnDeath = false
local blurEffect = game.Lighting.HealthBlur
local colorEffect = game.Lighting.HealthColor
local stunSound = game.SoundService.SoundEffects.concussion
local respawnGui = plr.PlayerGui.Other.RespawnButton
local blackGui = plr.PlayerGui.BlackScreen.BlackScreen
local loadCharacterEvent = game.ReplicatedStorage.Events.ClientToServer:WaitForChild("LoadCharacter")
local ragdollEvent = game.ReplicatedStorage.Events.ClientToServer:WaitForChild("Ragdoll")
humanoid.Died:Connect(function()
humanoid.PlatformStand = true
print("blud died")
ragdollEvent:FireServer(char)
stunSound:Play()
blurEffect.Size = 12
colorEffect.TintColor = Color3.fromRGB(200, 100, 100)
local tween = TS:Create(blurEffect,
TweenInfo.new(4, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0.5, false),
{Size = 50}
)
local tween2 = TS:Create(colorEffect,
TweenInfo.new(4, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0.5, false),
{TintColor = Color3.fromRGB(60, 30, 30)}
)
task.wait(1)
tween:Play()
tween2:Play()
tween.Completed:Connect(function()
print("uhh")
task.wait(0.2)
TS:Create(respawnGui,
TweenInfo.new(.6, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out),
{Size = UDim2.fromScale(0.3, 0.06)}
):Play()
respawnGui.Visible = true
respawnGui.MouseEnter:Connect(function()
hoverSound:Play()
TS:Create(respawnGui.UIStroke, TweenInfo.new(.2), {Color = Color3.fromRGB(200, 200, 200)}):Play()
end)
respawnGui.MouseLeave:Connect(function()
TS:Create(respawnGui.UIStroke, TweenInfo.new(.2), {Color = Color3.fromRGB(12, 12, 12)}):Play()
end)
respawnGui.TextButton.MouseButton1Click:Connect(function()
clickSound:Play()
local tween = TS:Create(respawnGui,
TweenInfo.new(.4, Enum.EasingStyle.Back, Enum.EasingDirection.In),
{Size = UDim2.fromScale(0, 0)}
)
tween:Play()
task.wait(.35)
print("1")
respawnGui.Visible = false
blackGui.Transparency = 1
blackGui.Visible = true
TS:Create(blackGui, TweenInfo.new(2), {BackgroundTransparency = 0}):Play()
task.wait(1.65)
print("2")
loadCharacterEvent:FireServer(plr)
repeat task.wait() print("e") until workspace:FindFirstChild(plr.Name)
char = workspace[plr.Name]
humanoid = workspace[plr.Name]:WaitForChild("Humanoid")
print(char.Name)
print(humanoid.Parent.Name)
task.wait(1)
print("3")
blurEffect.Size = 18
local tween2 = TS:Create(blackGui, TweenInfo.new(2), {BackgroundTransparency = 1})
local tween3 = TS:Create(blurEffect, TweenInfo.new(3), {Size = 0})
tween2:Play()
tween3:Play()
tween2.Completed:Connect(function()
print("4")
blackGui.Visible = false
blackGui.Transparency = 0
end)
end)
end)
end)