DrakrMakr

"Hiking a mountain" Minigame

Aug 27th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. local Hint = Instance.new("Hint", workspace)
  2. script.Parent = owner
  3. Hint.Text = '"Hiking a mountain" ; Minigame by DrakerMaker'
  4. wait(2)
  5. Hint.Text = "Intermission : I I I I I I I"
  6. local Count = Instance.new("Sound", workspace)
  7. Count.SoundId = "rbxassetid://836911190"
  8. Count.Volume = 0.3
  9. local Height = Instance.new("Sound", workspace)
  10. Height.SoundId = "rbxassetid://836911190"
  11. Height.Volume = 0.3
  12. sub = 28
  13. height = 1
  14. function Do()
  15. Hint.Text = "Intermission : I I I I I I I"
  16. sub = 28
  17. height = 1
  18. for i = 1,8 do
  19. wait(1)
  20. Count:Play()
  21. sub = sub - 2
  22. Hint.Text = string.sub("Intermission : I I I I I I I", 1, sub)
  23. end
  24. Count.PlaybackSpeed = 2
  25. Count:Play()
  26. Hint.Text = "GO!"
  27. wait(1)
  28. Hint.Parent = nil
  29. Count.PlaybackSpeed = 1
  30. local LASTCFRAME
  31. Count:Play()
  32. local start = Instance.new("Part", workspace)
  33. start.Size = Vector3.new(15, 0.5, 15)
  34. start.BrickColor = BrickColor.new("White")
  35. start.Material = "Neon"
  36. start.CFrame = workspace.Base.CFrame *CFrame.new(math.random(-20, 20), 2, math.random(-20, 20))
  37. start.Anchored = true
  38. LASTCFRAME = start.CFrame
  39. for i = 1,50 do
  40. wait(0.1)
  41. Count:Play()
  42. local plat = Instance.new("Part", workspace)
  43. plat.Size = Vector3.new(15, 0.5, 15)
  44. plat.BrickColor = BrickColor.new("Cyan")
  45. plat.Material = "Neon"
  46. plat.CFrame = LASTCFRAME *CFrame.new(math.random(-20, 20), 7, math.random(-20, 20))
  47. plat.Anchored = true
  48. LASTCFRAME = plat.CFrame
  49. plat.Name = "HikePlat"
  50. plat.Touched:connect(function()
  51. plat.Material = "Marble"
  52. end)
  53. wait(0.3)
  54. if height < 5 then
  55. height = height +0.1
  56. end
  57. Height.PlaybackSpeed = height
  58. Height:Play()
  59. end
  60. Hint.Parent = workspace
  61. Hint.Text = "Aight, its time the builder mice take a rest. But the goal is ready! Go get it!"
  62. local goal = Instance.new("Part", workspace)
  63. goal.Size = Vector3.new(15, 0.5, 15)
  64. goal.BrickColor = BrickColor.new("New Yeller")
  65. goal.Material = "Neon"
  66. goal.CFrame = LASTCFRAME *CFrame.new(math.random(-20, 20), 4, math.random(-20, 20))
  67. goal.Anchored = true
  68. goal.Name = "HikePlatGoal"
  69. local WinnerWon = false
  70. goal.Touched:connect(function(p)
  71. if owner.Parent:FindFirstChild(p.Parent.Name) then
  72. if WinnerWon == false then
  73. WinnerWon = true
  74. Hint.Text = "Congrats, for "..p.Parent.Name.." has won the game!"
  75. wait(2)
  76. if owner.Parent[p.Parent.Name].Backpack:FindFirstChild("Fly") ~= nil then
  77. Hint.Text = "They have been rejected, I found Fly tool."
  78. WinnerWon = false
  79. if owner.Parent[p.Parent.Name].Character:FindFirstChild("Torso") then
  80. force = Instance.new("BodyPosition", owner.Parent[p.Parent.Name].Character:FindFirstChild("Torso"))
  81. force.Position = Vector3.new(900000000, 900000000000000000, 9000000000000)
  82. end
  83. if owner.Parent[p.Parent.Name].Character:FindFirstChild("UpperTorso") then
  84. force = Instance.new("BodyPosition", owner.Parent[p.Parent.Name].Character:FindFirstChild("Torso"))
  85. force.Position = Vector3.new(900000000, 900000000000000000, 9000000000000)
  86. end
  87. wait(2)
  88. Hint.Text = "Aight, its time the builder mice take a rest. But the goal is ready! Go get it!"
  89. elseif owner.Parent[p.Parent.Name].Backpack:FindFirstChild("Fly") == nil then
  90. Hint.Text = "Hold your horses, the builder mice are bulldozin up the course!"
  91. Hint.Parent = nil
  92. for i,v in pairs(workspace:GetChildren()) do
  93. if v.Name == "HikePlat" then
  94. v.Anchored = false
  95. v.CanCollide = false
  96. end
  97. end
  98. goal.Anchored = false
  99. goal.CanCollide = false
  100. start:Destroy()
  101. script:Destroy()
  102. end
  103. end
  104. end
  105. end)
  106. end
  107. Do()
Add Comment
Please, Sign In to add comment