
Keyless

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local RollService = ReplicatedStorage:WaitForChild("_NetworkServiceContainer"):WaitForChild("RollService")
local activeUUID = nil
local rolling = true
local function createDraggableButton(buttonText, initialPosition, buttonColor)
local CustomScreenGui = Instance.new("ScreenGui")
local CustomButton = Instance.new("TextButton")
local UICorner = Instance.new("UICorner")
local UIStroke = Instance.new("UIStroke")
local CoreGui = game:GetService("CoreGui")
CustomScreenGui.Name = "RollingControlGUI"
CustomScreenGui.Parent = CoreGui
CustomScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
CustomScreenGui.ResetOnSpawn = false
CustomButton.Parent = CustomScreenGui
CustomButton.BackgroundColor3 = buttonColor or Color3.fromRGB(255, 255, 255)
CustomButton.BackgroundTransparency = 0.5
CustomButton.Position = initialPosition
CustomButton.Size = UDim2.new(0.1, 0, 0.05, 0)
CustomButton.Text = buttonText
CustomButton.TextColor3 = Color3.fromRGB(255, 255, 255)
CustomButton.TextScaled = true
UICorner.CornerRadius = UDim.new(1, 0)
UICorner.Parent = CustomButton
UIStroke.Parent = CustomButton
UIStroke.Thickness = 2
UIStroke.Color = Color3.fromRGB(0, 0, 0)
local dragging
local dragInput, dragStart, startPos
CustomButton.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = CustomButton.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
CustomButton.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
game:GetService("UserInputService").InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - dragStart
CustomButton.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
end)
CustomButton.MouseButton1Click:Connect(function()
rolling = not rolling
if rolling then
CustomButton.Text = "Stop Rolling"
print("Rolling started.")
else
CustomButton.Text = "Start Rolling"
activeUUID = nil
print("Rolling stopped. UUID has been reset.")
end
end)
return CustomScreenGui
end
local initialButtonPosition = UDim2.new(0.5, -50, 0.5, -25)
createDraggableButton("Stop Rolling", initialButtonPosition, Color3.fromRGB(0, 170, 255))
local function logArguments(args)
print("RollService event received. Arguments:")
for index, value in ipairs(args) do
print(index, ":", value)
end
end
local function attemptRoll(uuid)
local args = {
[1] = "attemptTraitRoll",
[2] = uuid
}
RollService:FireServer(unpack(args))
print("Attempting roll with UUID:", uuid)
end
RollService.OnClientEvent:Connect(function(...)
local args = {...}
if not activeUUID and args[2] and type(args[2]) == "string" then
activeUUID = args[2]
print("Captured UUID:", activeUUID)
end
logArguments(args)
end)
local function autoRoll()
while true do
if rolling and activeUUID then
attemptRoll(activeUUID)
end
wait(1)
end
end
spawn(autoRoll)
I tried my best to make it as optimized as possible please read description before using it
GPT
🤫
nice script LIKE :)
very cool LIKE :)
my script is remix for his, the mechanic is almost same