Advertisement
PC55654

Blade Ball OP Script

Sep 10th, 2023 (edited)
1,997
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.14 KB | Source Code | 2 1
  1. local localPlayer = game.Players.LocalPlayer
  2. local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
  3. local abilitiesFolder = character:WaitForChild("Abilities")
  4.  
  5. local ChosenAbility = "Raging Deflection"
  6.  
  7. local function createGUI()
  8. local screenGui = Instance.new("ScreenGui")
  9. screenGui.Name = "AbilityChooser"
  10. screenGui.ResetOnSpawn = true -- Disable ResetOnSpawn
  11. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  12.  
  13. local frame = Instance.new("Frame")
  14. frame.Size = UDim2.new(0, 200, 0, 250)
  15. frame.Position = UDim2.new(0.5, -100, 0.5, -125)
  16. frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  17. frame.BorderSizePixel = 0
  18. frame.Parent = screenGui
  19.  
  20. local isDragging = false
  21. local dragInput
  22. local dragStart
  23. local startPos
  24.  
  25. local function update(input)
  26. local delta = input.Position - dragStart
  27. frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  28. end
  29.  
  30. frame.InputBegan:Connect(function(input)
  31. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  32. isDragging = true
  33. dragStart = input.Position
  34. startPos = frame.Position
  35.  
  36. input.Changed:Connect(function()
  37. if input.UserInputState == Enum.UserInputState.End then
  38. isDragging = false
  39. end
  40. end)
  41. end
  42. end)
  43.  
  44. frame.InputChanged:Connect(function(input)
  45. if input.UserInputType == Enum.UserInputType.MouseMovement then
  46. dragInput = input
  47. end
  48. end)
  49.  
  50. game:GetService("UserInputService").InputChanged:Connect(function(input)
  51. if input == dragInput and isDragging then
  52. update(input)
  53. end
  54. end)
  55.  
  56. local abilities = {"Dash", "Forcefield", "Invisibility", "Platform", "Raging Deflection", "Shadow Step", "Super Jump", "Telekinesis", "Thunder Dash", "Rapture"}
  57. local buttonHeight = 20
  58. for i, ability in ipairs(abilities) do
  59. local button = Instance.new("TextButton")
  60. button.Size = UDim2.new(1, 0, 0, buttonHeight)
  61. button.Position = UDim2.new(0, 0, 0, (i - 1) * (buttonHeight + 5))
  62. button.Text = ability
  63. button.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  64. button.BorderColor3 = Color3.new(1, 1, 1)
  65. button.Parent = frame
  66.  
  67. button.MouseButton1Click:Connect(function()
  68. ChosenAbility = ability
  69. end)
  70. end
  71.  
  72. -- Create a ScreenGui for displaying text labels
  73. local textGui = Instance.new("ScreenGui")
  74. textGui.Name = "TextLabelGui"
  75. textGui.ResetOnSpawn = false -- Disable ResetOnSpawn
  76. textGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  77.  
  78. -- Create TextLabels with messages and show them
  79. local textGui = Instance.new("ScreenGui")
  80. textGui.Name = "TextLabelGui"
  81. textGui.ResetOnSpawn = false
  82. textGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  83.  
  84. local messages = {
  85. "Loaded",
  86. "Thanks For Using My Script",
  87. "Made By Unknown_GAMER"
  88. }
  89.  
  90. for i, message in ipairs(messages) do
  91. local textLabel = Instance.new("TextLabel")
  92. textLabel.Size = UDim2.new(0, 250, 0, 40)
  93. textLabel.Position = UDim2.new(0.1, -130, 1, -50)
  94. textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  95. textLabel.BackgroundTransparency = 0.6 -- Set background transparency (0.5 means 50% transparent)
  96. textLabel.BorderSizePixel = 0
  97. textLabel.Text = message
  98. textLabel.TextColor3 = Color3.new(1, 1, 1)
  99. textLabel.Font = Enum.Font.SourceSansBold
  100. textLabel.TextSize = 24
  101. textLabel.Parent = textGui
  102. wait(3)
  103. textLabel:Destroy()
  104. end
  105. end
  106.  
  107. local function toggleAbilityChooser()
  108. local abilityGui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("AbilityChooser")
  109. if abilityGui then
  110. abilityGui.Enabled = not abilityGui.Enabled
  111. else
  112. createGUI()
  113. end
  114. end
  115.  
  116. -- Create a ScreenGui to hold the button
  117. local gui = Instance.new("ScreenGui")
  118. gui.Name = "Button"
  119. gui.ResetOnSpawn = false -- Disable ResetOnSpawn
  120. gui.Parent = game.Players.LocalPlayer.PlayerGui
  121.  
  122. -- Create a TextButton
  123. local button = Instance.new("TextButton")
  124. button.Name = "ToggleButton"
  125. button.Text = "Toggle"
  126. button.Size = UDim2.new(0, 150, 0, 30)
  127. button.Position = UDim2.new(0.1, -50, 0.350, -50)
  128. button.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  129. button.BorderColor3 = Color3.new(1, 1, 1)
  130. button.Parent = gui
  131.  
  132. -- Connect the button's click event to toggle the Ability GUI
  133. button.MouseButton1Click:Connect(toggleAbilityChooser)
  134.  
  135. createGUI() -- Call createGUI to create the AbilityChooser GUI initially
  136.  
  137. while wait() do
  138. for _, obj in pairs(abilitiesFolder:GetChildren()) do
  139. if obj:IsA("LocalScript") then
  140. if obj.Name == ChosenAbility then
  141. obj.Disabled = false
  142. else
  143. obj.Disabled = true
  144. end
  145. end
  146. end
  147. end
  148.  
  149. -- Wait for 2 seconds and then disable ResetOnSpawn for the created ScreenGui
  150. wait(2)
  151. game.Players.LocalPlayer.PlayerGui.AbilityChooser.ResetOnSpawn = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement