Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Lighting = game:GetService("Lighting") -- Defining The Lighting Service!
- local Button = script.Parent.ShadowButton -- Getting The Button From The GUI
- local On = true -- Setting A Variable To Keep Track Of The State Of The Shadows
- Button.MouseButton1Click:Connect(function() -- Connecting If It Is Clicked
- if On == false then -- Checking If On Is False / Shadows Is Off
- Lighting.GlobalShadows = true
- Button.Text = "Shadows : ON" -- Setting The Text On The GUI To Show The Shadows Are On
- On = true -- Setting The Variable To True To Keep Track Of The State
- else -- Otherwise
- Lighting.GlobalShadows = false
- Button.Text = "Shadows : OFF" -- Setting The Text On The GUI To Show The Shadows Are Off
- On = false -- Setting The Variable To False To Keep Track Of The State
- end
- end) -- Ending The Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement