Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local DrRayLibrary = loadstring(game:HttpGet("https://raw.githubusercontent.com/AZYsGithub/DrRay-UI-Library/main/DrRay.lua"))()
- local window = DrRayLibrary:Load("Legends Battlegrounds - Free - 🤜🏻☯️", "Default")
- local tab = DrRayLibrary.newTab("Main", "ImageIdHere")
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local STARE_DISTANCE = 20
- local isStaring = false
- local stareLoop
- local currentTarget
- local function getNearestPlayer()
- local localPlayer = Players.LocalPlayer
- local nearestPlayer = nil
- local shortestDistance = math.huge
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local playerPos = player.Character.HumanoidRootPart.Position
- local localPlayerPos = localPlayer.Character.PrimaryPart.Position
- local distance = (playerPos - localPlayerPos).magnitude
- if distance < shortestDistance then
- shortestDistance = distance
- nearestPlayer = player
- end
- end
- end
- return nearestPlayer
- end
- local function stareAtPlayer(targetPlayer)
- if stareLoop then
- stareLoop:Disconnect()
- end
- local function stareFunc()
- local localChar = Players.LocalPlayer.Character
- if not targetPlayer or not targetPlayer.Character or not targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
- stareLoop:Disconnect()
- return
- end
- if localChar.PrimaryPart and targetPlayer.Character.HumanoidRootPart then
- local localPos = localChar.PrimaryPart.Position
- local targetPos = targetPlayer.Character.HumanoidRootPart.Position
- local modTargetPos = Vector3.new(targetPos.X, localPos.Y, targetPos.Z)
- local newCFrame = CFrame.new(localPos, modTargetPos)
- localChar:SetPrimaryPartCFrame(newCFrame)
- end
- end
- stareLoop = RunService.RenderStepped:Connect(function()
- stareFunc()
- local localChar = Players.LocalPlayer.Character
- local targetPos = targetPlayer.Character.HumanoidRootPart.Position
- local localPos = localChar.PrimaryPart.Position
- local distance = (targetPos - localPos).magnitude
- if distance > STARE_DISTANCE then
- stareLoop:Disconnect()
- local newTarget = getNearestPlayer()
- stareAtPlayer(newTarget)
- end
- end)
- end
- tab.newLabel("Credits to Crypted_Workspace For Helping Me")
- tab.newInput("Distance", "Set A Value For Lock Distance", function(value)
- STARE_DISTANCE = tonumber(value) or STARE_DISTANCE
- end)
- tab.newButton("Enable/Disable Lock", "Lock Toggle", function()
- if isStaring then
- if stareLoop then
- stareLoop:Disconnect()
- end
- isStaring = false
- currentTarget = nil
- else
- currentTarget = getNearestPlayer()
- if currentTarget then
- stareAtPlayer(currentTarget)
- isStaring = true
- end
- end
- end)
- local players = game:GetService("Players")
- local excludedPlayerNames = {"Kevin_MitnickHKR"}
- local forceBlock = false
- local forceM1 = false
- local forceNs1 = false
- local forceNs2 = false
- local forceNs3 = false
- local forceNs4 = false
- local forceDash = false
- local forceAwaken = false
- local function isExcluded(name)
- for _, excludedName in ipairs(excludedPlayerNames) do
- if string.find(name:lower(), excludedName:lower()) then
- return true
- end
- end
- return false
- end
- local function updatePlayerList()
- for _, player in ipairs(players:GetPlayers()) do
- if player ~= players.LocalPlayer and not isExcluded(player.Name) and not isExcluded(player.DisplayName) then
- local character = player.Character
- if character then
- local network = character:FindFirstChild("Network")
- if network and network:IsA("RemoteEvent") then
- if forceBlock then
- local args = { [1] = { ["Request"] = "FDown" } }
- network:FireServer(unpack(args))
- end
- if forceM1 then
- local args = { [1] = { ["Request"] = "M1Down" } }
- network:FireServer(unpack(args))
- end
- if forceDash then
- local args = { [1] = { ["Bool"] = false, ["Request"] = "FrontDash" } }
- network:FireServer(unpack(args))
- end
- if forceAwaken then
- local args = { [1] = { ["Request"] = "Awaken" } }
- network:FireServer(unpack(args))
- end
- if forceNs1 then
- local args = { [1] = { ["Number"] = "1", ["Request"] = "Skill" } }
- network:FireServer(unpack(args))
- end
- if forceNs2 then
- local args = { [1] = { ["Number"] = "2", ["Request"] = "Skill" } }
- network:FireServer(unpack(args))
- end
- if forceNs3 then
- local args = { [1] = { ["Number"] = "3", ["Request"] = "Skill" } }
- network:FireServer(unpack(args))
- end
- if forceNs4 then
- local args = { [1] = { ["Number"] = "4", ["Request"] = "Skill" } }
- network:FireServer(unpack(args))
- end
- end
- end
- end
- end
- end
- tab.newInput("Whitelist", "Enter Player Name To Whitelist", function(playerName)
- if not isExcluded(playerName) then
- table.insert(excludedPlayerNames, playerName)
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Success",
- Text = "Player Is Now Whitelisted.",
- Duration = 5
- })
- else
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Failed",
- Text = "Player Is Already Whitelisted.",
- Duration = 5
- })
- end
- end)
- tab.newInput("Un-Whitelist", "Enter Player Name To Remove From Whitelist", function(playerName)
- for i, excludedName in ipairs(excludedPlayerNames) do
- if string.find(excludedName:lower(), playerName:lower()) then
- table.remove(excludedPlayerNames, i)
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Success",
- Text = "Player Is Removed From Whitelist.",
- Duration = 5
- })
- return
- end
- end
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Failed",
- Text = "Player Is Not In Whitelist.",
- Duration = 5
- })
- end)
- tab.newInput("Target Player", "Enter Player Name To Target", function(playerName)
- excludedPlayerNames = {}
- for _, player in ipairs(players:GetPlayers()) do
- if player.Name ~= playerName and player ~= players.LocalPlayer then
- table.insert(excludedPlayerNames, player.Name)
- end
- end
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Successfully Set",
- Text = "All Players Except Entered Player Name Are Whitelisted.",
- Duration = 5
- })
- end)
- tab.newButton("Clear Whitelist", "Clear All Whitelisted Players", function()
- excludedPlayerNames = {}
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Whitelist Reset",
- Text = "All Players Is Removed From Whitelist.",
- Duration = 5
- })
- end)
- tab.newButton("Whitelist Players", "Whitelist All Current Players", function()
- excludedPlayerNames = {}
- for _, player in ipairs(players:GetPlayers()) do
- if player ~= players.LocalPlayer then
- table.insert(excludedPlayerNames, player.Name)
- end
- end
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Whitelist Players",
- Text = "All Current Players Have been Whitelisted.",
- Duration = 5
- })
- end)
- tab.newLabel("Combat")
- tab.newButton("Force Block", "Toggle Force-Block", function()
- forceBlock = not forceBlock
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceBlock and "Activated" or "Deactivated",
- Text = "Force-Block is " .. (forceBlock and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- tab.newButton("Force M1", "Toggle Force-M1", function()
- forceM1 = not forceM1
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceM1 and "Activated" or "Deactivated",
- Text = "Force-M1 is " .. (forceM1 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- tab.newButton("Force Forward Dash", "Toggle Force-Forward Dash", function()
- forceDash = not forceDash
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceDash and "Activated" or "Deactivated",
- Text = "Force-Forward Dash is " .. (forceDash and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- tab.newButton("Force Awaken", "Toggle Force-Awaken", function()
- forceAwaken = not forceAwaken
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceAwaken and "Activated" or "Deactivated",
- Text = "Force-Awaken is " .. (forceAwaken and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- tab.newLabel("Skills")
- tab.newLabel("Normal Mode")
- tab.newButton("Force Skill 1", "Toggle Force-Skill 1", function()
- forceNs1 = not forceNs1
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceNs1 and "Activated" or "Deactivated",
- Text = "Force-Skill 1 is " .. (forceNs1 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- tab.newButton("Force Skill 2", "Toggle Force-Skill 2", function()
- forceNs2 = not forceNs2
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceNs2 and "Activated" or "Deactivated",
- Text = "Force-Skill 2 is " .. (forceNs2 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- tab.newButton("Force Skill 3", "Toggle Force-Skill 3", function()
- forceNs3 = not forceNs3
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceNs3 and "Activated" or "Deactivated",
- Text = "Force-Skill 3 is " .. (forceNs3 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- tab.newButton("Force Skill 4", "Toggle Force-Skill 4", function()
- forceNs4 = not forceNs4
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceNs4 and "Activated" or "Deactivated",
- Text = "Force-Skill 4 is " .. (forceNs4 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- local tab = DrRayLibrary.newTab("Combat Utilities", "ImageIdHere")
- local isUppercutModeActive = false
- local uppercutLoopConnection
- tab.newButton("Uppercut Mode", "Always Uppercut Toggle", function()
- if isUppercutModeActive then
- if uppercutLoopConnection then
- uppercutLoopConnection:Disconnect()
- uppercutLoopConnection = nil
- end
- isUppercutModeActive = false
- else
- isUppercutModeActive = true
- uppercutLoopConnection = game:GetService("RunService").Heartbeat:Connect(function()
- wait(1.3)
- local args = {
- [1] = {
- ["Request"] = "SpaceDown"
- }
- }
- game:GetService("Players").LocalPlayer.Character.Network:FireServer(unpack(args))
- end)
- end
- end)
- tab.newLabel("Auto Combo")
- local tab = DrRayLibrary.newTab("Force Buttons", "ImageIdHere")
- tab.newButton("Force Block","Button", function()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ActionMenu"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 100, 0, 30)
- button.Position = UDim2.new(0, 10, 0, 10)
- button.Text = "Force Block"
- button.Font = Enum.Font.SourceSans
- button.FontSize = Enum.FontSize.Size24
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 100, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 50)
- toggleButton.Text = "Toggle Drag"
- toggleButton.Name = "ToggleDragButton" -- Unique identifier
- toggleButton.Font = Enum.Font.SourceSans
- toggleButton.FontSize = Enum.FontSize.Size24
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- toggleButton.Parent = screenGui
- -- Remove duplicates of "ToggleDragButton"
- for _, gui in pairs(screenGui:GetChildren()) do
- if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
- gui:Destroy()
- end
- end
- local UserInputService = game:GetService("UserInputService")
- local dragToggle = false
- local dragInput = nil
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- local function toggleDraggable()
- dragToggle = not dragToggle
- if not dragToggle then
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
- if button:FindFirstChild("AnchorsConstraint") then
- button.AnchorsConstraint:Destroy()
- end
- end
- end
- button.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
- dragStart = input.Position
- startPos = button.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- updateInput(input)
- end
- end)
- toggleButton.MouseButton1Click:Connect(toggleDraggable)
- button.MouseButton1Click:Connect(function()
- forceBlock = not forceBlock
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceBlock and "Activated" or "Deactivated",
- Text = "Force-Block is " .. (forceBlock and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- end)
- tab.newButton("Force M1","Button", function()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ActionMenu"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 100, 0, 30)
- button.Position = UDim2.new(0, 10, 0, 10)
- button.Text = "Force M1"
- button.Font = Enum.Font.SourceSans
- button.FontSize = Enum.FontSize.Size24
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 100, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 50)
- toggleButton.Text = "Toggle Drag"
- toggleButton.Name = "ToggleDragButton" -- Unique identifier
- toggleButton.Font = Enum.Font.SourceSans
- toggleButton.FontSize = Enum.FontSize.Size24
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- toggleButton.Parent = screenGui
- -- Remove duplicates of "ToggleDragButton"
- for _, gui in pairs(screenGui:GetChildren()) do
- if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
- gui:Destroy()
- end
- end
- local UserInputService = game:GetService("UserInputService")
- local dragToggle = false
- local dragInput = nil
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- local function toggleDraggable()
- dragToggle = not dragToggle
- if not dragToggle then
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
- if button:FindFirstChild("AnchorsConstraint") then
- button.AnchorsConstraint:Destroy()
- end
- end
- end
- button.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
- dragStart = input.Position
- startPos = button.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- updateInput(input)
- end
- end)
- toggleButton.MouseButton1Click:Connect(toggleDraggable)
- button.MouseButton1Click:Connect(function()
- forceM1 = not forceM1
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceM1 and "Activated" or "Deactivated",
- Text = "Force-M1 is " .. (forceM1 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- end)
- tab.newButton("Force Dash","Button", function()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ActionMenu"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 100, 0, 30)
- button.Position = UDim2.new(0, 10, 0, 10)
- button.Text = "Force Dash"
- button.Font = Enum.Font.SourceSans
- button.FontSize = Enum.FontSize.Size24
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 100, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 50)
- toggleButton.Text = "Toggle Drag"
- toggleButton.Name = "ToggleDragButton" -- Unique identifier
- toggleButton.Font = Enum.Font.SourceSans
- toggleButton.FontSize = Enum.FontSize.Size24
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- toggleButton.Parent = screenGui
- -- Remove duplicates of "ToggleDragButton"
- for _, gui in pairs(screenGui:GetChildren()) do
- if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
- gui:Destroy()
- end
- end
- local UserInputService = game:GetService("UserInputService")
- local dragToggle = false
- local dragInput = nil
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- local function toggleDraggable()
- dragToggle = not dragToggle
- if not dragToggle then
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
- if button:FindFirstChild("AnchorsConstraint") then
- button.AnchorsConstraint:Destroy()
- end
- end
- end
- button.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
- dragStart = input.Position
- startPos = button.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- updateInput(input)
- end
- end)
- toggleButton.MouseButton1Click:Connect(toggleDraggable)
- button.MouseButton1Click:Connect(function()
- forceDash = not forceDash
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceDash and "Activated" or "Deactivated",
- Text = "Force-Forward Dash is " .. (forceDash and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- end)
- tab.newButton("Force Awaken","Button", function()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ActionMenu"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 100, 0, 30)
- button.Position = UDim2.new(0, 10, 0, 10)
- button.Text = "Force Awaken"
- button.Font = Enum.Font.SourceSans
- button.FontSize = Enum.FontSize.Size24
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 100, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 50)
- toggleButton.Text = "Toggle Drag"
- toggleButton.Name = "ToggleDragButton" -- Unique identifier
- toggleButton.Font = Enum.Font.SourceSans
- toggleButton.FontSize = Enum.FontSize.Size24
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- toggleButton.Parent = screenGui
- -- Remove duplicates of "ToggleDragButton"
- for _, gui in pairs(screenGui:GetChildren()) do
- if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
- gui:Destroy()
- end
- end
- local UserInputService = game:GetService("UserInputService")
- local dragToggle = false
- local dragInput = nil
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- local function toggleDraggable()
- dragToggle = not dragToggle
- if not dragToggle then
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
- if button:FindFirstChild("AnchorsConstraint") then
- button.AnchorsConstraint:Destroy()
- end
- end
- end
- button.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
- dragStart = input.Position
- startPos = button.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- updateInput(input)
- end
- end)
- toggleButton.MouseButton1Click:Connect(toggleDraggable)
- button.MouseButton1Click:Connect(function()
- forceAwaken = not forceAwaken
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceAwaken and "Activated" or "Deactivated",
- Text = "Force-Awaken is " .. (forceAwaken and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- end)
- tab.newLabel("Skills")
- tab.newButton("Force-Skill 1","Button", function()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ActionMenu"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 100, 0, 30)
- button.Position = UDim2.new(0, 10, 0, 10)
- button.Text = "Force S-1"
- button.Font = Enum.Font.SourceSans
- button.FontSize = Enum.FontSize.Size24
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 100, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 50)
- toggleButton.Text = "Toggle Drag"
- toggleButton.Name = "ToggleDragButton" -- Unique identifier
- toggleButton.Font = Enum.Font.SourceSans
- toggleButton.FontSize = Enum.FontSize.Size24
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- toggleButton.Parent = screenGui
- -- Remove duplicates of "ToggleDragButton"
- for _, gui in pairs(screenGui:GetChildren()) do
- if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
- gui:Destroy()
- end
- end
- local UserInputService = game:GetService("UserInputService")
- local dragToggle = false
- local dragInput = nil
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- local function toggleDraggable()
- dragToggle = not dragToggle
- if not dragToggle then
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
- if button:FindFirstChild("AnchorsConstraint") then
- button.AnchorsConstraint:Destroy()
- end
- end
- end
- button.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
- dragStart = input.Position
- startPos = button.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- updateInput(input)
- end
- end)
- toggleButton.MouseButton1Click:Connect(toggleDraggable)
- button.MouseButton1Click:Connect(function()
- forceNs1 = not forceNs1
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceNs1 and "Activated" or "Deactivated",
- Text = "Force-Skill 1 is " .. (forceNs1 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- end)
- tab.newButton("Force-Skill 2","Button", function()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ActionMenu"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 100, 0, 30)
- button.Position = UDim2.new(0, 10, 0, 10)
- button.Text = "Force S-2"
- button.Font = Enum.Font.SourceSans
- button.FontSize = Enum.FontSize.Size24
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 100, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 50)
- toggleButton.Text = "Toggle Drag"
- toggleButton.Name = "ToggleDragButton" -- Unique identifier
- toggleButton.Font = Enum.Font.SourceSans
- toggleButton.FontSize = Enum.FontSize.Size24
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- toggleButton.Parent = screenGui
- -- Remove duplicates of "ToggleDragButton"
- for _, gui in pairs(screenGui:GetChildren()) do
- if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
- gui:Destroy()
- end
- end
- local UserInputService = game:GetService("UserInputService")
- local dragToggle = false
- local dragInput = nil
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- local function toggleDraggable()
- dragToggle = not dragToggle
- if not dragToggle then
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
- if button:FindFirstChild("AnchorsConstraint") then
- button.AnchorsConstraint:Destroy()
- end
- end
- end
- button.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
- dragStart = input.Position
- startPos = button.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- updateInput(input)
- end
- end)
- toggleButton.MouseButton1Click:Connect(toggleDraggable)
- button.MouseButton1Click:Connect(function()
- forceNs2 = not forceNs2
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceNs2 and "Activated" or "Deactivated",
- Text = "Force-Skill 2 is " .. (forceNs2 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- end)
- tab.newButton("Force-Skill 3","Button", function()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ActionMenu"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 100, 0, 30)
- button.Position = UDim2.new(0, 10, 0, 10)
- button.Text = "Force S-3"
- button.Font = Enum.Font.SourceSans
- button.FontSize = Enum.FontSize.Size24
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 100, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 50)
- toggleButton.Text = "Toggle Drag"
- toggleButton.Name = "ToggleDragButton" -- Unique identifier
- toggleButton.Font = Enum.Font.SourceSans
- toggleButton.FontSize = Enum.FontSize.Size24
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- toggleButton.Parent = screenGui
- -- Remove duplicates of "ToggleDragButton"
- for _, gui in pairs(screenGui:GetChildren()) do
- if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
- gui:Destroy()
- end
- end
- local UserInputService = game:GetService("UserInputService")
- local dragToggle = false
- local dragInput = nil
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- local function toggleDraggable()
- dragToggle = not dragToggle
- if not dragToggle then
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
- if button:FindFirstChild("AnchorsConstraint") then
- button.AnchorsConstraint:Destroy()
- end
- end
- end
- button.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
- dragStart = input.Position
- startPos = button.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- updateInput(input)
- end
- end)
- toggleButton.MouseButton1Click:Connect(toggleDraggable)
- button.MouseButton1Click:Connect(function()
- forceNs3 = not forceNs3
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceNs3 and "Activated" or "Deactivated",
- Text = "Force-Skill 3 is " .. (forceNs3 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- end)
- tab.newButton("Force-Skill 4","Button", function()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ActionMenu"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 100, 0, 30)
- button.Position = UDim2.new(0, 10, 0, 10)
- button.Text = "Force S-4"
- button.Font = Enum.Font.SourceSans
- button.FontSize = Enum.FontSize.Size24
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 100, 0, 30)
- toggleButton.Position = UDim2.new(0, 10, 0, 50)
- toggleButton.Text = "Toggle Drag"
- toggleButton.Name = "ToggleDragButton" -- Unique identifier
- toggleButton.Font = Enum.Font.SourceSans
- toggleButton.FontSize = Enum.FontSize.Size24
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- toggleButton.Parent = screenGui
- -- Remove duplicates of "ToggleDragButton"
- for _, gui in pairs(screenGui:GetChildren()) do
- if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
- gui:Destroy()
- end
- end
- local UserInputService = game:GetService("UserInputService")
- local dragToggle = false
- local dragInput = nil
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- local function toggleDraggable()
- dragToggle = not dragToggle
- if not dragToggle then
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
- if button:FindFirstChild("AnchorsConstraint") then
- button.AnchorsConstraint:Destroy()
- end
- end
- end
- button.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
- dragStart = input.Position
- startPos = button.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- updateInput(input)
- end
- end)
- toggleButton.MouseButton1Click:Connect(toggleDraggable)
- button.MouseButton1Click:Connect(function()
- forceNs4 = not forceNs4
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = forceNs4 and "Activated" or "Deactivated",
- Text = "Force-Skill 4 is " .. (forceNs4 and "Activated." or "Deactivated."),
- Duration = 5
- })
- end)
- end)
- while true do
- updatePlayerList()
- wait(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement