Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local localPlayer = game.Players.LocalPlayer
- local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
- local abilitiesFolder = character:WaitForChild("Abilities")
- local ChosenAbility = "Raging Deflection"
- local function createGUI()
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "AbilityChooser"
- screenGui.ResetOnSpawn = true -- Disable ResetOnSpawn
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 200, 0, 250)
- frame.Position = UDim2.new(0.5, -100, 0.5, -125)
- frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- frame.BorderSizePixel = 0
- frame.Parent = screenGui
- local isDragging = false
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- frame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- isDragging = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- isDragging = false
- end
- end)
- end
- end)
- frame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- game:GetService("UserInputService").InputChanged:Connect(function(input)
- if input == dragInput and isDragging then
- update(input)
- end
- end)
- local abilities = {"Dash", "Forcefield", "Invisibility", "Platform", "Raging Deflection", "Shadow Step", "Super Jump", "Telekinesis", "Thunder Dash", "Rapture"}
- local buttonHeight = 20
- for i, ability in ipairs(abilities) do
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(1, 0, 0, buttonHeight)
- button.Position = UDim2.new(0, 0, 0, (i - 1) * (buttonHeight + 5))
- button.Text = ability
- button.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
- button.BorderColor3 = Color3.new(1, 1, 1)
- button.Parent = frame
- button.MouseButton1Click:Connect(function()
- ChosenAbility = ability
- end)
- end
- -- Create a ScreenGui for displaying text labels
- local textGui = Instance.new("ScreenGui")
- textGui.Name = "TextLabelGui"
- textGui.ResetOnSpawn = false -- Disable ResetOnSpawn
- textGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Create TextLabels with messages and show them
- local textGui = Instance.new("ScreenGui")
- textGui.Name = "TextLabelGui"
- textGui.ResetOnSpawn = false
- textGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local messages = {
- "Loaded",
- "Thanks For Using My Script",
- "Made By Unknown_GAMER"
- }
- for i, message in ipairs(messages) do
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(0, 250, 0, 40)
- textLabel.Position = UDim2.new(0.1, -130, 1, -50)
- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- textLabel.BackgroundTransparency = 0.6 -- Set background transparency (0.5 means 50% transparent)
- textLabel.BorderSizePixel = 0
- textLabel.Text = message
- textLabel.TextColor3 = Color3.new(1, 1, 1)
- textLabel.Font = Enum.Font.SourceSansBold
- textLabel.TextSize = 24
- textLabel.Parent = textGui
- wait(3)
- textLabel:Destroy()
- end
- end
- local function toggleAbilityChooser()
- local abilityGui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("AbilityChooser")
- if abilityGui then
- abilityGui.Enabled = not abilityGui.Enabled
- else
- createGUI()
- end
- end
- -- Create a ScreenGui to hold the button
- local gui = Instance.new("ScreenGui")
- gui.Name = "Button"
- gui.ResetOnSpawn = false -- Disable ResetOnSpawn
- gui.Parent = game.Players.LocalPlayer.PlayerGui
- -- Create a TextButton
- local button = Instance.new("TextButton")
- button.Name = "ToggleButton"
- button.Text = "Toggle"
- button.Size = UDim2.new(0, 150, 0, 30)
- button.Position = UDim2.new(0.1, -50, 0.350, -50)
- button.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
- button.BorderColor3 = Color3.new(1, 1, 1)
- button.Parent = gui
- -- Connect the button's click event to toggle the Ability GUI
- button.MouseButton1Click:Connect(toggleAbilityChooser)
- createGUI() -- Call createGUI to create the AbilityChooser GUI initially
- while wait() do
- for _, obj in pairs(abilitiesFolder:GetChildren()) do
- if obj:IsA("LocalScript") then
- if obj.Name == ChosenAbility then
- obj.Disabled = false
- else
- obj.Disabled = true
- end
- end
- end
- end
- -- Wait for 2 seconds and then disable ResetOnSpawn for the created ScreenGui
- wait(2)
- game.Players.LocalPlayer.PlayerGui.AbilityChooser.ResetOnSpawn = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement