local debounce = false local userinputservice = game:GetService("UserInputService") userinputservice.InputBegan:Connect(function(input, gameProcessedEvent) if not debounce then debounce = true script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.1 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.2 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.3 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.4 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.5 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.6 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.7 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.8 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.9 wait(1) script.Parent.ScreenGui.Frame.BackgroundTransparency = 1 wait(1) wait(10) debounce = false end end)
Fading GUI script :
local TweenService = game:GetService('TweenService') local Frame = script.Parent
TweenService:Create( Frame, -- UI object you're tweening, in this case it's Frame TweenInfo.new(2), -- Amount of seconds {BackgroundTransparency = 1} -- Goal ):Play() -- Plays your tween