Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local part = workspace.Union
- local TweenService = game:GetService("TweenService")
- 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))}
- 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))}
- local tweenInfo = TweenInfo.new(7)
- local goingUpBoolean = true
- local ClickDetector = Instance.new("ClickDetector")
- local tween = TweenService:Create(part, tweenInfo, property)
- local tween2 = TweenService:Create(part, tweenInfo, property2)
- script.Parent.ClickDetector.MouseClick:connect(function()
- script.Parent.Color = Color3.fromRGB(0, 255, 0)
- wait(0.1)
- script.Parent.Color = Color3.fromRGB(91, 93, 105)
- wait(0.1)
- tween:play()
- goingUpBoolean = false
- tween.Completed:Connect(function(playbackState)
- wait(0.1)
- if goingUpBoolean == false
- then
- wait(0.1)
- tween2:Play()
- else
- goingUpBoolean = true
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement