Advertisement
Guest User

Roblox LOCAL SCRIPT

a guest
May 21st, 2019
3,536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2.  
  3. game.ReplicatedStorage:WaitForChild("Fade").OnClientEvent:Connect(function(option)
  4.     if option == "fade" then
  5.         script.Parent.Frame.BackgroundTransparency = 0
  6.         player:WaitForChild("PlayerGui"):SetTopbarTransparency(0)
  7.     else
  8.         for i = 1, 10 do
  9.             script.Parent.Frame.BackgroundTransparency = i/10
  10.             if player:WaitForChild("PlayerGui"):GetTopbarTransparency() < 0.5 then
  11.                 player.WaitForChild("PlayerGui"):SetTopbarTransparency(i/10)
  12.             end
  13.             wait()
  14.         end
  15.     end
  16. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement