Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Jump Settings (Local Script) (SPS)
- -- By @sukitovone
- local Players = game:GetService("Players")
- local TweenService = game:GetService("TweenService")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- local DEFAULT_SIZE = UDim2.new(0,80,0,80)
- local DEFAULT_POSITION = UDim2.new(1,-100,1,-100)
- -- Helper
- local function getAttr(name,default)
- if player:GetAttribute(name)==nil then player:SetAttribute(name,default) end
- return player:GetAttribute(name)
- end
- local function setAttr(name,value)
- player:SetAttribute(name,value)
- end
- -- ScreenGui utama
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "TouchGuiSettings"
- ScreenGui.ResetOnSpawn = false
- ScreenGui.IgnoreGuiInset = true
- ScreenGui.Parent = playerGui
- -- InputBlocker fullscreen
- local InputBlocker = Instance.new("Frame")
- InputBlocker.Size = UDim2.new(1,0,1,0)
- InputBlocker.Position = UDim2.new(0,0,0,0)
- InputBlocker.BackgroundTransparency = 1
- InputBlocker.Visible = false
- InputBlocker.ZIndex = 9999
- InputBlocker.Parent = ScreenGui
- -- Topbar SETTINGS Button
- local OpenButton = Instance.new("TextButton")
- OpenButton.Size = UDim2.new(0,100,0,28)
- OpenButton.Position = UDim2.new(1,-120,0,8)
- OpenButton.BackgroundColor3 = Color3.fromRGB(30,30,30)
- OpenButton.Text = "JUMP"
- OpenButton.Font = Enum.Font.GothamBold
- OpenButton.TextColor3 = Color3.fromRGB(255,255,255)
- OpenButton.TextSize = 14
- OpenButton.BorderSizePixel = 0
- OpenButton.Parent = ScreenGui
- Instance.new("UICorner",OpenButton).CornerRadius = UDim.new(1,0)
- Instance.new("UIStroke",OpenButton).Color = Color3.fromRGB(0,0,0)
- -- Frame Settings compact
- local Frame = Instance.new("Frame")
- Frame.Size = UDim2.new(0,240,0,300)
- Frame.Position = UDim2.new(0.5,-120,1,50)
- Frame.BackgroundColor3 = Color3.fromRGB(25,25,25)
- Frame.BackgroundTransparency = 0.07
- Frame.BorderSizePixel = 0
- Frame.Parent = ScreenGui
- Instance.new("UICorner",Frame).CornerRadius = UDim.new(0,12)
- -- UIStroke biru
- local stroke = Instance.new("UIStroke")
- stroke.Color = Color3.fromRGB(0,150,255)
- stroke.Thickness = 2
- stroke.Parent = Frame
- -- Title
- local Title = Instance.new("TextLabel")
- Title.Size = UDim2.new(1,0,0,38)
- Title.Position = UDim2.new(0,0,0,8)
- Title.BackgroundTransparency = 1
- Title.Text = "JUMP SETTINGS"
- Title.Font = Enum.Font.GothamBold
- Title.TextSize = 18
- Title.TextColor3 = Color3.fromRGB(0,200,255)
- Title.TextXAlignment = Enum.TextXAlignment.Center
- Title.Parent = Frame
- -- Credits
- local Credits = Instance.new("TextLabel")
- Credits.Size = UDim2.new(1,0,0,14)
- Credits.Position = UDim2.new(0,0,0,34)
- Credits.BackgroundTransparency = 1
- Credits.Text = "by @sukitovone"
- Credits.Font = Enum.Font.Gotham
- Credits.TextSize = 12
- Credits.TextColor3 = Color3.fromRGB(180,180,180)
- Credits.TextXAlignment = Enum.TextXAlignment.Center
- Credits.Parent = Frame
- -- Garis tipis
- local titleLine = Instance.new("Frame")
- titleLine.Size = UDim2.new(1,0,0,2)
- titleLine.Position = UDim2.new(0,0,0,60)
- titleLine.BackgroundColor3 = Color3.fromRGB(0,150,255)
- titleLine.BorderSizePixel = 0
- titleLine.Parent = Frame
- -- Slider table
- local sliders = {}
- local draggingSlider = nil
- local function createSlider(name,yPos,minVal,maxVal,attrName,defaultValue,descText)
- local slider = {}
- local default = defaultValue or getAttr(attrName,0)
- -- Label kiri
- local label = Instance.new("TextLabel")
- label.Size = UDim2.new(0,120,0,20)
- label.Position = UDim2.new(0,10,0,yPos)
- label.Text = name
- label.TextColor3 = Color3.new(1,1,1)
- label.BackgroundTransparency = 1
- label.Font = Enum.Font.Gotham
- label.TextSize = 14
- label.TextXAlignment = Enum.TextXAlignment.Left
- label.Parent = Frame
- -- Value kanan
- local valueLabel = Instance.new("TextLabel")
- valueLabel.Size = UDim2.new(0,50,0,20)
- valueLabel.Position = UDim2.new(1,-60,0,yPos)
- valueLabel.Text = tostring(default)
- valueLabel.TextColor3 = Color3.fromRGB(0,200,255)
- valueLabel.BackgroundTransparency = 1
- valueLabel.Font = Enum.Font.GothamBold
- valueLabel.TextSize = 14
- valueLabel.TextXAlignment = Enum.TextXAlignment.Right
- valueLabel.Parent = Frame
- -- Track slider
- local track = Instance.new("Frame")
- track.Size = UDim2.new(1,-40,0,10)
- track.Position = UDim2.new(0,20,0,yPos+22)
- track.BackgroundColor3 = Color3.fromRGB(60,60,60)
- track.BorderSizePixel = 0
- track.Parent = Frame
- Instance.new("UICorner",track).CornerRadius = UDim.new(1,0)
- -- Fill
- local fill = Instance.new("Frame")
- local rel = (default-minVal)/(maxVal-minVal)
- fill.Size = UDim2.new(rel,0,1,0)
- fill.BackgroundColor3 = Color3.fromRGB(0,150,255)
- fill.BorderSizePixel = 0
- fill.Parent = track
- Instance.new("UICorner",fill).CornerRadius = UDim.new(1,0)
- local gradient = Instance.new("UIGradient")
- gradient.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(0,180,255)),ColorSequenceKeypoint.new(1,Color3.fromRGB(0,100,255))})
- gradient.Rotation = 90
- gradient.Parent = fill
- -- Knob
- local knob = Instance.new("Frame")
- knob.Size = UDim2.new(0,17,0,17)
- knob.Position = UDim2.new(rel,-8,0.5,-8)
- knob.BackgroundColor3 = Color3.fromRGB(255,255,255)
- knob.BorderSizePixel = 0
- knob.Parent = track
- Instance.new("UICorner",knob).CornerRadius = UDim.new(1,0)
- local knobGlow = Instance.new("UIStroke")
- knobGlow.Color = Color3.fromRGB(0,180,255)
- knobGlow.Thickness = 3
- knobGlow.Transparency = 0.5
- knobGlow.Parent = knob
- local function hoverOn() TweenService:Create(knobGlow,TweenInfo.new(0.15,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{Transparency=0}):Play() end
- local function hoverOff() TweenService:Create(knobGlow,TweenInfo.new(0.15,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{Transparency=0.5}):Play() end
- knob.MouseEnter:Connect(hoverOn)
- knob.MouseLeave:Connect(hoverOff)
- local value = default
- local function setValue(newValue)
- value = math.clamp(newValue,minVal,maxVal)
- local rel = (value-minVal)/(maxVal-minVal)
- fill:TweenSize(UDim2.new(rel,0,1,0),"Out","Quad",0.2,true)
- knob:TweenPosition(UDim2.new(rel,-8,0.5,-8),"Out","Quad",0.2,true)
- valueLabel.Text = tostring(math.floor(value))
- setAttr(attrName,value)
- if slider.OnChange then slider.OnChange(value) end
- end
- local function updateSlider(inputX)
- local rel = math.clamp((inputX-track.AbsolutePosition.X)/track.AbsoluteSize.X,0,1)
- local newValue = math.floor(minVal + rel*(maxVal-minVal))
- setValue(newValue)
- end
- knob.InputBegan:Connect(function(input)
- if input.UserInputType==Enum.UserInputType.MouseButton1 or input.UserInputType==Enum.UserInputType.Touch then
- draggingSlider=slider
- InputBlocker.Visible=true
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if draggingSlider==slider then
- if input.UserInputType==Enum.UserInputType.Touch or input.UserInputType==Enum.UserInputType.MouseMovement then
- updateSlider(input.Position.X)
- end
- end
- end)
- UserInputService.InputEnded:Connect(function(input)
- if draggingSlider==slider and (input.UserInputType==Enum.UserInputType.MouseButton1 or input.UserInputType==Enum.UserInputType.Touch) then
- draggingSlider=nil
- InputBlocker.Visible=false
- end
- end)
- -- Garis bawah tiap slider
- local separator = Instance.new("Frame")
- separator.Size = UDim2.new(1,-20,0,1)
- separator.Position = UDim2.new(0,10,0,yPos+45)
- separator.BackgroundColor3 = Color3.fromRGB(80,80,80)
- separator.BorderSizePixel = 0
- separator.Parent = Frame
- slider.SetValue = setValue
- sliders[attrName] = slider
- return slider
- end
- -- Sliders default (update)
- local sliderSize = createSlider("Ukuran", 75, 80, 150, "JumpSize", 80)
- local sliderX = createSlider("Posisi Horizontal", 135, -200, 200, "JumpPosX", 0)
- local sliderY = createSlider("Posisi Vertikal", 195, -200, 200, "JumpPosY", 0)
- -- Reset Button
- local Reset = Instance.new("TextButton")
- Reset.Size = UDim2.new(0.95,0,0,25)
- Reset.Position = UDim2.new(0.025,0,0,258)
- Reset.Text = "Reset Default"
- Reset.Font = Enum.Font.GothamBold
- Reset.TextSize = 14
- Reset.TextColor3 = Color3.new(1,1,1)
- Reset.BackgroundColor3 = Color3.fromRGB(212,63,63)
- Reset.Parent = Frame
- Instance.new("UICorner",Reset).CornerRadius = UDim.new(0,6)
- Reset.MouseButton1Click:Connect(function()
- sliders["JumpSize"].SetValue(80)
- sliders["JumpPosX"].SetValue(0)
- sliders["JumpPosY"].SetValue(0)
- end)
- -- Close button
- local Close = Instance.new("ImageButton")
- Close.Size = UDim2.new(0,22,0,22)
- Close.Position = UDim2.new(1,-32,0,8)
- Close.BackgroundColor3 = Color3.fromRGB(200,30,30)
- Close.Image = "rbxassetid://6031094678"
- Close.ImageColor3 = Color3.fromRGB(255,255,255)
- Close.Parent = Frame
- Instance.new("UICorner",Close).CornerRadius = UDim.new(0,5)
- -- Toggle menu
- local menuVisible = false
- local function toggleMenu(show)
- menuVisible = show
- OpenButton.Visible = not show
- if show then
- Frame:TweenPosition(UDim2.new(0.5,-120,0.5,-140),"Out","Quad",0.3,true)
- InputBlocker.Visible = true
- else
- Frame:TweenPosition(UDim2.new(0.5,-120,1,50),"Out","Quad",0.3,true)
- InputBlocker.Visible = false
- end
- end
- OpenButton.MouseButton1Click:Connect(function() toggleMenu(not menuVisible) end)
- Close.MouseButton1Click:Connect(function() toggleMenu(false) end)
- -- Apply settings (tetap gunakan posisi default Roblox saat join)
- local function applySettings()
- local touchGui = playerGui:FindFirstChild("TouchGui")
- if not touchGui then return end
- local control = touchGui:FindFirstChild("TouchControlFrame")
- if not control then return end
- local jump = control:FindFirstChild("JumpButton",true)
- if not jump then return end
- local scale = getAttr("JumpSize",80)/80
- local posX = getAttr("JumpPosX",0)
- local posY = getAttr("JumpPosY",0)
- jump.Size = UDim2.new(0, DEFAULT_SIZE.X.Offset * scale, 0, DEFAULT_SIZE.Y.Offset * scale)
- jump.Position = UDim2.new(DEFAULT_POSITION.X.Scale, DEFAULT_POSITION.X.Offset + posX, DEFAULT_POSITION.Y.Scale, DEFAULT_POSITION.Y.Offset + posY)
- end
- sliderSize.OnChange = applySettings
- sliderX.OnChange = applySettings
- sliderY.OnChange = applySettings
Advertisement
Add Comment
Please, Sign In to add comment