Advertisement
LordMuhamad

green fixed xddddd

Mar 24th, 2025
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. -- Services
  2. local TweenService = game:GetService("TweenService")
  3. local player = game.Players.LocalPlayer
  4. local screenGui = player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui")
  5.  
  6. -- Create the ImageLabel
  7. local imageLabel = Instance.new("ImageLabel")
  8. imageLabel.Parent = screenGui
  9. imageLabel.Size = UDim2.new(0, 138, 0, 138) -- Size: 138x138
  10. imageLabel.Position = UDim2.new(0.01, 0, 0.813, 0) -- Position as specified
  11. imageLabel.Image = "rbxassetid://104147423617326" -- Using the provided Decal ID
  12. imageLabel.Visible = true -- Make it visible
  13. imageLabel.ImageTransparency = 1 -- Start with fully transparent image
  14. imageLabel.BackgroundTransparency = 1 -- Make the background fully transparent
  15.  
  16. -- Function to smoothly change transparency twice and then hide smoothly
  17. local function changeTransparencyTwiceAndHideSmoothly()
  18. -- Fade the image in (make it visible)
  19. local tweenInfoIn = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
  20. local goalIn = {ImageTransparency = 0} -- Make it fully visible
  21.  
  22. local tweenIn = TweenService:Create(imageLabel, tweenInfoIn, goalIn)
  23. tweenIn:Play() -- Play the fade-in tween
  24.  
  25. -- Wait for the fade-in to complete
  26. tweenIn.Completed:Wait()
  27.  
  28. -- Fade the image out (make it transparent)
  29. local tweenInfoOut = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
  30. local goalOut = {ImageTransparency = 1} -- Make it fully transparent
  31.  
  32. local tweenOut = TweenService:Create(imageLabel, tweenInfoOut, goalOut)
  33. tweenOut:Play() -- Play the fade-out tween
  34.  
  35. -- Wait for the fade-out to complete
  36. tweenOut.Completed:Wait()
  37.  
  38. -- Fade the image back in (make it visible again)
  39. local tweenInfoIn2 = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
  40. local goalIn2 = {ImageTransparency = 0} -- Make it fully visible again
  41.  
  42. local tweenIn2 = TweenService:Create(imageLabel, tweenInfoIn2, goalIn2)
  43. tweenIn2:Play() -- Play the fade-in tween again
  44.  
  45. -- Wait for the fade-in to complete
  46. tweenIn2.Completed:Wait()
  47.  
  48. -- Fade the image out again and then hide it smoothly
  49. local tweenInfoOut2 = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
  50. local goalOut2 = {ImageTransparency = 1} -- Make it fully transparent again
  51.  
  52. local tweenOut2 = TweenService:Create(imageLabel, tweenInfoOut2, goalOut2)
  53. tweenOut2:Play() -- Play the fade-out tween again
  54.  
  55. -- Wait for the second fade-out to complete
  56. tweenOut2.Completed:Wait()
  57.  
  58. -- Smoothly hide the ImageLabel by making it invisible
  59. imageLabel.Visible = false -- Hide the image label
  60. -- Or destroy it if you no longer need it
  61. -- imageLabel:Destroy() -- Optionally destroy the ImageLabel from the screen
  62. end
  63.  
  64. -- Call the function to start the effect
  65. changeTransparencyTwiceAndHideSmoothly()
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement