Advertisement
Sungmingamerpro13

Skip Cutscene (LocalScript)

Apr 28th, 2024
1,266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.72 KB | None | 0 0
  1. local TopFrame = script.Parent.TopFrame
  2. local BottomFrame = script.Parent.BottomFrame
  3.  
  4. local players = game:GetService("Players"):GetPlayers()
  5. local PlayersAmount = script.PlayersAmount
  6.  
  7. TopFrame.SkipFrame.SkipButton.MouseButton1Click:Connect(function()
  8.     PlayersAmount.Value += 1
  9. end)
  10.  
  11. PlayersAmount:GetPropertyChangedSignal("Value"):Connect(function()
  12.     TopFrame.SkipFrame.SkipButton.TextLabel.Text = "Skip ("..PlayersAmount.Value.."/"..#players..")"
  13.    
  14.     if PlayersAmount.Value >= #players then
  15.         wait(3)
  16.         TopFrame:TweenPosition(UDim2.new(0,0,-1,0),.1)
  17.         BottomFrame:TweenPosition(UDim2.new(0,0,1,0),.1)
  18.     end
  19. end)
  20.  
  21. TopFrame.SkipFrame.SkipButton.TextLabel.Text = "Skip ("..PlayersAmount.Value.."/"..#players..")"
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement