Advertisement
MRobbin99

fantastic frontier WIP

Feb 26th, 2019
1,498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. -- Script generated by R2Sv2
  2. -- R2Sv2 developed by Luckyxero
  3.  
  4. local Event = game:GetService("Workspace").DungeonDoorStart.InteractEvent
  5. Event:FireServer()
  6.  
  7.  
  8. -- Objects
  9.  
  10. local ScreenGui = Instance.new("ScreenGui")
  11. local GUI = Instance.new("Frame")
  12. local Title = Instance.new("TextLabel")
  13. local Credits = Instance.new("TextLabel")
  14. local Button1= Instance.new("TextButton")
  15.  
  16. -- Properties
  17. floor = 1
  18. modifier = false
  19. hum = game.Players.LocalPlayer.Character
  20.  
  21. ScreenGui.Parent = game.CoreGui
  22.  
  23. GUI.Name = "GUI"
  24. GUI.Parent = ScreenGui
  25. GUI.BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314)
  26. GUI.BorderColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  27. GUI.BorderSizePixel = 0
  28. GUI.Position = UDim2.new(0, 0, 0.730039531, 0)
  29. GUI.Size = UDim2.new(0, 316, 0, 339)
  30. GUI.Style = Enum.FrameStyle.RobloxRound
  31.  
  32. Title.Name = "Title"
  33. Title.Parent = GUI
  34. Title.Active = true
  35. Title.BackgroundColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  36. Title.Position = UDim2.new(0.114720426, 0, 0.00523944944, 0)
  37. Title.Size = UDim2.new(0, 200, 0, 50)
  38. Title.Font = Enum.Font.SourceSans
  39. Title.Text = "Title"
  40. Title.TextColor3 = Color3.new(1, 1, 1)
  41. Title.TextSize = 14
  42.  
  43. Button1.Name = "Button1"
  44. Button1.Parent = GUI
  45. Button1.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  46. Button1.Position = UDim2.new(0.114720426, 0, 0.233038351, 0)
  47. Button1.Size = UDim2.new(0, 200, 0, 50)
  48. Button1.Font = Enum.Font.SourceSans
  49. Button1.Text = "Button1"
  50. Button1.TextColor3 = Color3.new(1, 1, 1)
  51. Button1.TextSize = 14
  52. Button1.MouseButton1Down:connect(function()
  53.  
  54. if modifier == true then
  55. modifier = false
  56. Button1.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  57. else
  58. modifier = true
  59. Button1.BackgroundColor3 = Color3.new(40, 127, 71)
  60. start()
  61. end
  62. end)
  63.  
  64.  
  65. Credits.Name = "Credits"
  66. Credits.Parent = GUI
  67. Credits.BackgroundColor3 = Color3.new(1, 1, 1)
  68. Credits.Position = UDim2.new(0.00316455704, 0, 0.943952799, 0)
  69. Credits.Size = UDim2.new(0, 109, 0, 18)
  70. Credits.Font = Enum.Font.SourceSans
  71. Credits.Text = "Credits to MRobbin99"
  72. Credits.TextSize = 14
  73.  
  74.  
  75. -- functions
  76.  
  77. -- Kill
  78. function start()
  79. while modifier do
  80. wait(.1)
  81. dungeonTemp = game.Workspace.DungeonTemp:GetChildren()
  82. for i = 1, #dungeonTemp do
  83. if floor == 6 or floor == 12 and i == 2 then
  84. wait(5)
  85. target = game:GetService("Workspace").DungeonDoorContinue.DungeonDoor
  86. hum.HumanoidRootPart.CFrame = target.CFrame
  87. wait(.5)
  88. local Event = game:GetService("Workspace").DungeonDoorContinue.InteractEvent
  89. Event:FireServer()
  90. floor = floor + 1
  91. wait(4)
  92. elseif dungeonTemp[i].Name == "Exit" then
  93. Event = game:GetService("Workspace").DungeonTemp.Exit.Portal.InteractEvent
  94. Event:FireServer()
  95. floor = floor + 1
  96. wait(3)
  97. print(floor)
  98. elseif dungeonTemp[i].Name ~= "Room" then
  99. waveFolder = dungeonTemp[i]
  100. kill()
  101. end
  102. end
  103. end
  104. end
  105.  
  106. function kill()
  107. enemies = waveFolder:GetChildren()
  108. for i = 1, #enemies do
  109. if enemies[i]:FindFirstChild("Humanoid") ~= nil then
  110. enemies[i]:FindFirstChild("Humanoid").Health = 0
  111. end
  112. end
  113. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement