Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- -- VARIĆVEIS
- local humanoid
- local enabled = false
- local baseAnimationSpeed = 1
- local animationSpeed = baseAnimationSpeed
- -- UI Setup
- local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- screenGui.ResetOnSpawn = false
- -- Frame
- local frame = Instance.new("Frame", screenGui)
- frame.Size = UDim2.new(0, 160, 0, 120)
- frame.Position = UDim2.new(0.5, -80, 0.2, 0)
- frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- frame.BorderSizePixel = 0
- Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 8)
- -- Header
- local header = Instance.new("TextLabel", frame)
- header.Size = UDim2.new(1, 0, 0, 30)
- header.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
- header.Text = "Speed Swing"
- header.TextColor3 = Color3.fromRGB(255, 255, 255)
- header.TextScaled = true
- header.Font = Enum.Font.GothamBold
- -- Toggle Button
- local toggleButton = Instance.new("TextButton", frame)
- toggleButton.Size = UDim2.new(0, 140, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 35)
- toggleButton.Text = "OFF"
- toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- Instance.new("UICorner", toggleButton).CornerRadius = UDim.new(0, 8)
- -- Speed Input
- local speedInput = Instance.new("TextBox", frame)
- speedInput.Size = UDim2.new(0, 140, 0, 30)
- speedInput.Position = UDim2.new(0, 10, 0, 70)
- speedInput.Text = tostring(baseAnimationSpeed)
- speedInput.PlaceholderText = "Swing Speed"
- speedInput.TextColor3 = Color3.fromRGB(255, 255, 255)
- speedInput.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- Instance.new("UICorner", speedInput).CornerRadius = UDim.new(0, 8)
- -- Mobile Draggable Feature
- local dragging = false
- local dragStart, startPos
- header.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- header.InputChanged:Connect(function(input)
- if dragging and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- local delta = input.Position - dragStart
- frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
- -- Main Functions
- local function updateAnimations()
- if humanoid then
- local animator = humanoid:FindFirstChildOfClass("Animator")
- if animator then
- for _, track in pairs(animator:GetPlayingAnimationTracks()) do
- track:AdjustSpeed(enabled and (animationSpeed / baseAnimationSpeed) or 1)
- end
- end
- end
- end
- local function setupCharacter()
- local character = player.Character or player.CharacterAdded:Wait()
- humanoid = character:WaitForChild("Humanoid")
- local animator = humanoid:FindFirstChildOfClass("Animator")
- if animator then
- animator.AnimationPlayed:Connect(updateAnimations)
- end
- updateAnimations()
- end
- local function toggleScript()
- enabled = not enabled
- toggleButton.Text = enabled and "ON" or "OFF"
- toggleButton.BackgroundColor3 = enabled and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
- updateAnimations()
- end
- -- Character Setup
- player.CharacterAdded:Connect(function()
- setupCharacter() -- Call the setup function whenever a new character spawns
- end)
- setupCharacter() -- Ensure the character is set up initially
- -- Button Actions
- toggleButton.MouseButton1Click:Connect(toggleScript)
- speedInput.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- local newSpeed = tonumber(speedInput.Text)
- if newSpeed and newSpeed > 0 then
- animationSpeed = newSpeed
- updateAnimations()
- else
- speedInput.Text = tostring(baseAnimationSpeed)
- end
- end
- end)
- -- RGB animation for title
- task.spawn(function()
- local step = 5
- while true do
- for i = 0, 255, step do
- header.TextColor3 = Color3.fromRGB(255 - i, i, 0)
- task.wait(0.05)
- end
- end
- end)
- -- Creating Tag for creator
- local function createCreatorTag(target)
- local function createTag()
- if target.Character and target.Character:FindFirstChild("Head") and not target.Character:FindFirstChild("LakizTag") then
- local tag = Instance.new("BillboardGui")
- tag.Name = "LakizTag"
- tag.Adornee = target.Character.Head
- tag.Size = UDim2.new(4, 0, 1, 0)
- tag.StudsOffset = Vector3.new(0, 4, 0)
- tag.AlwaysOnTop = true
- tag.MaxDistance = 100
- tag.Parent = target.Character
- local text = Instance.new("TextLabel", tag)
- text.Size = UDim2.new(1, 0, 1, 0)
- text.BackgroundTransparency = 1
- text.Text = "LAKIZ CREATOR"
- text.TextColor3 = Color3.fromRGB(255, 0, 0)
- text.TextStrokeTransparency = 0
- text.TextStrokeColor3 = Color3.new(0, 0, 0)
- text.TextScaled = true
- text.Font = Enum.Font.SourceSansBold
- RunService.RenderStepped:Connect(function()
- if tag and target.Character and target.Character:FindFirstChild("Head") then
- local cam = workspace.CurrentCamera
- local dist = (target.Character.Head.Position - cam.CFrame.Position).Magnitude
- local scale = math.clamp(dist / 10, 1.2, 5)
- tag.Size = UDim2.new(4 * scale, 0, 1 * scale, 0)
- text.TextSize = math.clamp(14 * scale, 14, 50)
- end
- end)
- end
- end
- createTag()
- target.CharacterAdded:Connect(function()
- task.wait(1)
- createTag()
- end)
- end
- -- Monitor the creator and add tag
- for _, p in ipairs(Players:GetPlayers()) do
- if p.Name == "DummySaberShowdown0" then
- createCreatorTag(p)
- end
- end
- Players.PlayerAdded:Connect(function(p)
- if p.Name == "DummySaberShowdown0" then
- createCreatorTag(p)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement