Advertisement
Alief_Athallah

Day/Night Script

Aug 20th, 2020
1,750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local lighting = game.Lighting
  2. local btn = script.Parent
  3.  
  4. btn.MouseButton1Click:Connect(function()
  5.     if lighting.ClockTime == 10 then
  6.         lighting.ClockTime = 19
  7.         btn.Text = "Day" -- Text will change when you pressed the TextButton --
  8.        
  9.     else
  10.        
  11.         lighting.ClockTime = 10
  12.         btn.Text = "Night" -- Text Changed after pressed the Button --
  13.     end
  14. end)
  15.  
  16. ---[[ Script created by AliefAthallah ]]---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement