Hey there! I am a lua scripter here, and I need help from you guys to see if this would work (Studio not working) and this a night vision script. I made this more realistic by adding a gui that's green and the night vision can be accessed by KeyDown event, and there's a object on the player's head that turns the ambient to 20 and the color of it to lime green (or whatever it is) any ways, here it is (Note, this is a local script)
Repeat wait () until game.Players.LocalPlayer
Local p = game.Players.LocalPlayer--P is for player
Local m = p:GetMouse--m stands for mouse
Local folder = p.PlayerGui:WaitForChild("Night Vision Gui")-- Name of gui for night vision
m.KeyDown:connect(function(key)
If key: lower() == "N" then--N for night vision
Game.Player.NightVisionGear
Game.StarterGui.Visible then
game.StarterGui.NightVisionGui.Visible = False
Game.Player.NightVisionGear.Ambient = 0
Else
Game.StarterGui.NightVisionGui.Visible = True
Game.Player.NightVisionGear.Ambient = 20
End
end)
end)
Please tell me if something is wrong, and edit this or write the one easier than this. Thanks!
