0% found this document useful (0 votes)
37 views3 pages

Lua GUI for Roblox Animation Control

The document contains a Lua script for a GUI in a Roblox game, featuring a TextLabel, ImageLabel, and TextButton. The script allows players to enable or disable an animation based on their character's rig type (R15 or R6) when the button is clicked. Additionally, it includes functionality to drag the GUI around the screen using mouse or touch input.

Uploaded by

harkinian7
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views3 pages

Lua GUI for Roblox Animation Control

The document contains a Lua script for a GUI in a Roblox game, featuring a TextLabel, ImageLabel, and TextButton. The script allows players to enable or disable an animation based on their character's rig type (R15 or R6) when the button is clicked. Additionally, it includes functionality to drag the GUI around the screen using mouse or touch input.

Uploaded by

harkinian7
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

-- Gui to Lua

-- Version: 3.2

-- Instances:

local ScreenGui = [Link]("ScreenGui")


local TextLabel = [Link]("TextLabel")
local ImageLabel = [Link]("ImageLabel")
local TextButton = [Link]("TextButton")

--Properties:

[Link] = [Link]:WaitForChild("PlayerGui")
[Link] = [Link]

[Link] = ScreenGui
TextLabel.BackgroundColor3 = [Link](255, 255, 255)
TextLabel.BorderColor3 = [Link](0, 0, 0)
[Link] = 0
[Link] = [Link](0.0532544367, 0, 0.06967213, 0)
[Link] = [Link](0, 245, 0, 34)
[Link] = [Link]
[Link] = "Addendum Dance (R6 Doesnt work now)"
TextLabel.TextColor3 = [Link](0, 0, 0)
[Link] = 14.000

[Link] = TextLabel
ImageLabel.BackgroundColor3 = [Link](255, 255, 255)
ImageLabel.BorderColor3 = [Link](0, 0, 0)
[Link] = 0
[Link] = [Link](-0.00388843776, 0, 1.04026031, 0)
[Link] = [Link](0, 245, 0, 349)
[Link] = "rbxassetid://2278464"

[Link] = ImageLabel
TextButton.BackgroundColor3 = [Link](255, 255, 255)
TextButton.BorderColor3 = [Link](0, 0, 0)
[Link] = 0
[Link] = [Link](0.0938775539, 0, 0.601719141, 0)
[Link] = [Link](0, 200, 0, 50)
[Link] = [Link]
[Link] = "Enable"
TextButton.TextColor3 = [Link](0, 0, 0)
[Link] = 14.000

-- Scripts:

local function QASHSR_fake_script() -- [Link]


local script = [Link]('LocalScript', TextButton)

local Players = game:GetService("Players")


local player = [Link] or [Link]:Wait()
local character = [Link] or [Link]:Wait()
local humanoid = character:WaitForChild("Humanoid")

local R15_AnimId = "rbxassetid://121924019901219"


local R6_AnimId = "rbxassetid://76766217238659"

local track -- ¢ᄍタ¢ᄌチ¢ᄍヌ¢ᄌレ AnimationTrack ¢ᄍト¢ᄌᄃ¢ᄍノ¢ᄌユ¢ᄌᆪ¢ᄌヌ¢ᄌル¢ᄌᄉ¢ᄍノ¢ᄍタ¢ᄌ゙¢


ᄌᄋ¢ᄍネ¢ᄌᆳ¢ᄍタ¢ᄌᆪ¢ᄌᄉ¢ᄌᄁ¢ᄌチ¢ᄌᆱ¢ᄌᄁ¢ᄌᄌ¢ᄌヤ¢ᄍト¢ᄌヤ¢ᄍノ

[Link].MouseButton1Up:Connect(function()
if [Link] == "Enable" then
[Link] = "Disable"

-- ¢ᄍツ¢ᄌᆱ¢ᄌᆬ¢ᄌヤ animation ¢ᄌユ¢ᄌᄇ¢ᄌᄀ RigType


local anim = [Link]("Animation")
if [Link] == [Link].R15 then
[Link] = R15_AnimId
else
[Link] = R6_AnimId
end

-- ¢ᄍツ¢ᄌᆱ¢ᄌᆬ¢ᄌヤ animation track ¢ᄍチ¢ᄌᆬ¢ᄌᄚ¢ᄍタ¢ᄌᆬ¢ᄍネ¢ᄌル


track = humanoid:LoadAnimation(anim)
track:Play()
track:AdjustSpeed(1.7)

else
[Link] = "Enable"
if track then
track:Stop()
track = nil -- ¢ᄍタ¢ᄌト¢ᄌᆬ¢ᄌᄉ¢ᄌᄁ¢ᄌᆪ¢ᄍフ¢ᄌユ¢ᄌᄆ¢ᄌᄃ¢ᄍチ¢ᄌロ¢ᄌᆪ¢ᄌᆱ¢ᄌ
ᆬ¢ᄌᄆ¢ᄌヌ¢ᄌᆱ¢ᄌᄁ¢ᄌᄌ¢ᄌヤ animation
end
end
end)

end
[Link](QASHSR_fake_script)()
local function JQSEV_fake_script() -- [Link]
local script = [Link]('LocalScript', TextLabel)

local UserInputService = game:GetService("UserInputService")

local gui = [Link]

local dragging
local dragInput
local dragStart
local startPos

local function update(input)


local delta = [Link] - dragStart
[Link] = [Link]([Link], [Link] + delta.X,
[Link], [Link] + delta.Y)
end

[Link]:Connect(function(input)
if [Link] == [Link].MouseButton1 or
[Link] == [Link] then
dragging = true
dragStart = [Link]
startPos = [Link]

[Link]:Connect(function()
if [Link] == [Link] then
dragging = false
end
end)
end
end)

[Link]:Connect(function(input)
if [Link] == [Link] or
[Link] == [Link] then
dragInput = input
end
end)

[Link]:Connect(function(input)
if input == dragInput and dragging then
update(input)
end
end)
end
[Link](JQSEV_fake_script)()

You might also like