Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. local mouse = game.Players.LocalPlayer:GetMouse()
  2. local running = false
  3. function sound()
  4. local sound = Instance.new("Sound")
  5. sound.SoundId = "rbxassetid://163621622"
  6. sound.Playing = true
  7. wait(sound.TimeLength)
  8. sound.Parent = nil
  9. end
  10. function getTool()
  11. for _, kid in ipairs(script.Parent:GetChildren()) do
  12. if kid.className == "Tool" then return kid end
  13. end
  14. return nil
  15. end
  16.  
  17.  
  18. mouse.KeyDown:connect(function (key) -- Run function
  19. key = string.lower(key)
  20. if string.byte(key) == 48 then
  21. running = true
  22. local keyConnection = mouse.KeyUp:connect(function (key)
  23. if string.byte(key) == 48 then
  24. running = false
  25. end
  26. end)
  27. for i = 1,5 do
  28. game.Workspace.CurrentCamera.FieldOfView = (70+(i*2))
  29. wait()
  30. end
  31. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 150
  32. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 70
  33. sound()
  34. repeat wait () until running == false
  35. keyConnection:disconnect()
  36. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  37. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50
  38. for i = 1,5 do
  39. game.Workspace.CurrentCamera.FieldOfView = (80-(i*2))
  40. wait()
  41. end
  42. end
  43. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement