Advertisement
ProScripter29

REVAMPED Hitbox Extender Script

Jun 1st, 2023 (edited)
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. local AssetFolder = game:GetObjects("rbxassetid://13614502199")[1]
  2.  
  3. local Gui = AssetFolder:WaitForChild("HitboxSizerScript"):WaitForChild("HitboxSizeGui")
  4.  
  5. local TextBox = Gui:FindFirstChild("Box")
  6.  
  7. local LocalPlayer = game.Players.LocalPlayer
  8.  
  9. Gui.Parent = LocalPlayer.PlayerGui
  10.  
  11. AssetFolder:Destroy()
  12.  
  13. Size = Vector3.new(2,2,1)
  14.  
  15. Type = Enum.PartType.Block
  16.  
  17. TextBox.Changed:Connect(function()
  18. local NewSize = tonumber(TextBox.Text)
  19. if not NewSize then
  20. NewSize = 2
  21. Size = Vector3.new(NewSize, NewSize, 1)
  22. Type = Enum.PartType.Block
  23. else
  24. Size = Vector3.new(NewSize, NewSize, NewSize)
  25. Type = Enum.PartType.Ball
  26. end
  27. end)
  28.  
  29. task.spawn(function()
  30. while task.wait(2) do
  31. for i, Model in pairs(workspace:GetDescendants()) do
  32. if Model:IsA("Model") and Model:FindFirstChild("Humanoid") and LocalPlayer.Character then
  33. local Player = game.Players:GetPlayerFromCharacter(Model)
  34. if Player and Player.Character and (Player ~= LocalPlayer) then
  35. local Character = Player.Character
  36. if Character:FindFirstChild("HumanoidRootPart") then
  37. Character.HumanoidRootPart.Size = Size
  38. Character.HumanoidRootPart.CastShadow = false
  39. Character.HumanoidRootPart.BrickColor = BrickColor.new("Institutional white")
  40. Character.HumanoidRootPart.Transparency = -1
  41. Character.HumanoidRootPart.Material = Enum.Material.ForceField
  42. Character.HumanoidRootPart.Shape = Type
  43. Character.HumanoidRootPart.CanCollide = false
  44. end
  45. elseif not (Model == LocalPlayer.Character) then
  46. local Character = Model
  47. if Character:FindFirstChild("HumanoidRootPart") then
  48. Character.HumanoidRootPart.Size = Size
  49. Character.HumanoidRootPart.CastShadow = false
  50. Character.HumanoidRootPart.BrickColor = BrickColor.new("Institutional white")
  51. Character.HumanoidRootPart.Transparency = -1
  52. Character.HumanoidRootPart.Material = Enum.Material.ForceField
  53. Character.HumanoidRootPart.Shape = Type
  54. Character.HumanoidRootPart.CanCollide = false
  55. end
  56. end
  57. end
  58. end
  59. end
  60. end)
  61.  
  62. task.spawn(function()
  63. local UIS = game:GetService("UserInputService")
  64. function dragify(Frame)
  65. dragToggle = nil
  66. local dragSpeed = 0
  67. dragInput = nil
  68. dragStart = nil
  69. local dragPos = nil
  70. function updateInput(input)
  71. local Delta = input.Position - dragStart
  72. local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  73. game:GetService("TweenService"):Create(Frame, TweenInfo.new(0.05), {Position = Position}):Play()
  74. end
  75. Frame.InputBegan:Connect(function(input)
  76. if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and UIS:GetFocusedTextBox() == nil then
  77. dragToggle = true
  78. dragStart = input.Position
  79. startPos = Frame.Position
  80. input.Changed:Connect(function()
  81. if input.UserInputState == Enum.UserInputState.End then
  82. dragToggle = false
  83. end
  84. end)
  85. end
  86. end)
  87. Frame.InputChanged:Connect(function(input)
  88. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  89. dragInput = input
  90. end
  91. end)
  92. game:GetService("UserInputService").InputChanged:Connect(function(input)
  93. if input == dragInput and dragToggle then
  94. updateInput(input)
  95. end
  96. end)
  97. end
  98.  
  99. dragify(TextBox)
  100. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement