-- Services local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local RunService = game:GetService("RunService") local CoreGui = game:GetService("CoreGui") -- Variables local selectedPlayer = nil local speed = 1 -- Speed set to half (original was 2) local clappingSound = Instance.new("Sound") clappingSound.SoundId = "rbxassetid://9114762281" -- Looping clapping sound clappingSound.Looped = true local moving = false -- To track if the player is moving or not -- GUI Setup local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "UniversalBangGUI" ScreenGui.Parent = CoreGui local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 300, 0, 300) MainFrame.Position = UDim2.new(0.5, -150, 0.5, -150) MainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) MainFrame.BorderSizePixel = 2 MainFrame.Draggable = true MainFrame.Active = true MainFrame.Parent = ScreenGui local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1, 0, 0, 25) Title.Text = "Bang Player" Title.TextColor3 = Color3.new(1, 1, 1) Title.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2) Title.Parent = MainFrame -- Warning Text local WarningLabel = Instance.new("TextLabel") WarningLabel.Size = UDim2.new(1, 0, 0, 25) WarningLabel.Position = UDim2.new(0, 0, 0, 25) WarningLabel.Text = "WARNING: THIS INCLUDES CLAPPING NOISES!" WarningLabel.TextColor3 = Color3.new(1, 0, 0) WarningLabel.BackgroundColor3 = Color3.new(0, 0, 0) WarningLabel.Parent = MainFrame -- Player Selector TextBox (Unresettable) local PlayerSelector = Instance.new("TextBox") PlayerSelector.Size = UDim2.new(1, 0, 0, 40) PlayerSelector.Position = UDim2.new(0, 0, 0, 60) PlayerSelector.PlaceholderText = "Enter Username/Display Name" PlayerSelector.TextColor3 = Color3.new(1, 1, 1) PlayerSelector.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3) PlayerSelector.ClearTextOnFocus = false PlayerSelector.Parent = MainFrame -- Display Player Information local PlayerInfo = Instance.new("TextLabel") PlayerInfo.Size = UDim2.new(1, 0, 0, 25) PlayerInfo.Position = UDim2.new(0, 0, 0, 100) PlayerInfo.Text = "No Player Selected" PlayerInfo.TextColor3 = Color3.new(1, 1, 1) PlayerInfo.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3) PlayerInfo.Parent = MainFrame -- Speed Label local SpeedLabel = Instance.new("TextLabel") SpeedLabel.Size = UDim2.new(1, 0, 0, 25) SpeedLabel.Position = UDim2.new(0, 0, 0, 220) SpeedLabel.Text = "Speed: " .. speed SpeedLabel.TextColor3 = Color3.new(1, 1, 1) SpeedLabel.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3) SpeedLabel.Parent = MainFrame -- Start and Stop Buttons local StartButton = Instance.new("TextButton") StartButton.Size = UDim2.new(1, 0, 0, 30) StartButton.Position = UDim2.new(0, 0, 0, 250) StartButton.Text = "Start" StartButton.TextColor3 = Color3.new(1, 1, 1) StartButton.BackgroundColor3 = Color3.new(0, 1, 0) StartButton.Parent = MainFrame local StopButton = Instance.new("TextButton") StopButton.Size = UDim2.new(1, 0, 0, 30) StopButton.Position = UDim2.new(0, 0, 0, 290) StopButton.Text = "Stop" StopButton.TextColor3 = Color3.new(1, 1, 1) StopButton.BackgroundColor3 = Color3.new(1, 0, 0) StopButton.Parent = MainFrame -- Minimize Button local MinimizeButton = Instance.new("TextButton") MinimizeButton.Size = UDim2.new(0, 50, 0, 25) MinimizeButton.Position = UDim2.new(1, -50, 0, 0) MinimizeButton.Text = "-" MinimizeButton.TextColor3 = Color3.new(1, 1, 1) MinimizeButton.BackgroundColor3 = Color3.new(0.8, 0.5, 0) MinimizeButton.Parent = MainFrame -- Smooth back-and-forth movement function (Behind selected player) local function moveBackAndForth() if selectedPlayer then local character = LocalPlayer.Character if not character then return end -- Calculate the positions for the back-and-forth movement local distance = 4 -- Maximum distance (4 studs) local minDistance = 1 -- Minimum distance (1 stud) -- Set up the direction of movement local forward = true -- Initially moving forward (towards the selected player) -- Loop for continuous movement while moving do if selectedPlayer and selectedPlayer.Character and character then local targetPosition if forward then targetPosition = selectedPlayer.Character.HumanoidRootPart.Position - selectedPlayer.Character.HumanoidRootPart.CFrame.LookVector * distance else targetPosition = selectedPlayer.Character.HumanoidRootPart.Position - selectedPlayer.Character.HumanoidRootPart.CFrame.LookVector * minDistance end -- Smooth movement towards the target position local direction = (targetPosition - character.HumanoidRootPart.Position).unit local smoothPosition = character.HumanoidRootPart.Position + direction * (speed / 2) -- Half speed for smooth movement -- Update character's position character:SetPrimaryPartCFrame(CFrame.new(smoothPosition)) -- Make the player always look at the selected player character.HumanoidRootPart.CFrame = CFrame.new(smoothPosition, selectedPlayer.Character.HumanoidRootPart.Position) -- Reverse direction once the target position is reached if (character.HumanoidRootPart.Position - targetPosition).Magnitude < 0.1 then forward = not forward end end RunService.Heartbeat:Wait() -- Wait to avoid overwhelming the server end end end -- Looping clapping sound local function startClappingSound() if not clappingSound.Parent then clappingSound.Parent = LocalPlayer.Character:WaitForChild("HumanoidRootPart") end clappingSound:Play() end -- GUI Minimize local minimized = false MinimizeButton.MouseButton1Click:Connect(function() minimized = not minimized for _, child in pairs(MainFrame:GetChildren()) do if child:IsA("TextButton") or child:IsA("TextLabel") then child.Visible = not minimized end end end) -- Button Clicks StartButton.MouseButton1Click:Connect(function() if selectedPlayer then moving = true -- Enable movement startClappingSound() -- Play the new looping sound moveBackAndForth() -- Start the movement else warn("No player selected!") end end) StopButton.MouseButton1Click:Connect(function() moving = false -- Disable movement clappingSound:Stop() -- Stop sound when clicked end) -- Update Player Information PlayerSelector.FocusLost:Connect(function() -- Look for player based on entered name or username local playerName = PlayerSelector.Text:lower() for _, player in pairs(Players:GetPlayers()) do if player.Name:lower():sub(1, #playerName) == playerName or player.DisplayName:lower():sub(1, #playerName) == playerName then selectedPlayer = player PlayerInfo.Text = "Selected: " .. player.DisplayName .. " (" .. player.Name .. ")" return end end PlayerInfo.Text = "No Player Found" end)