Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LightBrightness = 35 --Lights Brightness
- LightRange = 30 --Lights Range
- LKeyBind = "e" --Light on/off
- SKeyBind = "q" --Shadows on/off
- local mouse = game.Players.LocalPlayer:GetMouse()
- function Shadows()
- player = game.Players.LocalPlayer
- Char = player.Character
- Root = Char.HumanoidRootPart
- RootLight = Root:FindFirstChild("Light")
- if RootLight.Shadows == false then
- Root.Transparency = 0.5
- RootLight.Shadows = true
- elseif RootLight.Shadows == true then
- Root.Transparency = 1
- RootLight.Shadows = false
- end
- end
- function Light()
- player = game.Players.LocalPlayer
- Char = player.Character
- playerLight = Char.HumanoidRootPart:FindFirstChild("Light")
- playerHead = Char.Head
- if playerLight then
- if playerLight.Enabled == true then
- playerLight.Enabled = false
- elseif playerLight.Enabled == false then
- playerLight.Enabled = true
- playerLight.Color = playerHead.Color
- end
- else
- light = Instance.new("SurfaceLight",Char:FindFirstChild("HumanoidRootPart"))
- light.Name = "Light"
- light.Color = playerHead.Color
- light.Range = LightRange
- light.Brightness = LightBrightness
- light.Shadows = false
- end
- end
- mouse.KeyDown:connect(function(key)
- key = key:lower()
- if key == LKeyBind then
- Light()
- end
- if key == SKeyBind then
- Shadows()
- end
- end)
Add Comment
Please, Sign In to add comment