-- Cart Test Panel | Executor -- Für Tests in deiner eigenen Roblox-Spielkopie local Players = game:GetService("Players") local player = Players.LocalPlayer local backpack = player:WaitForChild("Backpack") local old = player.PlayerGui:FindFirstChild("CartTestPanel") if old then old:Destroy() end local gui = Instance.new("ScreenGui") gui.Name = "CartTestPanel" gui.ResetOnSpawn = false gui.Parent = player.PlayerGui local frame = Instance.new("Frame") frame.Size = UDim2.fromOffset(300, 190) frame.Position = UDim2.new(0, 20, 0.3, 0) frame.BackgroundColor3 = Color3.fromRGB(25, 30, 43) frame.Active = true frame.Draggable = true frame.Parent = gui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 10) local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -40, 0, 38) title.BackgroundTransparency = 1 title.Text = "CART TEST PANEL" title.TextColor3 = Color3.fromRGB(100, 210, 255) title.TextScaled = true title.Parent = frame local nameBox = Instance.new("TextBox") nameBox.Size = UDim2.new(1, -20, 0, 38) nameBox.Position = UDim2.fromOffset(10, 45) nameBox.PlaceholderText = "Spielername eingeben" nameBox.Text = "" nameBox.TextScaled = true nameBox.ClearTextOnFocus = false nameBox.Parent = frame local status = Instance.new("TextLabel") status.Size = UDim2.new(1, -20, 0, 28) status.Position = UDim2.fromOffset(10, 85) status.BackgroundTransparency = 1 status.Text = "Bereit" status.TextColor3 = Color3.new(1, 1, 1) status.TextScaled = true status.Parent = frame local start = Instance.new("TextButton") start.Size = UDim2.new(1, -20, 0, 42) start.Position = UDim2.fromOffset(10, 125) start.Text = "START CART TEST" start.TextScaled = true start.BackgroundColor3 = Color3.fromRGB(35, 125, 200) start.TextColor3 = Color3.new(1, 1, 1) start.Parent = frame Instance.new("UICorner", start).CornerRadius = UDim.new(0, 8) local function findPlayer(text) text = text:lower() for _, p in ipairs(Players:GetPlayers()) do if p.Name:lower() == text or p.DisplayName:lower() == text then return p end end end local function findCart() local character = player.Character local tools = {} for _, item in ipairs(backpack:GetChildren()) do if item:IsA("Tool") then table.insert(tools, item) end end if character then for _, item in ipairs(character:GetChildren()) do if item:IsA("Tool") then table.insert(tools, item) end end end for _, tool in ipairs(tools) do if tool.Name:lower():find("cart") or tool.Name:lower():find("shopping") then return tool end end end local busy = false start.Activated:Connect(function() if busy then return end busy = true local originalCharacter = player.Character local root = originalCharacter and originalCharacter:FindFirstChild("HumanoidRootPart") if not root then status.Text = "Charakter nicht gefunden" busy = false return end local originalPosition = root.CFrame status.Text = "Position gespeichert" local target = findPlayer(nameBox.Text) if not target then status.Text = "Spieler nicht gefunden" busy = false return end local targetCharacter = target.Character local targetRoot = targetCharacter and targetCharacter:FindFirstChild("HumanoidRootPart") if not targetRoot then status.Text = "Zielcharakter fehlt" busy = false return end local cart = findCart() if not cart then status.Text = "Cart im Inventar fehlt" busy = false return end local humanoid = originalCharacter:FindFirstChildOfClass("Humanoid") if humanoid then humanoid:EquipTool(cart) end status.Text = "Cart ausgerüstet" -- Nur eine Bewegungsanfrage für den eigenen Charakter. -- Der Server kann lokale Teleports zurücksetzen. task.wait(0.5) if player.Character == originalCharacter then root.CFrame = targetRoot.CFrame * CFrame.new(0, 0, 5) end status.Text = "Bei Zielspieler angekommen" -- Der Cart-Sitz muss vom Spiel selbst erstellt werden. -- Warte auf eine Sitzverbindung am Zielcharakter. local deadline = os.clock() + 10 local seated = false repeat task.wait(0.2) targetCharacter = target.Character local hum = targetCharacter and targetCharacter:FindFirstChildOfClass("Humanoid") seated = hum ~= nil and hum.SeatPart ~= nil until seated or os.clock() >= deadline if not seated then status.Text = "Kein Cart-Sitz erkannt" busy = false return end status.Text = "Sitz erkannt; Rückflug nicht garantiert" -- Zur gespeicherten Position zurückkehren. -- Das nimmt den anderen Spieler nicht automatisch mit. task.wait(0.5) if player.Character == originalCharacter and root.Parent then root.CFrame = originalPosition end status.Text = "Test beendet" busy = false end)