Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat wait() until game:GetService("Players").LocalPlayer
- player = game:GetService("Players").LocalPlayer
- local char = player.Character
- while not char do
- wait()
- char = player.Character
- end
- local storage = game:WaitForChild("ReplicatedStorage")
- local UserInputService = game:GetService("UserInputService")
- local UIstorage = storage:WaitForChild("UI")
- local open = script:WaitForChild("Door Open")
- local close = script:WaitForChild("Door Close")
- -- Interaction
- local mouse = player:GetMouse()
- mouse.Button1Down:connect(function(got)
- if mouse.Target then
- if mouse.Target.Name == "Door" then
- print("Click to Enter")
- local boop = mouse.Target.Grab.Value
- local tp = boop:WaitForChild("Destination").Value
- local back = boop:WaitForChild("BackTP").Value
- local screw = back:WaitForChild("Script")
- if boop:WaitForChild("Event") and boop:WaitForChild("Destination") and boop:WaitForChild("BackTP") then
- boop.Event:FireServer()
- screw.Backdoor:FireServer()
- print("backdoor fired")
- local part = Instance.new("Part")
- part.Parent = game:GetService("Workspace")
- part.Name = "Teleportation"
- part.CFrame = CFrame.new(char:WaitForChild("Torso").Position)
- part.Anchored = true
- part.CanCollide = false
- print("Fired")
- open:Play()
- local transit = UIstorage:WaitForChild("Transition")
- transit:Clone().Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
- wait(.5)
- char:WaitForChild("Torso").CFrame = CFrame.new(tp.Position)
- wait(.5)
- close:Play()
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment