ojbaby

broken code

Aug 5th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 KB | None | 0 0
  1.  
  2.  
  3. repeat wait() until game:GetService("Players").LocalPlayer
  4. player = game:GetService("Players").LocalPlayer
  5. local char = player.Character
  6. while not char do
  7.     wait()
  8.     char = player.Character
  9. end
  10.  
  11. local storage = game:WaitForChild("ReplicatedStorage")
  12. local UserInputService = game:GetService("UserInputService")
  13. local UIstorage = storage:WaitForChild("UI")
  14. local open = script:WaitForChild("Door Open")
  15. local close = script:WaitForChild("Door Close")
  16.  
  17.  
  18. -- Interaction
  19. local mouse = player:GetMouse()
  20. mouse.Button1Down:connect(function(got)
  21. if mouse.Target then
  22.     if mouse.Target.Name == "Door" then
  23.         print("Click to Enter")
  24.             local boop = mouse.Target.Grab.Value
  25.             local tp = boop:WaitForChild("Destination").Value
  26.             local back = boop:WaitForChild("BackTP").Value
  27.             local screw = back:WaitForChild("Script")
  28.            
  29.             if boop:WaitForChild("Event") and boop:WaitForChild("Destination") and boop:WaitForChild("BackTP") then
  30.                 boop.Event:FireServer()
  31.                 screw.Backdoor:FireServer()
  32.                 print("backdoor fired")
  33.                 local part = Instance.new("Part")
  34.                 part.Parent = game:GetService("Workspace")
  35.                 part.Name = "Teleportation"
  36.                 part.CFrame = CFrame.new(char:WaitForChild("Torso").Position)
  37.                 part.Anchored = true
  38.                 part.CanCollide = false
  39.                 print("Fired")
  40.                 open:Play()
  41.                 local transit = UIstorage:WaitForChild("Transition")
  42.                 transit:Clone().Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
  43.                 wait(.5)
  44.                 char:WaitForChild("Torso").CFrame = CFrame.new(tp.Position)
  45.                
  46.                 wait(.5)
  47.                 close:Play()
  48.             end
  49.  
  50.         end
  51.     end
  52. end)
Advertisement
Add Comment
Please, Sign In to add comment