DISTROYER190

Untitled

Dec 15th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. --[[ Night Vision by EcIiptic - 5/8/14
  2. Edited by SneakySecretAgent - 5/14/15
  3. Put this in the starterpack.
  4. --]]
  5.  
  6. local Player = game.Players.LocalPlayer
  7.  
  8. local Brightness = 1000
  9. local Color = Color3.new(0/255,255/255,0/255)
  10. local Range = 30
  11.  
  12. local On = false
  13.  
  14. local First_Person_When_On = true
  15. local Original_Camera_Setting = Enum.CameraMode.Classic
  16.  
  17. Player:GetMouse().KeyDown:connect(function(Key)
  18. if (Key:lower() == "e") then
  19. if (On == false) then
  20. On = true
  21. if (First_Person_When_On == true) then
  22. Original_Camera_Setting = Player.CameraMode
  23. Player.CameraMode = Enum.CameraMode.LockFirstPerson
  24. local gui = Instance.new("ScreenGui")
  25. gui.Name = "Gui"
  26. local frame = Instance.new("ImageLabel")
  27. gui.Parent = Player.PlayerGui
  28. frame.Parent = gui
  29. gui.Parent = Player.PlayerGui
  30. frame.Size = UDim2.new(0,5000,0,5000)
  31. frame.BackgroundColor3 = Color3.new(0,170,0)
  32. frame.BackgroundTransparency = .8
  33. end
  34.  
  35. local Part = Instance.new("Part", game.Workspace.CurrentCamera)
  36. Part.Name = "NightVision"
  37. Part.CanCollide = false
  38. Part.Transparency = 1
  39. local Light = Instance.new("PointLight", Part)
  40. Light.Brightness = Brightness
  41. Light.Color = Color
  42. Light.Range = Range
  43. local Weld = Instance.new("Weld", Part)
  44. Weld.Part0 = Part
  45. Weld.Part1 = Player.Character.Head
  46. else
  47. On = false
  48. Player.CameraMode = Original_Camera_Setting
  49. local Search = game.Workspace.CurrentCamera:FindFirstChild("NightVision")
  50. local Check = Player.PlayerGui:FindFirstChild("Gui")
  51. if Player.Character.Humanoid.Health == 0 then
  52. Search:Destroy()
  53. Check:Destroy()
  54. end
  55. if (Search) then
  56. Search:Destroy()
  57. if (Check) then
  58. Check:Destroy()
  59. end
  60. end
  61. end
  62. end
  63. end)
  64. while wait() do
  65. if Player.Character.Humanoid.Health == 0 then
  66. Player.CameraMode = Original_Camera_Setting
  67. SearchGui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("Gui", true)
  68. SearchNV = game.Workspace.CurrentCamera:FindFirstChild("NightVision")
  69. if SearchGui and SearchNV then
  70. SearchGui:Destroy()
  71. SearchNV:Destroy()
  72. end
  73. end
  74. end
  75. local GuideGui = Instance.new("ScreenGui", Player:WaitForChild("PlayerGui"))
  76. local Box = Instance.new("TextLabel", GuideGui)
  77. Box.Size = UDim2.new(1,0,1,0)
  78. Box.BackgroundTransparency = 1
  79. Box.FontSize = "Size48"
  80. Box.TextColor3 = Color
  81. Box.Text = "Press 'e' to enable night vision"
  82. wait(1)
  83. for i = 0, 1, 0.1 do
  84. Box.TextTransparency = i
  85. wait(0.1)
  86. end
  87. GuideGui:Destroy()
Add Comment
Please, Sign In to add comment