Weird_Dood

Start script

Dec 26th, 2023 (edited)
836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | Source Code | 0 0
  1. local button = script.Parent
  2.  
  3. local balloon = game.Workspace.HERE
  4. local cam = game.Workspace.cam
  5.  
  6. local moveDistance = 0.1
  7.  
  8. button.MouseButton1Up:Connect(function()
  9.     script.Parent.Visible = false
  10.     local currentBalloonPosition = balloon.Position
  11.     local currentCamPosition = cam.Position
  12.    
  13.     while true do
  14.         wait()
  15.         if game.Workspace.KillParts.Value.Value ~= 1 then
  16.             local currentBalloonPosition = balloon.Position
  17.             local currentCamPosition = cam.Position
  18.             local newBalloonPosition = currentBalloonPosition + Vector3.new(0, moveDistance, 0)
  19.             local newCamPosition = currentCamPosition + Vector3.new(0, moveDistance, 0)
  20.             balloon.Position = newBalloonPosition
  21.             cam.Position = newCamPosition
  22.             wait(0.01)
  23.         end
  24.     end
  25. end)
  26.  
Advertisement
Add Comment
Please, Sign In to add comment