SHOW:
|
|
- or go back to the newest paste.
1 | repeat wait() until game.Players.LocalPlayer | |
2 | char = game.Players.LocalPlayer.Character | |
3 | destination = game.Workspace.planshut | |
4 | ||
5 | function onClick() | |
6 | script.Parent.Sound:Play() | |
7 | wait(6) | |
8 | script.Parent.Parent.view.Transparency = 0 -- view space | |
9 | wait(1) | |
10 | script.Parent.Parent.view.Decal.Transparency = 0 | |
11 | script.Parent.Parent.view.Decal.Texture = "http://www.roblox.com/asset?id=244339877" --view planet | |
12 | wait(1) | |
13 | script.Parent.Parent.view.Decal.Texture = "http://www.roblox.com/asset?id=244339507" -- closer view | |
14 | wait(1) | |
15 | script.Parent.Parent.view.Decal.Texture = "http://www.roblox.com/asset?id=244339544" -- surface view | |
16 | wait(1) | |
17 | local s = game.ReplicatedStorage.planetshut:clone() | |
18 | s.Parent = game.Workspace -- make shuttle on planet | |
19 | if script.Parent.Parent.Door.Transparency == 0 then | |
20 | s.Door.Transparency = 0 | |
21 | s.Door.CanCollide = true | |
22 | else | |
23 | s.Door.Transparency = 1 | |
24 | s.Door.CanCollide = false | |
25 | end --if door is open, open door on planet shuttle | |
26 | char.Torso.Anchored = true | |
27 | char.Torso.CFrame = destination.CFrame + Vector3.new(0,4,0) | |
28 | wait(0.2) | |
29 | char.Torso.Anchored = false --teleport player to planet shuttle | |
30 | script.Parent.Parent:Destroy() --destroy this shuttle | |
31 | end | |
32 | ||
33 | - | script.Parent.ClickDetector.MouseClick:connect(onClick) |
33 | + | script.Parent.ClickDetector.MouseClick:connect(onClick) |