0% found this document useful (0 votes)
868 views5 pages

Za Warudo Script

The document is a script for a game that implements a time stop mechanic for a player character. It includes player and character setup, sound effects, visual effects, and logic for stopping and resuming time, as well as teleportation functionality. The script utilizes various game services and includes event listeners for player actions and character state changes.

Uploaded by

dsndengu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
868 views5 pages

Za Warudo Script

The document is a script for a game that implements a time stop mechanic for a player character. It includes player and character setup, sound effects, visual effects, and logic for stopping and resuming time, as well as teleportation functionality. The script utilizes various game services and includes event listeners for player actions and character state changes.

Uploaded by

dsndengu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

-- [DIO's Time Stop Script] --

-----------------------------------------------------------------------------------
-----------------

-- Player & Character Setup --

local Players = game:GetService("Players")


local player = Players.LocalPlayer
local mouse = player:GetMouse()

local char, head, torso, root, humanoid

local function updateCharacter()


char = player.Character or player.CharacterAdded:Wait()
head = char:WaitForChild("Head")
torso = char:FindFirstChild("Torso") or char:WaitForChild("UpperTorso")
root = char:WaitForChild("HumanoidRootPart")
humanoid = char:WaitForChild("Humanoid")
end

-- Re-setup on respawn
player.CharacterAdded:Connect(function()
wait()
updateCharacter()
setupSounds()
monitorDeath()
end)

updateCharacter()

-----------------------------------------------------------------------------------
-----------------

-- General Setup --

local tween = game:GetService("TweenService")


local lighting = game:GetService("Lighting")
local frozenobjectstable = {}

local seconds = 10
local stoppedtime = false

-- Color Correction Effect --


local timestopeffect = Instance.new("ColorCorrectionEffect")
timestopeffect.Parent = lighting
timestopeffect.Saturation = 0
timestopeffect.Contrast = 0
timestopeffect.Enabled = true

-----------------------------------------------------------------------------------
-----------------

-- Sphere Effects --

local function createTimeSphere(size, weldPart)


local part = Instance.new("Part")
part.Parent = weldPart
part.Material = Enum.Material.ForceField
part.Size = Vector3.new(0, 0, 0)
part.Shape = Enum.PartType.Ball
part.CanCollide = false
part.Massless = true
part.Color = Color3.new(1, 1, 1)
part.CastShadow = false

local weld = Instance.new("Weld")


weld.Part0 = part
weld.Part1 = weldPart
weld.C0 = weldPart.CFrame
weld.C1 = weldPart.CFrame
weld.Parent = part

return part
end

local timestopsphere1 = createTimeSphere(45, torso)


local timestopsphere2 = createTimeSphere(40, torso)
local timestopsphere3 = createTimeSphere(35, torso)

-----------------------------------------------------------------------------------
-----------------

-- Sound Setup --

local timestopvoiceline, injuredtimestopvoiceline, tssfx


local timeresumevoiceline, injuredtimeresumevoiceline
local countervoiceline, countersfx, tsteleportsfx
local clock

function setupSounds()
timestopvoiceline = Instance.new("Sound", head)
timestopvoiceline.SoundId = "rbxassetid://7514417921"
timestopvoiceline.Volume = 5

injuredtimestopvoiceline = Instance.new("Sound", head)


injuredtimestopvoiceline.SoundId = "rbxassetid://6043864223"
injuredtimestopvoiceline.Volume = 5

tssfx = Instance.new("Sound", head)


tssfx.SoundId = "rbxassetid://5679636294"
tssfx.Volume = 5

timeresumevoiceline = Instance.new("Sound", head)


timeresumevoiceline.SoundId = "rbxassetid://4329802996"
timeresumevoiceline.Volume = 5

injuredtimeresumevoiceline = Instance.new("Sound", head)


injuredtimeresumevoiceline.SoundId = "rbxassetid://6043853981"
injuredtimeresumevoiceline.Volume = 5

countervoiceline = Instance.new("Sound", head)


countervoiceline.SoundId = "rbxassetid://6675048510"
countervoiceline.Volume = 5

countersfx = Instance.new("Sound", head)


countersfx.SoundId = "rbxassetid://4572672240"
countersfx.Volume = 4.5
tsteleportsfx = Instance.new("Sound", torso)
tsteleportsfx.SoundId = "rbxassetid://3077287610"
tsteleportsfx.Volume = 4.5

clock = Instance.new("Sound", workspace)


clock.SoundId = "rbxassetid://4940109913"
clock.Volume = 4.5
clock.Looped = true
end

setupSounds()

-- Stop if you die during time stop


function monitorDeath()
if humanoid then
humanoid.Died:Connect(function()
if stoppedtime then
timeresume()
end
end)
end
end

monitorDeath()

-----------------------------------------------------------------------------------
-----------------

-- Time Stop Logic --

function timestop()
if stoppedtime == true then return end
if not char or not humanoid or humanoid.Health <= 0 then return end

if humanoid.Health < 50 then


injuredtimestopvoiceline:Play()
wait(1)
tssfx:Play()
else
timestopvoiceline:Play()
wait(1.6)
end

settings().Network.IncomingReplicationLag = math.huge

for _, v in pairs(workspace:GetDescendants()) do
if v:IsA("BasePart") and not v.Anchored and not v:IsDescendantOf(char)
then
v.Anchored = true
table.insert(frozenobjectstable, v)
end
end

stoppedtime = true

coroutine.wrap(function()
timestopeffect.Enabled = true
tween:Create(workspace.CurrentCamera, TweenInfo.new(1.5,
Enum.EasingStyle.Exponential), {FieldOfView = 250}):Play()
wait(1.7)
tween:Create(workspace.CurrentCamera, TweenInfo.new(1,
Enum.EasingStyle.Quart), {FieldOfView = 70}):Play()
tween:Create(timestopeffect, TweenInfo.new(1), {Contrast = 0}):Play()
tween:Create(timestopeffect, TweenInfo.new(1), {Saturation = -
0.8}):Play()
end)()

coroutine.wrap(function()
for i = 1, 65 do
wait()
local offset = Vector3.new(math.random(-650, 650), math.random(-
650, 650), math.random(-650, 650)) / 700
tween:Create(humanoid, TweenInfo.new(0.1), {CameraOffset =
offset}):Play()
end
tween:Create(humanoid, TweenInfo.new(0.1), {CameraOffset =
Vector3.new(0, 0, 0)}):Play()
end)()

coroutine.wrap(function()
tween:Create(timestopsphere1, TweenInfo.new(1), {Size = Vector3.new(45,
45, 45)}):Play()
tween:Create(timestopsphere2, TweenInfo.new(1.4), {Size =
Vector3.new(40, 40, 40)}):Play()
tween:Create(timestopsphere3, TweenInfo.new(1.7), {Size =
Vector3.new(35, 35, 35)}):Play()
wait(1.7)
tween:Create(timestopsphere1, TweenInfo.new(1), {Size = Vector3.new(0,
0, 0)}):Play()
tween:Create(timestopsphere2, TweenInfo.new(1), {Size = Vector3.new(0,
0, 0)}):Play()
tween:Create(timestopsphere3, TweenInfo.new(1), {Size = Vector3.new(0,
0, 0)}):Play()
end)()

for _, v in pairs(workspace:GetDescendants()) do
if v:IsA("ParticleEmitter") or v:IsA("Fire") then
tween:Create(v, TweenInfo.new(3), {TimeScale = 0}):Play()
elseif v:IsA("Sound") and not v:IsDescendantOf(char) then
tween:Create(v, TweenInfo.new(4), {PlaybackSpeed = 0}):Play()
end
end

wait(seconds)
timeresume()
end

function timeresume()
if stoppedtime == false then return end

if humanoid and humanoid.Health <= 0 then return end

if humanoid.Health < 50 then


injuredtimeresumevoiceline:Play()
wait(0.6)
else
timeresumevoiceline:Play()
wait(0.9)
end

settings().Network.IncomingReplicationLag = 0

for _, v in pairs(frozenobjectstable) do
if v:IsA("BasePart") then
v.Anchored = false
end
end

for _, v in pairs(workspace:GetDescendants()) do
if v:IsA("ParticleEmitter") or v:IsA("Fire") then
tween:Create(v, TweenInfo.new(3), {TimeScale = 1}):Play()
elseif v:IsA("Sound") and not v:IsDescendantOf(char) then
tween:Create(v, TweenInfo.new(2), {PlaybackSpeed = 1}):Play()
end
end

tween:Create(timestopeffect, TweenInfo.new(2), {Saturation = 0}):Play()


stoppedtime = false
end

function tsteleport()
if stoppedtime == true then return end
tsteleportsfx:Play()
tween:Create(timestopeffect, TweenInfo.new(0.1), {TintColor = Color3.new(0,
0, 0)}):Play()
wait(0.2)
tween:Create(timestopeffect, TweenInfo.new(0.1), {TintColor = Color3.new(1,
1, 1)}):Play()
root.CFrame = CFrame.new(mouse.Hit.p.X, mouse.Hit.p.Y, mouse.Hit.p.Z)
end

mouse.KeyDown:Connect(function(key)
if key == "f" then
if stoppedtime then
timeresume()
else
timestop()
end
elseif key == "v" and not stoppedtime then
tsteleport()
end
end)

You might also like