Luriyuluri

[DIO's Time Stop Script]

May 17th, 2024 (edited)
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.58 KB | None | 0 0
  1. Press the button F Time Stop
  2.  
  3. keyboard
  4.  
  5. -- [DIO's Time Stop Script] --
  6.  
  7. -- Based on the main ability of DIO's Stand, The World, from Part 3 of JoJo's Bizarre Adventure.
  8.  
  9. -- MOST of everything in this script is written by Tsuagon, except for the screenshake part, that was taken from a tutorial. Credit to the people to made said tutorials and scripts.
  10.  
  11. ----------------------------------------------------------------------------------------------------
  12.  
  13. -- Player Stuff --
  14.  
  15. local player = game:GetService("Players").LocalPlayer
  16. local char = player.Character
  17. local head = char.Head
  18. local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  19. local root = char.HumanoidRootPart
  20. local humanoid = char.Humanoid
  21.  
  22. local playerhealth = humanoid.Health
  23.  
  24. local mouse = player:GetMouse()
  25.  
  26. ----------------------------------------------------------------------------------------------------
  27.  
  28. -- General Stuff --
  29.  
  30. local tween = game:GetService("TweenService")
  31. local lighting = game:GetService("Lighting")
  32. local input = game:GetService("UserInputService")
  33.  
  34. local frozenobjectstable = {}
  35.  
  36. seconds = 5 -- You can change the length in which time is stopped for by modifying this number.
  37.  
  38. stoppedtime = false
  39.  
  40. -- Time Stop Effect
  41.  
  42. local timestopeffect = Instance.new("ColorCorrectionEffect")
  43. timestopeffect.Parent = lighting
  44. timestopeffect.Saturation = 0
  45. timestopeffect.Contrast = 0
  46. timestopeffect.Enabled = true
  47.  
  48. -- Sphere Effect
  49.  
  50. local timestopsphere1 = Instance.new("Part")
  51. timestopsphere1.Parent = torso
  52. timestopsphere1.Material = Enum.Material.ForceField
  53. timestopsphere1.Size = Vector3.new(0, 0, 0)
  54. timestopsphere1.Shape = Enum.PartType.Ball
  55. timestopsphere1.CanCollide = false
  56. timestopsphere1.Massless = true
  57. timestopsphere1.Color = Color3.new(1, 1, 1)
  58. timestopsphere1.CastShadow = false
  59.  
  60. local sphere1weld = Instance.new("Weld")
  61. sphere1weld.Part0 = timestopsphere1
  62. sphere1weld.Part1 = torso
  63. sphere1weld.C0 = torso.CFrame
  64. sphere1weld.C1 = torso.CFrame
  65. sphere1weld.Parent = timestopsphere1
  66.  
  67. local timestopsphere2 = Instance.new("Part")
  68. timestopsphere2.Parent = torso
  69. timestopsphere2.Material = Enum.Material.ForceField
  70. timestopsphere2.Size = Vector3.new(0, 0, 0)
  71. timestopsphere2.Shape = Enum.PartType.Ball
  72. timestopsphere2.CanCollide = false
  73. timestopsphere2.Massless = true
  74. timestopsphere2.Color = Color3.new(1, 1, 1)
  75. timestopsphere2.CastShadow = false
  76.  
  77. local sphere2weld = Instance.new("Weld")
  78. sphere2weld.Part0 = timestopsphere2
  79. sphere2weld.Part1 = torso
  80. sphere2weld.C0 = torso.CFrame
  81. sphere2weld.C1 = torso.CFrame
  82. sphere2weld.Parent = timestopsphere2
  83.  
  84. local timestopsphere3 = Instance.new("Part")
  85. timestopsphere3.Parent = torso
  86. timestopsphere3.Material = Enum.Material.ForceField
  87. timestopsphere3.Size = Vector3.new(0, 0, 0)
  88. timestopsphere3.Shape = Enum.PartType.Ball
  89. timestopsphere3.CanCollide = false
  90. timestopsphere3.Massless = true
  91. timestopsphere3.Color = Color3.new(1, 1, 1)
  92. timestopsphere3.CastShadow = false
  93.  
  94. local sphere3weld = Instance.new("Weld")
  95. sphere3weld.Part0 = timestopsphere3
  96. sphere3weld.Part1 = torso
  97. sphere3weld.C0 = torso.CFrame
  98. sphere3weld.C1 = torso.CFrame
  99. sphere3weld.Parent = timestopsphere3
  100.  
  101. -- Sounds
  102.  
  103. local timestopvoiceline = Instance.new("Sound", head)
  104. timestopvoiceline.SoundId = "rbxassetid://7514417921"
  105. timestopvoiceline.Volume = 5
  106.  
  107. local injuredtimestopvoiceline = Instance.new("Sound", head)
  108. injuredtimestopvoiceline.SoundId = "rbxassetid://6043864223"
  109. injuredtimestopvoiceline.Volume = 5
  110.  
  111. local tssfx = Instance.new("Sound", head)
  112. tssfx.SoundId = "rbxassetid://5679636294"
  113. tssfx.Volume = 5
  114.  
  115. local timeresumevoiceline = Instance.new("Sound", head)
  116. timeresumevoiceline.SoundId = "rbxassetid://4329802996"
  117. timeresumevoiceline.Volume = 5
  118.  
  119. local injuredtimeresumevoiceline = Instance.new("Sound", head)
  120. injuredtimeresumevoiceline.SoundId = "rbxassetid://6043853981"
  121. injuredtimeresumevoiceline.Volume = 5
  122.  
  123. local countervoiceline = Instance.new("Sound", head)
  124. countervoiceline.SoundId = "rbxassetid://6675048510"
  125. countervoiceline.Volume = 5
  126.  
  127. local countersfx = Instance.new("Sound", head)
  128. countersfx.SoundId = "rbxassetid://4572672240"
  129. countersfx.Volume = 4.5
  130.  
  131. local tsteleportsfx = Instance.new("Sound", torso)
  132. tsteleportsfx.SoundId = "rbxassetid://3077287610"
  133. tsteleportsfx.Volume = 4.5
  134.  
  135. local clock = Instance.new("Sound", workspace)
  136. clock.SoundId = "rbxassetid://4940109913"
  137. clock.Volume = 4.5
  138. clock.Looped = true
  139.  
  140. ----------------------------------------------------------------------------------------------------
  141.  
  142. -- Main Script --
  143.  
  144. function timestop()
  145. if stoppedtime == true then return end
  146. if humanoid.Health < 50 then
  147. injuredtimestopvoiceline:Play()
  148. wait(1)
  149. tssfx:Play()
  150. elseif humanoid.Health > 50 then
  151. timestopvoiceline:Play()
  152. wait(1.6)
  153. end
  154. settings().Network.IncomingReplicationLag = math.huge
  155. for _, v in pairs(workspace:GetDescendants()) do
  156. if v:IsA("BasePart") then
  157. if not v.Anchored == true then
  158. if not v:IsDescendantOf(char) then
  159. v.Anchored = true
  160. table.insert(frozenobjectstable, v)
  161. end
  162. end
  163. end
  164. end
  165. coroutine.resume(coroutine.create(function()
  166. coroutine.resume(coroutine.create(function()
  167. timestopeffect.Enabled = true
  168. tween:Create(workspace.CurrentCamera, TweenInfo.new(1.5, Enum.EasingStyle.Exponential), {FieldOfView = 250}):Play();
  169. coroutine.resume(coroutine.create(function()
  170. while stoppedtime == false do
  171. tween:Create(timestopeffect, TweenInfo.new(0.8, Enum.EasingStyle.Quart), {Contrast = -2}):Play();
  172. wait(0.3)
  173. tween:Create(timestopeffect, TweenInfo.new(0.5, Enum.EasingStyle.Quart), {Saturation = -1}):Play();
  174. wait(0.2)
  175. tween:Create(timestopeffect, TweenInfo.new(0.5, Enum.EasingStyle.Quart), {Saturation = -2}):Play();
  176. wait()
  177. tween:Create(timestopeffect, TweenInfo.new(0.8, Enum.EasingStyle.Quart), {Contrast = -2.4}):Play();
  178. wait(0.3)
  179. tween:Create(timestopeffect, TweenInfo.new(0.5, Enum.EasingStyle.Quart), {Saturation = 1}):Play();
  180. wait(0.2)
  181. tween:Create(timestopeffect, TweenInfo.new(0.5, Enum.EasingStyle.Quart), {Saturation = -2}):Play();
  182. end
  183. end))
  184. wait(1.7)
  185. tween:Create(workspace.CurrentCamera, TweenInfo.new(1, Enum.EasingStyle.Quart), {FieldOfView = 70}):Play();
  186. tween:Create(timestopeffect, TweenInfo.new(1, Enum.EasingStyle.Quart), {Contrast = 0}):Play();
  187. tween:Create(timestopeffect, TweenInfo.new(1, Enum.EasingStyle.Quart), {Saturation = -0.8}):Play();
  188. end))
  189. coroutine.resume(coroutine.create(function()
  190. for _ = 1, 65 do
  191. wait()
  192. local offset1 = math.random(-650, 650) / 700
  193. local offset2 = math.random(-650, 650) / 700
  194. local offset3 = math.random(-650, 650) / 700
  195. tween:Create(humanoid, TweenInfo.new(0.1), {CameraOffset = Vector3.new(offset1, offset2, offset3)}):Play();
  196. end
  197. tween:Create(humanoid, TweenInfo.new(0.1), {CameraOffset = Vector3.new(0, 0, 0)}):Play();
  198. end))
  199. coroutine.resume(coroutine.create(function()
  200. tween:Create(timestopsphere1, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0), {Size = Vector3.new(45, 45, 45)}):Play();
  201. tween:Create(timestopsphere2, TweenInfo.new(1.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0), {Size = Vector3.new(40, 40, 40)}):Play();
  202. tween:Create(timestopsphere3, TweenInfo.new(1.7, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0), {Size = Vector3.new(35, 35, 35)}):Play();
  203. wait(1.7)
  204. tween:Create(timestopsphere1, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0), {Size = Vector3.new(0, 0, 0)}):Play();
  205. tween:Create(timestopsphere2, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0), {Size = Vector3.new(0, 0, 0)}):Play();
  206. tween:Create(timestopsphere3, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0), {Size = Vector3.new(0, 0, 0)}):Play();
  207. end))
  208. coroutine.resume(coroutine.create(function()
  209. for _, v in pairs(workspace:GetDescendants()) do
  210. if v:IsA("ParticleEmitter") then
  211. tween:Create(v, TweenInfo.new(3), {TimeScale = 0}):Play();
  212. end
  213. end
  214. for _, v in pairs(workspace:GetDescendants()) do
  215. if v:IsA("Fire") then
  216. tween:Create(v, TweenInfo.new(3), {TimeScale = 0}):Play();
  217. end
  218. end
  219. end))
  220. coroutine.resume(coroutine.create(function()
  221. for _, v in pairs(workspace:GetDescendants()) do
  222. if v:IsA("Sound") then
  223. if not v:IsDescendantOf(char) then
  224. tween:Create(v, TweenInfo.new(4), {PlaybackSpeed = 0}):Play();
  225. end
  226. end
  227. end
  228. end))
  229. end))
  230. stoppedtime = true
  231. wait(seconds)
  232. timeresume()
  233. end
  234.  
  235. function timeresume()
  236. if stoppedtime == false then return end
  237. if humanoid.Health < 50 then
  238. injuredtimeresumevoiceline:Play()
  239. wait(0.6)
  240. elseif humanoid.Health > 50 then
  241. timeresumevoiceline:Play()
  242. wait(0.9)
  243. end
  244. settings().Network.IncomingReplicationLag = 0
  245. for _, v in pairs(frozenobjectstable) do
  246. if v:IsA("BasePart") then
  247. v.Anchored = false
  248. end
  249. end
  250. coroutine.resume(coroutine.create(function()
  251. for _, v in pairs(workspace:GetDescendants()) do
  252. if v:IsA("ParticleEmitter") then
  253. tween:Create(v, TweenInfo.new(3), {TimeScale = 1}):Play();
  254. end
  255. end
  256. for _, v in pairs(workspace:GetDescendants()) do
  257. if v:IsA("Fire") then
  258. tween:Create(v, TweenInfo.new(3), {TimeScale = 1}):Play();
  259. end
  260. end
  261. end))
  262. coroutine.resume(coroutine.create(function()
  263. for _, v in pairs(workspace:GetDescendants()) do
  264. if v:IsA("Sound") then
  265. if not v:IsDescendantOf(char) then
  266. tween:Create(v, TweenInfo.new(2), {PlaybackSpeed = 1}):Play();
  267. end
  268. end
  269. end
  270. end))
  271. tween:Create(timestopeffect, TweenInfo.new(2, Enum.EasingStyle.Quart), {Saturation = 0}):Play();
  272. stoppedtime = false
  273. end
  274.  
  275. function tsteleport()
  276. if stoppedtime == true then return end
  277. tsteleportsfx:Play()
  278. coroutine.resume(coroutine.create(function()
  279. tween:Create(timestopeffect, TweenInfo.new(0.1), {TintColor = Color3.new(0, 0, 0)}):Play();
  280. wait(0.2)
  281. tween:Create(timestopeffect, TweenInfo.new(0.1), {TintColor = Color3.new(1, 1, 1)}):Play();
  282. end))
  283. root.CFrame = CFrame.new(mouse.Hit.p.X, mouse.Hit.p.Y, mouse.Hit.p.Z)
  284. end
  285.  
  286. --[[function counter()
  287. countervoiceline:Play()
  288. wait(0.6)
  289. humanoid.HealthChanged:Connect(function(health)
  290. if playerhealth > 100 then
  291. countersfx:Play()
  292. root.CFrame = root.CFrame + root.CFrame.lookVector * -20
  293. elseif health == playerhealth then return end
  294. end)
  295. end]]--
  296.  
  297. mouse.KeyDown:Connect(function(key)
  298. if key == "f" and stoppedtime == false then
  299. timestop()
  300. elseif key == "f" and stoppedtime == true then
  301. timeresume()
  302. end
  303. if key == "v" and stoppedtime == false then
  304. tsteleport()
  305. end
  306. end)
Advertisement
Add Comment
Please, Sign In to add comment