Advertisement
lllkkklkk

dio v8

Sep 17th, 2024
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.92 KB | None | 0 0
  1. -- Place this script in a LocalScript
  2.  
  3. local player = game.Players.LocalPlayer
  4. local character = player.Character or player.CharacterAdded:Wait()
  5. local userInputService = game:GetService("UserInputService")
  6. local runService = game:GetService("RunService")
  7. local tweenService = game:GetService("TweenService")
  8. local cooldown = false
  9. local cooldownTime = 6 -- Cooldown duration in seconds
  10.  
  11. local frozenPlayers = {}
  12.  
  13. -- Print welcome messages
  14. print("Welcome to Client Dio V1!! I had so much fun making this.")
  15. print("F to stop time")
  16. print("J to summon stand (not finished)")
  17.  
  18. -- Send a notification to the player
  19. game:GetService("StarterGui"):SetCore("SendNotification", {
  20. Title = "HEY!", -- Required
  21. Text = "check console for stuff!", -- Required
  22. Icon = "rbxassetid://1234567890" -- Optional
  23. })
  24.  
  25. -- Function to freeze a player
  26. local function freezePlayer(otherCharacter)
  27. if otherCharacter and otherCharacter:FindFirstChild("HumanoidRootPart") then
  28. otherCharacter.HumanoidRootPart.Anchored = true
  29. frozenPlayers[otherCharacter] = true
  30. end
  31. end
  32.  
  33. -- Function to unfreeze a player
  34. local function unfreezePlayer(otherCharacter)
  35. if otherCharacter and otherCharacter:FindFirstChild("HumanoidRootPart") then
  36. otherCharacter.HumanoidRootPart.Anchored = false
  37. frozenPlayers[otherCharacter] = nil
  38. end
  39. end
  40.  
  41. -- Function to check if a player's camera is inside the domain
  42. local function isCameraInDomain(domain)
  43. local camera = workspace.CurrentCamera
  44. local distance = (camera.CFrame.Position - domain.Position).Magnitude
  45. return distance <= domain.Size.X / 2
  46. end
  47.  
  48. -- Function to apply black and white vision
  49. local function applyBlackAndWhiteVision()
  50. if not workspace.CurrentCamera:FindFirstChild("BlackAndWhiteEffect") then
  51. local colorCorrection = Instance.new("ColorCorrectionEffect")
  52. colorCorrection.Name = "BlackAndWhiteEffect"
  53. colorCorrection.Saturation = -1
  54. colorCorrection.Contrast = 0.5
  55. colorCorrection.Parent = workspace.CurrentCamera
  56. end
  57. end
  58.  
  59. -- Function to remove black and white vision
  60. local function removeBlackAndWhiteVision()
  61. if workspace.CurrentCamera:FindFirstChild("BlackAndWhiteEffect") then
  62. workspace.CurrentCamera:FindFirstChild("BlackAndWhiteEffect"):Destroy()
  63. end
  64. end
  65.  
  66. -- Function to monitor camera position and apply/remove vision effect
  67. local function monitorCamera(domain)
  68. local connection
  69. connection = runService.RenderStepped:Connect(function()
  70. if domain and domain.Parent then
  71. if isCameraInDomain(domain) then
  72. applyBlackAndWhiteVision()
  73. else
  74. removeBlackAndWhiteVision()
  75. end
  76. else
  77. connection:Disconnect()
  78. removeBlackAndWhiteVision() -- Ensure the effect is removed when the domain is gone
  79. end
  80. end)
  81. end
  82.  
  83. -- Function to create the domain
  84. local function createDomain()
  85. if cooldown then return end
  86. cooldown = true
  87.  
  88. -- Create the domain part
  89. local domain = Instance.new("Part")
  90. domain.Size = Vector3.new(26, 26, 26) -- Make the domain 1.3x larger
  91. domain.Shape = Enum.PartType.Ball -- Set the shape to a sphere (circle)
  92. domain.Material = Enum.Material.Glass -- Set material to Glass
  93. domain.Transparency = 0.5 -- Adjust transparency to make it more glass-like
  94. domain.Anchored = false
  95. domain.CanCollide = false
  96. domain.CastShadow = false -- Disable shadows for the domain
  97. domain.Parent = workspace
  98. domain.CFrame = character.HumanoidRootPart.CFrame -- Position it at the player
  99.  
  100. -- Attach the domain to the player
  101. local attachment0 = Instance.new("Attachment", domain)
  102. local attachment1 = Instance.new("Attachment", character.HumanoidRootPart)
  103. local rigidConstraint = Instance.new("RigidConstraint")
  104. rigidConstraint.Attachment0 = attachment0
  105. rigidConstraint.Attachment1 = attachment1
  106. rigidConstraint.Parent = domain
  107.  
  108. -- Play the sound when F is pressed
  109. local sound = Instance.new("Sound")
  110. sound.SoundId = "rbxassetid://7514417921"
  111. sound.Volume = 0.5
  112. sound.Parent = character.HumanoidRootPart
  113. sound:Play()
  114.  
  115. -- Freeze other players inside the domain
  116. domain.Touched:Connect(function(hit)
  117. local otherCharacter = hit.Parent
  118. if otherCharacter and otherCharacter:FindFirstChild("HumanoidRootPart") then
  119. local otherPlayer = game.Players:GetPlayerFromCharacter(otherCharacter)
  120. if otherPlayer and otherPlayer ~= player then
  121. freezePlayer(otherCharacter)
  122. end
  123. end
  124. end)
  125.  
  126. -- Monitor camera position for vision effect
  127. monitorCamera(domain)
  128.  
  129. -- Destroy the domain and unfreeze players after 6 seconds
  130. game:GetService("Debris"):AddItem(domain, 6)
  131. wait(6)
  132. for otherCharacter, _ in pairs(frozenPlayers) do
  133. unfreezePlayer(otherCharacter)
  134. end
  135.  
  136. -- Remove vision effect when domain is gone
  137. removeBlackAndWhiteVision()
  138.  
  139. -- Cooldown
  140. wait(cooldownTime)
  141. cooldown = false
  142. end
  143.  
  144. -- Function to summon fog and play sound when J is pressed
  145. local function summonFog()
  146. -- Create the ParticleEmitter for fog
  147. local fogEmitter = Instance.new("ParticleEmitter")
  148. fogEmitter.Texture = "rbxasset://textures/particles/smoke_main.dds" -- Use a smoke texture for fog
  149. fogEmitter.Color = ColorSequence.new(Color3.fromRGB(105, 105, 105)) -- Adjust color as needed
  150. fogEmitter.LightInfluence = 0
  151. fogEmitter.Size = NumberSequence.new(3) -- Size of the particles (smaller size)
  152. fogEmitter.Lifetime = NumberRange.new(5) -- How long each particle lasts
  153. fogEmitter.Rate = 50 -- How many particles are emitted per second
  154. fogEmitter.Speed = NumberRange.new(0.5) -- Speed of the particles
  155. fogEmitter.Rotation = NumberRange.new(0, 360)
  156. fogEmitter.RotSpeed = NumberRange.new(10)
  157. fogEmitter.SpreadAngle = Vector2.new(360, 360)
  158. fogEmitter.Parent = character.HumanoidRootPart -- Attach the emitter to the character
  159.  
  160. -- Play the sound and remove the fog when the sound finishes
  161. local sound = Instance.new("Sound")
  162. sound.SoundId = "rbxassetid://6921086445"
  163. sound.Volume = 0.5
  164. sound.Parent = character.HumanoidRootPart
  165. sound:Play()
  166.  
  167. sound.Ended:Connect(function()
  168. -- Destroy the ParticleEmitter
  169. fogEmitter:Destroy()
  170. end)
  171. end
  172.  
  173. -- Function to create and weld a new avatar to the player
  174. local function createAndWeldAvatar()
  175. -- Clone the player's character
  176. local newAvatar = character:Clone()
  177. newAvatar.Parent = workspace
  178.  
  179. -- Position the new avatar to the side of the player
  180. local offset = Vector3.new(5, 0, 0) -- Adjust the offset to position it to the side
  181. newAvatar:SetPrimaryPartCFrame(character.HumanoidRootPart.CFrame * CFrame.new(offset))
  182.  
  183. -- Weld the new avatar to the player's character
  184. for _, part in pairs(newAvatar:GetChildren()) do
  185. if part:IsA("BasePart") then
  186. local weld = Instance.new("WeldConstraint")
  187. weld.Part0 = part
  188. weld.Part1 = character:FindFirstChild(part.Name)
  189. weld.Parent = part
  190. end
  191. end
  192.  
  193. -- Ensure the new avatar is anchored to the player
  194. local attachment0 = Instance.new("Attachment", newAvatar.HumanoidRootPart)
  195. local attachment1 = Instance.new("Attachment", character.HumanoidRootPart)
  196. local rigidConstraint = Instance.new("RigidConstraint")
  197. rigidConstraint.Attachment0 = attachment0
  198. rigidConstraint.Attachment1 = attachment1
  199. rigidConstraint.Parent = newAvatar.HumanoidRootPart
  200. end
  201.  
  202. -- Function to detect key press
  203. userInputService.InputBegan:Connect(function(input, gameProcessed)
  204. if not gameProcessed and input.KeyCode == Enum.KeyCode.F then
  205. createDomain()
  206. elseif not gameProcessed and input.KeyCode == Enum.KeyCode.J then
  207. summonFog()
  208. createAndWeldAvatar()
  209. end
  210. end)
  211.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement