luckyblocksscript

an anonymous user · March 03, 2025
local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()

local Window = Rayfield:CreateWindow({
   Name = "Lucky Blocks | Game 🔫",
   LoadingTitle = "Lading LUCKY BLOCKS",
   LoadingSubtitle = "by declinelol",
   ConfigurationSaving = {
      Enabled = false,
      FolderName = nil, -- Create a custom folder for your hub/game
      FileName = "Example Hub"
   },
   Discord = {
      Enabled = true,
      Invite = "k4xrZc58aB", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ABCD would be ABCD
      RememberJoins = true -- Set this to false to make them join the discord every time they load it up
   },
   KeySystem = false, -- Set this to true to use our key system
   KeySettings = {
      Title = "Key | Youtube Hub",
      Subtitle = "Key System",
      Note = "Key In Discord Server",
      FileName = "YoutubeHubKey1", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
      SaveKey = false, -- The user's key will be saved, but if you change the key, they will be unable to use your script
      GrabKeyFromSite = true, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
      Key = {"https://[Log in to view URL]"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
   }
})

local MainTab = Window:CreateTab("🏠 Home", nil) -- Title, Image
local MainSection = MainTab:CreateSection("Main")

Rayfield:Notify({
   Title = "You executed the script",
   Content = "Have Fun",
   Duration = 5,
   Image = 13047715178,
   Actions = { -- Notification Buttons
      Ignore = {
         Name = "Okay!",
         Callback = function()
         print("The user tapped Okay!")
      end
   },
},
})

local Button = MainTab:CreateButton({
   Name = "Infinite Jump Toggle",
   Callback = function()
       --Toggles the infinite jump between on or off on every script run
_G.infinjump = not _G.infinjump

if _G.infinJumpStarted == nil then
	--Ensures this only runs once to save resources
	_G.infinJumpStarted = true
	
	--Notifies readiness
	game.StarterGui:SetCore("SendNotification", {Title="Youtube Hub"; Text="Infinite Jump Activated!"; Duration=5;})

	--The actual infinite jump
	local plr = game:GetService('Players').LocalPlayer
	local m = plr:GetMouse()
	m.KeyDown:connect(function(k)
		if _G.infinjump then
			if k:byte() == 32 then
			humanoid = game:GetService'Players'.LocalPlayer.Character:FindFirstChildOfClass('Humanoid')
			humanoid:ChangeState('Jumping')
			wait()
			humanoid:ChangeState('Seated')
			end
		end
	end)
end
   end,
})

local Slider = MainTab:CreateSlider({
   Name = "WalkSpeed Slider",
   Range = {1, 350},
   Increment = 1,
   Suffix = "Speed",
   CurrentValue = 16,
   Flag = "sliderws", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
   Callback = function(Value)
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = (Value)
   end,
})

local Slider = MainTab:CreateSlider({
   Name = "JumpPower Slider",
   Range = {1, 350},
   Increment = 1,
   Suffix = "Speed",
   CurrentValue = 16,
   Flag = "sliderjp", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
   Callback = function(Value)
        game.Players.LocalPlayer.Character.Humanoid.JumpPower = (Value)
   end,
})

local Input = MainTab:CreateInput({
   Name = "Walkspeed",
   PlaceholderText = "1-500",
   RemoveTextAfterFocusLost = true,
   Callback = function(Text)
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = (Text)
   end,
})

local OtherSection = MainTab:CreateSection("Other")

local Button1 = MainTab:CreateButton({
   Name = "Get Item (rainbow block)",
   Callback = function()
       -- Give the item when the button is pressed
       game:GetService("ReplicatedStorage").SpawnRainbowBlock:FireServer()
       print("Item Given!")
   end,
})

local loopConnection -- Store the loop connection

local Toggle = MainTab:CreateToggle({
   Name = "Auto Give Items (rainbow block)",
   CurrentValue = false,
   Flag = "Toggle1", 
   Callback = function(Value)
       if Value then
           -- Start the loop when toggled on
           loopConnection = game:GetService("RunService").Heartbeat:Connect(function()
               game:GetService("ReplicatedStorage").SpawnRainbowBlock:FireServer()
               wait(0.1) -- Adjust delay if needed
           end)
           print("FARMING STARTED")
       else
           -- Stop the loop when toggled off
           if loopConnection then
               loopConnection:Disconnect()
               loopConnection = nil
           end
           print("FARMING STOPPED")
       end
   end,
})

local Button2 = MainTab:CreateButton({
   Name = "Get Item (galaxy block)",
   Callback = function()
       -- Give the item when the button is pressed
       game:GetService("ReplicatedStorage").SpawnGalaxyBlock:FireServer()
       print("Item Given!")
   end,
})

local loopConnection -- Store the loop connection

local MiscTab = Window:CreateTab("🎲 Misc", nil) -- Title, Image
local Toggle = MainTab:CreateToggle({
   Name = "Auto Give Items (galaxy block)",
   CurrentValue = false,
   Flag = "Toggle1", 
   Callback = function(Value)
       if Value then
           -- Start the loop when toggled on
           loopConnection = game:GetService("RunService").Heartbeat:Connect(function()
               game:GetService("ReplicatedStorage").SpawnGalaxyBlock:FireServer()
               wait(0.1) -- Adjust delay if needed
           end)
           print("FARMING STARTED")
       else
           -- Stop the loop when toggled off
           if loopConnection then
               loopConnection:Disconnect()
               loopConnection = nil
           end
           print("FARMING STOPPED")
       end
   end,
})


local TPTab = Window:CreateTab("🏝 Teleports", nil) -- Title, Image
local Section = TeleportTab:CreateSection("Islands")

local Button1 = TPTab:CreateButton({
   Name = "Middle",
   Callback = function()
       local player = game.Players.LocalPlayer
       local targetPart = workspace:FindFirstChild("CenterBlocks") and 
                          workspace.CenterBlocks:FindFirstChild("Givers") and 
                          workspace.CenterBlocks.Givers:FindFirstChild("VoidGiver") and 
                          workspace.CenterBlocks.Givers.VoidGiver:FindFirstChild("ColoredParts") and 
                          workspace.CenterBlocks.Givers.VoidGiver.ColoredParts:FindFirstChild("Center")

       if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and targetPart then
           player.Character.HumanoidRootPart.CFrame = targetPart.CFrame
           print("Teleported to CenterBlocks.Givers.VoidGiver.ColoredParts.Center")
       else
           print("Teleport failed: Target part not found")
       end
   end,
})



local Button2 = TPTab:CreateButton({
   Name = "Back To Base",
   Callback = function()
       local player = game.Players.LocalPlayer
       local targetPart = workspace:FindFirstChild("tp") and 
                          workspace.tp:FindFirstChild("SpawnWalls")

       if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and targetPart then
           player.Character.HumanoidRootPart.CFrame = targetPart.CFrame
           print("Teleported to tp.SpawnWalls")
       else
           print("Teleport failed: Target part not found")
       end
   end,
})

local Button3 = TPTab:CreateButton({
   Name = "Tree",
   Callback = function()
       local player = game.Players.LocalPlayer
       if not player or not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then return end

       local targetPart = workspace:GetChildren()[21]:GetChildren()[107]

       if targetPart and targetPart:IsA("BasePart") then
           player.Character.HumanoidRootPart.CFrame = targetPart.CFrame
       end
   end,
})

local Toggle = MiscTab:CreateToggle({
   Name = "Player ESP",
   CurrentValue = false,
   Flag = "ToggleESP",
   Callback = function(Value)
       if Value then
           -- Function to create ESP for a player
           local function createESP(player)
               if player == game.Players.LocalPlayer then return end -- Don't highlight yourself
               if player.Character then
                   local highlight = player.Character:FindFirstChild("Highlight")
                   if not highlight then
                       highlight = Instance.new("Highlight")
                       highlight.Parent = player.Character
                       highlight.FillColor = Color3.fromRGB(255, 0, 0) -- Red color
                       highlight.OutlineColor = Color3.fromRGB(255, 255, 255) -- White outline
                       highlight.FillTransparency = 0.5
                       highlight.OutlineTransparency = 0
                   end
               end
           end

           -- Function to add ESP to all players
           local function addESPToAllPlayers()
               for _, player in pairs(game.Players:GetPlayers()) do
                   createESP(player)
               end
           end

           -- Start ESP
           addESPToAllPlayers()

           -- Listen for new players
           playerAddedConnection = game.Players.PlayerAdded:Connect(function(player)
               player.CharacterAdded:Connect(function()
                   createESP(player)
               end)
           end)

           print("ESP ACTIVATED")
       else
           -- Remove ESP from all players
           for _, player in pairs(game.Players:GetPlayers()) do
               if player.Character then
                   local highlight = player.Character:FindFirstChild("Highlight")
                   if highlight then
                       highlight:Destroy()
                   end
               end
           end

           -- Disconnect listener
           if playerAddedConnection then
               playerAddedConnection:Disconnect()
               playerAddedConnection = nil
           end

           print("ESP DEACTIVATED")
       end
   end,
})


Output

Comments

Please sign up or log in to contribute to the discussion.