Advertisement
Guest User

dungeon quest gui

a guest
Mar 31st, 2019
9,551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. local UI = game:GetObjects("rbxassetid://2884392408")[1]
  2. local Me = game:GetService("Players").LocalPlayer
  3. local dungeon = workspace:FindFirstChild("dungeon") or false
  4. local up = false
  5. local canact = true
  6. local mouseinside = false
  7. local Teleport = function(P1, P2)
  8. local Weld = Instance.new("Weld")
  9. Weld.Part0 = P1
  10. Weld.Part1 = P2
  11. Weld.Parent = P1
  12. wait(.05)
  13. Weld:Destroy()
  14. end
  15. local functions = {
  16. ["speed"] = function(Input)
  17. Me.Character:FindFirstChildOfClass("Humanoid").WalkSpeed = tonumber(Input)
  18. end,
  19. ["jump power"] = function(Input)
  20. Me.Character:FindFirstChildOfClass("Humanoid").JumpPower = tonumber(Input)
  21. end,
  22. ["teleport to"] = function(Input)
  23. local Player
  24. local Players = game:GetService("Players"):GetPlayers()
  25. for Index = 1, #Players do
  26. if Players[Index].Name:lower():sub(1, #Input) == Input:lower() then
  27. Player = Players[Index]
  28. end
  29. end
  30. if Player then
  31. Teleport(Me.Character.UpperTorso,Player.Character.UpperTorso)
  32. end
  33. end,
  34. ["teleport to npc"] = function()
  35. if not dungeon then return end
  36. local NPC = dungeon:FindFirstChildWhichIsA("Humanoid",true).Parent
  37. Teleport(Me.Character.UpperTorso,NPC.UpperTorso)
  38. end,
  39. ["remove barriers"] = function()
  40. if not dungeon then return end
  41. for i,v in pairs(dungeon:GetDescendants()) do
  42. if v.Name == "barrier" then
  43. v.Transparency = 1
  44. v.CanCollide = false
  45. end
  46. end
  47. end
  48. }
  49. for i,v in pairs(UI:WaitForChild("tabs"):GetChildren()) do
  50. v.MouseButton1Click:Connect(function()
  51. local OtherTab = v.Name == "player" and "game" or "player"
  52. UI[OtherTab].Visible = false
  53. UI.tabs[OtherTab].BorderSizePixel = 1
  54. UI.tabs[OtherTab].TextColor3 = Color3.new(1,1,1)
  55. v.BorderSizePixel = 2
  56. v.TextColor3 = Color3.fromRGB(0,170,255)
  57. UI[v.Name].Visible = true
  58. end)
  59. end
  60. for i,v in pairs(UI:GetDescendants()) do
  61. if v.ClassName == "TextButton" and functions[v.Text] then
  62. v.MouseButton1Click:Connect(function()
  63. if v.Parent.Name == "player" then
  64. v.Parent.Visible = false
  65. UI.input.Visible = true
  66. UI.input.PlaceholderText = v.Text
  67. UI.input:CaptureFocus()
  68. local enter = false
  69. repeat
  70. enter = UI.input.FocusLost:Wait()
  71. until enter
  72. end
  73. functions[v.Text](UI.input.Text)
  74. UI.input.Visible = false
  75. v.Parent.Visible = true
  76. end)
  77. end
  78. end
  79. UI.MouseEnter:Connect(function()
  80. mouseinside = true
  81. if not canact or up then return end
  82. canact = false
  83. up = true
  84. UI:TweenPosition(UDim2.new(0.5, -150, 0.5, -100),nil,nil,.5)
  85. wait(.45)
  86. canact = true
  87. end)
  88. UI.MouseLeave:Connect(function()
  89. mouseinside = false
  90. end)
  91. game:GetService("UserInputService").InputBegan:Connect(function(I,G)
  92. if I.UserInputType == Enum.UserInputType.MouseButton1 and not mouseinside and canact then
  93. canact = false
  94. up = false
  95. UI:TweenPosition(UDim2.new(0.5, -150, 1, -25),nil,nil,.5)
  96. wait(.45)
  97. canact = true
  98. end
  99. end)
  100. UI.Parent = get_hidden_gui and get_hidden_gui() or game.CoreGui:FindFirstChildOfClass("ScreenGui")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement