Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --or just copy this:loadstring(game:HttpGet('https://pastebin.com/raw/imDcmf3y'))()
- --your allowed to showcase this script :D
- --made by gdamiano on youtube
- --tell me in the comments if I should make for R15
- --THIS SCRIPT ONLY WORKS FOR R6
- -- Services
- local TweenService = game:GetService("TweenService")
- local UserInputService = game:GetService("UserInputService")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "CustomGui"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = player:WaitForChild("PlayerGui")
- -- === Utility: Rounded Corners ===
- local function addRoundness(uiElement, radius)
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, radius or 12)
- corner.Parent = uiElement
- end
- -- === Notification Label ===
- local notification = Instance.new("TextLabel")
- notification.Size = UDim2.new(0, 200, 0, 35)
- notification.Position = UDim2.new(0.5, -100, 0.85, 0)
- notification.BackgroundTransparency = 0.2
- notification.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- notification.TextColor3 = Color3.fromRGB(230, 230, 230)
- notification.TextScaled = true
- notification.Text = ""
- notification.Visible = false
- notification.Parent = screenGui
- addRoundness(notification)
- local function showNotification(text)
- notification.Text = text
- notification.Visible = true
- notification.TextTransparency = 1
- notification.BackgroundTransparency = 1
- local fadeIn = TweenService:Create(notification, TweenInfo.new(0.3), {
- TextTransparency = 0,
- BackgroundTransparency = 0.2
- })
- fadeIn:Play()
- fadeIn.Completed:Wait()
- task.wait(1)
- local fadeOut = TweenService:Create(notification, TweenInfo.new(0.3), {
- TextTransparency = 1,
- BackgroundTransparency = 1
- })
- fadeOut:Play()
- fadeOut.Completed:Wait()
- notification.Visible = false
- end
- -- === Smooth Feedback Animation ===
- local function animateClick(uiElement)
- local origColor = uiElement.BackgroundColor3
- local tween = TweenService:Create(uiElement, TweenInfo.new(0.1), {
- BackgroundColor3 = origColor:Lerp(Color3.new(1, 1, 1), 0.1)
- })
- tween:Play()
- tween.Completed:Wait()
- TweenService:Create(uiElement, TweenInfo.new(0.2), {
- BackgroundColor3 = origColor
- }):Play()
- end
- -- === Background UI Holder ===
- local uiHolder = Instance.new("Frame")
- uiHolder.Size = UDim2.new(0, 450, 0, 260)
- uiHolder.Position = UDim2.new(0.5, -225, 0.4, 0)
- uiHolder.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- uiHolder.BackgroundTransparency = 0.3
- uiHolder.BorderSizePixel = 0
- uiHolder.Parent = screenGui
- addRoundness(uiHolder)
- -- === Main Frame for Headless Button ===
- local frame = Instance.new("Frame")
- frame.Name = "MainFrame"
- frame.Size = UDim2.new(0, 120, 0, 120)
- frame.Position = UDim2.new(0, 20, 0.5, -60)
- frame.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- frame.BorderSizePixel = 0
- frame.Active = true
- frame.Parent = uiHolder
- addRoundness(frame)
- -- === Headless Button ===
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(1, 0, 1, 0)
- button.BackgroundColor3 = Color3.fromRGB(120, 120, 120)
- button.Text = "Headless"
- button.TextColor3 = Color3.new(1, 1, 1)
- button.Font = Enum.Font.GothamSemibold
- button.TextScaled = true
- button.Parent = frame
- addRoundness(button)
- -- === Size Input Box ===
- local sizeInput = Instance.new("TextBox")
- sizeInput.Size = UDim2.new(0, 120, 0, 40)
- sizeInput.Position = UDim2.new(0, 160, 0.15, 0)
- sizeInput.PlaceholderText = "Size (e.g. 1.5)"
- sizeInput.Text = ""
- sizeInput.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- sizeInput.TextColor3 = Color3.fromRGB(255, 255, 255)
- sizeInput.Font = Enum.Font.Gotham
- sizeInput.TextScaled = true
- sizeInput.ClearTextOnFocus = false
- sizeInput.Parent = uiHolder
- addRoundness(sizeInput)
- -- === Resize Button ===
- local resizeButton = Instance.new("TextButton")
- resizeButton.Size = UDim2.new(0, 120, 0, 40)
- resizeButton.Position = UDim2.new(0, 160, 0.5, -20)
- resizeButton.BackgroundColor3 = Color3.fromRGB(130, 130, 130)
- resizeButton.Text = "Change Size!"
- resizeButton.TextColor3 = Color3.new(1, 1, 1)
- resizeButton.Font = Enum.Font.GothamSemibold
- resizeButton.TextScaled = true
- resizeButton.Parent = uiHolder
- addRoundness(resizeButton)
- -- === Drag Utility ===
- local function makeDraggable(uiElement)
- local dragging, dragInput, dragStart, startPos
- uiElement.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = uiElement.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- uiElement.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- local delta = input.Position - dragStart
- uiElement.Position = UDim2.new(
- startPos.X.Scale,
- startPos.X.Offset + delta.X,
- startPos.Y.Scale,
- startPos.Y.Offset + delta.Y
- )
- end
- end)
- end
- -- === Resize Utility ===
- local function makeResizable(uiElement)
- local resizer = Instance.new("Frame")
- resizer.Size = UDim2.new(0, 10, 0, 10)
- resizer.AnchorPoint = Vector2.new(1, 1)
- resizer.Position = UDim2.new(1, 0, 1, 0)
- resizer.BackgroundColor3 = Color3.fromRGB(150, 150, 150)
- resizer.BorderSizePixel = 0
- resizer.Parent = uiElement
- resizer.Active = true
- addRoundness(resizer, 4)
- local resizing = false
- local startSize, startPos
- resizer.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- resizing = true
- startSize = uiElement.Size
- startPos = input.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- resizing = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if resizing and input.UserInputType == Enum.UserInputType.MouseMovement then
- local delta = input.Position - startPos
- uiElement.Size = UDim2.new(
- startSize.X.Scale,
- math.max(startSize.X.Offset + delta.X, 40),
- startSize.Y.Scale,
- math.max(startSize.Y.Offset + delta.Y, 40)
- )
- end
- end)
- end
- -- === Apply Interactions ===
- makeDraggable(uiHolder)
- makeDraggable(button)
- makeResizable(button)
- makeResizable(sizeInput)
- makeResizable(resizeButton)
- -- === Headless Button Click: Animation + Notification ===
- button.MouseButton1Click:Connect(function()
- animateClick(button)
- showNotification("Headless Button Clicked!")
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:FindFirstChildOfClass("Humanoid")
- if humanoid then
- local animator = humanoid:FindFirstChildOfClass("Animator")
- if not animator then
- animator = Instance.new("Animator")
- animator.Parent = humanoid
- end
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://109950701751520"
- local track = animator:LoadAnimation(animation)
- track.Priority = Enum.AnimationPriority.Action -- Blend with movement
- track.Looped = false
- track:Play()
- else
- warn("Humanoid not found; cannot play animation.")
- end
- end)
- -- === Resize Button Logic ===
- resizeButton.MouseButton1Click:Connect(function()
- local scale = tonumber(sizeInput.Text)
- if scale and scale > 0 then
- local newSize = UDim2.new(0, 120 * scale, 0, 120 * scale)
- local tween = TweenService:Create(frame, TweenInfo.new(0.3), {
- Size = newSize
- })
- tween:Play()
- showNotification("Resized successfully")
- else
- showNotification("Invalid size input")
- end
- animateClick(resizeButton)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement