Advertisement
Masterx31HD

Lucky Blocks GUI

Jun 22nd, 2019
10,204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.21 KB | None | 0 0
  1. local LuckyBlocksGui = Instance.new("ScreenGui")
  2. local MainFrame = Instance.new("Frame")
  3. local ButtonFrame = Instance.new("Frame")
  4. local BaseTP = Instance.new("TextButton")
  5. local BaseNum = Instance.new("TextBox")
  6. local NormalBlock = Instance.new("TextButton")
  7. local NormalAmmount = Instance.new("TextBox")
  8. local SuperBlock = Instance.new("TextButton")
  9. local SuperAmmount = Instance.new("TextBox")
  10. local RainbowBlock = Instance.new("TextButton")
  11. local RainbowAmmount = Instance.new("TextBox")
  12. local Fly = Instance.new("TextButton")
  13. local Noclip = Instance.new("TextButton")
  14. local HideButton = Instance.new("ImageButton")
  15. local Name = Instance.new("TextLabel")
  16. local GuiActive = false
  17. local plr = game.Players.LocalPlayer
  18. local plrName = plr.Name
  19.  
  20. --Properties:
  21. LuckyBlocksGui.Name = "LuckyBlocksGui"
  22. LuckyBlocksGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  23. LuckyBlocksGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  24.  
  25. MainFrame.Name = "MainFrame"
  26. MainFrame.Parent = LuckyBlocksGui
  27. MainFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  28. MainFrame.BackgroundTransparency = 0.30000001192093
  29. MainFrame.Position = UDim2.new(0.404893458, 0, 0.0649717525, 0)
  30. MainFrame.Size = UDim2.new(0, 240, 0, 30)
  31. MainFrame.Draggable = true
  32.  
  33. ButtonFrame.Name = "ButtonFrame"
  34. ButtonFrame.Parent = MainFrame
  35. ButtonFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  36. ButtonFrame.BackgroundTransparency = 0.5
  37. ButtonFrame.Position = UDim2.new(0.000726789236, 0, 0.974011302, 0)
  38. ButtonFrame.Size = UDim2.new(0, 240, 0, 361)
  39. ButtonFrame.Visible = false
  40.  
  41. BaseTP.Name = "BaseTP"
  42. BaseTP.Parent = ButtonFrame
  43. BaseTP.BackgroundColor3 = Color3.new(0, 0, 0)
  44. BaseTP.BackgroundTransparency = 0.5
  45. BaseTP.BorderColor3 = Color3.new(0, 0, 0)
  46. BaseTP.Position = UDim2.new(0.0375000015, 0, 0.0554016605, 0)
  47. BaseTP.Size = UDim2.new(0, 100, 0, 30)
  48. BaseTP.Font = Enum.Font.SourceSansBold
  49. BaseTP.Text = "Tp to base "
  50. BaseTP.TextColor3 = Color3.new(1, 1, 1)
  51. BaseTP.TextSize = 16
  52. BaseTP.Activated:connect(function()
  53. game.Workspace[plrName].HumanoidRootPart.CFrame = game.Workspace["Spawn"..BaseNum.Text].SpawnLocation.CFrame
  54. end)
  55.  
  56. BaseNum.Name = "BaseNum"
  57. BaseNum.Parent = ButtonFrame
  58. BaseNum.BackgroundColor3 = Color3.new(0, 0, 0)
  59. BaseNum.BackgroundTransparency = 0.5
  60. BaseNum.BorderColor3 = Color3.new(0, 0, 0)
  61. BaseNum.Position = UDim2.new(0.555000007, 0, 0.0549999997, 0)
  62. BaseNum.Size = UDim2.new(0, 100, 0, 30)
  63. BaseNum.Font = Enum.Font.SourceSansBold
  64. BaseNum.PlaceholderText = "Base Number ( from 1 to 8 )"
  65. BaseNum.Text = ""
  66. BaseNum.TextColor3 = Color3.new(1, 1, 1)
  67. BaseNum.TextScaled = true
  68. BaseNum.TextSize = 16
  69. BaseNum.TextStrokeColor3 = Color3.new(1, 1, 1)
  70. BaseNum.TextWrapped = true
  71.  
  72. NormalBlock.Name = "NormalBlock"
  73. NormalBlock.Parent = ButtonFrame
  74. NormalBlock.BackgroundColor3 = Color3.new(0, 0, 0)
  75. NormalBlock.BackgroundTransparency = 0.5
  76. NormalBlock.BorderColor3 = Color3.new(0, 0, 0)
  77. NormalBlock.Position = UDim2.new(0.0375000015, 0, 0.193905815, 0)
  78. NormalBlock.Size = UDim2.new(0, 100, 0, 30)
  79. NormalBlock.Font = Enum.Font.SourceSansBold
  80. NormalBlock.Text = "TP to player"
  81. NormalBlock.TextColor3 = Color3.new(1, 1, 1)
  82. NormalBlock.TextScaled = true
  83. NormalBlock.TextSize = 16
  84. NormalBlock.TextWrapped = true
  85. NormalBlock.Activated:connect(function()
  86. game.Workspace[plrName].HumanoidRootPart.CFrame = game.Workspace[NormalAmmount.Text].HumanoidRootPart.CFrame
  87. end)
  88.  
  89. NormalAmmount.Name = "NormalAmmount"
  90. NormalAmmount.Parent = ButtonFrame
  91. NormalAmmount.BackgroundColor3 = Color3.new(0, 0, 0)
  92. NormalAmmount.BackgroundTransparency = 0.5
  93. NormalAmmount.BorderColor3 = Color3.new(0, 0, 0)
  94. NormalAmmount.Position = UDim2.new(0.555000007, 0, 0.193504155, 0)
  95. NormalAmmount.Size = UDim2.new(0, 100, 0, 30)
  96. NormalAmmount.Font = Enum.Font.SourceSansBold
  97. NormalAmmount.PlaceholderText = "Player Name"
  98. NormalAmmount.Text = ""
  99. NormalAmmount.TextColor3 = Color3.new(1, 1, 1)
  100. NormalAmmount.TextScaled = true
  101. NormalAmmount.TextSize = 16
  102. NormalAmmount.TextStrokeColor3 = Color3.new(1, 1, 1)
  103. NormalAmmount.TextWrapped = true
  104.  
  105. SuperBlock.Name = "SuperBlock"
  106. SuperBlock.Parent = ButtonFrame
  107. SuperBlock.BackgroundColor3 = Color3.new(0, 0, 0)
  108. SuperBlock.BackgroundTransparency = 0.5
  109. SuperBlock.BorderColor3 = Color3.new(0, 0, 0)
  110. SuperBlock.Position = UDim2.new(0.0375000015, 0, 0.332409978, 0)
  111. SuperBlock.Size = UDim2.new(0, 100, 0, 30)
  112. SuperBlock.Font = Enum.Font.SourceSansBold
  113. SuperBlock.Text = "Get diamond block items"
  114. SuperBlock.TextColor3 = Color3.new(1, 1, 1)
  115. SuperBlock.TextScaled = true
  116. SuperBlock.TextSize = 16
  117. SuperBlock.TextWrapped = true
  118. SuperBlock.Activated:connect(function()
  119. for i=1,SuperAmmount.Text do
  120. game.ReplicatedStorage.SpawnDiamondBlock:FireServer()
  121. end
  122. end)
  123.  
  124. SuperAmmount.Name = "SuperAmmount"
  125. SuperAmmount.Parent = ButtonFrame
  126. SuperAmmount.BackgroundColor3 = Color3.new(0, 0, 0)
  127. SuperAmmount.BackgroundTransparency = 0.5
  128. SuperAmmount.BorderColor3 = Color3.new(0, 0, 0)
  129. SuperAmmount.Position = UDim2.new(0.555000007, 0, 0.332008302, 0)
  130. SuperAmmount.Size = UDim2.new(0, 100, 0, 30)
  131. SuperAmmount.Font = Enum.Font.SourceSansBold
  132. SuperAmmount.PlaceholderText = "Diamond Block items ammount"
  133. SuperAmmount.Text = ""
  134. SuperAmmount.TextColor3 = Color3.new(1, 1, 1)
  135. SuperAmmount.TextScaled = true
  136. SuperAmmount.TextSize = 16
  137. SuperAmmount.TextStrokeColor3 = Color3.new(1, 1, 1)
  138. SuperAmmount.TextWrapped = true
  139.  
  140. RainbowBlock.Name = "RainbowBlock"
  141. RainbowBlock.Parent = ButtonFrame
  142. RainbowBlock.BackgroundColor3 = Color3.new(0, 0, 0)
  143. RainbowBlock.BackgroundTransparency = 0.5
  144. RainbowBlock.BorderColor3 = Color3.new(0, 0, 0)
  145. RainbowBlock.Position = UDim2.new(0.0375000015, 0, 0.487534642, 0)
  146. RainbowBlock.Size = UDim2.new(0, 100, 0, 30)
  147. RainbowBlock.Font = Enum.Font.SourceSansBold
  148. RainbowBlock.Text = "Get rainbow block items"
  149. RainbowBlock.TextColor3 = Color3.new(1, 1, 1)
  150. RainbowBlock.TextScaled = true
  151. RainbowBlock.TextSize = 16
  152. RainbowBlock.TextWrapped = true
  153. RainbowBlock.Activated:connect(function()
  154. for i=1,RainbowAmmount.Text do
  155. game.ReplicatedStorage.SpawnRainbowBlock:FireServer()
  156. end
  157. end)
  158.  
  159. RainbowAmmount.Name = "RainbowAmmount"
  160. RainbowAmmount.Parent = ButtonFrame
  161. RainbowAmmount.BackgroundColor3 = Color3.new(0, 0, 0)
  162. RainbowAmmount.BackgroundTransparency = 0.5
  163. RainbowAmmount.BorderColor3 = Color3.new(0, 0, 0)
  164. RainbowAmmount.Position = UDim2.new(0.555000007, 0, 0.487132967, 0)
  165. RainbowAmmount.Size = UDim2.new(0, 100, 0, 30)
  166. RainbowAmmount.Font = Enum.Font.SourceSansBold
  167. RainbowAmmount.PlaceholderText = "Rainbow Block items ammount"
  168. RainbowAmmount.Text = ""
  169. RainbowAmmount.TextColor3 = Color3.new(1, 1, 1)
  170. RainbowAmmount.TextScaled = true
  171. RainbowAmmount.TextSize = 16
  172. RainbowAmmount.TextStrokeColor3 = Color3.new(1, 1, 1)
  173. RainbowAmmount.TextWrapped = true
  174.  
  175. Fly.Name = "Fly"
  176. Fly.Parent = ButtonFrame
  177. Fly.BackgroundColor3 = Color3.new(0, 0, 0)
  178. Fly.BackgroundTransparency = 0.5
  179. Fly.BorderColor3 = Color3.new(0, 0, 0)
  180. Fly.Position = UDim2.new(0.291666657, 0, 0.63988924, 0)
  181. Fly.Size = UDim2.new(0, 100, 0, 30)
  182. Fly.Font = Enum.Font.SourceSansBold
  183. Fly.Text = "Fly (alt to toggle)"
  184. Fly.TextColor3 = Color3.new(1, 1, 1)
  185. Fly.TextScaled = true
  186. Fly.TextSize = 16
  187. Fly.TextWrapped = true
  188. local Settings = {
  189.  
  190. Speed = 5,
  191. SprintSpeed = 30,
  192. ToggleKey = Enum.KeyCode.LeftAlt,
  193. SprintKey = Enum.KeyCode.LeftControl,
  194.  
  195. ForwardKey = Enum.KeyCode.W,
  196. LeftKey = Enum.KeyCode.A,
  197. BackwardKey = Enum.KeyCode.S,
  198. RightKey = Enum.KeyCode.D,
  199. UpKey = Enum.KeyCode.E,
  200. DownKey = Enum.KeyCode.Q,
  201.  
  202. }
  203.  
  204. local Screen = Instance.new("ScreenGui",game.CoreGui)
  205. local Distance = Instance.new("TextLabel",Screen)
  206. Distance.BackgroundTransparency = 1
  207. Distance.Size = UDim2.new(0,10,0,10)
  208. Distance.ZIndex = 2
  209. Distance.Text = "0"
  210. Distance.TextStrokeTransparency = .5
  211. Distance.TextSize = 20
  212. Distance.TextStrokeColor3 = Color3.fromRGB(33, 33, 33)
  213. Distance.Font = Enum.Font.Gotham
  214. Distance.TextColor3 = Color3.new(1,1,1)
  215. Distance.TextXAlignment = Enum.TextXAlignment.Left
  216. Distance.TextYAlignment = Enum.TextYAlignment.Top
  217.  
  218.  
  219. local Mouse = game.Players.LocalPlayer:GetMouse()
  220. local Direction = Vector3.new(0,0,0)
  221. local InterpolatedDir = Direction
  222. local Tilt = 0
  223. local InterpolatedTilt = Tilt
  224. local RunService = game:GetService("RunService")
  225. local Toggled = false
  226. local Sprinting = false
  227. local CameraPos = game.Workspace.CurrentCamera.CFrame.Position
  228.  
  229. pcall(function()
  230. game.Players.LocalPlayer.DevCameraOcclusionMode = Enum.DevCameraOcclusionMode.Invisicam
  231. end)
  232.  
  233. function Lerp(a, b, t)
  234. return a + (b - a) * t
  235. end
  236.  
  237. local LastPos = nil
  238.  
  239. function KeyHandler(actionName, userInputState)
  240. if true and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  241. if actionName == "Toggle" and userInputState == Enum.UserInputState.Begin then
  242. Toggled = not Toggled
  243. if Toggled then
  244. LastPos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  245. --game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
  246. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
  247. else
  248. LastPos = nil
  249. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  250. --game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
  251. end
  252. elseif actionName == "Forward" then
  253. Tilt = userInputState == Enum.UserInputState.Begin and -20 or 0
  254. Direction = Vector3.new(Direction.x,Direction.y,userInputState == Enum.UserInputState.Begin and -1 or 0)
  255. elseif actionName == "Left" then
  256. Direction = Vector3.new(userInputState == Enum.UserInputState.Begin and -1 or 0,Direction.y,Direction.z)
  257. elseif actionName == "Backward" then
  258. Tilt = userInputState == Enum.UserInputState.Begin and 20 or 0
  259. Direction = Vector3.new(Direction.x,Direction.y,userInputState == Enum.UserInputState.Begin and 1 or 0)
  260. elseif actionName == "Right" then
  261. Direction = Vector3.new(userInputState == Enum.UserInputState.Begin and 1 or 0,Direction.y,Direction.z)
  262. elseif actionName == "Up" then
  263. Direction = Vector3.new(Direction.x,userInputState == Enum.UserInputState.Begin and 1 or 0,Direction.z)
  264. elseif actionName == "Down" then
  265. Direction = Vector3.new(Direction.x,userInputState == Enum.UserInputState.Begin and -1 or 0,Direction.z)
  266. elseif actionName == "Sprint" then
  267. Sprinting = userInputState == Enum.UserInputState.Begin
  268. end
  269. end
  270. end
  271.  
  272.  
  273.  
  274. game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
  275.  
  276. if inputObject.KeyCode == Settings.ToggleKey then
  277. KeyHandler("Toggle", Enum.UserInputState.Begin, inputObject)
  278. elseif inputObject.KeyCode == Settings.ForwardKey then
  279. KeyHandler("Forward", Enum.UserInputState.Begin, inputObject)
  280. elseif inputObject.KeyCode == Settings.LeftKey then
  281. KeyHandler("Left", Enum.UserInputState.Begin, inputObject)
  282. elseif inputObject.KeyCode == Settings.BackwardKey then
  283. KeyHandler("Backward", Enum.UserInputState.Begin, inputObject)
  284. elseif inputObject.KeyCode == Settings.RightKey then
  285. KeyHandler("Right", Enum.UserInputState.Begin, inputObject)
  286. elseif inputObject.KeyCode == Settings.UpKey then
  287. KeyHandler("Up", Enum.UserInputState.Begin, inputObject)
  288. elseif inputObject.KeyCode == Settings.DownKey then
  289. KeyHandler("Down", Enum.UserInputState.Begin, inputObject)
  290. elseif inputObject.KeyCode == Settings.SprintKey then
  291. KeyHandler("Sprint", Enum.UserInputState.Begin, inputObject)
  292. end
  293.  
  294.  
  295. end)
  296.  
  297.  
  298. game:GetService("UserInputService").InputEnded:connect(function(inputObject, gameProcessedEvent)
  299.  
  300. if inputObject.KeyCode == Settings.ToggleKey then
  301. KeyHandler("Toggle", Enum.UserInputState.End, inputObject)
  302. elseif inputObject.KeyCode == Settings.ForwardKey then
  303. KeyHandler("Forward", Enum.UserInputState.End, inputObject)
  304. elseif inputObject.KeyCode == Settings.LeftKey then
  305. KeyHandler("Left", Enum.UserInputState.End, inputObject)
  306. elseif inputObject.KeyCode == Settings.BackwardKey then
  307. KeyHandler("Backward", Enum.UserInputState.End, inputObject)
  308. elseif inputObject.KeyCode == Settings.RightKey then
  309. KeyHandler("Right", Enum.UserInputState.End, inputObject)
  310. elseif inputObject.KeyCode == Settings.UpKey then
  311. KeyHandler("Up", Enum.UserInputState.End, inputObject)
  312. elseif inputObject.KeyCode == Settings.DownKey then
  313. KeyHandler("Down", Enum.UserInputState.End, inputObject)
  314. elseif inputObject.KeyCode == Settings.SprintKey then
  315. KeyHandler("Sprint", Enum.UserInputState.End, inputObject)
  316. end
  317.  
  318.  
  319. end)
  320.  
  321.  
  322. RunService.RenderStepped:Connect(function()
  323. if Toggled and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  324. for i,v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
  325. if v:IsA("BasePart") then
  326. v.Velocity = Vector3.new(0,0,0)
  327. end
  328. end
  329. local RootPart = game.Players.LocalPlayer.Character.HumanoidRootPart
  330. if LastPos then
  331. Distance.Text = math.floor((LastPos-RootPart.Position).Magnitude+.5)
  332. if (LastPos-RootPart.Position).Magnitude >= 350 then
  333. Distance.TextColor3 = Color3.new(1,0,0)
  334. else
  335. Distance.TextColor3 = Color3.new(1,1,1)
  336. end
  337. else
  338. Distance.TextColor3 = Color3.new(1,1,1)
  339. Distance.Text = 0
  340. end
  341. InterpolatedDir = InterpolatedDir:Lerp((Direction * (Sprinting and Settings.SprintSpeed or Settings.Speed)),.2)
  342. InterpolatedTilt = Lerp(InterpolatedTilt ,Tilt* (Sprinting and 2 or 1),Tilt == 0 and .2 or .1)
  343. RootPart.CFrame = RootPart.CFrame:Lerp(CFrame.new(RootPart.Position,RootPart.Position + Mouse.UnitRay.Direction) * CFrame.Angles(0,math.rad(00),0) * CFrame.new(InterpolatedDir) * CFrame.Angles(math.rad(InterpolatedTilt),0,0),.2)
  344. else
  345. Distance.TextColor3 = Color3.new(1,1,1)
  346. Distance.Text = 0
  347. end
  348. end)
  349.  
  350.  
  351.  
  352. Noclip.Name = "Noclip"
  353. Noclip.Parent = ButtonFrame
  354. Noclip.BackgroundColor3 = Color3.new(0, 0, 0)
  355. Noclip.BackgroundTransparency = 0.5
  356. Noclip.BorderColor3 = Color3.new(0, 0, 0)
  357. Noclip.Position = UDim2.new(0.287499994, 0, 0.795013905, 0)
  358. Noclip.Size = UDim2.new(0, 100, 0, 30)
  359. Noclip.Font = Enum.Font.SourceSansBold
  360. Noclip.Text = "Click2TP (ctrl to tp)"
  361. Noclip.TextColor3 = Color3.new(1, 1, 1)
  362. Noclip.TextScaled = true
  363. Noclip.TextSize = 16
  364. Noclip.TextWrapped = true
  365. Noclip.Activated:connect(function()
  366. local Plr = game:GetService("Players").LocalPlayer
  367. local Mouse = Plr:GetMouse()
  368.  
  369. Mouse.Button1Down:connect(function()
  370. if not game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then return end
  371. if not Mouse.Target then return end
  372. Plr.Character:MoveTo(Mouse.Hit.p)
  373. end)
  374. end)
  375.  
  376. HideButton.Name = "HideButton"
  377. HideButton.Parent = MainFrame
  378. HideButton.BackgroundColor3 = Color3.new(1, 1, 1)
  379. HideButton.BackgroundTransparency = 1
  380. HideButton.Position = UDim2.new(0.891666651, 0, 0.166666672, 0)
  381. HideButton.Size = UDim2.new(0, 20, 0, 20)
  382. HideButton.Image = "rbxassetid://52756150"
  383.  
  384. Name.Name = "Name"
  385. Name.Parent = MainFrame
  386. Name.BackgroundColor3 = Color3.new(1, 1, 1)
  387. Name.BackgroundTransparency = 1
  388. Name.Size = UDim2.new(0, 200, 0, 29)
  389. Name.Font = Enum.Font.SourceSansBold
  390. Name.Text = "Lucky Blocks GUI"
  391. Name.TextColor3 = Color3.new(1, 1, 1)
  392. Name.TextSize = 18
  393. -- Scripts:
  394. HideButton.Activated:connect(function()
  395. if GuiActive == false then
  396. ButtonFrame.Visible = true
  397. GuiActive = true
  398. HideButton.Image = "rbxassetid://52756189"
  399. else
  400. ButtonFrame.Visible = false
  401. GuiActive = false
  402. HideButton.Image = "rbxassetid://52756150"
  403. end
  404. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement