Pastebin
Retrouvez, créez et partagez vos snippets en temps réel.
Rechercher un Pastebin
Aucun paste trouvé.
Créer un paste
Pastebin
Blog
HackdesHub universal script
-- HackdesHub - LocalScript (Noclip R6/R15 robuste) -- Colle ce fichier dans StarterGui (LocalScript) -- Contient : UI stylée, Fly (sans anchoring), Noclip robuste R6/R15, Self-Fling -- IMPORTANT : utiliser uniquement dans ton propre jeu / pour debug local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera -- CONFIG local DEFAULT_FLY_KEY = Enum.KeyCode.F local DEFAULT_FLY_SPEED = 60 local DEFAULT_FLING_FORCE = 350 -- Idempotence cleanup helpers local function safeRemoveOldGui() if player:FindFirstChild("PlayerGui") then local existing = player.PlayerGui:FindFirstChild("HackdesHub") if existing then existing:Destroy() end end end local function safeRemoveOldPhysics() local char = player.Character if not char then return end for _, name in ipairs({"HB_Fly_BV","BP_Fly_BV","Fly_BV","HB_Fly_BG","BP_Fly_BG","Fly_BG"}) do for _, obj in ipairs(char:GetDescendants()) do if (obj:IsA("BodyVelocity") or obj:IsA("BodyGyro")) and obj.Name == name then pcall(function() obj:Destroy() end) end end end end safeRemoveOldGui() safeRemoveOldPhysics() -- Utils local function getKeyCodeFromString(str) if typeof(str) ~= "string" then return nil end local s = str:match("^%s*(.-)%s*$") if s == "" then return nil end local ok, res = pcall(function() return Enum.KeyCode[s] end) if ok and res then return res end local target = s:upper() for _, item in ipairs(Enum.KeyCode:GetEnumItems()) do if item.Name:upper() == target then return item end end return nil end local function getHRP(char) if not char then return nil end return char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso") end -- State local flyKey = DEFAULT_FLY_KEY local flySpeed = DEFAULT_FLY_SPEED local flingForce = DEFAULT_FLING_FORCE local flying = false local BV, BG, heartbeatConn = nil, nil, nil local inputState = { forward = 0, right = 0, up = 0 } -- Noclip state: savedCanCollide[part] = original bool local noclipEnabled = false local savedCanCollide = {} local partChangedConns = {} -- [part] = connection local noclipSteppedConn = nil -- Animator save local savedAnimators = {} local savedPlatformStand = nil -- UI creation (same stylé as avant) local function makeUI() local gui = Instance.new("ScreenGui") gui.Name = "HackdesHub" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local main = Instance.new("Frame") main.Name = "Main" main.Size = UDim2.new(0, 360, 0, 220) main.Position = UDim2.new(0.03, 0, 0.06, 0) main.BackgroundColor3 = Color3.fromRGB(30,30,30) main.BorderSizePixel = 0 main.Parent = gui main.Active = true local corner = Instance.new("UICorner", main) corner.CornerRadius = UDim.new(0, 12) local stroke = Instance.new("UIStroke", main) stroke.Transparency = 0.85 stroke.Thickness = 1 local grad = Instance.new("UIGradient", main) grad.Color = ColorSequence.new{ ColorSequenceKeypoint.new(0, Color3.fromRGB(42,42,42)), ColorSequenceKeypoint.new(1, Color3.fromRGB(28,28,28)) } grad.Rotation = 90 local title = Instance.new("TextLabel", main) title.Size = UDim2.new(1, -20, 0, 36) title.Position = UDim2.new(0, 10, 0, 8) title.BackgroundTransparency = 1 title.Text = "HackdesHub · Dev Tools" title.TextColor3 = Color3.fromRGB(235,235,235) title.Font = Enum.Font.GothamBold title.TextSize = 18 title.TextXAlignment = Enum.TextXAlignment.Left local sub = Instance.new("TextLabel", main) sub.Size = UDim2.new(1, -20, 0, 18) sub.Position = UDim2.new(0, 10, 0, 36) sub.BackgroundTransparency = 1 sub.Text = "Fly • Noclip • Self-Fling" sub.TextColor3 = Color3.fromRGB(170,170,170) sub.Font = Enum.Font.SourceSans sub.TextSize = 13 sub.TextXAlignment = Enum.TextXAlignment.Left local div = Instance.new("Frame", main) div.Size = UDim2.new(1, -20, 0, 2) div.Position = UDim2.new(0, 10, 0, 60) div.BackgroundColor3 = Color3.fromRGB(45,45,45) div.BorderSizePixel = 0 local function styledButton(text, pos) local b = Instance.new("TextButton") b.Size = UDim2.new(0, 160, 0, 40) b.Position = pos b.Text = text b.Font = Enum.Font.Gotham b.TextSize = 16 b.TextColor3 = Color3.fromRGB(245,245,245) b.BackgroundColor3 = Color3.fromRGB(52,52,52) b.BorderSizePixel = 0 b.Parent = main local c = Instance.new("UICorner", b) c.CornerRadius = UDim.new(0, 10) local s = Instance.new("UIStroke", b) s.Thickness = 1 s.Transparency = 0.9 local tweenInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) local normal = {BackgroundColor3 = b.BackgroundColor3} local hover = {BackgroundColor3 = Color3.fromRGB(70,70,70)} b.MouseEnter:Connect(function() TweenService:Create(b, tweenInfo, hover):Play() end) b.MouseLeave:Connect(function() TweenService:Create(b, tweenInfo, normal):Play() end) return b end local flyBtn = styledButton("Fly : OFF", UDim2.new(0, 12, 0, 72)) local noclipBtn = styledButton("Noclip : OFF", UDim2.new(0, 188, 0, 72)) local flingBtn = styledButton("Self-Fling", UDim2.new(0, 12, 0, 124)) local plus = Instance.new("TextButton", main) plus.Size = UDim2.new(0, 40, 0, 36) plus.Position = UDim2.new(0, 188, 0, 124) plus.Text = "+" plus.Font = Enum.Font.GothamBold plus.TextSize = 20 plus.TextColor3 = Color3.fromRGB(235,235,235) plus.BackgroundColor3 = Color3.fromRGB(60,60,60) local plusCorner = Instance.new("UICorner", plus); plusCorner.CornerRadius = UDim.new(0, 8) local minus = Instance.new("TextButton", main) minus.Size = UDim2.new(0, 40, 0, 36) minus.Position = UDim2.new(0, 236, 0, 124) minus.Text = "-" minus.Font = Enum.Font.GothamBold minus.TextSize = 20 minus.TextColor3 = Color3.fromRGB(235,235,235) minus.BackgroundColor3 = Color3.fromRGB(60,60,60) local minusCorner = Instance.new("UICorner", minus); minusCorner.CornerRadius = UDim.new(0, 8) local speedLabel = Instance.new("TextLabel", main) speedLabel.Size = UDim2.new(0, 320, 0, 22) speedLabel.Position = UDim2.new(0, 12, 0, 172) speedLabel.BackgroundTransparency = 1 speedLabel.Text = "Vitesse : " .. flySpeed speedLabel.TextColor3 = Color3.fromRGB(215,215,215) speedLabel.Font = Enum.Font.SourceSans speedLabel.TextSize = 14 speedLabel.TextXAlignment = Enum.TextXAlignment.Left local keyLabel = Instance.new("TextLabel", main) keyLabel.Size = UDim2.new(0, 98, 0, 18) keyLabel.Position = UDim2.new(0, 12, 0, 194) keyLabel.BackgroundTransparency = 1 keyLabel.Text = "Touche Fly :" keyLabel.TextColor3 = Color3.fromRGB(170,170,170) keyLabel.Font = Enum.Font.SourceSans keyLabel.TextSize = 13 keyLabel.TextXAlignment = Enum.TextXAlignment.Left local keyBox = Instance.new("TextBox", main) keyBox.Size = UDim2.new(0, 110, 0, 22) keyBox.Position = UDim2.new(0, 112, 0, 190) keyBox.Text = flyKey.Name keyBox.Font = Enum.Font.SourceSans keyBox.TextSize = 14 keyBox.PlaceholderText = "Ex: F, G, Space" local applyKey = Instance.new("TextButton", main) applyKey.Size = UDim2.new(0, 70, 0, 22) applyKey.Position = UDim2.new(0, 232, 0, 190) applyKey.Text = "Appliquer" applyKey.Font = Enum.Font.SourceSans applyKey.TextSize = 13 applyKey.BackgroundColor3 = Color3.fromRGB(78,78,78) applyKey.TextColor3 = Color3.fromRGB(240,240,240) local applyCorner = Instance.new("UICorner", applyKey); applyCorner.CornerRadius = UDim.new(0,6) local closeBtn = Instance.new("TextButton", main) closeBtn.Size = UDim2.new(0, 84, 0, 30) closeBtn.Position = UDim2.new(1, -94, 0, 10) closeBtn.Text = "Fermer" closeBtn.Font = Enum.Font.Gotham closeBtn.TextSize = 14 closeBtn.BackgroundColor3 = Color3.fromRGB(90,90,90) closeBtn.TextColor3 = Color3.fromRGB(245,245,245) local closeCorner = Instance.new("UICorner", closeBtn); closeCorner.CornerRadius = UDim.new(0,8) local helper = Instance.new("TextLabel", main) helper.Size = UDim2.new(1, -24, 0, 16) helper.Position = UDim2.new(0, 12, 1, -24) helper.BackgroundTransparency = 1 helper.Text = "WASD · Space (haut) · LeftShift (bas) · Clic droit: déplacer UI" helper.TextColor3 = Color3.fromRGB(150,150,150) helper.Font = Enum.Font.SourceSans helper.TextSize = 12 helper.TextXAlignment = Enum.TextXAlignment.Left -- draggable: right-click do local dragging = false local dragStart, startPos main.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton2 then dragging = true dragStart = input.Position startPos = main.Position end end) main.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement and dragging then local delta = input.Position - dragStart main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton2 then dragging = false end end) end return { gui = gui, main = main, flyBtn = flyBtn, noclipBtn = noclipBtn, flingBtn = flingBtn, plus = plus, minus = minus, speedLabel = speedLabel, keyBox = keyBox, applyKey = applyKey, closeBtn = closeBtn, helper = helper } end local ui = makeUI() -- Animations helpers (disable/restore local animators) local function disableLocalAnimations(char) if not char then return end local humanoid = char:FindFirstChildOfClass("Humanoid") if not humanoid then return end if savedPlatformStand == nil then savedPlatformStand = humanoid.PlatformStand end pcall(function() humanoid.PlatformStand = true end) for _, d in ipairs(char:GetDescendants()) do if d:IsA("Animator") then savedAnimators[d] = d.Parent d.Parent = nil end end local a = humanoid:FindFirstChildWhichIsA("Animator") if a and savedAnimators[a] == nil then savedAnimators[a] = a.Parent a.Parent = nil end end local function restoreLocalAnimations(char) for anim, parent in pairs(savedAnimators) do if anim and parent then pcall(function() anim.Parent = parent end) end end savedAnimators = {} if char then local humanoid = char:FindFirstChildOfClass("Humanoid") if humanoid and savedPlatformStand ~= nil then pcall(function() humanoid.PlatformStand = savedPlatformStand end) savedPlatformStand = nil end end end -- FLY (sans anchor) local function enableFly() local char = player.Character if not char then return end local hrp = getHRP(char) if not hrp then return end -- cleanup old BV/BG on hrp for _, c in ipairs(hrp:GetChildren()) do if (c:IsA("BodyVelocity") and (c.Name == "HB_Fly_BV" or c.Name == "BP_Fly_BV" or c.Name == "Fly_BV")) or (c:IsA("BodyGyro") and (c.Name == "HB_Fly_BG" or c.Name == "BP_Fly_BG" or c.Name == "Fly_BG")) then pcall(function() c:Destroy() end) end end -- disable animations only (do NOT anchor) disableLocalAnimations(char) BV = Instance.new("BodyVelocity") BV.Name = "HB_Fly_BV" BV.MaxForce = Vector3.new(1e5,1e5,1e5) BV.Velocity = Vector3.new(0,0,0) BV.Parent = hrp BG = Instance.new("BodyGyro") BG.Name = "HB_Fly_BG" BG.MaxTorque = Vector3.new(1e5,1e5,1e5) BG.P = 2000 BG.CFrame = hrp.CFrame BG.Parent = hrp if heartbeatConn then heartbeatConn:Disconnect(); heartbeatConn = nil end heartbeatConn = RunService.Heartbeat:Connect(function(dt) if not (BV and BG and hrp.Parent) then return end local look = camera.CFrame.LookVector local right = camera.CFrame.RightVector local moveVec = look * inputState.forward + right * inputState.right + Vector3.new(0,1,0) * inputState.up if moveVec.Magnitude > 0 then moveVec = moveVec.Unit end local targetVel = moveVec * flySpeed BV.Velocity = BV.Velocity:Lerp(targetVel, math.clamp(12 * dt, 0, 1)) BG.CFrame = CFrame.new(hrp.Position, hrp.Position + camera.CFrame.LookVector) end) end local function disableFly() flying = false if ui and ui.flyBtn then ui.flyBtn.Text = "Fly : OFF" end if heartbeatConn then heartbeatConn:Disconnect(); heartbeatConn = nil end if BV then pcall(function() BV:Destroy() end); BV = nil end if BG then pcall(function() BG:Destroy() end); BG = nil end restoreLocalAnimations(player.Character) inputState.forward, inputState.right, inputState.up = 0,0,0 end local function toggleFly() if flying then disableFly() else flying = true if ui and ui.flyBtn then ui.flyBtn.Text = "Fly : ON" end enableFly() end end -- ===== NOCLIP ROBUST (R6 & R15) ===== -- Approach: -- 1) Save original CanCollide for every BasePart in the character. -- 2) Set CanCollide = false for every BasePart. -- 3) For each part, connect to GetPropertyChangedSignal("CanCollide") to reapply false if something toggles it back. -- 4) Listen to DescendantAdded to apply the same to parts created later. -- 5) Heartbeat loop to keep table clean and reapply if needed. -- 6) On disable, restore original values and disconnect signals. local function saveAndDisablePart(part) if not part or not part:IsA("BasePart") then return end -- save original only once if savedCanCollide[part] == nil then savedCanCollide[part] = part.CanCollide end -- set CanCollide false pcall(function() part.CanCollide = false end) -- connect property change to enforce false if partChangedConns[part] == nil then partChangedConns[part] = part:GetPropertyChangedSignal("CanCollide"):Connect(function() if not noclipEnabled then return end if part and part.Parent then pcall(function() if part.CanCollide then part.CanCollide = false end end) end end) end end local function enableNoclipNow(char) if not char then return end -- ensure tables savedCanCollide = savedCanCollide or {} partChangedConns = partChangedConns or {} -- apply to existing parts for _, desc in ipairs(char:GetDescendants()) do if desc:IsA("BasePart") then saveAndDisablePart(desc) end end -- handle future parts if char and char.DescendantAdded and (not (partChangedConns["__descendant"] and partChangedConns["__descendant"].Connected)) then -- create a wrapper conn stored under special key to allow disconnect partChangedConns["__descendant"] = char.DescendantAdded:Connect(function(desc) if noclipEnabled and desc and desc:IsA("BasePart") then saveAndDisablePart(desc) -- slight delay to handle some replication races task.defer(function() if desc and desc.Parent then pcall(function() desc.CanCollide = false end) end end) end end) end -- heartbeat enforcer: clean dead entries and reapply false if needed if noclipSteppedConn then noclipSteppedConn:Disconnect(); noclipSteppedConn = nil end noclipSteppedConn = RunService.Heartbeat:Connect(function() -- iterate savedCanCollide keys for part, _ in pairs(savedCanCollide) do if part and part.Parent then if part.CanCollide then pcall(function() part.CanCollide = false end) end else -- part removed -> cleanup its conn and saved value local conn = partChangedConns[part] if conn then pcall(function() conn:Disconnect() end) partChangedConns[part] = nil end savedCanCollide[part] = nil end end end) end local function disableNoclipNow(char) -- disconnect descendant conn if partChangedConns and partChangedConns["__descendant"] then pcall(function() partChangedConns["__descendant"]:Disconnect() end) partChangedConns["__descendant"] = nil end -- restore saved values for part, original in pairs(savedCanCollide) do if part and part.Parent then pcall(function() part.CanCollide = original end) end -- disconnect per-part changed conn local conn = partChangedConns[part] if conn then pcall(function() conn:Disconnect() end) partChangedConns[part] = nil end end -- clear tables and disconnect heartbeat savedCanCollide = {} if noclipSteppedConn then noclipSteppedConn:Disconnect(); noclipSteppedConn = nil end end local function toggleNoclip() noclipEnabled = not noclipEnabled if ui and ui.noclipBtn then ui.noclipBtn.Text = noclipEnabled and "Noclip : ON" or "Noclip : OFF" end local char = player.Character if noclipEnabled then if char then task.delay(0.03, function() enableNoclipNow(char) end) end else disableNoclipNow(char) end end -- ===== Self fling ===== local function doSelfFling() local char = player.Character if not char then return end local hrp = getHRP(char) if hrp then hrp.Velocity = camera.CFrame.LookVector * flingForce end end -- ===== Input handling ===== UserInputService.InputBegan:Connect(function(input, processed) if processed then return end -- toggle fly via chosen key if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == flyKey then if flying then -- disable disableFly() else flying = true if ui and ui.flyBtn then ui.flyBtn.Text = "Fly : ON" end enableFly() end return end -- movement keys when flying if input.UserInputType == Enum.UserInputType.Keyboard then local k = input.KeyCode if k == Enum.KeyCode.W then inputState.forward = 1 end if k == Enum.KeyCode.S then inputState.forward = -1 end if k == Enum.KeyCode.D then inputState.right = 1 end if k == Enum.KeyCode.A then inputState.right = -1 end if k == Enum.KeyCode.Space then inputState.up = 1 end if k == Enum.KeyCode.LeftShift then inputState.up = -1 end end end) UserInputService.InputEnded:Connect(function(input, processed) if processed then return end if input.UserInputType == Enum.UserInputType.Keyboard then local k = input.KeyCode if k == Enum.KeyCode.W or k == Enum.KeyCode.S then inputState.forward = 0 end if k == Enum.KeyCode.A or k == Enum.KeyCode.D then inputState.right = 0 end if k == Enum.KeyCode.Space or k == Enum.KeyCode.LeftShift then inputState.up = 0 end end end) -- ===== UI wiring ===== if ui then ui.flyBtn.MouseButton1Click:Connect(function() toggleFly() end) ui.noclipBtn.MouseButton1Click:Connect(function() toggleNoclip() end) ui.flingBtn.MouseButton1Click:Connect(function() doSelfFling() end) ui.plus.MouseButton1Click:Connect(function() flySpeed = flySpeed + 10 ui.speedLabel.Text = "Vitesse : " .. flySpeed end) ui.minus.MouseButton1Click:Connect(function() flySpeed = math.max(10, flySpeed - 10) ui.speedLabel.Text = "Vitesse : " .. flySpeed end) ui.closeBtn.MouseButton1Click:Connect(function() -- clean everything if flying then disableFly() end if noclipEnabled then disableNoclipNow(player.Character); noclipEnabled = false end if ui.gui then ui.gui:Destroy() end end) ui.applyKey.MouseButton1Click:Connect(function() local txt = ui.keyBox.Text local kc = getKeyCodeFromString(txt) if kc then flyKey = kc ui.keyBox.Text = flyKey.Name ui.helper.Text = "Touche de fly appliquée : " .. flyKey.Name else ui.helper.Text = "Touche inconnue — ex: F, G, Space, LeftShift" end end) end -- Reapply noclip on respawn; disable fly on respawn player.CharacterAdded:Connect(function(char) task.delay(0.12, function() if noclipEnabled then enableNoclipNow(char) end if flying then disableFly() end end) end) -- Init UI labels if ui then ui.speedLabel.Text = "Vitesse : " .. flySpeed ui.keyBox.Text = flyKey.Name end -- End
Créé il y a 1 semaine.