Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. local part = workspace.Union
  2. local TweenService = game:GetService("TweenService")
  3. local property = {CFrame = CFrame.new(-67.049, 14.5, 176.5) * CFrame.fromOrientation(math.rad(part.orientation.X),math.rad(part.orientation.Y),math.rad(part.orientation.Z))}
  4. local property2 = {CFrame = CFrame.new(-67.024, 7, 176.7) * CFrame.fromOrientation(math.rad(part.orientation.X),math.rad(part.orientation.Y),math.rad(part.orientation.Z))}
  5. local tweenInfo = TweenInfo.new(7)
  6. local goingUpBoolean = true
  7. local ClickDetector = Instance.new("ClickDetector")
  8.  
  9. local tween = TweenService:Create(part, tweenInfo, property)
  10. local tween2 = TweenService:Create(part, tweenInfo, property2)
  11.  
  12. script.Parent.ClickDetector.MouseClick:connect(function()
  13. script.Parent.Color = Color3.fromRGB(0, 255, 0)
  14. wait(0.1)
  15. script.Parent.Color = Color3.fromRGB(91, 93, 105)
  16. wait(0.1)
  17. tween:play()
  18. goingUpBoolean = false
  19.  
  20.  
  21. tween.Completed:Connect(function(playbackState)
  22. wait(0.1)
  23. if goingUpBoolean == false
  24. then
  25. wait(0.1)
  26. tween2:Play()
  27. else
  28. goingUpBoolean = true
  29. end
  30. end)
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement