Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local LuckyBlocksGui = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local ButtonFrame = Instance.new("Frame")
- local BaseTP = Instance.new("TextButton")
- local BaseNum = Instance.new("TextBox")
- local NormalBlock = Instance.new("TextButton")
- local NormalAmmount = Instance.new("TextBox")
- local SuperBlock = Instance.new("TextButton")
- local SuperAmmount = Instance.new("TextBox")
- local RainbowBlock = Instance.new("TextButton")
- local RainbowAmmount = Instance.new("TextBox")
- local Fly = Instance.new("TextButton")
- local Noclip = Instance.new("TextButton")
- local HideButton = Instance.new("ImageButton")
- local Name = Instance.new("TextLabel")
- local GuiActive = false
- local plr = game.Players.LocalPlayer
- local plrName = plr.Name
- --Properties:
- LuckyBlocksGui.Name = "LuckyBlocksGui"
- LuckyBlocksGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- LuckyBlocksGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- MainFrame.Name = "MainFrame"
- MainFrame.Parent = LuckyBlocksGui
- MainFrame.BackgroundColor3 = Color3.new(0, 0, 0)
- MainFrame.BackgroundTransparency = 0.30000001192093
- MainFrame.Position = UDim2.new(0.404893458, 0, 0.0649717525, 0)
- MainFrame.Size = UDim2.new(0, 240, 0, 30)
- MainFrame.Draggable = true
- ButtonFrame.Name = "ButtonFrame"
- ButtonFrame.Parent = MainFrame
- ButtonFrame.BackgroundColor3 = Color3.new(0, 0, 0)
- ButtonFrame.BackgroundTransparency = 0.5
- ButtonFrame.Position = UDim2.new(0.000726789236, 0, 0.974011302, 0)
- ButtonFrame.Size = UDim2.new(0, 240, 0, 361)
- ButtonFrame.Visible = false
- BaseTP.Name = "BaseTP"
- BaseTP.Parent = ButtonFrame
- BaseTP.BackgroundColor3 = Color3.new(0, 0, 0)
- BaseTP.BackgroundTransparency = 0.5
- BaseTP.BorderColor3 = Color3.new(0, 0, 0)
- BaseTP.Position = UDim2.new(0.0375000015, 0, 0.0554016605, 0)
- BaseTP.Size = UDim2.new(0, 100, 0, 30)
- BaseTP.Font = Enum.Font.SourceSansBold
- BaseTP.Text = "Tp to base "
- BaseTP.TextColor3 = Color3.new(1, 1, 1)
- BaseTP.TextSize = 16
- BaseTP.Activated:connect(function()
- game.Workspace[plrName].HumanoidRootPart.CFrame = game.Workspace["Spawn"..BaseNum.Text].SpawnLocation.CFrame
- end)
- BaseNum.Name = "BaseNum"
- BaseNum.Parent = ButtonFrame
- BaseNum.BackgroundColor3 = Color3.new(0, 0, 0)
- BaseNum.BackgroundTransparency = 0.5
- BaseNum.BorderColor3 = Color3.new(0, 0, 0)
- BaseNum.Position = UDim2.new(0.555000007, 0, 0.0549999997, 0)
- BaseNum.Size = UDim2.new(0, 100, 0, 30)
- BaseNum.Font = Enum.Font.SourceSansBold
- BaseNum.PlaceholderText = "Base Number ( from 1 to 8 )"
- BaseNum.Text = ""
- BaseNum.TextColor3 = Color3.new(1, 1, 1)
- BaseNum.TextScaled = true
- BaseNum.TextSize = 16
- BaseNum.TextStrokeColor3 = Color3.new(1, 1, 1)
- BaseNum.TextWrapped = true
- NormalBlock.Name = "NormalBlock"
- NormalBlock.Parent = ButtonFrame
- NormalBlock.BackgroundColor3 = Color3.new(0, 0, 0)
- NormalBlock.BackgroundTransparency = 0.5
- NormalBlock.BorderColor3 = Color3.new(0, 0, 0)
- NormalBlock.Position = UDim2.new(0.0375000015, 0, 0.193905815, 0)
- NormalBlock.Size = UDim2.new(0, 100, 0, 30)
- NormalBlock.Font = Enum.Font.SourceSansBold
- NormalBlock.Text = "TP to player"
- NormalBlock.TextColor3 = Color3.new(1, 1, 1)
- NormalBlock.TextScaled = true
- NormalBlock.TextSize = 16
- NormalBlock.TextWrapped = true
- NormalBlock.Activated:connect(function()
- game.Workspace[plrName].HumanoidRootPart.CFrame = game.Workspace[NormalAmmount.Text].HumanoidRootPart.CFrame
- end)
- NormalAmmount.Name = "NormalAmmount"
- NormalAmmount.Parent = ButtonFrame
- NormalAmmount.BackgroundColor3 = Color3.new(0, 0, 0)
- NormalAmmount.BackgroundTransparency = 0.5
- NormalAmmount.BorderColor3 = Color3.new(0, 0, 0)
- NormalAmmount.Position = UDim2.new(0.555000007, 0, 0.193504155, 0)
- NormalAmmount.Size = UDim2.new(0, 100, 0, 30)
- NormalAmmount.Font = Enum.Font.SourceSansBold
- NormalAmmount.PlaceholderText = "Player Name"
- NormalAmmount.Text = ""
- NormalAmmount.TextColor3 = Color3.new(1, 1, 1)
- NormalAmmount.TextScaled = true
- NormalAmmount.TextSize = 16
- NormalAmmount.TextStrokeColor3 = Color3.new(1, 1, 1)
- NormalAmmount.TextWrapped = true
- SuperBlock.Name = "SuperBlock"
- SuperBlock.Parent = ButtonFrame
- SuperBlock.BackgroundColor3 = Color3.new(0, 0, 0)
- SuperBlock.BackgroundTransparency = 0.5
- SuperBlock.BorderColor3 = Color3.new(0, 0, 0)
- SuperBlock.Position = UDim2.new(0.0375000015, 0, 0.332409978, 0)
- SuperBlock.Size = UDim2.new(0, 100, 0, 30)
- SuperBlock.Font = Enum.Font.SourceSansBold
- SuperBlock.Text = "Get diamond block items"
- SuperBlock.TextColor3 = Color3.new(1, 1, 1)
- SuperBlock.TextScaled = true
- SuperBlock.TextSize = 16
- SuperBlock.TextWrapped = true
- SuperBlock.Activated:connect(function()
- for i=1,SuperAmmount.Text do
- game.ReplicatedStorage.SpawnDiamondBlock:FireServer()
- end
- end)
- SuperAmmount.Name = "SuperAmmount"
- SuperAmmount.Parent = ButtonFrame
- SuperAmmount.BackgroundColor3 = Color3.new(0, 0, 0)
- SuperAmmount.BackgroundTransparency = 0.5
- SuperAmmount.BorderColor3 = Color3.new(0, 0, 0)
- SuperAmmount.Position = UDim2.new(0.555000007, 0, 0.332008302, 0)
- SuperAmmount.Size = UDim2.new(0, 100, 0, 30)
- SuperAmmount.Font = Enum.Font.SourceSansBold
- SuperAmmount.PlaceholderText = "Diamond Block items ammount"
- SuperAmmount.Text = ""
- SuperAmmount.TextColor3 = Color3.new(1, 1, 1)
- SuperAmmount.TextScaled = true
- SuperAmmount.TextSize = 16
- SuperAmmount.TextStrokeColor3 = Color3.new(1, 1, 1)
- SuperAmmount.TextWrapped = true
- RainbowBlock.Name = "RainbowBlock"
- RainbowBlock.Parent = ButtonFrame
- RainbowBlock.BackgroundColor3 = Color3.new(0, 0, 0)
- RainbowBlock.BackgroundTransparency = 0.5
- RainbowBlock.BorderColor3 = Color3.new(0, 0, 0)
- RainbowBlock.Position = UDim2.new(0.0375000015, 0, 0.487534642, 0)
- RainbowBlock.Size = UDim2.new(0, 100, 0, 30)
- RainbowBlock.Font = Enum.Font.SourceSansBold
- RainbowBlock.Text = "Get rainbow block items"
- RainbowBlock.TextColor3 = Color3.new(1, 1, 1)
- RainbowBlock.TextScaled = true
- RainbowBlock.TextSize = 16
- RainbowBlock.TextWrapped = true
- RainbowBlock.Activated:connect(function()
- for i=1,RainbowAmmount.Text do
- game.ReplicatedStorage.SpawnRainbowBlock:FireServer()
- end
- end)
- RainbowAmmount.Name = "RainbowAmmount"
- RainbowAmmount.Parent = ButtonFrame
- RainbowAmmount.BackgroundColor3 = Color3.new(0, 0, 0)
- RainbowAmmount.BackgroundTransparency = 0.5
- RainbowAmmount.BorderColor3 = Color3.new(0, 0, 0)
- RainbowAmmount.Position = UDim2.new(0.555000007, 0, 0.487132967, 0)
- RainbowAmmount.Size = UDim2.new(0, 100, 0, 30)
- RainbowAmmount.Font = Enum.Font.SourceSansBold
- RainbowAmmount.PlaceholderText = "Rainbow Block items ammount"
- RainbowAmmount.Text = ""
- RainbowAmmount.TextColor3 = Color3.new(1, 1, 1)
- RainbowAmmount.TextScaled = true
- RainbowAmmount.TextSize = 16
- RainbowAmmount.TextStrokeColor3 = Color3.new(1, 1, 1)
- RainbowAmmount.TextWrapped = true
- Fly.Name = "Fly"
- Fly.Parent = ButtonFrame
- Fly.BackgroundColor3 = Color3.new(0, 0, 0)
- Fly.BackgroundTransparency = 0.5
- Fly.BorderColor3 = Color3.new(0, 0, 0)
- Fly.Position = UDim2.new(0.291666657, 0, 0.63988924, 0)
- Fly.Size = UDim2.new(0, 100, 0, 30)
- Fly.Font = Enum.Font.SourceSansBold
- Fly.Text = "Fly (alt to toggle)"
- Fly.TextColor3 = Color3.new(1, 1, 1)
- Fly.TextScaled = true
- Fly.TextSize = 16
- Fly.TextWrapped = true
- local Settings = {
- Speed = 5,
- SprintSpeed = 30,
- ToggleKey = Enum.KeyCode.LeftAlt,
- SprintKey = Enum.KeyCode.LeftControl,
- ForwardKey = Enum.KeyCode.W,
- LeftKey = Enum.KeyCode.A,
- BackwardKey = Enum.KeyCode.S,
- RightKey = Enum.KeyCode.D,
- UpKey = Enum.KeyCode.E,
- DownKey = Enum.KeyCode.Q,
- }
- local Screen = Instance.new("ScreenGui",game.CoreGui)
- local Distance = Instance.new("TextLabel",Screen)
- Distance.BackgroundTransparency = 1
- Distance.Size = UDim2.new(0,10,0,10)
- Distance.ZIndex = 2
- Distance.Text = "0"
- Distance.TextStrokeTransparency = .5
- Distance.TextSize = 20
- Distance.TextStrokeColor3 = Color3.fromRGB(33, 33, 33)
- Distance.Font = Enum.Font.Gotham
- Distance.TextColor3 = Color3.new(1,1,1)
- Distance.TextXAlignment = Enum.TextXAlignment.Left
- Distance.TextYAlignment = Enum.TextYAlignment.Top
- local Mouse = game.Players.LocalPlayer:GetMouse()
- local Direction = Vector3.new(0,0,0)
- local InterpolatedDir = Direction
- local Tilt = 0
- local InterpolatedTilt = Tilt
- local RunService = game:GetService("RunService")
- local Toggled = false
- local Sprinting = false
- local CameraPos = game.Workspace.CurrentCamera.CFrame.Position
- pcall(function()
- game.Players.LocalPlayer.DevCameraOcclusionMode = Enum.DevCameraOcclusionMode.Invisicam
- end)
- function Lerp(a, b, t)
- return a + (b - a) * t
- end
- local LastPos = nil
- function KeyHandler(actionName, userInputState)
- if true and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- if actionName == "Toggle" and userInputState == Enum.UserInputState.Begin then
- Toggled = not Toggled
- if Toggled then
- LastPos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
- --game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
- game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
- else
- LastPos = nil
- game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
- --game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
- end
- elseif actionName == "Forward" then
- Tilt = userInputState == Enum.UserInputState.Begin and -20 or 0
- Direction = Vector3.new(Direction.x,Direction.y,userInputState == Enum.UserInputState.Begin and -1 or 0)
- elseif actionName == "Left" then
- Direction = Vector3.new(userInputState == Enum.UserInputState.Begin and -1 or 0,Direction.y,Direction.z)
- elseif actionName == "Backward" then
- Tilt = userInputState == Enum.UserInputState.Begin and 20 or 0
- Direction = Vector3.new(Direction.x,Direction.y,userInputState == Enum.UserInputState.Begin and 1 or 0)
- elseif actionName == "Right" then
- Direction = Vector3.new(userInputState == Enum.UserInputState.Begin and 1 or 0,Direction.y,Direction.z)
- elseif actionName == "Up" then
- Direction = Vector3.new(Direction.x,userInputState == Enum.UserInputState.Begin and 1 or 0,Direction.z)
- elseif actionName == "Down" then
- Direction = Vector3.new(Direction.x,userInputState == Enum.UserInputState.Begin and -1 or 0,Direction.z)
- elseif actionName == "Sprint" then
- Sprinting = userInputState == Enum.UserInputState.Begin
- end
- end
- end
- game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
- if inputObject.KeyCode == Settings.ToggleKey then
- KeyHandler("Toggle", Enum.UserInputState.Begin, inputObject)
- elseif inputObject.KeyCode == Settings.ForwardKey then
- KeyHandler("Forward", Enum.UserInputState.Begin, inputObject)
- elseif inputObject.KeyCode == Settings.LeftKey then
- KeyHandler("Left", Enum.UserInputState.Begin, inputObject)
- elseif inputObject.KeyCode == Settings.BackwardKey then
- KeyHandler("Backward", Enum.UserInputState.Begin, inputObject)
- elseif inputObject.KeyCode == Settings.RightKey then
- KeyHandler("Right", Enum.UserInputState.Begin, inputObject)
- elseif inputObject.KeyCode == Settings.UpKey then
- KeyHandler("Up", Enum.UserInputState.Begin, inputObject)
- elseif inputObject.KeyCode == Settings.DownKey then
- KeyHandler("Down", Enum.UserInputState.Begin, inputObject)
- elseif inputObject.KeyCode == Settings.SprintKey then
- KeyHandler("Sprint", Enum.UserInputState.Begin, inputObject)
- end
- end)
- game:GetService("UserInputService").InputEnded:connect(function(inputObject, gameProcessedEvent)
- if inputObject.KeyCode == Settings.ToggleKey then
- KeyHandler("Toggle", Enum.UserInputState.End, inputObject)
- elseif inputObject.KeyCode == Settings.ForwardKey then
- KeyHandler("Forward", Enum.UserInputState.End, inputObject)
- elseif inputObject.KeyCode == Settings.LeftKey then
- KeyHandler("Left", Enum.UserInputState.End, inputObject)
- elseif inputObject.KeyCode == Settings.BackwardKey then
- KeyHandler("Backward", Enum.UserInputState.End, inputObject)
- elseif inputObject.KeyCode == Settings.RightKey then
- KeyHandler("Right", Enum.UserInputState.End, inputObject)
- elseif inputObject.KeyCode == Settings.UpKey then
- KeyHandler("Up", Enum.UserInputState.End, inputObject)
- elseif inputObject.KeyCode == Settings.DownKey then
- KeyHandler("Down", Enum.UserInputState.End, inputObject)
- elseif inputObject.KeyCode == Settings.SprintKey then
- KeyHandler("Sprint", Enum.UserInputState.End, inputObject)
- end
- end)
- RunService.RenderStepped:Connect(function()
- if Toggled and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- for i,v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
- if v:IsA("BasePart") then
- v.Velocity = Vector3.new(0,0,0)
- end
- end
- local RootPart = game.Players.LocalPlayer.Character.HumanoidRootPart
- if LastPos then
- Distance.Text = math.floor((LastPos-RootPart.Position).Magnitude+.5)
- if (LastPos-RootPart.Position).Magnitude >= 350 then
- Distance.TextColor3 = Color3.new(1,0,0)
- else
- Distance.TextColor3 = Color3.new(1,1,1)
- end
- else
- Distance.TextColor3 = Color3.new(1,1,1)
- Distance.Text = 0
- end
- InterpolatedDir = InterpolatedDir:Lerp((Direction * (Sprinting and Settings.SprintSpeed or Settings.Speed)),.2)
- InterpolatedTilt = Lerp(InterpolatedTilt ,Tilt* (Sprinting and 2 or 1),Tilt == 0 and .2 or .1)
- 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)
- else
- Distance.TextColor3 = Color3.new(1,1,1)
- Distance.Text = 0
- end
- end)
- Noclip.Name = "Noclip"
- Noclip.Parent = ButtonFrame
- Noclip.BackgroundColor3 = Color3.new(0, 0, 0)
- Noclip.BackgroundTransparency = 0.5
- Noclip.BorderColor3 = Color3.new(0, 0, 0)
- Noclip.Position = UDim2.new(0.287499994, 0, 0.795013905, 0)
- Noclip.Size = UDim2.new(0, 100, 0, 30)
- Noclip.Font = Enum.Font.SourceSansBold
- Noclip.Text = "Click2TP (ctrl to tp)"
- Noclip.TextColor3 = Color3.new(1, 1, 1)
- Noclip.TextScaled = true
- Noclip.TextSize = 16
- Noclip.TextWrapped = true
- Noclip.Activated:connect(function()
- local Plr = game:GetService("Players").LocalPlayer
- local Mouse = Plr:GetMouse()
- Mouse.Button1Down:connect(function()
- if not game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then return end
- if not Mouse.Target then return end
- Plr.Character:MoveTo(Mouse.Hit.p)
- end)
- end)
- HideButton.Name = "HideButton"
- HideButton.Parent = MainFrame
- HideButton.BackgroundColor3 = Color3.new(1, 1, 1)
- HideButton.BackgroundTransparency = 1
- HideButton.Position = UDim2.new(0.891666651, 0, 0.166666672, 0)
- HideButton.Size = UDim2.new(0, 20, 0, 20)
- HideButton.Image = "rbxassetid://52756150"
- Name.Name = "Name"
- Name.Parent = MainFrame
- Name.BackgroundColor3 = Color3.new(1, 1, 1)
- Name.BackgroundTransparency = 1
- Name.Size = UDim2.new(0, 200, 0, 29)
- Name.Font = Enum.Font.SourceSansBold
- Name.Text = "Lucky Blocks GUI"
- Name.TextColor3 = Color3.new(1, 1, 1)
- Name.TextSize = 18
- -- Scripts:
- HideButton.Activated:connect(function()
- if GuiActive == false then
- ButtonFrame.Visible = true
- GuiActive = true
- HideButton.Image = "rbxassetid://52756189"
- else
- ButtonFrame.Visible = false
- GuiActive = false
- HideButton.Image = "rbxassetid://52756150"
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement