Advertisement
Guest User

Untitled

a guest
Feb 24th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.68 KB | None | 0 0
  1. local plr = game:GetService("Players").LocalPlayer
  2. local gui = script.Parent
  3. local selectbasegui = script.Parent.Parent:WaitForChild("SelectBaseGui")
  4. local shopbuton,inventorybutton, settingsbutton, gameversion = gui:WaitForChild("ShopButton"), gui:WaitForChild("InventoryButton"), gui:WaitForChild("SettingsButton"), gui:WaitForChild("GameVersion")
  5. local settingsframe = gui:WaitForChild("SettingsFrame")
  6. local deletebutton, teleportbutton, rotatebutton, saveandloadbutton, twittercodebutton, settingscancelbutton, twittercodeframe, feedbackreportbutton = settingsframe:WaitForChild("DeleteButton"), settingsframe:WaitForChild("TeleportButton"), settingsframe:WaitForChild("RotateButton"), settingsframe:WaitForChild("SaveandLoadButton"), settingsframe:WaitForChild("TwitterCodeButton"), settingsframe:WaitForChild("CancelButton"), settingsframe:WaitForChild("TwitterCodeFrame"),settingsframe:WaitForChild("Feedback/ReportButton")
  7. local tcancelbutton, ttextbox = twittercodeframe:WaitForChild("CancelButton"), twittercodeframe:WaitForChild("TextBox")
  8. local inventoryframe = gui:WaitForChild("InventoryFrame")
  9. local icancelbutton = inventoryframe:WaitForChild("CancelButton")
  10. local shopframe = gui:WaitForChild("ShopFrame")
  11. local scancelbutton = shopframe:WaitForChild("CancelButton")
  12. local baseplates = workspace.Bases:GetChildren()
  13. local place = 1
  14.  
  15. shopbuton.MouseButton1Click:Connect(function()
  16. shopframe.Visible = true
  17. local buttons = {shopbuton, inventorybutton, settingsbutton, gameversion}
  18. for _, button in next, buttons do
  19. button.Visible = false
  20. end
  21. end)
  22.  
  23. inventorybutton.MouseButton1Click:Connect(function()
  24. inventoryframe.Visible = true
  25. local buttons = {shopbuton, inventorybutton, settingsbutton, gameversion}
  26. for _, button in next, buttons do
  27. button.Visible = false
  28. end
  29. end)
  30.  
  31.  
  32. settingsbutton.MouseButton1Click:Connect(function()
  33. plr.PlayerGui:WaitForChild("MainGui"):WaitForChild("SettingsFrame").Visible = true
  34. local buttons = {shopbuton, inventorybutton, settingsbutton, gameversion}
  35. for _, button in next, buttons do
  36. button.Visible = false
  37. end
  38. end)
  39.  
  40. deletebutton.MouseButton1Click:Connect(function()
  41. -- Player deletes base.
  42. print("I BEEN CLICKED")
  43. end)
  44.  
  45. -- enabled1 = true
  46.  
  47. teleportbutton.MouseButton1Click:Connect(function()
  48. --[[
  49. if not enabled1 then
  50. return
  51. end
  52. enabled1 = false
  53. baseplates[place].Owner.Value = plr
  54. plr.Character.HumanoidRootPart.CFrame = CFrame.new(baseplates[place].BasePlate.Position.X, baseplates[place].BasePlate.Position.Y+3, baseplates[place].BasePlate.Position.Z)
  55. for i = 30, 0, -1 do
  56. teleportbutton.Style = Enum.ButtonStyle.RobloxRoundButton
  57. teleportbutton.Text = "COOL DOWN IN "..i.." SECONDS"
  58. wait(1)
  59. teleportbutton.Text = "TELEPORT TO BASE"
  60. teleportbutton.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
  61. end
  62. enabled1 = true
  63. --]]
  64. print("I BEEN CLICKED")
  65. end)
  66.  
  67. rotatebutton.MouseButton1Click:Connect(function()
  68. print("I BEEN CLICKED")
  69. end)
  70.  
  71. saveandloadbutton.MouseButton1Click:Connect(function()
  72. -- Save and/or Load Base.
  73. print("I BEEN CLICKED")
  74. end)
  75.  
  76. settingscancelbutton.MouseButton1Click:Connect(function()
  77. plr.PlayerGui:WaitForChild("MainGui"):WaitForChild("SettingsFrame").Visible = false
  78. local buttons = {shopbuton, inventorybutton, settingsbutton, gameversion}
  79. for _, buttons in next, buttons do
  80. buttons.Visible = true
  81. end
  82. end)
  83.  
  84. enabled2 = true
  85.  
  86. twittercodebutton.MouseButton1Click:Connect(function()
  87. if not enabled2 then
  88. return
  89. end
  90. enabled2 = false
  91. local buttons = {deletebutton, rotatebutton, saveandloadbutton, teleportbutton, settingscancelbutton, feedbackreportbutton}
  92. for _, buttons in next, buttons do
  93. buttons.Visible = false
  94. end
  95. twittercodebutton:TweenPosition(UDim2.new(0.019, 0, 0.066, 0), "In", "Back", 1)
  96. wait(1.2)
  97. twittercodeframe.Visible = true
  98. enabled2 = true
  99. end)
  100.  
  101. enabled3 = true
  102.  
  103. tcancelbutton.MouseButton1Click:Connect(function()
  104. if not enabled3 then
  105. return
  106. end
  107. enabled3 = false
  108. twittercodeframe.Visible = false
  109. ttextbox.Text = "ENTER CODE HERE"
  110. twittercodebutton:TweenPosition(UDim2.new(0.019, 0, 0.6, 0), "Out", "Back", 1)
  111. wait(1.2)
  112. local buttons = {deletebutton, rotatebutton, saveandloadbutton, teleportbutton, settingscancelbutton, feedbackreportbutton}
  113. for _, buttons in next, buttons do
  114. buttons.Visible = true
  115. end
  116. enabled3 = true
  117. end)
  118.  
  119. feedbackreportbutton.MouseButton1Click:Connect(function()
  120. print("I BEEN CLICKED")
  121. end)
  122.  
  123. icancelbutton.MouseButton1Click:Connect(function()
  124. inventoryframe.Visible = false
  125. local buttons = {shopbuton, inventorybutton, settingsbutton, gameversion}
  126. for _, button in next, buttons do
  127. button.Visible = true
  128. end
  129. end)
  130.  
  131. scancelbutton.MouseButton1Click:Connect(function()
  132. shopframe.Visible = false
  133. local buttons = {shopbuton, inventorybutton, settingsbutton, gameversion}
  134. for _, button in next, buttons do
  135. button.Visible = true
  136. end
  137. end)
  138.  
  139. -- Inventory/Shop Section
  140. local rep = game:GetService("ReplicatedStorage")
  141. local itemmodelfolder = rep:WaitForChild("GuiFolder"):WaitForChild("ItemModelFolder")
  142. local itemmodel = rep:WaitForChild("ItemModel")
  143. local vipid = 1234567
  144. local supervipid = 1234567
  145. local grouppassid = 1234567
  146.  
  147. local itemmodelstuff = itemmodel:GetChildren()
  148. local normal = itemmodelfolder:WaitForChild("Inventory"):WaitForChild("Normal")
  149. local grouppass = itemmodelfolder:WaitForChild("Inventory"):WaitForChild("GroupPass")
  150. local vip = itemmodelfolder:WaitForChild("Inventory"):WaitForChild("Vip")
  151. local supervip = itemmodelfolder:WaitForChild("Inventory"):WaitForChild("SuperVip")
  152. -- local inventorystuff = {itemmodelfolder:WaitForChild("Inventory"):WaitForChild("Normal"), itemmodelfolder:WaitForChild("Inventory"):WaitForChild("GroupPass"), itemmodelfolder:WaitForChild("Inventory"):WaitForChild("Vip"), itemmodelfolder:WaitForChild("Inventory"):WaitForChild("SuperVip")}
  153. local basicbuildingblocks = itemmodel:WaitForChild("Basic Building Blocks")
  154.  
  155. -- Basic Building Blocks Section
  156.  
  157. local blocks = basicbuildingblocks:GetChildren()
  158.  
  159. if blocks.VIP.Value == 0 then
  160. local clone = normal:Clone()
  161. clone.Parent = shopframe.ItemFrame.ScrollingFrame
  162. clone.Position.CFrame = CFrame.new(0,0,0,0)
  163. else
  164. print("It didn't load sir. Sorry.")
  165. end
  166.  
  167. if blocks.VIP.Value == 1 then
  168. local clone = vip:Clone()
  169. clone.Parent = shopframe.ItemFrame.ScrollingFrame
  170. clone.Position.CFrame = CFrame.new(0,0,0,0)
  171. else
  172. print("It didn't load sir. Sorry.")
  173. end
  174.  
  175. if blocks.VIP.Value == 2 then
  176. local clone = supervip:Clone()
  177. clone.Parent = shopframe.ItemFrame.ScrollingFrame
  178. clone.Position.CFrame = CFrame.new(0,0,0,0)
  179. end
  180.  
  181. if blocks.VIP.Value == 3 then
  182. local clone = grouppass:Clone()
  183. clone.Parent = shopframe.ItemFrame.ScrollingFrame
  184. clone.Position.CFrame = CFrame.new(0,0,0,0)
  185. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement