Advertisement
ProScripter29

Universal Hub 1.0

Dec 15th, 2022 (edited)
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.70 KB | None | 0 0
  1. -- Universal Script --
  2.  
  3. local Library = loadstring(game:HttpGet("https://pastebin.com/raw/jNS157AK"))()
  4.  
  5. local Players = game:GetService("Players")
  6. local StarterGui = game:GetService("StarterGui")
  7.  
  8. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  9.  
  10. local RunService = game:GetService("RunService")
  11. local InputService = game:GetService("UserInputService")
  12. local TeleportService = game:GetService("TeleportService")
  13.  
  14. local GroupService = game:GetService("GroupService")
  15. local Chat = game:GetService("Chat")
  16.  
  17. local Player = Players.LocalPlayer
  18.  
  19. -- Variables --
  20. _G.HSpeed = 16
  21. _G.HJumpPower = 50
  22.  
  23. local InfiniteJumps = false
  24.  
  25. _G.HHitboxExpander = false
  26. _G.HHitboxSize = Vector3.new(7.5, 7.5, 7.5)
  27.  
  28. local Gravity = 180
  29.  
  30. local ChatSpam = false
  31. local SpamDelay = 1
  32. local SpamMessage = "Hello world!"
  33.  
  34. local ScriptRunning = true
  35.  
  36. -- Main --
  37. local Window = Library:CreateWindow("Universal Hub", "...")
  38.  
  39. local Main = Window:addPage("Player", 5, true, 7.5)
  40.  
  41. task.wait() -- Wait for a while to load
  42.  
  43. local BackgroundSound = Instance.new("Sound", workspace)
  44. BackgroundSound.Name = "_bgsound"
  45. BackgroundSound.Looped = true
  46.  
  47. local ScriptStarted = false
  48. local Transparency = true
  49. local NoClip = false
  50.  
  51. local Player = game:GetService("Players").LocalPlayer
  52. local RealCharacter = Player.Character or Player.CharacterAdded:Wait()
  53.  
  54. local IsInvisible = false
  55.  
  56. RealCharacter.Archivable = true
  57.  
  58. local FakeCharacter = RealCharacter:Clone()
  59.  
  60. local Part
  61.  
  62. Part = Instance.new("Part", workspace)
  63. Part.Anchored = true
  64. Part.Size = Vector3.new(200, 1, 200)
  65. Part.CFrame = CFrame.new(5000, 0, 5000)
  66. Part.CanCollide = true
  67. FakeCharacter.Parent = workspace
  68. FakeCharacter.HumanoidRootPart.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  69.  
  70. for i, v in pairs(RealCharacter:GetChildren()) do
  71.     if v:IsA("LocalScript") then
  72.         local clone = v:Clone()
  73.         clone.Disabled = true
  74.         clone.Parent = FakeCharacter
  75.     end
  76. end
  77.  
  78. if Transparency then
  79.     for i, v in pairs(FakeCharacter:GetDescendants()) do
  80.         if v:IsA("BasePart") then
  81.             v.BrickColor = BrickColor.new("Institutional white")
  82.             v.Transparency = -1
  83.             v.Material = Enum.Material.ForceField
  84.         end
  85.     end
  86. end
  87.  
  88. local CanInvis = true
  89.  
  90. local function RealCharacterDied()
  91.     CanInvis = false
  92.     RealCharacter:Destroy()
  93.     RealCharacter = Player.Character
  94.     CanInvis = true
  95.     IsInvisible = false
  96.     FakeCharacter:Destroy()
  97.     workspace.CurrentCamera.CameraSubject = RealCharacter.Humanoid
  98.  
  99.     RealCharacter.Archivable = true
  100.     FakeCharacter = RealCharacter:Clone()
  101.     Part:Destroy()
  102.     Part = Instance.new("Part", workspace)
  103.     Part.Anchored = true
  104.     Part.Size = Vector3.new(200, 1, 200)
  105.     Part.CFrame = CFrame.new(5000, 0, 5000) --Set this to whatever you want, just far away from the map.
  106.     Part.CanCollide = true
  107.     FakeCharacter.Parent = workspace
  108.     FakeCharacter.HumanoidRootPart.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  109.  
  110.     for i, v in pairs(RealCharacter:GetChildren()) do
  111.         if v:IsA("LocalScript") then
  112.             local clone = v:Clone()
  113.             clone.Disabled = true
  114.             clone.Parent = FakeCharacter
  115.         end
  116.     end
  117.     if Transparency then
  118.         for i, v in pairs(FakeCharacter:GetDescendants()) do
  119.             if v:IsA("BasePart") then
  120.                 v.BrickColor = BrickColor.new("Institutional white")
  121.                 v.Transparency = -1
  122.                 v.Material = Enum.Material.ForceField
  123.             end
  124.         end
  125.     end
  126.     RealCharacter.Humanoid.Died:Connect(function()
  127.         RealCharacter:Destroy()
  128.         FakeCharacter:Destroy()
  129.     end)
  130.     Player.CharacterAppearanceLoaded:Connect(RealCharacterDied)
  131. end
  132.  
  133. RealCharacter.Humanoid.Died:Connect(function()
  134.     RealCharacter:Destroy()
  135.     FakeCharacter:Destroy()
  136. end)
  137.  
  138. Player.CharacterAppearanceLoaded:Connect(RealCharacterDied)
  139.  
  140. local PseudoAnchor
  141.  
  142. RunService.RenderStepped:Connect(
  143.     function()
  144.         if PseudoAnchor ~= nil then
  145.             PseudoAnchor.CFrame = Part.CFrame * CFrame.new(0, 5, 0)
  146.         end
  147.         if NoClip then
  148.             FakeCharacter.Humanoid:ChangeState(11)
  149.         end
  150.     end
  151. )
  152.  
  153. PseudoAnchor = FakeCharacter.HumanoidRootPart
  154.  
  155. local function SetInvisible()
  156.     if IsInvisible == false then
  157.         local StoredCF = RealCharacter.HumanoidRootPart.CFrame
  158.         RealCharacter.HumanoidRootPart.CFrame = FakeCharacter.HumanoidRootPart.CFrame
  159.         FakeCharacter.HumanoidRootPart.CFrame = StoredCF
  160.         RealCharacter.Humanoid:UnequipTools()
  161.         Player.Character = FakeCharacter
  162.         workspace.CurrentCamera.CameraSubject = FakeCharacter.Humanoid
  163.         PseudoAnchor = RealCharacter.HumanoidRootPart
  164.         for i, v in pairs(FakeCharacter:GetChildren()) do
  165.             if v:IsA("LocalScript") then
  166.                 v.Disabled = false
  167.             end
  168.         end
  169.  
  170.         IsInvisible = true
  171.     else
  172.         local StoredCF = FakeCharacter.HumanoidRootPart.CFrame
  173.         FakeCharacter.HumanoidRootPart.CFrame = RealCharacter.HumanoidRootPart.CFrame
  174.  
  175.         RealCharacter.HumanoidRootPart.CFrame = StoredCF
  176.  
  177.         FakeCharacter.Humanoid:UnequipTools()
  178.         Player.Character = RealCharacter
  179.         workspace.CurrentCamera.CameraSubject = RealCharacter.Humanoid
  180.         PseudoAnchor = FakeCharacter.HumanoidRootPart
  181.         for i, v in pairs(FakeCharacter:GetChildren()) do
  182.             if v:IsA("LocalScript") then
  183.                 v.Disabled = true
  184.             end
  185.         end
  186.         IsInvisible = false
  187.     end
  188. end
  189.  
  190. local function SetSpeed()
  191.     -- Speed
  192.     while task.wait() do
  193.         if (Player.Character ~= nil) and (ScriptRunning == true) then
  194.             if (Player.Character:FindFirstChildOfClass("Humanoid") ~= nil) then
  195.                 Player.Character:FindFirstChildOfClass("Humanoid").WalkSpeed = _G.HSpeed
  196.             end
  197.         end
  198.     end
  199. end
  200.  
  201. local function SetJumpPower()
  202.     -- Jump Power
  203.     while task.wait() do
  204.         if (Player.Character ~= nil) and (ScriptRunning == true) then
  205.             if (Player.Character:FindFirstChildOfClass("Humanoid") ~= nil) then
  206.                 Player.Character:FindFirstChildOfClass("Humanoid").UseJumpPower = true
  207.                 Player.Character:FindFirstChildOfClass("Humanoid").JumpPower = _G.HJumpPower
  208.             end
  209.         end
  210.     end
  211. end
  212.  
  213. local function ChatSpammer()
  214.     -- Spam the Chat
  215.     local Remote = ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest
  216.     while true do
  217.         if (Player ~= nil) and (ChatSpam == true) and (ScriptRunning == true) then
  218.             local Args = {
  219.                 [1] = SpamMessage,
  220.                 [2] = "All"
  221.             }
  222.             Remote:FireServer(unpack(Args))
  223.             task.wait(SpamDelay)
  224.         end
  225.         task.wait()
  226.     end
  227. end
  228.  
  229. local function HitboxExpand()
  230.     -- Get all players
  231.     while task.wait(0.1) do
  232.         if (HitboxExpander == true) and (ScriptRunning == true) then
  233.             for _, Target in pairs(game.Players:GetPlayers()) do
  234.                 if (Target ~= Player) and (Target.Character ~= nil) and (Target.Character:FindFirstChild("HumanoidRootPart") ~= nil) then
  235.                     local HumanoidRootPart = Target.Character:FindFirstChild("HumanoidRootPart")
  236.                     HumanoidRootPart.Size = _G.HHitboxSize
  237.                     HumanoidRootPart.CanCollide = false
  238.                     HumanoidRootPart.Transparency = 1
  239.                     HumanoidRootPart.Material = Enum.Material.Neon
  240.                     HumanoidRootPart.BrickColor = Target.TeamColor
  241.                     if not HumanoidRootPart:FindFirstChild("_happyshighlight") then
  242.                         local Highlight = Instance.new("BoxHandleAdornment", HumanoidRootPart)
  243.                         Highlight.Name = "_happyshighlight"
  244.                         Highlight.Visible = true
  245.                         Highlight.AlwaysOnTop = true
  246.                         Highlight.Adornee = HumanoidRootPart
  247.                         Highlight.Size = _G.HHitboxSize
  248.                         Highlight.ZIndex = 0
  249.                         Highlight.AdornCullingMode = Enum.AdornCullingMode.Never
  250.                         Highlight.Transparency = 0.7
  251.                         Highlight.Color = Target.TeamColor
  252.                     else
  253.                         local Highlight = HumanoidRootPart:FindFirstChild("_happyshighlight")
  254.                         Highlight.Visible = true
  255.                         Highlight.AlwaysOnTop = true
  256.                         Highlight.Adornee = HumanoidRootPart
  257.                         Highlight.Size = _G.HHitboxSize
  258.                         Highlight.ZIndex = 0
  259.                         Highlight.AdornCullingMode = Enum.AdornCullingMode.Never
  260.                         Highlight.Transparency = 0.7
  261.                         Highlight.Color = Target.TeamColor
  262.                     end
  263.                 end
  264.             end
  265.         else
  266.             for _, Target in pairs(game.Players:GetPlayers()) do
  267.                 if (Target.Character ~= nil) and (Target.Character:FindFirstChild("HumanoidRootPart") ~= nil) then
  268.                     local HumanoidRootPart = Target.Character:FindFirstChild("HumanoidRootPart")
  269.                     HumanoidRootPart.Size = Vector3.new(2, 2, 1)
  270.                     HumanoidRootPart.CanCollide = false
  271.                     HumanoidRootPart.Transparency = 1
  272.                     if HumanoidRootPart:FindFirstChild("_happyshighlight") then
  273.                         HumanoidRootPart:FindFirstChild("_happyshighlight"):Destroy()
  274.                     end
  275.                 end
  276.             end
  277.         end
  278.     end
  279. end
  280.  
  281. Main:addLabel("Basic Actions", "Actions for your Character")
  282.  
  283. Main:addButton("Reset Character", function()
  284.     if (Player.Character ~= nil) then
  285.         Player.Character:FindFirstChildOfClass("Humanoid").Health = 0
  286.     end
  287. end)
  288.  
  289. Main:addTextBox("Speed", "...", function(Value)
  290.     if (tonumber(Value) ~= nil) then
  291.         _G.HSpeed = Value
  292.     end
  293. end)
  294.  
  295. Main:addTextBox("Jump Power", "...", function(Value)
  296.     if (tonumber(Value) ~= nil) then
  297.         _G.HJumpPower = Value
  298.     end
  299. end)
  300.  
  301. Main:addToggle("Infinite Jumps", function(Toggle)
  302.     if (Toggle == true) then
  303.         InfiniteJumps = true
  304.         InputService.JumpRequest:Connect(function()
  305.             if (InfiniteJumps == true) then
  306.                 Player.Character:FindFirstChildOfClass("Humanoid"):ChangeState("Jumping")
  307.             end
  308.         end)
  309.     end
  310. end)
  311.  
  312. Main:addToggle("Invisible | God Mode", function(Toggle)
  313.     if CanInvis and RealCharacter and FakeCharacter then
  314.         if RealCharacter:FindFirstChild("HumanoidRootPart") and FakeCharacter:FindFirstChild("HumanoidRootPart") then
  315.             SetInvisible()
  316.         end
  317.     end
  318. end)
  319.  
  320. Main:addLabel("Client Actions", "Actions for the Client")
  321.  
  322. Main:addToggle("Hitbox Expander", function(Toggle)
  323.     if (Toggle == false) then
  324.         HitboxSize = Vector3.new(7.5, 7.5, 7.5) -- Set to default hitbox expanding size
  325.         HitboxExpander = Toggle
  326.     else
  327.         HitboxExpander = Toggle
  328.     end
  329. end)
  330.  
  331. Main:addTextBox("Hitbox Size", "...", function(Value)
  332.     if (tonumber(Value) ~= nil) and (HitboxExpander == true) then
  333.         _G.HHitboxSize = Vector3.new(Value, Value, Value)
  334.     end
  335. end)
  336.  
  337. Main:addLabel("Server Actions", "Rejoin & Kick Yourself")
  338.  
  339. Main:addButton("Rejoin", function()
  340.     if (Player ~= nil) then
  341.         TeleportService:Teleport(game.PlaceId, Player)
  342.     end
  343. end)
  344.  
  345. Main:addButton("Kick", function()
  346.     if (Player ~= nil) then
  347.         Player:Kick("Requested kick from the client")
  348.     end
  349. end)
  350.  
  351. Main:addLabel("Chat Spammer", "Automatically spams messages in the Chat")
  352.  
  353. Main:addToggle("Chat Spam", function(Toggle)
  354.     ChatSpam = true
  355. end)
  356.  
  357. Main:addTextBox("Spam Message", "...", function(Value)
  358.     SpamMessage = tostring(Value)
  359. end)
  360.  
  361. Main:addTextBox("Spam Delay", "...", function(Value)
  362.     if (tonumber(Value) ~= nil) then
  363.         SpamDelay = tonumber(Value)
  364.     end
  365. end)
  366.  
  367. Main:addLabel("Info", "Copy your player and the game's info")
  368.  
  369. Main:addButton("Copy Player ID", function()
  370.     setclipboard(Player.UserId)
  371.     print("Player ID Copied!")
  372. end)
  373.  
  374. Main:addButton("Copy Creator ID", function()
  375.     if game.CreatorType == Enum.CreatorType.Group then
  376.         setclipboard(GroupService:GetGroupInfoAsync(game.CreatorId).Owner.Id)
  377.     else
  378.         setclipboard(game.CreatorId)
  379.     end
  380.     print("Creator ID Copied!")
  381. end)
  382.  
  383. Main:addButton("Copy Place ID", function()
  384.     setclipboard(game.GameId)
  385.     print("Game ID Copied!")
  386. end)
  387.  
  388. -- Sounds Page
  389.  
  390. local Music = Window:addPage("Music", 5, false, 7.5)
  391.  
  392. Music:addLabel("Background Music", "Enjoy your favorite ROBLOX music on the current game")
  393.  
  394. Music:addTextBox("Custom Music", "...", function(ID)
  395.     BackgroundSound.SoundId = "rbxassetid://"..ID
  396.     BackgroundSound.Volume = 2
  397.     BackgroundSound.PlaybackSpeed = 1
  398.     BackgroundSound:Stop() -- Replace Current Sound
  399.     BackgroundSound:Play() -- Play New Sound
  400. end)
  401.  
  402. -- Credits
  403.  
  404. local Credits = Window:addPage("Credits", 1, false, 7.5)
  405.  
  406. Credits:addLabel("Credits", "Hud created by HappyH0lidays2021")
  407.  
  408. Credits:addButton("Reset Gui", function()
  409.     ScriptRunning = false
  410.     loadstring(game:HttpGet("https://pastebin.com/raw/MqjU7wKz"))()
  411. end)
  412.  
  413. -- Start other functions
  414.  
  415. task.spawn(SetSpeed)
  416. task.spawn(SetJumpPower)
  417. task.spawn(HitboxExpand)
  418. task.spawn(ChatSpammer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement