local player = game.Players.LocalPlayer local RunService = game:GetService("RunService") local mouse = player:GetMouse() local currentSpeed = 16 local currentJump = 50 local currentHealth = 100 local teleportToPlayerEnabled = false -- משתנה לשמירת המיקום (ישמור את ה-CFrame) local savedPosition = nil -- הגדרת משתנה ריק לתיבת החיים כדי שהלולאה תכיר אותו local healthBox -- פונקציה להשתגרות לשחקן בלחיצת עכבר mouse.Button1Down:Connect(function() if not teleportToPlayerEnabled then return end local targetInstance = mouse.Target local character = player.Character if not character then return end local rootPart = character:FindFirstChild("HumanoidRootPart") if not rootPart then return end if targetInstance then -- מחפשים אם מה שלחצנו עליו שייך למודל של שחקן local targetModel = targetInstance:FindFirstAncestorOfClass("Model") if targetModel then local targetPlayer = game.Players:GetPlayerFromCharacter(targetModel) if targetPlayer and targetPlayer ~= player then local targetRoot = targetModel:FindFirstChild("HumanoidRootPart") if targetRoot then -- משתגרים למיקום השחקן (מזיזים קצת אחורה כדי לא להיתקע בתוכו) rootPart.CFrame = targetRoot.CFrame * CFrame.new(0, 0, 3) end end end end end) -- Force stats every frame & Update health box RunService.RenderStepped:Connect(function() local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then -- שמירה על מהירות וקפיצה humanoid.WalkSpeed = currentSpeed humanoid.UseJumpPower = true humanoid.JumpPower = currentJump -- עדכון תצוגת החיים בתיבה (רק אם המשתמש לא מקליד בה כרגע) if healthBox and not healthBox.IsFocused then healthBox.Text = tostring(math.floor(humanoid.Health)) end end end end) -- Function to apply health local function applyHealth(v) currentHealth = v local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.MaxHealth = math.max(currentHealth, humanoid.MaxHealth) humanoid.Health = currentHealth end end end -- Re-apply health when character respawns player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.MaxHealth = math.max(currentHealth, humanoid.MaxHealth) humanoid.Health = currentHealth end) -- GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "CaspiHub" screenGui.ResetOnSpawn = false screenGui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 340, 0, 480) frame.Position = UDim2.new(0, 20, 0, 20) frame.BackgroundColor3 = Color3.fromRGB(10, 10, 10) frame.Active = true frame.Draggable = true frame.Parent = screenGui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 16) local gradient = Instance.new("UIGradient") gradient.Color = ColorSequence.new{ ColorSequenceKeypoint.new(0, Color3.fromRGB(220, 30, 30)), ColorSequenceKeypoint.new(0.5, Color3.fromRGB(60, 12, 12)), ColorSequenceKeypoint.new(1, Color3.fromRGB(8, 8, 8)) } gradient.Rotation = 100 gradient.Parent = frame local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(255, 40, 40) stroke.Thickness = 2.5 stroke.Transparency = 0 stroke.Parent = frame local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 36) title.BackgroundTransparency = 1 title.Text = "⚡ CASPI HUB ⚡" title.TextColor3 = Color3.fromRGB(255, 90, 90) title.Font = Enum.Font.GothamBlack title.TextSize = 18 title.Parent = frame -- Rainbow Color Effect (אפקט צבעים שמשתנה מסביב ולכותרת) task.spawn(function() local hue = 0 while frame.Parent do hue = hue + 0.005 if hue >= 1 then hue = 0 end local rainbowColor = Color3.fromHSV(hue, 0.8, 1) stroke.Color = rainbowColor title.TextColor3 = rainbowColor task.wait(0.03) end end) local minBtn = Instance.new("TextButton") minBtn.Size = UDim2.new(0, 26, 0, 26) minBtn.Position = UDim2.new(1, -32, 0, 5) minBtn.Text = "-" minBtn.BackgroundColor3 = Color3.fromRGB(35, 15, 15) minBtn.TextColor3 = Color3.fromRGB(255, 255, 255) minBtn.Font = Enum.Font.GothamBold minBtn.TextSize = 16 minBtn.Parent = frame Instance.new("UICorner", minBtn).CornerRadius = UDim.new(0, 8) local body = Instance.new("Frame") body.Size = UDim2.new(1, 0, 1, -36) body.Position = UDim2.new(0, 0, 0, 36) body.BackgroundTransparency = 1 body.Parent = frame local minimized = false minBtn.MouseButton1Click:Connect(function() minimized = not minimized body.Visible = not minimized frame.Size = minimized and UDim2.new(0, 340, 0, 36) or UDim2.new(0, 340, 0, 480) minBtn.Text = minimized and "+" or "-" end) -- Text box builder local function makeInputRow(yPos, labelText, colorMain, defaultVal, onChange) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -20, 0, 18) label.Position = UDim2.new(0, 14, 0, yPos) label.BackgroundTransparency = 1 label.Text = labelText label.TextColor3 = Color3.fromRGB(220, 210, 210) label.Font = Enum.Font.GothamMedium label.TextXAlignment = Enum.TextXAlignment.Left label.TextSize = 13 label.Parent = body local box = Instance.new("TextBox") box.Size = UDim2.new(1, -28, 0, 38) box.Position = UDim2.new(0, 14, 0, yPos + 20) box.BackgroundColor3 = Color3.fromRGB(28, 14, 14) box.Text = tostring(defaultVal) box.TextColor3 = colorMain box.PlaceholderText = "Enter value..." box.Font = Enum.Font.GothamBlack box.TextSize = 18 box.ClearTextOnFocus = false box.Parent = body Instance.new("UICorner", box).CornerRadius = UDim.new(0, 8) local boxStroke = Instance.new("UIStroke") boxStroke.Color = colorMain boxStroke.Transparency = 0.2 boxStroke.Thickness = 1.5 boxStroke.Parent = box box.FocusLost:Connect(function(enterPressed) if enterPressed then local num = tonumber(box.Text) if num then onChange(num) else box.Text = tostring(defaultVal) end end end) return box end -- יצירת השורות makeInputRow(15, "SPEED", Color3.fromRGB(255, 90, 90), currentSpeed, function(v) currentSpeed = v end) makeInputRow(95, "JUMP POWER", Color3.fromRGB(255, 150, 90), currentJump, function(v) currentJump = v end) healthBox = makeInputRow(175, "HEALTH", Color3.fromRGB(255, 90, 130), currentHealth, function(v) applyHealth(v) end) -- כפתור Click Player to Teleport local teleBtn = Instance.new("TextButton") teleBtn.Size = UDim2.new(1, -28, 0, 36) teleBtn.Position = UDim2.new(0, 14, 0, 255) teleBtn.Text = "CLICK PLAYER TO TP: OFF" teleBtn.BackgroundColor3 = Color3.fromRGB(45, 15, 15) teleBtn.TextColor3 = Color3.fromRGB(255, 90, 90) teleBtn.Font = Enum.Font.GothamBlack teleBtn.TextSize = 13 teleBtn.Parent = body Instance.new("UICorner", teleBtn).CornerRadius = UDim.new(0, 8) teleBtn.MouseButton1Click:Connect(function() teleportToPlayerEnabled = not teleportToPlayerEnabled if teleportToPlayerEnabled then teleBtn.Text = "CLICK PLAYER TO TP: ON" teleBtn.BackgroundColor3 = Color3.fromRGB(15, 45, 20) teleBtn.TextColor3 = Color3.fromRGB(90, 255, 130) else teleBtn.Text = "CLICK PLAYER TO TP: OFF" teleBtn.BackgroundColor3 = Color3.fromRGB(45, 15, 15) teleBtn.TextColor3 = Color3.fromRGB(255, 90, 90) end end) -- כפתור שמירת מיקום (Save Position) local savePosBtn = Instance.new("TextButton") savePosBtn.Size = UDim2.new(0, 150, 0, 36) savePosBtn.Position = UDim2.new(0, 14, 0, 305) savePosBtn.Text = "💾 SAVE POSITION" savePosBtn.BackgroundColor3 = Color3.fromRGB(35, 25, 15) savePosBtn.TextColor3 = Color3.fromRGB(255, 180, 90) savePosBtn.Font = Enum.Font.GothamBold savePosBtn.TextSize = 12 savePosBtn.Parent = body Instance.new("UICorner", savePosBtn).CornerRadius = UDim.new(0, 8) savePosBtn.MouseButton1Click:Connect(function() local character = player.Character if character then local rootPart = character:FindFirstChild("HumanoidRootPart") if rootPart then savedPosition = rootPart.CFrame savePosBtn.Text = "✅ POSITION SAVED!" task.wait(1) savePosBtn.Text = "💾 SAVE POSITION" end end end) -- כפתור שיגור למיקום השמור (Teleport to Saved) local tpPosBtn = Instance.new("TextButton") tpPosBtn.Size = UDim2.new(0, 150, 0, 36) tpPosBtn.Position = UDim2.new(0, 176, 0, 305) tpPosBtn.Text = "🌀 TP TO SAVED" tpPosBtn.BackgroundColor3 = Color3.fromRGB(25, 15, 35) tpPosBtn.TextColor3 = Color3.fromRGB(180, 90, 255) tpPosBtn.Font = Enum.Font.GothamBold tpPosBtn.TextSize = 12 tpPosBtn.Parent = body Instance.new("UICorner", tpPosBtn).CornerRadius = UDim.new(0, 8) tpPosBtn.MouseButton1Click:Connect(function() if savedPosition then local character = player.Character if character then local rootPart = character:FindFirstChild("HumanoidRootPart") if rootPart then rootPart.CFrame = savedPosition end end else tpPosBtn.Text = "❌ NO POSITION SAVED" task.wait(1) tpPosBtn.Text = "🌀 TP TO SAVED" end end) -- פוטר (Footer) local footer = Instance.new("TextLabel") footer.Size = UDim2.new(1, 0, 0, 30) footer.Position = UDim2.new(0, 0, 0, 410) footer.BackgroundTransparency = 1 footer.Text = "click on a player to teleport to them when ON" footer.TextColor3 = Color3.fromRGB(150, 110, 110) footer.Font = Enum.Font.Gotham footer.TextSize = 10 footer.Parent = body