Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Moony's TP GUI for Delta/Mobile with Server Desync + Infinite Jump Toggle
- local TweenService = game:GetService("TweenService")
- local UserInputService = game:GetService("UserInputService")
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local player = Players.LocalPlayer
- -- Ensure RemoteEvent exists for server Desync
- local desyncEvent = ReplicatedStorage:FindFirstChild("DesyncEvent")
- if not desyncEvent then
- desyncEvent = Instance.new("RemoteEvent")
- desyncEvent.Name = "DesyncEvent"
- desyncEvent.Parent = ReplicatedStorage
- end
- -- GUI
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "MoonysTpGui"
- screenGui.ResetOnSpawn = false
- screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- screenGui.Parent = game:GetService("CoreGui")
- -- Click sound
- local function playClick()
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://6733314998"
- sound.Volume = 0.5
- sound.Parent = screenGui
- sound:Play()
- game:GetService("Debris"):AddItem(sound,1)
- end
- -- Main frame
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0,250,0,290)
- frame.Position = UDim2.new(0.5,-125,0.5,-145)
- frame.AnchorPoint = Vector2.new(0.5,0.5)
- frame.BackgroundColor3 = Color3.fromRGB(128,0,128)
- frame.BorderSizePixel = 0
- frame.Parent = screenGui
- local frameCorner = Instance.new("UICorner")
- frameCorner.CornerRadius = UDim.new(0,15)
- frameCorner.Parent = frame
- local frameOutline = Instance.new("UIStroke")
- frameOutline.Thickness = 3
- frameOutline.Color = Color3.fromRGB(0,0,0)
- frameOutline.Parent = frame
- -- Title
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1,0,0,40)
- title.Position = UDim2.new(0,0,0,0)
- title.BackgroundTransparency = 1
- title.Text = "Moony's Tp"
- title.TextColor3 = Color3.fromRGB(255,255,255)
- title.Font = Enum.Font.GothamBold
- title.TextSize = 24
- title.Parent = frame
- -- Button storage
- local buttons = {}
- local savedPosition
- -- Wait for character
- local function getCharacter()
- local char
- repeat
- char = player.Character
- wait(0.1)
- until char and char:FindFirstChild("HumanoidRootPart")
- return char
- end
- -- Create standard button
- local function createButton(name,posY,text,callback)
- local btn = Instance.new("TextButton")
- btn.Name = name
- btn.Size = UDim2.new(0,200,0,40)
- btn.Position = UDim2.new(0.5,-100,0,posY)
- btn.BackgroundColor3 = Color3.fromRGB(0,255,255)
- btn.Text = text
- btn.Font = Enum.Font.GothamBold
- btn.TextSize = 18
- btn.TextColor3 = Color3.fromRGB(0,0,0)
- btn.Parent = frame
- btn.ZIndex = 2
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0,10)
- corner.Parent = btn
- local outline = Instance.new("UIStroke")
- outline.Thickness = 2
- outline.Color = Color3.fromRGB(0,0,0)
- outline.Parent = btn
- btn.Activated:Connect(function()
- playClick()
- TweenService:Create(btn,TweenInfo.new(0.1),{BackgroundTransparency=0.3}):Play()
- pcall(callback)
- end)
- table.insert(buttons,btn)
- end
- -- TP Forward
- createButton("TpForward",50,"TP Forward",function()
- local char = getCharacter()
- char.HumanoidRootPart.CFrame += char.HumanoidRootPart.CFrame.LookVector * 10
- end)
- -- Save Base
- createButton("SaveBase",100,"Save Base",function()
- local char = getCharacter()
- savedPosition = char.HumanoidRootPart.CFrame
- print("Base saved")
- end)
- -- TP to Base
- createButton("TpToBase",150,"TP to Base",function()
- local char = getCharacter()
- if savedPosition then
- char.HumanoidRootPart.CFrame = savedPosition
- end
- end)
- -- Desync (Server visible)
- createButton("Desync",200,"Desync",function()
- desyncEvent:FireServer()
- print("Desync sent to server!")
- end)
- -- Infinite Jump toggle button (circle indicator)
- local infiniteJumpBtn = Instance.new("Frame")
- infiniteJumpBtn.Size = UDim2.new(0,200,0,40)
- infiniteJumpBtn.Position = UDim2.new(0.5,-100,0,250)
- infiniteJumpBtn.BackgroundColor3 = Color3.fromRGB(0,255,255)
- infiniteJumpBtn.Parent = frame
- infiniteJumpBtn.ZIndex = 2
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0,10)
- corner.Parent = infiniteJumpBtn
- local outline = Instance.new("UIStroke")
- outline.Thickness = 2
- outline.Color = Color3.fromRGB(0,0,0)
- outline.Parent = infiniteJumpBtn
- -- Circle indicator
- local toggleCircle = Instance.new("Frame")
- toggleCircle.Size = UDim2.new(0,20,0,20)
- toggleCircle.Position = UDim2.new(0,5,0.5,-10)
- toggleCircle.BackgroundColor3 = Color3.fromRGB(0,255,255)
- toggleCircle.Parent = infiniteJumpBtn
- toggleCircle.ZIndex = 3
- local circleCorner = Instance.new("UICorner")
- circleCorner.CornerRadius = UDim.new(1,0)
- circleCorner.Parent = toggleCircle
- -- Button text
- local btnText = Instance.new("TextLabel")
- btnText.Size = UDim2.new(1,-30,1,0)
- btnText.Position = UDim2.new(0,30,0,0)
- btnText.BackgroundTransparency = 1
- btnText.Text = "Infinite Jump"
- btnText.TextColor3 = Color3.fromRGB(0,0,0)
- btnText.Font = Enum.Font.GothamBold
- btnText.TextSize = 18
- btnText.Parent = infiniteJumpBtn
- -- Toggle state
- local infiniteJumpEnabled = false
- local function toggleInfiniteJump()
- infiniteJumpEnabled = not infiniteJumpEnabled
- if infiniteJumpEnabled then
- toggleCircle.BackgroundColor3 = Color3.fromRGB(0,255,0)
- else
- toggleCircle.BackgroundColor3 = Color3.fromRGB(0,255,255)
- end
- end
- -- Activated toggle
- infiniteJumpBtn.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
- playClick()
- toggleInfiniteJump()
- end
- end)
- -- Infinite Jump logic
- UserInputService.JumpRequest:Connect(function()
- if infiniteJumpEnabled then
- local char = getCharacter()
- local humanoid = char:FindFirstChildOfClass("Humanoid")
- if humanoid then
- humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
- end
- end
- end)
- -- Add Infinite Jump to buttons table for minimize/restore
- table.insert(buttons, infiniteJumpBtn)
- -- Minimize / Restore
- local minimizeBtn = Instance.new("TextButton")
- minimizeBtn.Size = UDim2.new(0,30,0,30)
- minimizeBtn.Position = UDim2.new(1,-70,0,5)
- minimizeBtn.BackgroundColor3 = Color3.fromRGB(0,255,255)
- minimizeBtn.Text = "_"
- minimizeBtn.Font = Enum.Font.GothamBold
- minimizeBtn.TextSize = 18
- minimizeBtn.TextColor3 = Color3.fromRGB(0,0,0)
- minimizeBtn.Parent = frame
- minimizeBtn.ZIndex = 3
- local minCorner = Instance.new("UICorner")
- minCorner.CornerRadius = UDim.new(0,8)
- minCorner.Parent = minimizeBtn
- local minOutline = Instance.new("UIStroke")
- minOutline.Thickness = 2
- minOutline.Color = Color3.fromRGB(0,0,0)
- minOutline.Parent = minimizeBtn
- local fullSize = frame.Size
- local minimizedSize = UDim2.new(0,250,0,40)
- minimizeBtn.Activated:Connect(function()
- playClick()
- if frame.Size == fullSize then
- TweenService:Create(frame,TweenInfo.new(0.25,Enum.EasingStyle.Quad,Enum.EasingDirection.Out), {Size=minimizedSize}):Play()
- -- Hide buttons
- for _, btn in pairs(buttons) do
- TweenService:Create(btn,TweenInfo.new(0.25), {Size=UDim2.new(0,0,0,0)}):Play()
- end
- TweenService:Create(title,TweenInfo.new(0.25), {TextTransparency=1}):Play()
- else
- TweenService:Create(frame,TweenInfo.new(0.25,Enum.EasingStyle.Quad,Enum.EasingDirection.Out), {Size=fullSize}):Play()
- -- Restore buttons
- for _, btn in pairs(buttons) do
- local targetY = 50
- if btn.Name=="SaveBase" then targetY=100 end
- if btn.Name=="TpToBase" then targetY=150 end
- if btn.Name=="Desync" then targetY=200 end
- if btn.Name=="InfiniteJump" then targetY=250 end
- TweenService:Create(btn,TweenInfo.new(0.25), {Size=UDim2.new(0,200,0,40), Position=UDim2.new(0.5,-100,0,targetY)}):Play()
- end
- TweenService:Create(title,TweenInfo.new(0.25), {TextTransparency=0}):Play()
- end
- end)
- -- Close
- local closeBtn = Instance.new("TextButton")
- closeBtn.Size = UDim2.new(0,30,0,30)
- closeBtn.Position = UDim2.new(1,-35,0,5)
- closeBtn.Text = "X"
- closeBtn.BackgroundColor3 = Color3.fromRGB(255,0,0)
- closeBtn.Font = Enum.Font.GothamBold
- closeBtn.TextSize = 18
- closeBtn.TextColor3 = Color3.fromRGB(255,255,255)
- closeBtn.Parent = frame
- closeBtn.ZIndex = 3
- local closeCorner = Instance.new("UICorner")
- closeCorner.CornerRadius = UDim.new(0,8)
- closeCorner.Parent = closeBtn
- local closeOutline = Instance.new("UIStroke")
- closeOutline.Thickness = 2
- closeOutline.Color = Color3.fromRGB(0,0,0)
- closeOutline.Parent = closeBtn
- closeBtn.Activated:Connect(function()
- playClick()
- frame:Destroy()
- end)
- -- Draggable
- local dragging, dragInput, dragStart, startPos = false, nil, nil, nil
- title.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- title.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragging and input == dragInput then
- 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
- end)
Add Comment
Please, Sign In to add comment