Advertisement
KevinMitnickHKR

Legends Battlegrounds - Free - 🤜🏻☯️

Aug 15th, 2024 (edited)
6,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.45 KB | None | 0 0
  1. local DrRayLibrary = loadstring(game:HttpGet("https://raw.githubusercontent.com/AZYsGithub/DrRay-UI-Library/main/DrRay.lua"))()
  2. local window = DrRayLibrary:Load("Legends Battlegrounds - Free - 🤜🏻☯️", "Default")
  3.  
  4. local tab = DrRayLibrary.newTab("Main", "ImageIdHere")
  5.  
  6. local Players = game:GetService("Players")
  7. local RunService = game:GetService("RunService")
  8.  
  9. local STARE_DISTANCE = 20
  10. local isStaring = false
  11. local stareLoop
  12. local currentTarget
  13.  
  14. local function getNearestPlayer()
  15. local localPlayer = Players.LocalPlayer
  16. local nearestPlayer = nil
  17. local shortestDistance = math.huge
  18.  
  19. for _, player in ipairs(Players:GetPlayers()) do
  20. if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  21. local playerPos = player.Character.HumanoidRootPart.Position
  22. local localPlayerPos = localPlayer.Character.PrimaryPart.Position
  23. local distance = (playerPos - localPlayerPos).magnitude
  24.  
  25. if distance < shortestDistance then
  26. shortestDistance = distance
  27. nearestPlayer = player
  28. end
  29. end
  30. end
  31.  
  32. return nearestPlayer
  33. end
  34.  
  35. local function stareAtPlayer(targetPlayer)
  36. if stareLoop then
  37. stareLoop:Disconnect()
  38. end
  39.  
  40. local function stareFunc()
  41. local localChar = Players.LocalPlayer.Character
  42.  
  43. if not targetPlayer or not targetPlayer.Character or not targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
  44. stareLoop:Disconnect()
  45. return
  46. end
  47.  
  48. if localChar.PrimaryPart and targetPlayer.Character.HumanoidRootPart then
  49. local localPos = localChar.PrimaryPart.Position
  50. local targetPos = targetPlayer.Character.HumanoidRootPart.Position
  51. local modTargetPos = Vector3.new(targetPos.X, localPos.Y, targetPos.Z)
  52. local newCFrame = CFrame.new(localPos, modTargetPos)
  53. localChar:SetPrimaryPartCFrame(newCFrame)
  54. end
  55. end
  56.  
  57. stareLoop = RunService.RenderStepped:Connect(function()
  58. stareFunc()
  59. local localChar = Players.LocalPlayer.Character
  60. local targetPos = targetPlayer.Character.HumanoidRootPart.Position
  61. local localPos = localChar.PrimaryPart.Position
  62. local distance = (targetPos - localPos).magnitude
  63.  
  64. if distance > STARE_DISTANCE then
  65. stareLoop:Disconnect()
  66. local newTarget = getNearestPlayer()
  67. stareAtPlayer(newTarget)
  68. end
  69. end)
  70. end
  71.  
  72. tab.newLabel("Credits to Crypted_Workspace For Helping Me")
  73.  
  74. tab.newInput("Distance", "Set A Value For Lock Distance", function(value)
  75. STARE_DISTANCE = tonumber(value) or STARE_DISTANCE
  76. end)
  77.  
  78. tab.newButton("Enable/Disable Lock", "Lock Toggle", function()
  79. if isStaring then
  80. if stareLoop then
  81. stareLoop:Disconnect()
  82. end
  83. isStaring = false
  84. currentTarget = nil
  85. else
  86. currentTarget = getNearestPlayer()
  87. if currentTarget then
  88. stareAtPlayer(currentTarget)
  89. isStaring = true
  90. end
  91. end
  92. end)
  93.  
  94. local players = game:GetService("Players")
  95. local excludedPlayerNames = {"Kevin_MitnickHKR"}
  96. local forceBlock = false
  97. local forceM1 = false
  98. local forceNs1 = false
  99. local forceNs2 = false
  100. local forceNs3 = false
  101. local forceNs4 = false
  102. local forceDash = false
  103. local forceAwaken = false
  104.  
  105. local function isExcluded(name)
  106. for _, excludedName in ipairs(excludedPlayerNames) do
  107. if string.find(name:lower(), excludedName:lower()) then
  108. return true
  109. end
  110. end
  111. return false
  112. end
  113.  
  114. local function updatePlayerList()
  115. for _, player in ipairs(players:GetPlayers()) do
  116. if player ~= players.LocalPlayer and not isExcluded(player.Name) and not isExcluded(player.DisplayName) then
  117. local character = player.Character
  118. if character then
  119. local network = character:FindFirstChild("Network")
  120. if network and network:IsA("RemoteEvent") then
  121. if forceBlock then
  122. local args = { [1] = { ["Request"] = "FDown" } }
  123. network:FireServer(unpack(args))
  124. end
  125. if forceM1 then
  126. local args = { [1] = { ["Request"] = "M1Down" } }
  127. network:FireServer(unpack(args))
  128. end
  129. if forceDash then
  130. local args = { [1] = { ["Bool"] = false, ["Request"] = "FrontDash" } }
  131. network:FireServer(unpack(args))
  132. end
  133. if forceAwaken then
  134. local args = { [1] = { ["Request"] = "Awaken" } }
  135. network:FireServer(unpack(args))
  136. end
  137. if forceNs1 then
  138. local args = { [1] = { ["Number"] = "1", ["Request"] = "Skill" } }
  139. network:FireServer(unpack(args))
  140. end
  141. if forceNs2 then
  142. local args = { [1] = { ["Number"] = "2", ["Request"] = "Skill" } }
  143. network:FireServer(unpack(args))
  144. end
  145. if forceNs3 then
  146. local args = { [1] = { ["Number"] = "3", ["Request"] = "Skill" } }
  147. network:FireServer(unpack(args))
  148. end
  149. if forceNs4 then
  150. local args = { [1] = { ["Number"] = "4", ["Request"] = "Skill" } }
  151. network:FireServer(unpack(args))
  152. end
  153. end
  154. end
  155. end
  156. end
  157. end
  158.  
  159. tab.newInput("Whitelist", "Enter Player Name To Whitelist", function(playerName)
  160. if not isExcluded(playerName) then
  161. table.insert(excludedPlayerNames, playerName)
  162. game:GetService("StarterGui"):SetCore("SendNotification", {
  163. Title = "Success",
  164. Text = "Player Is Now Whitelisted.",
  165. Duration = 5
  166. })
  167. else
  168. game:GetService("StarterGui"):SetCore("SendNotification", {
  169. Title = "Failed",
  170. Text = "Player Is Already Whitelisted.",
  171. Duration = 5
  172. })
  173. end
  174. end)
  175.  
  176. tab.newInput("Un-Whitelist", "Enter Player Name To Remove From Whitelist", function(playerName)
  177. for i, excludedName in ipairs(excludedPlayerNames) do
  178. if string.find(excludedName:lower(), playerName:lower()) then
  179. table.remove(excludedPlayerNames, i)
  180. game:GetService("StarterGui"):SetCore("SendNotification", {
  181. Title = "Success",
  182. Text = "Player Is Removed From Whitelist.",
  183. Duration = 5
  184. })
  185. return
  186. end
  187. end
  188. game:GetService("StarterGui"):SetCore("SendNotification", {
  189. Title = "Failed",
  190. Text = "Player Is Not In Whitelist.",
  191. Duration = 5
  192. })
  193. end)
  194.  
  195. tab.newInput("Target Player", "Enter Player Name To Target", function(playerName)
  196. excludedPlayerNames = {}
  197. for _, player in ipairs(players:GetPlayers()) do
  198. if player.Name ~= playerName and player ~= players.LocalPlayer then
  199. table.insert(excludedPlayerNames, player.Name)
  200. end
  201. end
  202. game:GetService("StarterGui"):SetCore("SendNotification", {
  203. Title = "Successfully Set",
  204. Text = "All Players Except Entered Player Name Are Whitelisted.",
  205. Duration = 5
  206. })
  207. end)
  208.  
  209. tab.newButton("Clear Whitelist", "Clear All Whitelisted Players", function()
  210. excludedPlayerNames = {}
  211. game:GetService("StarterGui"):SetCore("SendNotification", {
  212. Title = "Whitelist Reset",
  213. Text = "All Players Is Removed From Whitelist.",
  214. Duration = 5
  215. })
  216. end)
  217.  
  218. tab.newButton("Whitelist Players", "Whitelist All Current Players", function()
  219. excludedPlayerNames = {}
  220. for _, player in ipairs(players:GetPlayers()) do
  221. if player ~= players.LocalPlayer then
  222. table.insert(excludedPlayerNames, player.Name)
  223. end
  224. end
  225. game:GetService("StarterGui"):SetCore("SendNotification", {
  226. Title = "Whitelist Players",
  227. Text = "All Current Players Have been Whitelisted.",
  228. Duration = 5
  229. })
  230. end)
  231.  
  232. tab.newLabel("Combat")
  233.  
  234. tab.newButton("Force Block", "Toggle Force-Block", function()
  235. forceBlock = not forceBlock
  236. game:GetService("StarterGui"):SetCore("SendNotification", {
  237. Title = forceBlock and "Activated" or "Deactivated",
  238. Text = "Force-Block is " .. (forceBlock and "Activated." or "Deactivated."),
  239. Duration = 5
  240. })
  241. end)
  242.  
  243. tab.newButton("Force M1", "Toggle Force-M1", function()
  244. forceM1 = not forceM1
  245. game:GetService("StarterGui"):SetCore("SendNotification", {
  246. Title = forceM1 and "Activated" or "Deactivated",
  247. Text = "Force-M1 is " .. (forceM1 and "Activated." or "Deactivated."),
  248. Duration = 5
  249. })
  250. end)
  251.  
  252. tab.newButton("Force Forward Dash", "Toggle Force-Forward Dash", function()
  253. forceDash = not forceDash
  254. game:GetService("StarterGui"):SetCore("SendNotification", {
  255. Title = forceDash and "Activated" or "Deactivated",
  256. Text = "Force-Forward Dash is " .. (forceDash and "Activated." or "Deactivated."),
  257. Duration = 5
  258. })
  259. end)
  260.  
  261. tab.newButton("Force Awaken", "Toggle Force-Awaken", function()
  262. forceAwaken = not forceAwaken
  263. game:GetService("StarterGui"):SetCore("SendNotification", {
  264. Title = forceAwaken and "Activated" or "Deactivated",
  265. Text = "Force-Awaken is " .. (forceAwaken and "Activated." or "Deactivated."),
  266. Duration = 5
  267. })
  268. end)
  269.  
  270. tab.newLabel("Skills")
  271.  
  272. tab.newLabel("Normal Mode")
  273.  
  274. tab.newButton("Force Skill 1", "Toggle Force-Skill 1", function()
  275. forceNs1 = not forceNs1
  276. game:GetService("StarterGui"):SetCore("SendNotification", {
  277. Title = forceNs1 and "Activated" or "Deactivated",
  278. Text = "Force-Skill 1 is " .. (forceNs1 and "Activated." or "Deactivated."),
  279. Duration = 5
  280. })
  281. end)
  282.  
  283. tab.newButton("Force Skill 2", "Toggle Force-Skill 2", function()
  284. forceNs2 = not forceNs2
  285. game:GetService("StarterGui"):SetCore("SendNotification", {
  286. Title = forceNs2 and "Activated" or "Deactivated",
  287. Text = "Force-Skill 2 is " .. (forceNs2 and "Activated." or "Deactivated."),
  288. Duration = 5
  289. })
  290. end)
  291.  
  292. tab.newButton("Force Skill 3", "Toggle Force-Skill 3", function()
  293. forceNs3 = not forceNs3
  294. game:GetService("StarterGui"):SetCore("SendNotification", {
  295. Title = forceNs3 and "Activated" or "Deactivated",
  296. Text = "Force-Skill 3 is " .. (forceNs3 and "Activated." or "Deactivated."),
  297. Duration = 5
  298. })
  299. end)
  300.  
  301. tab.newButton("Force Skill 4", "Toggle Force-Skill 4", function()
  302. forceNs4 = not forceNs4
  303. game:GetService("StarterGui"):SetCore("SendNotification", {
  304. Title = forceNs4 and "Activated" or "Deactivated",
  305. Text = "Force-Skill 4 is " .. (forceNs4 and "Activated." or "Deactivated."),
  306. Duration = 5
  307. })
  308. end)
  309.  
  310. local tab = DrRayLibrary.newTab("Combat Utilities", "ImageIdHere")
  311.  
  312. local isUppercutModeActive = false
  313. local uppercutLoopConnection
  314.  
  315. tab.newButton("Uppercut Mode", "Always Uppercut Toggle", function()
  316. if isUppercutModeActive then
  317. if uppercutLoopConnection then
  318. uppercutLoopConnection:Disconnect()
  319. uppercutLoopConnection = nil
  320. end
  321. isUppercutModeActive = false
  322. else
  323. isUppercutModeActive = true
  324. uppercutLoopConnection = game:GetService("RunService").Heartbeat:Connect(function()
  325. wait(1.3)
  326. local args = {
  327. [1] = {
  328. ["Request"] = "SpaceDown"
  329. }
  330. }
  331. game:GetService("Players").LocalPlayer.Character.Network:FireServer(unpack(args))
  332. end)
  333. end
  334. end)
  335.  
  336. tab.newLabel("Auto Combo")
  337.  
  338. local tab = DrRayLibrary.newTab("Force Buttons", "ImageIdHere")
  339.  
  340. tab.newButton("Force Block","Button", function()
  341. local screenGui = Instance.new("ScreenGui")
  342. screenGui.Name = "ActionMenu"
  343. screenGui.ResetOnSpawn = false
  344. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  345.  
  346. local button = Instance.new("TextButton")
  347. button.Size = UDim2.new(0, 100, 0, 30)
  348. button.Position = UDim2.new(0, 10, 0, 10)
  349. button.Text = "Force Block"
  350. button.Font = Enum.Font.SourceSans
  351. button.FontSize = Enum.FontSize.Size24
  352. button.TextColor3 = Color3.new(1, 1, 1)
  353. button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  354.  
  355. button.Parent = screenGui
  356.  
  357. local toggleButton = Instance.new("TextButton")
  358. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  359. toggleButton.Position = UDim2.new(0, 10, 0, 50)
  360. toggleButton.Text = "Toggle Drag"
  361. toggleButton.Name = "ToggleDragButton" -- Unique identifier
  362. toggleButton.Font = Enum.Font.SourceSans
  363. toggleButton.FontSize = Enum.FontSize.Size24
  364. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  365. toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  366.  
  367. toggleButton.Parent = screenGui
  368.  
  369. -- Remove duplicates of "ToggleDragButton"
  370. for _, gui in pairs(screenGui:GetChildren()) do
  371. if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
  372. gui:Destroy()
  373. end
  374. end
  375.  
  376. local UserInputService = game:GetService("UserInputService")
  377.  
  378. local dragToggle = false
  379. local dragInput = nil
  380. local dragStart = nil
  381. local startPos = nil
  382.  
  383. local function updateInput(input)
  384. local delta = input.Position - dragStart
  385. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  386. end
  387.  
  388. local function toggleDraggable()
  389. dragToggle = not dragToggle
  390. if not dragToggle then
  391. button.AnchorPoint = Vector2.new(0.5, 0.5)
  392. button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
  393. if button:FindFirstChild("AnchorsConstraint") then
  394. button.AnchorsConstraint:Destroy()
  395. end
  396. end
  397. end
  398.  
  399. button.InputBegan:Connect(function(input)
  400. if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
  401. dragStart = input.Position
  402. startPos = button.Position
  403. input.Changed:Connect(function()
  404. if input.UserInputState == Enum.UserInputState.End then
  405. dragToggle = false
  406. end
  407. end)
  408. end
  409. end)
  410.  
  411. UserInputService.InputChanged:Connect(function(input)
  412. if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
  413. updateInput(input)
  414. end
  415. end)
  416.  
  417. toggleButton.MouseButton1Click:Connect(toggleDraggable)
  418.  
  419. button.MouseButton1Click:Connect(function()
  420. forceBlock = not forceBlock
  421. game:GetService("StarterGui"):SetCore("SendNotification", {
  422. Title = forceBlock and "Activated" or "Deactivated",
  423. Text = "Force-Block is " .. (forceBlock and "Activated." or "Deactivated."),
  424. Duration = 5
  425. })
  426. end)
  427. end)
  428.  
  429. tab.newButton("Force M1","Button", function()
  430. local screenGui = Instance.new("ScreenGui")
  431. screenGui.Name = "ActionMenu"
  432. screenGui.ResetOnSpawn = false
  433. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  434.  
  435. local button = Instance.new("TextButton")
  436. button.Size = UDim2.new(0, 100, 0, 30)
  437. button.Position = UDim2.new(0, 10, 0, 10)
  438. button.Text = "Force M1"
  439. button.Font = Enum.Font.SourceSans
  440. button.FontSize = Enum.FontSize.Size24
  441. button.TextColor3 = Color3.new(1, 1, 1)
  442. button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  443.  
  444. button.Parent = screenGui
  445.  
  446. local toggleButton = Instance.new("TextButton")
  447. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  448. toggleButton.Position = UDim2.new(0, 10, 0, 50)
  449. toggleButton.Text = "Toggle Drag"
  450. toggleButton.Name = "ToggleDragButton" -- Unique identifier
  451. toggleButton.Font = Enum.Font.SourceSans
  452. toggleButton.FontSize = Enum.FontSize.Size24
  453. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  454. toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  455.  
  456. toggleButton.Parent = screenGui
  457.  
  458. -- Remove duplicates of "ToggleDragButton"
  459. for _, gui in pairs(screenGui:GetChildren()) do
  460. if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
  461. gui:Destroy()
  462. end
  463. end
  464.  
  465. local UserInputService = game:GetService("UserInputService")
  466.  
  467. local dragToggle = false
  468. local dragInput = nil
  469. local dragStart = nil
  470. local startPos = nil
  471.  
  472. local function updateInput(input)
  473. local delta = input.Position - dragStart
  474. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  475. end
  476.  
  477. local function toggleDraggable()
  478. dragToggle = not dragToggle
  479. if not dragToggle then
  480. button.AnchorPoint = Vector2.new(0.5, 0.5)
  481. button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
  482. if button:FindFirstChild("AnchorsConstraint") then
  483. button.AnchorsConstraint:Destroy()
  484. end
  485. end
  486. end
  487.  
  488. button.InputBegan:Connect(function(input)
  489. if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
  490. dragStart = input.Position
  491. startPos = button.Position
  492. input.Changed:Connect(function()
  493. if input.UserInputState == Enum.UserInputState.End then
  494. dragToggle = false
  495. end
  496. end)
  497. end
  498. end)
  499.  
  500. UserInputService.InputChanged:Connect(function(input)
  501. if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
  502. updateInput(input)
  503. end
  504. end)
  505.  
  506. toggleButton.MouseButton1Click:Connect(toggleDraggable)
  507.  
  508. button.MouseButton1Click:Connect(function()
  509. forceM1 = not forceM1
  510. game:GetService("StarterGui"):SetCore("SendNotification", {
  511. Title = forceM1 and "Activated" or "Deactivated",
  512. Text = "Force-M1 is " .. (forceM1 and "Activated." or "Deactivated."),
  513. Duration = 5
  514. })
  515. end)
  516. end)
  517.  
  518. tab.newButton("Force Dash","Button", function()
  519. local screenGui = Instance.new("ScreenGui")
  520. screenGui.Name = "ActionMenu"
  521. screenGui.ResetOnSpawn = false
  522. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  523.  
  524. local button = Instance.new("TextButton")
  525. button.Size = UDim2.new(0, 100, 0, 30)
  526. button.Position = UDim2.new(0, 10, 0, 10)
  527. button.Text = "Force Dash"
  528. button.Font = Enum.Font.SourceSans
  529. button.FontSize = Enum.FontSize.Size24
  530. button.TextColor3 = Color3.new(1, 1, 1)
  531. button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  532.  
  533. button.Parent = screenGui
  534.  
  535. local toggleButton = Instance.new("TextButton")
  536. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  537. toggleButton.Position = UDim2.new(0, 10, 0, 50)
  538. toggleButton.Text = "Toggle Drag"
  539. toggleButton.Name = "ToggleDragButton" -- Unique identifier
  540. toggleButton.Font = Enum.Font.SourceSans
  541. toggleButton.FontSize = Enum.FontSize.Size24
  542. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  543. toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  544.  
  545. toggleButton.Parent = screenGui
  546.  
  547. -- Remove duplicates of "ToggleDragButton"
  548. for _, gui in pairs(screenGui:GetChildren()) do
  549. if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
  550. gui:Destroy()
  551. end
  552. end
  553.  
  554. local UserInputService = game:GetService("UserInputService")
  555.  
  556. local dragToggle = false
  557. local dragInput = nil
  558. local dragStart = nil
  559. local startPos = nil
  560.  
  561. local function updateInput(input)
  562. local delta = input.Position - dragStart
  563. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  564. end
  565.  
  566. local function toggleDraggable()
  567. dragToggle = not dragToggle
  568. if not dragToggle then
  569. button.AnchorPoint = Vector2.new(0.5, 0.5)
  570. button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
  571. if button:FindFirstChild("AnchorsConstraint") then
  572. button.AnchorsConstraint:Destroy()
  573. end
  574. end
  575. end
  576.  
  577. button.InputBegan:Connect(function(input)
  578. if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
  579. dragStart = input.Position
  580. startPos = button.Position
  581. input.Changed:Connect(function()
  582. if input.UserInputState == Enum.UserInputState.End then
  583. dragToggle = false
  584. end
  585. end)
  586. end
  587. end)
  588.  
  589. UserInputService.InputChanged:Connect(function(input)
  590. if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
  591. updateInput(input)
  592. end
  593. end)
  594.  
  595. toggleButton.MouseButton1Click:Connect(toggleDraggable)
  596.  
  597. button.MouseButton1Click:Connect(function()
  598. forceDash = not forceDash
  599. game:GetService("StarterGui"):SetCore("SendNotification", {
  600. Title = forceDash and "Activated" or "Deactivated",
  601. Text = "Force-Forward Dash is " .. (forceDash and "Activated." or "Deactivated."),
  602. Duration = 5
  603. })
  604. end)
  605. end)
  606.  
  607. tab.newButton("Force Awaken","Button", function()
  608. local screenGui = Instance.new("ScreenGui")
  609. screenGui.Name = "ActionMenu"
  610. screenGui.ResetOnSpawn = false
  611. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  612.  
  613. local button = Instance.new("TextButton")
  614. button.Size = UDim2.new(0, 100, 0, 30)
  615. button.Position = UDim2.new(0, 10, 0, 10)
  616. button.Text = "Force Awaken"
  617. button.Font = Enum.Font.SourceSans
  618. button.FontSize = Enum.FontSize.Size24
  619. button.TextColor3 = Color3.new(1, 1, 1)
  620. button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  621.  
  622. button.Parent = screenGui
  623.  
  624. local toggleButton = Instance.new("TextButton")
  625. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  626. toggleButton.Position = UDim2.new(0, 10, 0, 50)
  627. toggleButton.Text = "Toggle Drag"
  628. toggleButton.Name = "ToggleDragButton" -- Unique identifier
  629. toggleButton.Font = Enum.Font.SourceSans
  630. toggleButton.FontSize = Enum.FontSize.Size24
  631. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  632. toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  633.  
  634. toggleButton.Parent = screenGui
  635.  
  636. -- Remove duplicates of "ToggleDragButton"
  637. for _, gui in pairs(screenGui:GetChildren()) do
  638. if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
  639. gui:Destroy()
  640. end
  641. end
  642.  
  643. local UserInputService = game:GetService("UserInputService")
  644.  
  645. local dragToggle = false
  646. local dragInput = nil
  647. local dragStart = nil
  648. local startPos = nil
  649.  
  650. local function updateInput(input)
  651. local delta = input.Position - dragStart
  652. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  653. end
  654.  
  655. local function toggleDraggable()
  656. dragToggle = not dragToggle
  657. if not dragToggle then
  658. button.AnchorPoint = Vector2.new(0.5, 0.5)
  659. button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
  660. if button:FindFirstChild("AnchorsConstraint") then
  661. button.AnchorsConstraint:Destroy()
  662. end
  663. end
  664. end
  665.  
  666. button.InputBegan:Connect(function(input)
  667. if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
  668. dragStart = input.Position
  669. startPos = button.Position
  670. input.Changed:Connect(function()
  671. if input.UserInputState == Enum.UserInputState.End then
  672. dragToggle = false
  673. end
  674. end)
  675. end
  676. end)
  677.  
  678. UserInputService.InputChanged:Connect(function(input)
  679. if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
  680. updateInput(input)
  681. end
  682. end)
  683.  
  684. toggleButton.MouseButton1Click:Connect(toggleDraggable)
  685.  
  686. button.MouseButton1Click:Connect(function()
  687. forceAwaken = not forceAwaken
  688. game:GetService("StarterGui"):SetCore("SendNotification", {
  689. Title = forceAwaken and "Activated" or "Deactivated",
  690. Text = "Force-Awaken is " .. (forceAwaken and "Activated." or "Deactivated."),
  691. Duration = 5
  692. })
  693. end)
  694. end)
  695.  
  696. tab.newLabel("Skills")
  697.  
  698. tab.newButton("Force-Skill 1","Button", function()
  699. local screenGui = Instance.new("ScreenGui")
  700. screenGui.Name = "ActionMenu"
  701. screenGui.ResetOnSpawn = false
  702. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  703.  
  704. local button = Instance.new("TextButton")
  705. button.Size = UDim2.new(0, 100, 0, 30)
  706. button.Position = UDim2.new(0, 10, 0, 10)
  707. button.Text = "Force S-1"
  708. button.Font = Enum.Font.SourceSans
  709. button.FontSize = Enum.FontSize.Size24
  710. button.TextColor3 = Color3.new(1, 1, 1)
  711. button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  712.  
  713. button.Parent = screenGui
  714.  
  715. local toggleButton = Instance.new("TextButton")
  716. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  717. toggleButton.Position = UDim2.new(0, 10, 0, 50)
  718. toggleButton.Text = "Toggle Drag"
  719. toggleButton.Name = "ToggleDragButton" -- Unique identifier
  720. toggleButton.Font = Enum.Font.SourceSans
  721. toggleButton.FontSize = Enum.FontSize.Size24
  722. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  723. toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  724.  
  725. toggleButton.Parent = screenGui
  726.  
  727. -- Remove duplicates of "ToggleDragButton"
  728. for _, gui in pairs(screenGui:GetChildren()) do
  729. if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
  730. gui:Destroy()
  731. end
  732. end
  733.  
  734. local UserInputService = game:GetService("UserInputService")
  735.  
  736. local dragToggle = false
  737. local dragInput = nil
  738. local dragStart = nil
  739. local startPos = nil
  740.  
  741. local function updateInput(input)
  742. local delta = input.Position - dragStart
  743. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  744. end
  745.  
  746. local function toggleDraggable()
  747. dragToggle = not dragToggle
  748. if not dragToggle then
  749. button.AnchorPoint = Vector2.new(0.5, 0.5)
  750. button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
  751. if button:FindFirstChild("AnchorsConstraint") then
  752. button.AnchorsConstraint:Destroy()
  753. end
  754. end
  755. end
  756.  
  757. button.InputBegan:Connect(function(input)
  758. if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
  759. dragStart = input.Position
  760. startPos = button.Position
  761. input.Changed:Connect(function()
  762. if input.UserInputState == Enum.UserInputState.End then
  763. dragToggle = false
  764. end
  765. end)
  766. end
  767. end)
  768.  
  769. UserInputService.InputChanged:Connect(function(input)
  770. if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
  771. updateInput(input)
  772. end
  773. end)
  774.  
  775. toggleButton.MouseButton1Click:Connect(toggleDraggable)
  776.  
  777. button.MouseButton1Click:Connect(function()
  778. forceNs1 = not forceNs1
  779. game:GetService("StarterGui"):SetCore("SendNotification", {
  780. Title = forceNs1 and "Activated" or "Deactivated",
  781. Text = "Force-Skill 1 is " .. (forceNs1 and "Activated." or "Deactivated."),
  782. Duration = 5
  783. })
  784. end)
  785. end)
  786.  
  787. tab.newButton("Force-Skill 2","Button", function()
  788. local screenGui = Instance.new("ScreenGui")
  789. screenGui.Name = "ActionMenu"
  790. screenGui.ResetOnSpawn = false
  791. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  792.  
  793. local button = Instance.new("TextButton")
  794. button.Size = UDim2.new(0, 100, 0, 30)
  795. button.Position = UDim2.new(0, 10, 0, 10)
  796. button.Text = "Force S-2"
  797. button.Font = Enum.Font.SourceSans
  798. button.FontSize = Enum.FontSize.Size24
  799. button.TextColor3 = Color3.new(1, 1, 1)
  800. button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  801.  
  802. button.Parent = screenGui
  803.  
  804. local toggleButton = Instance.new("TextButton")
  805. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  806. toggleButton.Position = UDim2.new(0, 10, 0, 50)
  807. toggleButton.Text = "Toggle Drag"
  808. toggleButton.Name = "ToggleDragButton" -- Unique identifier
  809. toggleButton.Font = Enum.Font.SourceSans
  810. toggleButton.FontSize = Enum.FontSize.Size24
  811. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  812. toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  813.  
  814. toggleButton.Parent = screenGui
  815.  
  816. -- Remove duplicates of "ToggleDragButton"
  817. for _, gui in pairs(screenGui:GetChildren()) do
  818. if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
  819. gui:Destroy()
  820. end
  821. end
  822.  
  823. local UserInputService = game:GetService("UserInputService")
  824.  
  825. local dragToggle = false
  826. local dragInput = nil
  827. local dragStart = nil
  828. local startPos = nil
  829.  
  830. local function updateInput(input)
  831. local delta = input.Position - dragStart
  832. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  833. end
  834.  
  835. local function toggleDraggable()
  836. dragToggle = not dragToggle
  837. if not dragToggle then
  838. button.AnchorPoint = Vector2.new(0.5, 0.5)
  839. button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
  840. if button:FindFirstChild("AnchorsConstraint") then
  841. button.AnchorsConstraint:Destroy()
  842. end
  843. end
  844. end
  845.  
  846. button.InputBegan:Connect(function(input)
  847. if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
  848. dragStart = input.Position
  849. startPos = button.Position
  850. input.Changed:Connect(function()
  851. if input.UserInputState == Enum.UserInputState.End then
  852. dragToggle = false
  853. end
  854. end)
  855. end
  856. end)
  857.  
  858. UserInputService.InputChanged:Connect(function(input)
  859. if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
  860. updateInput(input)
  861. end
  862. end)
  863.  
  864. toggleButton.MouseButton1Click:Connect(toggleDraggable)
  865.  
  866. button.MouseButton1Click:Connect(function()
  867. forceNs2 = not forceNs2
  868. game:GetService("StarterGui"):SetCore("SendNotification", {
  869. Title = forceNs2 and "Activated" or "Deactivated",
  870. Text = "Force-Skill 2 is " .. (forceNs2 and "Activated." or "Deactivated."),
  871. Duration = 5
  872. })
  873. end)
  874. end)
  875.  
  876. tab.newButton("Force-Skill 3","Button", function()
  877. local screenGui = Instance.new("ScreenGui")
  878. screenGui.Name = "ActionMenu"
  879. screenGui.ResetOnSpawn = false
  880. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  881.  
  882. local button = Instance.new("TextButton")
  883. button.Size = UDim2.new(0, 100, 0, 30)
  884. button.Position = UDim2.new(0, 10, 0, 10)
  885. button.Text = "Force S-3"
  886. button.Font = Enum.Font.SourceSans
  887. button.FontSize = Enum.FontSize.Size24
  888. button.TextColor3 = Color3.new(1, 1, 1)
  889. button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  890.  
  891. button.Parent = screenGui
  892.  
  893. local toggleButton = Instance.new("TextButton")
  894. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  895. toggleButton.Position = UDim2.new(0, 10, 0, 50)
  896. toggleButton.Text = "Toggle Drag"
  897. toggleButton.Name = "ToggleDragButton" -- Unique identifier
  898. toggleButton.Font = Enum.Font.SourceSans
  899. toggleButton.FontSize = Enum.FontSize.Size24
  900. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  901. toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  902.  
  903. toggleButton.Parent = screenGui
  904.  
  905. -- Remove duplicates of "ToggleDragButton"
  906. for _, gui in pairs(screenGui:GetChildren()) do
  907. if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
  908. gui:Destroy()
  909. end
  910. end
  911.  
  912. local UserInputService = game:GetService("UserInputService")
  913.  
  914. local dragToggle = false
  915. local dragInput = nil
  916. local dragStart = nil
  917. local startPos = nil
  918.  
  919. local function updateInput(input)
  920. local delta = input.Position - dragStart
  921. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  922. end
  923.  
  924. local function toggleDraggable()
  925. dragToggle = not dragToggle
  926. if not dragToggle then
  927. button.AnchorPoint = Vector2.new(0.5, 0.5)
  928. button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
  929. if button:FindFirstChild("AnchorsConstraint") then
  930. button.AnchorsConstraint:Destroy()
  931. end
  932. end
  933. end
  934.  
  935. button.InputBegan:Connect(function(input)
  936. if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
  937. dragStart = input.Position
  938. startPos = button.Position
  939. input.Changed:Connect(function()
  940. if input.UserInputState == Enum.UserInputState.End then
  941. dragToggle = false
  942. end
  943. end)
  944. end
  945. end)
  946.  
  947. UserInputService.InputChanged:Connect(function(input)
  948. if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
  949. updateInput(input)
  950. end
  951. end)
  952.  
  953. toggleButton.MouseButton1Click:Connect(toggleDraggable)
  954.  
  955. button.MouseButton1Click:Connect(function()
  956. forceNs3 = not forceNs3
  957. game:GetService("StarterGui"):SetCore("SendNotification", {
  958. Title = forceNs3 and "Activated" or "Deactivated",
  959. Text = "Force-Skill 3 is " .. (forceNs3 and "Activated." or "Deactivated."),
  960. Duration = 5
  961. })
  962. end)
  963. end)
  964.  
  965. tab.newButton("Force-Skill 4","Button", function()
  966. local screenGui = Instance.new("ScreenGui")
  967. screenGui.Name = "ActionMenu"
  968. screenGui.ResetOnSpawn = false
  969. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  970.  
  971. local button = Instance.new("TextButton")
  972. button.Size = UDim2.new(0, 100, 0, 30)
  973. button.Position = UDim2.new(0, 10, 0, 10)
  974. button.Text = "Force S-4"
  975. button.Font = Enum.Font.SourceSans
  976. button.FontSize = Enum.FontSize.Size24
  977. button.TextColor3 = Color3.new(1, 1, 1)
  978. button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  979.  
  980. button.Parent = screenGui
  981.  
  982. local toggleButton = Instance.new("TextButton")
  983. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  984. toggleButton.Position = UDim2.new(0, 10, 0, 50)
  985. toggleButton.Text = "Toggle Drag"
  986. toggleButton.Name = "ToggleDragButton" -- Unique identifier
  987. toggleButton.Font = Enum.Font.SourceSans
  988. toggleButton.FontSize = Enum.FontSize.Size24
  989. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  990. toggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  991.  
  992. toggleButton.Parent = screenGui
  993.  
  994. -- Remove duplicates of "ToggleDragButton"
  995. for _, gui in pairs(screenGui:GetChildren()) do
  996. if gui:IsA("TextButton") and gui.Name == "ToggleDragButton" and gui ~= toggleButton then
  997. gui:Destroy()
  998. end
  999. end
  1000.  
  1001. local UserInputService = game:GetService("UserInputService")
  1002.  
  1003. local dragToggle = false
  1004. local dragInput = nil
  1005. local dragStart = nil
  1006. local startPos = nil
  1007.  
  1008. local function updateInput(input)
  1009. local delta = input.Position - dragStart
  1010. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  1011. end
  1012.  
  1013. local function toggleDraggable()
  1014. dragToggle = not dragToggle
  1015. if not dragToggle then
  1016. button.AnchorPoint = Vector2.new(0.5, 0.5)
  1017. button.Position = UDim2.new(0, button.Position.X.Offset, 0, button.Position.Y.Offset)
  1018. if button:FindFirstChild("AnchorsConstraint") then
  1019. button.AnchorsConstraint:Destroy()
  1020. end
  1021. end
  1022. end
  1023.  
  1024. button.InputBegan:Connect(function(input)
  1025. if (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) and dragToggle then
  1026. dragStart = input.Position
  1027. startPos = button.Position
  1028. input.Changed:Connect(function()
  1029. if input.UserInputState == Enum.UserInputState.End then
  1030. dragToggle = false
  1031. end
  1032. end)
  1033. end
  1034. end)
  1035.  
  1036. UserInputService.InputChanged:Connect(function(input)
  1037. if dragToggle and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
  1038. updateInput(input)
  1039. end
  1040. end)
  1041.  
  1042. toggleButton.MouseButton1Click:Connect(toggleDraggable)
  1043.  
  1044. button.MouseButton1Click:Connect(function()
  1045. forceNs4 = not forceNs4
  1046. game:GetService("StarterGui"):SetCore("SendNotification", {
  1047. Title = forceNs4 and "Activated" or "Deactivated",
  1048. Text = "Force-Skill 4 is " .. (forceNs4 and "Activated." or "Deactivated."),
  1049. Duration = 5
  1050. })
  1051. end)
  1052. end)
  1053.  
  1054. while true do
  1055. updatePlayerList()
  1056. wait(0.1)
  1057. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement