MT
UnknownUniversal
Movimiento tela by ChatGPT
US
Universal Scriptleinerbrizuela91- Views
- 219
- Likes
- 0
- Dislikes
- 0
- Added
Script
--==================================================
-- TELA MINI HUB V5
-- Negro y morado | Botón minimizar
-- Animaciones normales + giros instantáneos
--==================================================
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local GUI_NAME = "TelaMiniHubV5"
local STEP_NAME = "TelaMiniHubV5_SnapTurn"
-- Evitar duplicar la interfaz y el efecto
RunService:UnbindFromRenderStep(STEP_NAME)
local oldGui = playerGui:FindFirstChild(GUI_NAME)
if oldGui then
oldGui:Destroy()
end
local enabled = false
local minimized = false
local character
local humanoid
local root
local animateScript
local oldAutoRotate
local oldAnimateDisabled
local diedConnection
local characterConnection
--==================================================
-- INTERFAZ PRINCIPAL
--==================================================
local gui = Instance.new("ScreenGui")
gui.Name = GUI_NAME
gui.ResetOnSpawn = false
gui.IgnoreGuiInset = true
gui.Parent = playerGui
local main = Instance.new("Frame")
main.Name = "Main"
main.Size = UDim2.fromOffset(190, 100)
main.Position = UDim2.new(0.5, -95, 0.2, 0)
main.BackgroundColor3 = Color3.fromRGB(15, 12, 20)
main.BorderSizePixel = 0
main.Active = true
main.Parent = gui
local mainCorner = Instance.new("UICorner")
mainCorner.CornerRadius = UDim.new(0, 10)
mainCorner.Parent = main
local outline = Instance.new("UIStroke")
outline.Color = Color3.fromRGB(145, 65, 230)
outline.Thickness = 1.5
outline.Parent = main
--==================================================
-- BARRA SUPERIOR
--==================================================
local header = Instance.new("TextLabel")
header.Name = "Header"
header.Size = UDim2.new(1, 0, 0, 30)
header.BackgroundColor3 = Color3.fromRGB(75, 30, 125)
header.BorderSizePixel = 0
header.Text = "TELA MINI HUB"
header.TextColor3 = Color3.new(1, 1, 1)
header.TextSize = 14
header.Font = Enum.Font.GothamBold
header.Parent = main
local headerCorner = Instance.new("UICorner")
headerCorner.CornerRadius = UDim.new(0, 9)
headerCorner.Parent = header
--==================================================
-- BOTÓN MINIMIZAR
--==================================================
local minimizeButton = Instance.new("TextButton")
minimizeButton.Name = "Minimize"
minimizeButton.Size = UDim2.fromOffset(28, 25)
minimizeButton.Position = UDim2.new(1, -32, 0, 2)
minimizeButton.BackgroundColor3 = Color3.fromRGB(90, 40, 145)
minimizeButton.BorderSizePixel = 0
minimizeButton.Text = "—"
minimizeButton.TextColor3 = Color3.new(1, 1, 1)
minimizeButton.TextSize = 20
minimizeButton.Font = Enum.Font.GothamBold
minimizeButton.ZIndex = 2
minimizeButton.Parent = main
local minimizeCorner = Instance.new("UICorner")
minimizeCorner.CornerRadius = UDim.new(0, 6)
minimizeCorner.Parent = minimizeButton
--==================================================
-- INTERRUPTOR TELA
--==================================================
local toggle = Instance.new("TextButton")
toggle.Name = "TelaToggle"
toggle.Size = UDim2.new(1, -20, 0, 38)
toggle.Position = UDim2.new(0, 10, 0, 45)
toggle.BackgroundColor3 = Color3.fromRGB(45, 25, 65)
toggle.BorderSizePixel = 0
toggle.Text = "TELA: OFF"
toggle.TextColor3 = Color3.fromRGB(220, 200, 255)
toggle.TextSize = 14
toggle.Font = Enum.Font.GothamBold
toggle.Parent = main
local toggleCorner = Instance.new("UICorner")
toggleCorner.CornerRadius = UDim.new(0, 7)
toggleCorner.Parent = toggle
local toggleOutline = Instance.new("UIStroke")
toggleOutline.Color = Color3.fromRGB(125, 60, 190)
toggleOutline.Thickness = 1
toggleOutline.Parent = toggle
--==================================================
-- RESTAURAR EFECTO
--==================================================
local function disableTELA()
enabled = false
RunService:UnbindFromRenderStep(STEP_NAME)
if humanoid and humanoid.Parent then
if oldAutoRotate ~= nil then
humanoid.AutoRotate = oldAutoRotate
end
end
if animateScript and animateScript.Parent then
if oldAnimateDisabled ~= nil then
animateScript.Disabled = oldAnimateDisabled
end
end
toggle.Text = "TELA: OFF"
toggle.BackgroundColor3 = Color3.fromRGB(45, 25, 65)
end
--==================================================
-- ACTIVAR EFECTO
--==================================================
local function enableTELA()
if not character or not humanoid or not root then
return
end
if humanoid.Health <= 0 then
return
end
RunService:UnbindFromRenderStep(STEP_NAME)
enabled = true
oldAutoRotate = humanoid.AutoRotate
humanoid.AutoRotate = false
-- Conservar las animaciones normales
animateScript = character:FindFirstChild("Animate")
oldAnimateDisabled = nil
if animateScript and animateScript:IsA("LocalScript") then
oldAnimateDisabled = animateScript.Disabled
animateScript.Disabled = false
end
toggle.Text = "TELA: ON"
toggle.BackgroundColor3 = Color3.fromRGB(100, 45, 160)
RunService:BindToRenderStep(
STEP_NAME,
Enum.RenderPriority.Character.Value + 1,
function()
if not enabled
or not character
or not character.Parent
or not humanoid
or humanoid.Health <= 0
or not root
or not root.Parent then
return
end
local direction = humanoid.MoveDirection
if direction.Magnitude > 0.05 then
local flatDirection = Vector3.new(
direction.X,
0,
direction.Z
)
if flatDirection.Magnitude > 0.001 then
local position = root.Position
root.CFrame = CFrame.lookAt(
position,
position + flatDirection.Unit
)
end
end
end
)
end
--==================================================
-- BOTÓN ON/OFF
--==================================================
toggle.Activated:Connect(function()
if enabled then
disableTELA()
else
enableTELA()
end
end)
--==================================================
-- MINIMIZAR / RESTAURAR
--==================================================
minimizeButton.Activated:Connect(function()
minimized = not minimized
if minimized then
toggle.Visible = false
main.Size = UDim2.fromOffset(190, 30)
minimizeButton.Text = "+"
else
toggle.Visible = true
main.Size = UDim2.fromOffset(190, 100)
minimizeButton.Text = "—"
end
end)
--==================================================
-- ARRASTRAR HUB EN MÓVIL Y PC
--==================================================
local dragging = false
local dragInput
local dragStart
local startPosition
header.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPosition = main.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
header.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and dragStart and startPosition then
if input == dragInput
or input.UserInputType == Enum.UserInputType.MouseMovement then
local delta = input.Position - dragStart
main.Position = UDim2.new(
startPosition.X.Scale,
startPosition.X.Offset + delta.X,
startPosition.Y.Scale,
startPosition.Y.Offset + delta.Y
)
end
end
end)
--==================================================
-- PERSONAJE Y RESPAWN
--==================================================
local function setupCharacter(newCharacter)
disableTELA()
character = newCharacter
humanoid = character:WaitForChild("Humanoid")
root = character:WaitForChild("HumanoidRootPart")
animateScript = character:FindFirstChild("Animate")
oldAutoRotate = nil
oldAnimateDisabled = nil
if diedConnection then
diedConnection:Disconnect()
diedConnection = nil
end
diedConnection = humanoid.Died:Connect(function()
disableTELA()
end)
end
characterConnection = player.CharacterAdded:Connect(setupCharacter)
if player.Character then
setupCharacter(player.Character)
end
--==================================================
-- LIMPIEZA
--==================================================
gui.Destroying:Connect(function()
disableTELA()
if diedConnection then
diedConnection:Disconnect()
diedConnection = nil
end
if characterConnection then
characterConnection:Disconnect()
characterConnection = nil
end
end)
print("[TELA MINI HUB V5] Cargado correctamente.")Features
- Tela movement