chandreeeee

flood escape 2

Oct 14th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Mouse = Player:GetMouse()
  3. local Multiplayer = game.Workspace.Multiplayer
  4.  
  5. Mouse.KeyDown:Connect(function(Key)
  6. if Key == "z" then
  7. local Map = Multiplayer.Map
  8. local Btns = {}
  9. local Desc = {}
  10. for i, v in pairs(Map:GetDescendants())do
  11. Desc[v.Name.."Obj"] = v
  12. end
  13. for i=0,30 do
  14. if Desc["_Button".. tostring(i).. "Obj"] ~= nil then
  15. table.insert(Btns,Desc["_Button".. tostring(i).. "Obj"])
  16. end
  17. end
  18. for i, v in pairs(Btns)do
  19. local Hitbox = v.Hitbox
  20. Player.Character.HumanoidRootPart.CFrame = Hitbox.CFrame
  21. wait(0.3)
  22. end
  23. elseif Key == "x" then
  24. local Map = Multiplayer.Map
  25. local ExitBlock = Map:FindFirstChild("ExitBlock")
  26. local Char = Player.Character
  27. local Ts = game:GetService("TweenService")
  28. local Ti = TweenInfo.new(
  29. 2,
  30. Enum.EasingStyle.Sine,
  31. Enum.EasingDirection.Out,
  32. 0,
  33. false,
  34. 0
  35. )
  36. local Tp = {
  37. CFrame = ExitBlock.CFrame
  38. }
  39. if ExitBlock ~= nil and ExitBlock:IsA("Part") then
  40. local Tw = Ts:Create(Player.Character.HumanoidRootPart,Ti,Tp)
  41. wait(0.1)
  42. Tw:Play()
  43. end
  44. elseif Key == "c" then
  45. local Map = Multiplayer.Map
  46. Map.ExitBlock:Destroy()
  47. end
  48. end)
Add Comment
Please, Sign In to add comment