Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.73 KB | None | 0 0
  1. u = game:GetService("UserInputService")
  2. s = game.ReplicatedStorage:FindFirstChild("Sound")
  3. --h = game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("Main_HUD").Mana.Bar.v
  4.  
  5. w = 1.9
  6. q = true
  7. u.InputBegan:Connect(function(f)
  8.     if f.UserInputType == Enum.UserInputType.Keyboard then
  9.         if f.KeyCode == Enum.KeyCode.Z and q and h.Value > 0 then
  10.             q=false
  11.             --h.Value = h.Value - 10
  12.             print("WORKS");
  13.             s:Play()
  14.             wait(w)
  15.             for _,v in pairs(workspace:GetChildren()) do
  16.             if v:IsA("Model") and v.Name~=game:GetService("Players").LocalPlayer.Name then
  17.                 for f,z in pairs(v:GetChildren()) do
  18.                     if z:IsA("Part") or z:IsA("MeshPart") then
  19.                         z.Anchored = f
  20.                         --local xp = Instance.new("Explosion")
  21.                         --xp.Position = z.Position
  22.                         --xp.Parent = z
  23.                     end
  24.                 end
  25.             end
  26.             end
  27.             if s.Playing then
  28.                 s.PlaybackSpeed = .8
  29.             end
  30.         end
  31.     end
  32. end)
  33.  
  34. s.Ended:connect(function()
  35.     wait(4)
  36.     for _,v in pairs(workspace:GetChildren()) do
  37.         if v:IsA("Model") and v.Name~=game:GetService("Players").LocalPlayer.Name then
  38.             for f,z in pairs(v:GetChildren()) do
  39.                 if z:IsA("Part") or z:IsA("MeshPart") then
  40.                     z.Anchored = false
  41.                 end
  42.             end
  43.         end
  44.     end
  45.     game:GetService("Lighting"):FindFirstChild("CO").Enabled = false
  46.     game:GetService("Lighting"):FindFirstChild("CO"):Destroy()
  47.     s.PlaybackSpeed = 1
  48.     print("STOPPED");
  49.     q=true
  50. end)
  51.  
  52. s.Played:connect(function()
  53.     wait(w)
  54.     game:GetService("ReplicatedStorage"):FindFirstChild("CO"):Clone().Parent = game:GetService("Lighting")
  55.     for i = 70, 145 do
  56.         workspace.CurrentCamera.FieldOfView = i
  57.         wait(.0009)
  58.     end
  59.     workspace.CurrentCamera.FieldOfView = 70
  60.     --for i = 120, 70, -1 do
  61.         --workspace.CurrentCamera.FieldOfView = i
  62.         --wait(.005)
  63.     --end
  64. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement