REDPlays

JoJo Part 4 Scripts

Jan 20th, 2020
8,327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. --//Local Scripts for the World, aka time stop
  2.  
  3. local Player = game:GetService("Players").LocalPlayer
  4.  
  5. local rp = game:GetService("ReplicatedStorage")
  6. local World = rp:WaitForChild("World")
  7.  
  8. local UIS = game:GetService("UserInputService")
  9.  
  10. local debounce = false
  11. local cooldown = 10
  12.  
  13. UIS.InputBegan:Connect(function(input,IsTyping)
  14. if IsTyping then
  15. return
  16. elseif input.KeyCode == Enum.KeyCode.C then
  17.  
  18. if workspace:FindFirstChild(Player.Name.." Stand") then
  19. if debounce == false then
  20. debounce = true
  21.  
  22. World:FireServer()
  23. end
  24. end
  25.  
  26. end
  27. end)
  28.  
  29. World.OnClientEvent:Connect(function()
  30. wait(cooldown)
  31. debounce = false
  32. end)
  33.  
  34. --//Server scripts for the world, aka time stop
  35.  
  36. local rp = game:GetService("ReplicatedStorage")
  37. local World = rp:WaitForChild("World")
  38. local TweenService = game:GetService("TweenService")
  39. local Debris = game:GetService("Debris")
  40.  
  41. local range = 100
  42. local duration = 3
  43.  
  44. World.OnServerEvent:Connect(function(Player)
  45. local Stand = workspace:FindFirstChild(Player.Name.." Stand"):WaitForChild("Dummy")
  46.  
  47. if Stand then
  48. local Character = Player.Character
  49. local Humanoid = Character:WaitForChild("Humanoid")
  50. local HumanoidRP = Character:WaitForChild("HumanoidRootPart")
  51.  
  52. local prevWeld = Stand:WaitForChild("HumanoidRootPart"):WaitForChild("Stand Weld")
  53. prevWeld:Destroy()
  54.  
  55. Stand:WaitForChild("HumanoidRootPart").CFrame = HumanoidRP.CFrame * CFrame.new(0,-.5,-3)
  56.  
  57. local weld = Instance.new("ManualWeld")
  58. weld.Name = "Stand Weld"
  59. weld.Part0 = Stand:WaitForChild("HumanoidRootPart")
  60. weld.Part1 = HumanoidRP
  61. weld.C0 = Stand:WaitForChild("HumanoidRootPart").CFrame:inverse() * HumanoidRP.CFrame
  62. weld.Parent = weld.Part0
  63.  
  64. local animControl = Stand:WaitForChild("AnimControl")
  65. for i, track in pairs(animControl:GetPlayingAnimationTracks()) do
  66. track:Stop()
  67. end
  68.  
  69. local Spread = animControl:LoadAnimation(script.Spread)
  70. Spread:Play()
  71.  
  72. local Folder = Instance.new("Folder",workspace)
  73. Folder.Name = Player.Name.." The World"
  74.  
  75. local Orb = script.Orb:Clone()
  76. Orb.CFrame = Stand:WaitForChild("HumanoidRootPart").CFrame
  77. Orb.Orientation = Character:WaitForChild("HumanoidRootPart").Orientation
  78. Orb.Parent = Folder
  79.  
  80. local goal = {}
  81. goal.Size = Orb.Size + Vector3.new(100,100,100)
  82. local info = TweenInfo.new(1,Enum.EasingStyle.Elastic,Enum.EasingDirection.InOut,0,false,.25)
  83. local tween = TweenService:Create(Orb,info,goal)
  84. tween:Play()
  85.  
  86. spawn(function()
  87. wait(.5)
  88. for i, chars in pairs(workspace:GetChildren()) do
  89. if chars:FindFirstChild("Humanoid") then
  90. if chars ~= Character then
  91. for j, part in pairs(chars:GetChildren()) do
  92. if part:IsA("MeshPart") or part:IsA("Part") then
  93. spawn(function()
  94. part.Anchored = true
  95. wait(duration)
  96. part.Anchored = false
  97. end)
  98. end
  99. end
  100. end
  101. end
  102. end
  103. end)
  104.  
  105. spawn(function()
  106. wait(1)
  107. local prevWeld = Stand:WaitForChild("HumanoidRootPart"):WaitForChild("Stand Weld")
  108. prevWeld:Destroy()
  109.  
  110. Stand:WaitForChild("HumanoidRootPart").CFrame = HumanoidRP.CFrame * CFrame.new(2,0,2)
  111.  
  112. local weld = Instance.new("ManualWeld")
  113. weld.Name = "Stand Weld"
  114. weld.Part0 = Stand:WaitForChild("HumanoidRootPart")
  115. weld.Part1 = HumanoidRP
  116. weld.C0 = Stand:WaitForChild("HumanoidRootPart").CFrame:inverse() * HumanoidRP.CFrame
  117. weld.Parent = weld.Part0
  118.  
  119. for i, track in pairs(animControl:GetPlayingAnimationTracks()) do
  120. track:Stop()
  121. end
  122.  
  123. local Idle = animControl:LoadAnimation(script.Idle)
  124. Idle:Play()
  125. end)
  126.  
  127. wait(duration)
  128. Debris:AddItem(Orb,1)
  129.  
  130. local goal2 = {}
  131. goal2.Size = Orb.Size - Orb.Size
  132. local info2 = TweenInfo.new(1,Enum.EasingStyle.Elastic,Enum.EasingDirection.InOut,0,false,.25)
  133. local tween2 = TweenService:Create(Orb,info2,goal2)
  134. tween2:Play()
  135.  
  136. World:FireClient(Player)
  137. end
  138. end)
Advertisement
Add Comment
Please, Sign In to add comment