local Config = { AutoRoll = false } getgenv().AutoRollConfig = Config local Players = game:GetService("Players") local CoreGui = game:GetService("CoreGui") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Workspace = game:GetService("Workspace") local LocalPlayer = Players.LocalPlayer local Camera = Workspace.CurrentCamera local RemoteEvents = ReplicatedStorage:WaitForChild("RemoteEvents") local RollRequest = RemoteEvents:WaitForChild("RollRequest") local RollResult = RemoteEvents:WaitForChild("RollResult") if CoreGui:FindFirstChild("AutoRollUI") then CoreGui.AutoRollUI:Destroy() end local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "AutoRollUI" ScreenGui.Parent = CoreGui ScreenGui.ResetOnSpawn = false local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Parent = ScreenGui MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) MainFrame.BorderSizePixel = 0 MainFrame.Position = UDim2.new(0.1, 0, 0.2, 0) MainFrame.Size = UDim2.new(0, 160, 0, 90) local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(0, 12) UICorner.Parent = MainFrame local Title = Instance.new("TextLabel") Title.Parent = MainFrame Title.BackgroundTransparency = 1 Title.Position = UDim2.new(0, 0, 0, 5) Title.Size = UDim2.new(1, 0, 0, 30) Title.Font = Enum.Font.GothamBold Title.Text = "🎲 RNG Auto Roll" Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.TextSize = 14 local ToggleButton = Instance.new("TextButton") ToggleButton.Parent = MainFrame ToggleButton.BackgroundColor3 = Color3.fromRGB(200, 60, 60) ToggleButton.Position = UDim2.new(0.1, 0, 0.45, 0) ToggleButton.Size = UDim2.new(0.8, 0, 0.4, 0) ToggleButton.Font = Enum.Font.GothamBold ToggleButton.Text = "OFF" ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleButton.TextSize = 18 local ButtonCorner = Instance.new("UICorner") ButtonCorner.CornerRadius = UDim.new(0, 8) ButtonCorner.Parent = ToggleButton local dragging local dragInput local dragStart local startPos local function update(input) local delta = input.Position - dragStart MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end MainFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = MainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) MainFrame.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 input == dragInput and dragging then update(input) end end) ToggleButton.MouseButton1Click:Connect(function() Config.AutoRoll = not Config.AutoRoll if Config.AutoRoll then ToggleButton.Text = "ON" ToggleButton.BackgroundColor3 = Color3.fromRGB(60, 200, 100) else ToggleButton.Text = "OFF" ToggleButton.BackgroundColor3 = Color3.fromRGB(200, 60, 60) end end) RunService.RenderStepped:Connect(function() if Config.AutoRoll then if Camera.CameraType == Enum.CameraType.Scriptable then if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then Camera.CameraType = Enum.CameraType.Custom Camera.CameraSubject = LocalPlayer.Character.Humanoid end end LocalPlayer.CameraMaxZoomDistance = 10000 LocalPlayer.CameraMinZoomDistance = 0.5 end end) task.spawn(function() while true do if Config.AutoRoll then RollRequest:FireServer({ autoDeleteEnabled = false, autoDeleteRarities = {} }) local success = false local connection connection = RollResult.OnClientEvent:Connect(function() success = true if connection then connection:Disconnect() end end) local timeElapsed = 0 while not success and timeElapsed < 2.5 and Config.AutoRoll do timeElapsed = timeElapsed + task.wait(0.1) end if connection then connection:Disconnect() end task.wait(0.05) else task.wait(0.5) end end end)