--[[ KM STUDIO ULTIMATE - Instant Noclip & 3D Tilt Fly System Creator: Kami_ytt (KM studios) ]] if _G.KM_FLY_MOBILE_LOADED then return end _G.KM_FLY_MOBILE_LOADED = true local Players = game:GetService("Players") local RunService = game:GetService("RunService") local CoreGui = game:GetService("CoreGui") local Stats = game:GetService("Stats") local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local SoundService = game:GetService("SoundService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera local flying = false local noclipActive = false local flySpeed = 50 local isMinimized = false local isScriptsScreenOpen = false local heroPoseActive = false local wideCameraActive = false local cameraFovValue = 70 local flyCamShakeActive = true local musicDeleted = false local currentThemeName = "NORMAL THEME" local currentLanguage = "ORIGINAL" local PANEL_WIDTH = 220 local EXPANDED_HEIGHT = 204 local MINIMIZED_HEIGHT = 38 local SCRIPTS_WIDTH = 266 local SCRIPTS_HEIGHT = 310 local SCRIPTS_CANVAS_HEIGHT = 462 local bodyVelocity, bodyGyro local mobileGui, mainPanel, panelStroke, contentHolder, minimizeBtn, studioBoxBtn, perfLabel local titleLabel, subTitle, speedLabel local flyToggleBtn, noclipToggleBtn, musicToggleBtn, nextTrackBtn, trackInfoLabel, speedBox local scriptsPanel, scriptsScrollFrame, backArrowBtn, scriptsTitle, heroPoseBtn, cameraFovBtn, camShakeBtn, deleteMusicBtn local sliderTitle, fovSliderFill, fovSliderKnob, fovValueLabel local themesHeader, languagesHeader, noteLabel local themeButtons = {} local languageButtons = {} local seasonalContainer local themeRegisteredItems = {} local seasonalEffectTokens = {} local savedMainSizeBeforeMin = UDim2.new(0, PANEL_WIDTH, 0, EXPANDED_HEIGHT) local savedMainPosBeforeMin = nil -- Bezpieczne pobranie modułu sterowania Robloxa dla telefonu / tabletu local controlModule = nil pcall(function() local playerScripts = player:WaitForChild("PlayerScripts", 2) if playerScripts then local playerModule = require(playerScripts:WaitForChild("PlayerModule", 2)) controlModule = playerModule:GetControls() end end) -- === TŁUMACZENIA (LANGUAGE SETTINGS 🌍) === local TRANSLATIONS = { ["ORIGINAL"] = { title = "FLY MOBILE ☆", subTitle = "by KM studios", flyOn = "Fly: ON", flyOff = "Fly: OFF", noclipOn = "Noclip: ON", noclipOff = "Noclip: OFF", musicOn = "Music: ON", musicOff = "Music: OFF", trackPrefix = "#", trackIdLabel = "ID", speedLabel = "Speed:", scriptsTitle = "KM scripts no keylless by KM studios", poseOn = "Pose: ON", poseOff = "Pose: OFF", cam120 = "Cam: 120", cam70 = "Cam: 70", fovLabel = "FOV:", shakeOn = "Cam Shake: ON", shakeOff = "Cam Shake: OFF", deleteMusic = "Delete Music", musicDeleted = "Music Deleted", themesHeader = "THEMES", languagesHeader = "LANGUAGE SETTINGS 🌍", noteText = "Notatka rozbudowana:\n• Skrypty KM studios działają w pełni bez klucza (KEYLESS) na telefonie.\n• Suwak FOV pozwala płynnie dopasować szerokość kamery (70-120), a Cam Shake dodaje drgania kamery w locie.\n• THEMES zmienia wygląd całego panelu, a 2. menu przytłumia muzykę bez przerywania.\n• Pose unosi jedną rękę w górę, a Delete Music usuwa przycisk muzyki.", }, ["ENGLISH"] = { title = "FLY MOBILE ☆", subTitle = "by KM studios", flyOn = "Fly: ON", flyOff = "Fly: OFF", noclipOn = "Noclip: ON", noclipOff = "Noclip: OFF", musicOn = "Music: ON", musicOff = "Music: OFF", trackPrefix = "#", trackIdLabel = "ID", speedLabel = "Speed:", scriptsTitle = "KM scripts keyless by KM studios", poseOn = "Pose: ON", poseOff = "Pose: OFF", cam120 = "Cam: 120", cam70 = "Cam: 70", fovLabel = "FOV:", shakeOn = "Cam Shake: ON", shakeOff = "Cam Shake: OFF", deleteMusic = "Delete Music", musicDeleted = "Music Deleted", themesHeader = "THEMES", languagesHeader = "LANGUAGE SETTINGS 🌍", noteText = "Extended Notes:\n• KM studios scripts run completely keyless on mobile devices.\n• The FOV slider adjusts camera view (70-120), while Cam Shake adds smooth camera vibration while flying.\n• THEMES updates the entire panel look, and Menu 2 muffles active music without stopping playback.\n• Pose raises one arm up smoothly, and Delete Music removes the music control.", }, ["POLSKI"] = { title = "LOT MOBILNY ☆", subTitle = "od KM studios", flyOn = "Lot: WŁ.", flyOff = "Lot: WYŁ.", noclipOn = "Przenikanie: WŁ.", noclipOff = "Przenikanie: WYŁ.", musicOn = "Muzyka: WŁ.", musicOff = "Muzyka: WYŁ.", trackPrefix = "Ut.", trackIdLabel = "ID", speedLabel = "Szybkość:", scriptsTitle = "Skrypty KM bez klucza od KM studios", poseOn = "Poza: WŁ.", poseOff = "Poza: WYŁ.", cam120 = "Kamera: 120", cam70 = "Kamera: 70", fovLabel = "Pole widzenia:", shakeOn = "Drgania kam.: WŁ.", shakeOff = "Drgania kam.: WYŁ.", deleteMusic = "Usuń muzykę", musicDeleted = "Muzyka usunięta", themesHeader = "MOTYWY", languagesHeader = "USTAWIENIA JĘZYKA 🌍", noteText = "Rozbudowana notatka:\n• Skrypty KM studios działają w pełni bez klucza na telefonach.\n• Suwak zmienia pole widzenia (70-120), a drgania kamery dodają płynny efekt podczas lotu.\n• Motywy zmieniają wygląd całego panelu, a otwarcie 2. menu przytłumia muzykę bez zatrzymywania.\n• Poza unosi jedną rękę w górę, a Usuń muzykę usuwa przyciski muzyki.", }, } local function getLangPack() return TRANSLATIONS[currentLanguage] or TRANSLATIONS["ORIGINAL"] end local function syncCamShakeUi() local lang = getLangPack() if camShakeBtn and camShakeBtn.Parent then camShakeBtn.Text = flyCamShakeActive and lang.shakeOn or lang.shakeOff camShakeBtn.TextColor3 = flyCamShakeActive and Color3.fromRGB(80, 220, 120) or Color3.fromRGB(220, 80, 80) end end local function refreshAllTexts() local lang = getLangPack() if titleLabel and titleLabel.Parent then titleLabel.Text = lang.title end if subTitle and subTitle.Parent then subTitle.Text = lang.subTitle end if flyToggleBtn and flyToggleBtn.Parent then flyToggleBtn.Text = flying and lang.flyOn or lang.flyOff end if noclipToggleBtn and noclipToggleBtn.Parent then noclipToggleBtn.Text = noclipActive and lang.noclipOn or lang.noclipOff end if musicToggleBtn and musicToggleBtn.Parent and not musicDeleted then musicToggleBtn.Text = musicEnabled and lang.musicOn or lang.musicOff end if speedLabel and speedLabel.Parent then speedLabel.Text = lang.speedLabel end if scriptsTitle and scriptsTitle.Parent then scriptsTitle.Text = lang.scriptsTitle end if heroPoseBtn and heroPoseBtn.Parent then heroPoseBtn.Text = heroPoseActive and lang.poseOn or lang.poseOff end if cameraFovBtn and cameraFovBtn.Parent then cameraFovBtn.Text = wideCameraActive and lang.cam120 or lang.cam70 end if sliderTitle and sliderTitle.Parent then sliderTitle.Text = lang.fovLabel end syncCamShakeUi() if deleteMusicBtn and deleteMusicBtn.Parent then deleteMusicBtn.Text = musicDeleted and lang.musicDeleted or lang.deleteMusic end if themesHeader and themesHeader.Parent then themesHeader.Text = lang.themesHeader end if languagesHeader and languagesHeader.Parent then languagesHeader.Text = lang.languagesHeader end if noteLabel and noteLabel.Parent then noteLabel.Text = lang.noteText end end local function refreshTrackInfo() if not trackInfoLabel or not trackInfoLabel.Parent or musicDeleted then return end local raw = playlist[currentTrackIndex] or "" local idNum = string.match(raw, "(%d+)$") or raw local lang = getLangPack() trackInfoLabel.Text = string.format("%s%d/%d | %s: %s", lang.trackPrefix, currentTrackIndex, #playlist, lang.trackIdLabel, idNum) end local function updateLanguageButtonVisuals() local activeDef = THEMES[currentThemeName] or THEMES["NORMAL THEME"] for code, btn in pairs(languageButtons) do if btn and btn.Parent then local isSelected = (code == currentLanguage) btn.TextColor3 = isSelected and Color3.fromRGB(110, 235, 145) or activeDef.textColor end end end local function setLanguage(langCode) if not TRANSLATIONS[langCode] then return end currentLanguage = langCode refreshAllTexts() refreshTrackInfo() updateLanguageButtonVisuals() end -- === PLAYLISTA MUZYCZNA (Przełącza się automatycznie po zakończeniu utworu, w pętli) === playlist = { "rbxassetid://1845458027", "rbxassetid://85362242154153", "rbxassetid://99445078556609", "rbxassetid://1846458016", "rbxassetid://1841443579" } currentTrackIndex = 1 musicEnabled = true trackGeneration = 0 BASE_MUSIC_VOLUME = 1 MUFFLED_MUSIC_VOLUME = 0.88 muffledStateActive = false muffledSavedVolumes = {} muffledEqualizers = {} local sound = Instance.new("Sound") sound.Name = "KM_Studio_Music" sound.Volume = BASE_MUSIC_VOLUME sound.Looped = false local function getMuffledTargetVolume(snd) if snd == sound then return MUFFLED_MUSIC_VOLUME end local orig = muffledSavedVolumes[snd] if typeof(orig) == "number" then return math.clamp(orig * 0.85, 0.06, 10) end return nil end local function collectPlayingSounds() local list = {} local seen = {} local function addIfPlaying(obj) if obj and obj:IsA("Sound") and not seen[obj] then seen[obj] = true local isActive = false pcall(function() isActive = obj.IsPlaying or (obj == sound and musicEnabled) end) if isActive then table.insert(list, obj) end end end if sound and sound.Parent then addIfPlaying(sound) end for _, container in ipairs({ SoundService, CoreGui, workspace }) do pcall(function() for _, desc in ipairs(container:GetDescendants()) do if desc:IsA("Sound") and desc.IsPlaying then addIfPlaying(desc) end end end) end local pg = player:FindFirstChildOfClass("PlayerGui") if pg then pcall(function() for _, desc in ipairs(pg:GetDescendants()) do if desc:IsA("Sound") and desc.IsPlaying then addIfPlaying(desc) end end end) end return list end local function applyMuffledMusicEffect(enable) if musicDeleted then return end muffledStateActive = enable if enable then for _, snd in ipairs(collectPlayingSounds()) do pcall(function() if muffledSavedVolumes[snd] == nil then muffledSavedVolumes[snd] = (snd == sound) and BASE_MUSIC_VOLUME or snd.Volume end local eq = muffledEqualizers[snd] if not eq or not eq.Parent then eq = snd:FindFirstChild("KM_Muffled_EQ") if not eq then eq = Instance.new("EqualizerSoundEffect") eq.Name = "KM_Muffled_EQ" eq.LowGain = 4.0 eq.MidGain = -9 eq.HighGain = -20 eq.Enabled = true eq.Parent = snd end muffledEqualizers[snd] = eq end eq.LowGain = 4.0 eq.MidGain = -9 eq.HighGain = -20 eq.Enabled = true local targetVol = getMuffledTargetVolume(snd) if targetVol then TweenService:Create( snd, TweenInfo.new(0.22, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Volume = targetVol } ):Play() end end) end else for snd, eq in pairs(muffledEqualizers) do pcall(function() if eq and eq.Parent then eq:Destroy() end end) muffledEqualizers[snd] = nil end for snd, origVol in pairs(muffledSavedVolumes) do pcall(function() if snd and snd.Parent then local restoreVol = (snd == sound) and BASE_MUSIC_VOLUME or origVol TweenService:Create( snd, TweenInfo.new(0.22, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Volume = restoreVol } ):Play() end end) muffledSavedVolumes[snd] = nil end if sound and sound.Parent then pcall(function() sound.Volume = BASE_MUSIC_VOLUME end) end end end local function attachSoundParent() if musicDeleted or not sound then return end local ok = pcall(function() sound.Parent = CoreGui end) if not ok or not sound.Parent then pcall(function() sound.Parent = player:WaitForChild("PlayerGui") end) end end attachSoundParent() local function advanceIndex() currentTrackIndex = currentTrackIndex + 1 if currentTrackIndex > #playlist then currentTrackIndex = 1 end end local lastTrackSwitchTick = 0 local isSwitchingTrack = false local function playTrackAtIndex(idx) if musicDeleted or not sound or isSwitchingTrack then return end isSwitchingTrack = true lastTrackSwitchTick = tick() trackGeneration = trackGeneration + 1 local myGen = trackGeneration local wrappedIdx = ((idx - 1) % #playlist) + 1 currentTrackIndex = wrappedIdx refreshTrackInfo() if sound.Parent == nil then attachSoundParent() end local nextAssetId = playlist[currentTrackIndex] or "" pcall(function() sound.Looped = false sound:Stop() sound.SoundId = "" sound.TimePosition = 0 sound.SoundId = nextAssetId sound.Volume = muffledStateActive and MUFFLED_MUSIC_VOLUME or BASE_MUSIC_VOLUME if musicEnabled and nextAssetId ~= "" then sound:Play() end end) task.delay(0.15, function() if trackGeneration == myGen and sound and not musicDeleted then pcall(function() if musicEnabled and not sound.IsPlaying and sound.SoundId == nextAssetId then sound.TimePosition = 0 sound:Play() end end) end isSwitchingTrack = false end) if muffledStateActive then task.defer(function() applyMuffledMusicEffect(true) end) end end local function triggerNextTrack() if musicDeleted or not musicEnabled or isSwitchingTrack then return end if (tick() - lastTrackSwitchTick) < 0.45 then return end local nextIdx = (currentTrackIndex % #playlist) + 1 playTrackAtIndex(nextIdx) end sound.Ended:Connect(function() if musicDeleted or not musicEnabled then return end triggerNextTrack() end) -- Nadzór końca utworu (także gdy dźwięk nie zdąży się załadować i ma TimeLength == 0 po próbie odtworzenia) task.spawn(function() local zeroLengthTicks = 0 local lastId = "" while true do task.wait(0.25) if musicDeleted then break end pcall(function() if not musicEnabled or not sound or isSwitchingTrack then zeroLengthTicks = 0 return end if sound.SoundId ~= lastId then lastId = sound.SoundId zeroLengthTicks = 0 end if sound.Parent == nil then attachSoundParent() end if not sound.IsPlaying and sound.SoundId ~= "" and (tick() - lastTrackSwitchTick) > 0.6 then sound:Play() end if muffledStateActive then applyMuffledMusicEffect(true) end local length = sound.TimeLength if length > 0 then zeroLengthTicks = 0 if sound.TimePosition >= (length - 0.2) then triggerNextTrack() end elseif sound.IsPlaying then zeroLengthTicks = zeroLengthTicks + 1 if zeroLengthTicks >= 20 then zeroLengthTicks = 0 triggerNextTrack() end end end) end end) playTrackAtIndex(currentTrackIndex) -- === MOTYWY PANELU (THEMES) === THEMES = { ["NORMAL THEME"] = { panelBg = Color3.fromRGB(22, 25, 33), cardBg = Color3.fromRGB(32, 36, 46), strokeColor = Color3.fromRGB(255, 255, 255), titleColor = Color3.fromRGB(255, 255, 255), subTitleColor = Color3.fromRGB(150, 160, 180), textColor = Color3.fromRGB(220, 220, 220), noteColor = Color3.fromRGB(205, 212, 225), accentColor = Color3.fromRGB(255, 255, 255), effectType = nil, }, ["AUTUMN THEME 🍂"] = { panelBg = Color3.fromRGB(42, 24, 14), cardBg = Color3.fromRGB(66, 36, 18), strokeColor = Color3.fromRGB(245, 158, 56), titleColor = Color3.fromRGB(255, 214, 153), subTitleColor = Color3.fromRGB(224, 152, 82), textColor = Color3.fromRGB(255, 226, 185), noteColor = Color3.fromRGB(245, 206, 158), accentColor = Color3.fromRGB(255, 168, 52), effectType = "AUTUMN", }, ["WINTER THEME ❄️"] = { panelBg = Color3.fromRGB(18, 29, 44), cardBg = Color3.fromRGB(30, 48, 70), strokeColor = Color3.fromRGB(190, 232, 255), titleColor = Color3.fromRGB(235, 248, 255), subTitleColor = Color3.fromRGB(165, 205, 232), textColor = Color3.fromRGB(220, 240, 255), noteColor = Color3.fromRGB(205, 230, 248), accentColor = Color3.fromRGB(165, 224, 255), effectType = "WINTER", }, ["SUMMER THEME ☀️"] = { panelBg = Color3.fromRGB(16, 44, 52), cardBg = Color3.fromRGB(24, 68, 78), strokeColor = Color3.fromRGB(255, 224, 92), titleColor = Color3.fromRGB(255, 244, 175), subTitleColor = Color3.fromRGB(115, 232, 218), textColor = Color3.fromRGB(225, 252, 248), noteColor = Color3.fromRGB(210, 246, 242), accentColor = Color3.fromRGB(72, 228, 214), effectType = "SUMMER", }, } local function clearSeasonalEffects() for key in pairs(seasonalEffectTokens) do seasonalEffectTokens[key] = (seasonalEffectTokens[key] or 0) + 1 end if seasonalContainer and seasonalContainer.Parent then for _, child in ipairs(seasonalContainer:GetChildren()) do pcall(function() child:Destroy() end) end end end local function spawnSeasonalEffects(effectType) clearSeasonalEffects() if not effectType or not seasonalContainer or not seasonalContainer.Parent then return end local particleGlyphs = {} local particleColors = {} if effectType == "AUTUMN" then particleGlyphs = { "🍂", "🍁" } particleColors = { Color3.fromRGB(255, 165, 55), Color3.fromRGB(214, 105, 38), Color3.fromRGB(245, 198, 72) } elseif effectType == "WINTER" then particleGlyphs = { "❄️", "•" } particleColors = { Color3.fromRGB(225, 245, 255), Color3.fromRGB(175, 225, 255) } elseif effectType == "SUMMER" then particleGlyphs = { "☀️", "✦" } particleColors = { Color3.fromRGB(255, 228, 102), Color3.fromRGB(110, 238, 224) } end for i = 1, 6 do local token = (seasonalEffectTokens[i] or 0) + 1 seasonalEffectTokens[i] = token task.spawn(function() while seasonalContainer and seasonalContainer.Parent and seasonalEffectTokens[i] == token do local pLabel = Instance.new("TextLabel") pLabel.BackgroundTransparency = 1 pLabel.Font = Enum.Font.GothamBold pLabel.Text = particleGlyphs[((i - 1) % #particleGlyphs) + 1] pLabel.TextColor3 = particleColors[((i - 1) % #particleColors) + 1] pLabel.TextSize = (effectType == "WINTER") and 11 or 12 pLabel.TextTransparency = 0.25 pLabel.Size = UDim2.new(0, 16, 0, 16) local startX = math.clamp(0.08 + ((i - 1) * 0.16) + (math.random(-4, 4) * 0.01), 0.05, 0.88) pLabel.Position = UDim2.new(startX, 0, -0.08, 0) pLabel.ZIndex = 3 pLabel.Parent = seasonalContainer local driftX = math.clamp(startX + (math.random(-8, 8) * 0.01), 0.04, 0.88) local fallTime = math.random(24, 38) / 10 local moveTween = TweenService:Create( pLabel, TweenInfo.new(fallTime, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { Position = UDim2.new(driftX, 0, 1.05, 0), TextTransparency = 0.85, Rotation = math.random(-25, 25) } ) moveTween:Play() task.wait(fallTime + math.random(2, 7) / 10) pcall(function() pLabel:Destroy() end) end end) end end local function registerThemedElement(obj, role) table.insert(themeRegisteredItems, { obj = obj, role = role }) end local function updateThemeButtonVisuals() local activeDef = THEMES[currentThemeName] or THEMES["NORMAL THEME"] for name, btn in pairs(themeButtons) do if btn and btn.Parent then local isSelected = (name == currentThemeName) btn.TextColor3 = isSelected and Color3.fromRGB(110, 235, 145) or activeDef.textColor end end end local function applyTheme(themeName, instant) local def = THEMES[themeName] if not def then return end currentThemeName = themeName local tweenInfo = instant and TweenInfo.new(0) or TweenInfo.new(0.32, Enum.EasingStyle.Quint, Enum.EasingDirection.Out) for _, item in ipairs(themeRegisteredItems) do local obj = item.obj local role = item.role if obj and obj.Parent then pcall(function() if role == "panelBg" then TweenService:Create(obj, tweenInfo, { BackgroundColor3 = def.panelBg }):Play() elseif role == "cardBg" then TweenService:Create(obj, tweenInfo, { BackgroundColor3 = def.cardBg }):Play() elseif role == "stroke" then TweenService:Create(obj, tweenInfo, { Color = def.strokeColor }):Play() elseif role == "title" then TweenService:Create(obj, tweenInfo, { TextColor3 = def.titleColor }):Play() elseif role == "subTitle" then TweenService:Create(obj, tweenInfo, { TextColor3 = def.subTitleColor }):Play() elseif role == "text" then TweenService:Create(obj, tweenInfo, { TextColor3 = def.textColor }):Play() elseif role == "note" then TweenService:Create(obj, tweenInfo, { TextColor3 = def.noteColor }):Play() end end) end end updateThemeButtonVisuals() updateLanguageButtonVisuals() spawnSeasonalEffects(def.effectType) end -- Płynna poza bohatera: jedna ręka w górze (R15 oraz R6, odporna na animacje gry) local savedRightShoulderC0 = nil local currentArmBlend = 0 local function findRightArmJoint(char) if not char then return nil, nil end local r15Arm = char:FindFirstChild("RightUpperArm") if r15Arm then local motor = r15Arm:FindFirstChild("RightShoulder") if motor and motor:IsA("Motor6D") then return motor, "R15" end end local torso = char:FindFirstChild("Torso") if torso then local r6Motor = torso:FindFirstChild("Right Shoulder") if r6Motor and r6Motor:IsA("Motor6D") then return r6Motor, "R6" end end return nil, nil end local function syncHeroPoseUi() local lang = getLangPack() if heroPoseBtn and heroPoseBtn.Parent then heroPoseBtn.Text = heroPoseActive and lang.poseOn or lang.poseOff heroPoseBtn.TextColor3 = heroPoseActive and Color3.fromRGB(80, 220, 120) or Color3.fromRGB(220, 220, 220) end end local function setHeroPose(enabled) heroPoseActive = enabled syncHeroPoseUi() end -- Płynne ustawianie kamery FOV w zakresie 70 - 120 (przycisk i suwak w 2. menu) local function syncFovSliderVisuals(val) local clamped = math.clamp(math.round(val), 70, 120) local ratio = (clamped - 70) / (120 - 70) local lang = getLangPack() if fovSliderFill and fovSliderFill.Parent then fovSliderFill.Size = UDim2.new(ratio, 0, 1, 0) end if fovSliderKnob and fovSliderKnob.Parent then fovSliderKnob.Position = UDim2.new(ratio, -6, 0.5, -6) end if fovValueLabel and fovValueLabel.Parent then fovValueLabel.Text = tostring(clamped) end if cameraFovBtn and cameraFovBtn.Parent then cameraFovBtn.Text = wideCameraActive and lang.cam120 or lang.cam70 cameraFovBtn.TextColor3 = wideCameraActive and Color3.fromRGB(80, 220, 120) or Color3.fromRGB(220, 220, 220) end end local function setCameraFovValue(targetFov, smooth) local clamped = math.clamp(targetFov, 70, 120) cameraFovValue = clamped wideCameraActive = (math.round(clamped) >= 100) syncFovSliderVisuals(clamped) local activeCam = workspace.CurrentCamera or camera if activeCam then pcall(function() if smooth then TweenService:Create( activeCam, TweenInfo.new(0.24, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { FieldOfView = clamped } ):Play() else activeCam.FieldOfView = clamped end end) end end local function setCameraFov70_120(wide) wideCameraActive = wide setCameraFovValue(wide and 120 or 70, true) end -- Usuwanie przycisku muzyki oraz obiektu dźwięku po kliknięciu Delete Music local function deleteMusicFeature() if musicDeleted then return end musicDeleted = true musicEnabled = false applyMuffledMusicEffect(false) pcall(function() if sound then sound:Stop() sound:Destroy() sound = nil end end) if musicToggleBtn and musicToggleBtn.Parent then pcall(function() musicToggleBtn:Destroy() end) musicToggleBtn = nil end if nextTrackBtn and nextTrackBtn.Parent then pcall(function() nextTrackBtn:Destroy() end) nextTrackBtn = nil end if trackInfoLabel and trackInfoLabel.Parent then pcall(function() trackInfoLabel:Destroy() end) trackInfoLabel = nil end if deleteMusicBtn and deleteMusicBtn.Parent then local lang = getLangPack() deleteMusicBtn.Text = lang.musicDeleted deleteMusicBtn.TextColor3 = Color3.fromRGB(220, 80, 80) end end -- Licznik FPS i pingu na górze obok przycisku "-" local fpsFrames = 0 local fpsAccumulator = 0 local currentFps = 60 local currentPing = 0 RunService.RenderStepped:Connect(function(dt) fpsFrames = fpsFrames + 1 fpsAccumulator = fpsAccumulator + dt if fpsAccumulator >= 0.5 then currentFps = math.clamp(math.round(fpsFrames / fpsAccumulator), 1, 999) fpsFrames = 0 fpsAccumulator = 0 pcall(function() local netItem = Stats.Network and Stats.Network.ServerStatsItem and Stats.Network.ServerStatsItem["Data Ping"] if netItem then currentPing = math.clamp(math.round(netItem:GetValue()), 0, 9999) end end) if perfLabel and perfLabel.Parent then perfLabel.Text = string.format("%d FPS | %dms", currentFps, currentPing) end end end) -- Animacja białej ramki: zmiana na zielony/czerwony, pętla i powrót do koloru motywu local strokePulseToken = 0 local GREEN_STROKE = Color3.fromRGB(80, 220, 120) local RED_STROKE = Color3.fromRGB(220, 80, 80) local function pulseStrokeColor(isOn) if not panelStroke or not panelStroke.Parent then return end strokePulseToken = strokePulseToken + 1 local myToken = strokePulseToken local activeDef = THEMES[currentThemeName] or THEMES["NORMAL THEME"] local baseStroke = activeDef.strokeColor local accentColor = isOn and GREEN_STROKE or RED_STROKE local dimAccent = isOn and Color3.fromRGB(35, 130, 65) or Color3.fromRGB(130, 35, 35) task.spawn(function() pcall(function() panelStroke.Color = accentColor if strokePulseToken ~= myToken then return end local t1 = TweenService:Create(panelStroke, TweenInfo.new(0.16, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { Color = dimAccent }) t1:Play() t1.Completed:Wait() if strokePulseToken ~= myToken then return end local t2 = TweenService:Create(panelStroke, TweenInfo.new(0.16, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { Color = accentColor }) t2:Play() t2.Completed:Wait() if strokePulseToken ~= myToken then return end local t3 = TweenService:Create(panelStroke, TweenInfo.new(0.26, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Color = baseStroke }) t3:Play() end) end) end -- Płynne animowanie minimalizowania panelu i powrotu do poprzedniego rozmiaru oraz pozycji local slideToken = 0 local function applyMinimizeState(instant) if not mainPanel or not contentHolder or not minimizeBtn then return end slideToken = slideToken + 1 local myToken = slideToken minimizeBtn.Text = isMinimized and "+" or "-" if isMinimized then savedMainSizeBeforeMin = UDim2.new(0, PANEL_WIDTH, 0, EXPANDED_HEIGHT) savedMainPosBeforeMin = mainPanel.Position local minSize = UDim2.new(0, PANEL_WIDTH, 0, MINIMIZED_HEIGHT) local minPos = UDim2.new( savedMainPosBeforeMin.X.Scale, savedMainPosBeforeMin.X.Offset, savedMainPosBeforeMin.Y.Scale, savedMainPosBeforeMin.Y.Offset + 4 ) if instant then contentHolder.Visible = false contentHolder.Position = UDim2.new(0, 0, 0, -156) mainPanel.Size = minSize mainPanel.Position = minPos return end local sizeTween = TweenService:Create( mainPanel, TweenInfo.new(0.28, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut), { Size = minSize, Position = minPos } ) local contentTween = TweenService:Create( contentHolder, TweenInfo.new(0.18, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Position = UDim2.new(0, 0, 0, -156) } ) sizeTween:Play() contentTween:Play() contentTween.Completed:Connect(function() if slideToken == myToken and isMinimized and contentHolder then contentHolder.Visible = false end end) else local restoreSize = savedMainSizeBeforeMin or UDim2.new(0, PANEL_WIDTH, 0, EXPANDED_HEIGHT) local restorePos = savedMainPosBeforeMin or mainPanel.Position if instant then contentHolder.Visible = true contentHolder.Position = UDim2.new(0, 0, 0, 36) mainPanel.Size = restoreSize mainPanel.Position = restorePos return end contentHolder.Visible = true contentHolder.Position = UDim2.new(0, 0, 0, -156) local sizeTween = TweenService:Create( mainPanel, TweenInfo.new(0.32, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Size = restoreSize, Position = restorePos } ) local contentTween = TweenService:Create( contentHolder, TweenInfo.new(0.26, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { Position = UDim2.new(0, 0, 0, 36) } ) sizeTween:Play() contentTween:Play() end end -- Przejście: 1. menu lekko spada w dół i wolniej idzie w górę, a od dołu wyjeżdża 2. menu local screenSwitchToken = 0 local function setScriptsScreen(openScripts, instant) if not mainPanel or not scriptsPanel then return end isScriptsScreenOpen = openScripts applyMuffledMusicEffect(openScripts) screenSwitchToken = screenSwitchToken + 1 local myToken = screenSwitchToken local mainCenterPos = savedMainPosBeforeMin or UDim2.new(0.5, -PANEL_WIDTH / 2, 0.3, -EXPANDED_HEIGHT / 2) local mainDipDownPos = UDim2.new( mainCenterPos.X.Scale, mainCenterPos.X.Offset, mainCenterPos.Y.Scale, mainCenterPos.Y.Offset + 22 ) local mainOffTopPos = UDim2.new(0.5, -PANEL_WIDTH / 2, 0, -EXPANDED_HEIGHT - 60) local scriptsCenterPos = UDim2.new(0.5, -SCRIPTS_WIDTH / 2, 0.5, -SCRIPTS_HEIGHT / 2) local scriptsOffBottomPos = UDim2.new(0.5, -SCRIPTS_WIDTH / 2, 1, 60) if instant then if openScripts then mainPanel.Visible = false mainPanel.Position = mainOffTopPos scriptsPanel.Visible = true scriptsPanel.Position = scriptsCenterPos else scriptsPanel.Visible = false scriptsPanel.Position = scriptsOffBottomPos mainPanel.Visible = true mainPanel.Position = mainCenterPos end return end if openScripts then scriptsPanel.Visible = true scriptsPanel.Position = scriptsOffBottomPos mainPanel.Visible = true local inTween = TweenService:Create( scriptsPanel, TweenInfo.new(0.74, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { Position = scriptsCenterPos } ) inTween:Play() task.spawn(function() local dipTween = TweenService:Create( mainPanel, TweenInfo.new(0.20, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = mainDipDownPos } ) dipTween:Play() dipTween.Completed:Wait() if screenSwitchToken ~= myToken or not isScriptsScreenOpen or not mainPanel then return end local riseTween = TweenService:Create( mainPanel, TweenInfo.new(0.56, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { Position = mainOffTopPos } ) riseTween:Play() riseTween.Completed:Connect(function() if screenSwitchToken == myToken and isScriptsScreenOpen and mainPanel then mainPanel.Visible = false end end) end) else mainPanel.Visible = true mainPanel.Position = mainOffTopPos scriptsPanel.Visible = true local outTween = TweenService:Create( scriptsPanel, TweenInfo.new(0.54, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut), { Position = scriptsOffBottomPos } ) local inTween = TweenService:Create( mainPanel, TweenInfo.new(0.64, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { Position = mainCenterPos } ) outTween:Play() inTween:Play() outTween.Completed:Connect(function() if screenSwitchToken == myToken and (not isScriptsScreenOpen) and scriptsPanel then scriptsPanel.Visible = false end end) end end -- Efekt lekkiego przyciemnienia liter przy kliknięciu (bez przybliżania/powiększania) local function attachLetterDimEffect(textObj, normalColor, dimmedColor) local dimId = 0 textObj.MouseButton1Click:Connect(function() dimId = dimId + 1 local currentId = dimId local dimTween = TweenService:Create( textObj, TweenInfo.new(0.14, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { TextColor3 = dimmedColor } ) dimTween:Play() dimTween.Completed:Wait() if dimId ~= currentId then return end local restoreTween = TweenService:Create( textObj, TweenInfo.new(0.24, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { TextColor3 = normalColor } ) restoreTween:Play() end) end -- Funkcja tworząca GUI KM STUDIO local function createMobileGui() themeRegisteredItems = {} themeButtons = {} languageButtons = {} clearSeasonalEffects() if mobileGui then pcall(function() mobileGui:Destroy() end) end mobileGui = Instance.new("ScreenGui") mobileGui.Name = "KMMobileSystem" mobileGui.ResetOnSpawn = false mobileGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling local success = pcall(function() mobileGui.Parent = CoreGui end) if not success then pcall(function() mobileGui.Parent = player:WaitForChild("PlayerGui") end) end local initialPos = savedMainPosBeforeMin or UDim2.new(0.5, -110, 0.3, -102) savedMainPosBeforeMin = initialPos mainPanel = Instance.new("Frame") mainPanel.Name = "MainPanel" mainPanel.Size = UDim2.new(0, PANEL_WIDTH, 0, EXPANDED_HEIGHT) mainPanel.Position = initialPos mainPanel.BackgroundColor3 = Color3.fromRGB(22, 25, 33) mainPanel.BackgroundTransparency = 0.05 mainPanel.Active = true mainPanel.Draggable = true mainPanel.ClipsDescendants = true mainPanel.Parent = mobileGui registerThemedElement(mainPanel, "panelBg") mainPanel:GetPropertyChangedSignal("Position"):Connect(function() if not isMinimized and not isScriptsScreenOpen and mainPanel.Visible then savedMainPosBeforeMin = mainPanel.Position end end) local uiCorner = Instance.new("UICorner") uiCorner.CornerRadius = UDim.new(0, 10) uiCorner.Parent = mainPanel panelStroke = Instance.new("UIStroke") panelStroke.Color = Color3.fromRGB(255, 255, 255) panelStroke.Thickness = 1.5 panelStroke.Transparency = 0.3 panelStroke.Parent = mainPanel registerThemedElement(panelStroke, "stroke") seasonalContainer = Instance.new("Frame") seasonalContainer.Name = "SeasonalEffectsLayer" seasonalContainer.Size = UDim2.new(1, 0, 1, 0) seasonalContainer.Position = UDim2.new(0, 0, 0, 0) seasonalContainer.BackgroundTransparency = 1 seasonalContainer.ClipsDescendants = true seasonalContainer.ZIndex = 2 seasonalContainer.Parent = mainPanel titleLabel = Instance.new("TextLabel") titleLabel.Size = UDim2.new(0, 102, 0, 18) titleLabel.Position = UDim2.new(0, 10, 0, 3) titleLabel.BackgroundTransparency = 1 titleLabel.Font = Enum.Font.GothamBold titleLabel.Text = "FLY MOBILE ☆" titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) titleLabel.TextSize = 13 titleLabel.TextXAlignment = Enum.TextXAlignment.Left titleLabel.ZIndex = 5 titleLabel.Parent = mainPanel registerThemedElement(titleLabel, "title") subTitle = Instance.new("TextLabel") subTitle.Size = UDim2.new(0, 76, 0, 14) subTitle.Position = UDim2.new(0, 10, 0, 20) subTitle.BackgroundTransparency = 1 subTitle.Font = Enum.Font.Gotham subTitle.Text = "by KM studios" subTitle.TextColor3 = Color3.fromRGB(150, 160, 180) subTitle.TextSize = 10 subTitle.TextXAlignment = Enum.TextXAlignment.Left subTitle.ZIndex = 5 subTitle.Parent = mainPanel registerThemedElement(subTitle, "subTitle") -- Kwadratowa ikonka obok "by KM studios" studioBoxBtn = Instance.new("TextButton") studioBoxBtn.Name = "StudioSquareIcon" studioBoxBtn.Size = UDim2.new(0, 14, 0, 14) studioBoxBtn.Position = UDim2.new(0, 88, 0, 20) studioBoxBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) studioBoxBtn.Font = Enum.Font.GothamBold studioBoxBtn.Text = "▪" studioBoxBtn.TextColor3 = Color3.fromRGB(220, 220, 220) studioBoxBtn.TextSize = 10 studioBoxBtn.ZIndex = 6 studioBoxBtn.Parent = mainPanel Instance.new("UICorner", studioBoxBtn).CornerRadius = UDim.new(0, 3) registerThemedElement(studioBoxBtn, "cardBg") registerThemedElement(studioBoxBtn, "text") local studioBoxStroke = Instance.new("UIStroke") studioBoxStroke.Color = Color3.fromRGB(255, 255, 255) studioBoxStroke.Thickness = 1 studioBoxStroke.Transparency = 0.45 studioBoxStroke.Parent = studioBoxBtn registerThemedElement(studioBoxStroke, "stroke") studioBoxBtn.MouseButton1Click:Connect(function() setScriptsScreen(true, false) end) perfLabel = Instance.new("TextLabel") perfLabel.Size = UDim2.new(0, 74, 0, 22) perfLabel.Position = UDim2.new(1, -110, 0, 8) perfLabel.BackgroundTransparency = 1 perfLabel.Font = Enum.Font.GothamBold perfLabel.Text = string.format("%d FPS | %dms", currentFps, currentPing) perfLabel.TextColor3 = Color3.fromRGB(175, 185, 205) perfLabel.TextSize = 9 perfLabel.TextXAlignment = Enum.TextXAlignment.Right perfLabel.ZIndex = 5 perfLabel.Parent = mainPanel registerThemedElement(perfLabel, "subTitle") minimizeBtn = Instance.new("TextButton") minimizeBtn.Size = UDim2.new(0, 22, 0, 22) minimizeBtn.Position = UDim2.new(1, -32, 0, 8) minimizeBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) minimizeBtn.Font = Enum.Font.GothamBold minimizeBtn.Text = "-" minimizeBtn.TextColor3 = Color3.fromRGB(220, 220, 220) minimizeBtn.TextSize = 14 minimizeBtn.ZIndex = 6 minimizeBtn.Parent = mainPanel Instance.new("UICorner", minimizeBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(minimizeBtn, "cardBg") registerThemedElement(minimizeBtn, "text") minimizeBtn.MouseButton1Click:Connect(function() isMinimized = not isMinimized applyMinimizeState(false) end) contentHolder = Instance.new("Frame") contentHolder.Name = "ContentHolder" contentHolder.Size = UDim2.new(1, 0, 0, EXPANDED_HEIGHT - 36) contentHolder.Position = UDim2.new(0, 0, 0, 36) contentHolder.BackgroundTransparency = 1 contentHolder.ZIndex = 5 contentHolder.Parent = mainPanel flyToggleBtn = Instance.new("TextButton") flyToggleBtn.Size = UDim2.new(1, -20, 0, 26) flyToggleBtn.Position = UDim2.new(0, 10, 0, 2) flyToggleBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) flyToggleBtn.Font = Enum.Font.GothamBold flyToggleBtn.Text = flying and "Fly: ON" or "Fly: OFF" flyToggleBtn.TextColor3 = flying and Color3.fromRGB(80, 220, 120) or Color3.fromRGB(220, 80, 80) flyToggleBtn.TextSize = 12 flyToggleBtn.ZIndex = 5 flyToggleBtn.Parent = contentHolder Instance.new("UICorner", flyToggleBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(flyToggleBtn, "cardBg") noclipToggleBtn = Instance.new("TextButton") noclipToggleBtn.Size = UDim2.new(1, -20, 0, 26) noclipToggleBtn.Position = UDim2.new(0, 10, 0, 32) noclipToggleBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) noclipToggleBtn.Font = Enum.Font.GothamBold noclipToggleBtn.Text = noclipActive and "Noclip: ON" or "Noclip: OFF" noclipToggleBtn.TextColor3 = noclipActive and Color3.fromRGB(80, 220, 120) or Color3.fromRGB(220, 80, 80) noclipToggleBtn.TextSize = 12 noclipToggleBtn.ZIndex = 5 noclipToggleBtn.Parent = contentHolder Instance.new("UICorner", noclipToggleBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(noclipToggleBtn, "cardBg") if not musicDeleted then musicToggleBtn = Instance.new("TextButton") musicToggleBtn.Size = UDim2.new(1, -52, 0, 26) musicToggleBtn.Position = UDim2.new(0, 10, 0, 62) musicToggleBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) musicToggleBtn.Font = Enum.Font.GothamBold musicToggleBtn.Text = musicEnabled and "Music: ON" or "Music: OFF" musicToggleBtn.TextColor3 = musicEnabled and Color3.fromRGB(80, 220, 120) or Color3.fromRGB(220, 80, 80) musicToggleBtn.TextSize = 12 musicToggleBtn.ZIndex = 5 musicToggleBtn.Parent = contentHolder Instance.new("UICorner", musicToggleBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(musicToggleBtn, "cardBg") nextTrackBtn = Instance.new("TextButton") nextTrackBtn.Size = UDim2.new(0, 28, 0, 26) nextTrackBtn.Position = UDim2.new(1, -38, 0, 62) nextTrackBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) nextTrackBtn.Font = Enum.Font.GothamBold nextTrackBtn.Text = ">" nextTrackBtn.TextColor3 = Color3.fromRGB(220, 220, 220) nextTrackBtn.TextSize = 13 nextTrackBtn.ZIndex = 5 nextTrackBtn.Parent = contentHolder Instance.new("UICorner", nextTrackBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(nextTrackBtn, "cardBg") registerThemedElement(nextTrackBtn, "text") trackInfoLabel = Instance.new("TextLabel") trackInfoLabel.Name = "TrackIdPreview" trackInfoLabel.Size = UDim2.new(1, -20, 0, 14) trackInfoLabel.Position = UDim2.new(0, 10, 0, 90) trackInfoLabel.BackgroundTransparency = 1 trackInfoLabel.Font = Enum.Font.GothamBold trackInfoLabel.Text = string.format("#%d/%d | ID: %s", currentTrackIndex, #playlist, string.match(playlist[currentTrackIndex] or "", "(%d+)$") or "") trackInfoLabel.TextColor3 = Color3.fromRGB(175, 185, 205) trackInfoLabel.TextSize = 9 trackInfoLabel.TextXAlignment = Enum.TextXAlignment.Center trackInfoLabel.ZIndex = 5 trackInfoLabel.Parent = contentHolder registerThemedElement(trackInfoLabel, "subTitle") musicToggleBtn.MouseButton1Click:Connect(function() if musicDeleted or not sound then return end local lang = getLangPack() if musicEnabled then musicEnabled = false pcall(function() sound:Pause() end) musicToggleBtn.Text = lang.musicOff musicToggleBtn.TextColor3 = Color3.fromRGB(220, 80, 80) else musicEnabled = true musicToggleBtn.Text = lang.musicOn musicToggleBtn.TextColor3 = Color3.fromRGB(80, 220, 120) if sound.SoundId == playlist[currentTrackIndex] and sound.TimePosition > 0 then pcall(function() sound:Resume() end) else playTrackAtIndex(currentTrackIndex) end if muffledStateActive then task.defer(function() applyMuffledMusicEffect(true) end) end end end) nextTrackBtn.MouseButton1Click:Connect(function() if musicDeleted then return end local lang = getLangPack() local nextIdx = (currentTrackIndex % #playlist) + 1 musicEnabled = true musicToggleBtn.Text = lang.musicOn musicToggleBtn.TextColor3 = Color3.fromRGB(80, 220, 120) playTrackAtIndex(nextIdx) end) end local speedRow = Instance.new("Frame") speedRow.Size = UDim2.new(1, -20, 0, 26) speedRow.Position = UDim2.new(0, 10, 0, 108) speedRow.BackgroundColor3 = Color3.fromRGB(32, 36, 46) speedRow.ZIndex = 5 speedRow.Parent = contentHolder Instance.new("UICorner", speedRow).CornerRadius = UDim.new(0, 6) registerThemedElement(speedRow, "cardBg") speedLabel = Instance.new("TextLabel") speedLabel.Size = UDim2.new(0.55, 0, 1, 0) speedLabel.Position = UDim2.new(0, 8, 0, 0) speedLabel.BackgroundTransparency = 1 speedLabel.Font = Enum.Font.GothamBold speedLabel.Text = "Speed:" speedLabel.TextColor3 = Color3.fromRGB(220, 220, 220) speedLabel.TextSize = 11 speedLabel.TextXAlignment = Enum.TextXAlignment.Left speedLabel.ZIndex = 5 speedLabel.Parent = speedRow registerThemedElement(speedLabel, "text") speedBox = Instance.new("TextBox") speedBox.Size = UDim2.new(0.38, 0, 0.8, 0) speedBox.Position = UDim2.new(0.57, 0, 0.1, 0) speedBox.BackgroundTransparency = 1 speedBox.Font = Enum.Font.GothamBold speedBox.Text = tostring(flySpeed) speedBox.TextColor3 = Color3.fromRGB(255, 255, 255) speedBox.TextSize = 12 speedBox.TextXAlignment = Enum.TextXAlignment.Right speedBox.ZIndex = 5 speedBox.Parent = speedRow registerThemedElement(speedBox, "title") speedBox.FocusLost:Connect(function() local val = tonumber(speedBox.Text) if val then flySpeed = math.clamp(val, 1, 500) speedBox.Text = tostring(flySpeed) else speedBox.Text = tostring(flySpeed) end end) -- Drugie menu: nieruchome na ekranie, z płynnym przewijaniem w pionie (ScrollingFrame) scriptsPanel = Instance.new("Frame") scriptsPanel.Name = "ScriptsInfoPanel" scriptsPanel.Size = UDim2.new(0, SCRIPTS_WIDTH, 0, SCRIPTS_HEIGHT) scriptsPanel.Position = UDim2.new(0.5, -SCRIPTS_WIDTH / 2, 1, 60) scriptsPanel.BackgroundColor3 = Color3.fromRGB(22, 25, 33) scriptsPanel.BackgroundTransparency = 0.05 scriptsPanel.Active = false scriptsPanel.Draggable = false scriptsPanel.ClipsDescendants = true scriptsPanel.Visible = false scriptsPanel.ZIndex = 8 scriptsPanel.Parent = mobileGui registerThemedElement(scriptsPanel, "panelBg") Instance.new("UICorner", scriptsPanel).CornerRadius = UDim.new(0, 10) local scriptsStroke = Instance.new("UIStroke") scriptsStroke.Color = Color3.fromRGB(255, 255, 255) scriptsStroke.Thickness = 1.5 scriptsStroke.Transparency = 0.3 scriptsStroke.Parent = scriptsPanel registerThemedElement(scriptsStroke, "stroke") local scriptsHeaderBar = Instance.new("Frame") scriptsHeaderBar.Name = "ScriptsHeaderBar" scriptsHeaderBar.Size = UDim2.new(1, 0, 0, 38) scriptsHeaderBar.Position = UDim2.new(0, 0, 0, 0) scriptsHeaderBar.BackgroundTransparency = 1 scriptsHeaderBar.ZIndex = 9 scriptsHeaderBar.Parent = scriptsPanel scriptsTitle = Instance.new("TextButton") scriptsTitle.Size = UDim2.new(1, -46, 0, 30) scriptsTitle.Position = UDim2.new(0, 10, 0, 4) scriptsTitle.BackgroundTransparency = 1 scriptsTitle.Active = false scriptsTitle.AutoButtonColor = false scriptsTitle.Font = Enum.Font.GothamBold scriptsTitle.Text = "KM scripts no keylless by KM studios" scriptsTitle.TextColor3 = Color3.fromRGB(255, 255, 255) scriptsTitle.TextSize = 11 scriptsTitle.TextWrapped = true scriptsTitle.TextXAlignment = Enum.TextXAlignment.Left scriptsTitle.TextYAlignment = Enum.TextYAlignment.Center scriptsTitle.ZIndex = 10 scriptsTitle.Parent = scriptsHeaderBar registerThemedElement(scriptsTitle, "title") attachLetterDimEffect( scriptsTitle, Color3.fromRGB(255, 255, 255), Color3.fromRGB(135, 143, 158) ) backArrowBtn = Instance.new("TextButton") backArrowBtn.Name = "BackArrowButton" backArrowBtn.Size = UDim2.new(0, 24, 0, 24) backArrowBtn.Position = UDim2.new(1, -34, 0, 7) backArrowBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) backArrowBtn.Font = Enum.Font.GothamBold backArrowBtn.Text = "←" backArrowBtn.TextColor3 = Color3.fromRGB(220, 220, 220) backArrowBtn.TextSize = 14 backArrowBtn.ZIndex = 11 backArrowBtn.Parent = scriptsHeaderBar Instance.new("UICorner", backArrowBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(backArrowBtn, "cardBg") registerThemedElement(backArrowBtn, "text") backArrowBtn.MouseButton1Click:Connect(function() setScriptsScreen(false, false) end) scriptsScrollFrame = Instance.new("ScrollingFrame") scriptsScrollFrame.Name = "ScriptsScrollFrame" scriptsScrollFrame.Size = UDim2.new(1, -6, 1, -42) scriptsScrollFrame.Position = UDim2.new(0, 3, 0, 38) scriptsScrollFrame.BackgroundTransparency = 1 scriptsScrollFrame.BorderSizePixel = 0 scriptsScrollFrame.ScrollBarThickness = 5 scriptsScrollFrame.ScrollBarImageColor3 = Color3.fromRGB(215, 222, 235) scriptsScrollFrame.ScrollingDirection = Enum.ScrollingDirection.Y scriptsScrollFrame.ElasticBehavior = Enum.ElasticBehavior.Always scriptsScrollFrame.CanvasSize = UDim2.new(0, 0, 0, SCRIPTS_CANVAS_HEIGHT) scriptsScrollFrame.ZIndex = 9 scriptsScrollFrame.Parent = scriptsPanel -- Przycisk poza bohatera (1 ręka w górze, płynnie) heroPoseBtn = Instance.new("TextButton") heroPoseBtn.Name = "HeroPoseButton" heroPoseBtn.Size = UDim2.new(0.5, -11, 0, 24) heroPoseBtn.Position = UDim2.new(0, 8, 0, 2) heroPoseBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) heroPoseBtn.Font = Enum.Font.GothamBold heroPoseBtn.Text = heroPoseActive and "Pose: ON" or "Pose: OFF" heroPoseBtn.TextColor3 = heroPoseActive and Color3.fromRGB(80, 220, 120) or Color3.fromRGB(220, 220, 220) heroPoseBtn.TextSize = 10 heroPoseBtn.ZIndex = 10 heroPoseBtn.Parent = scriptsScrollFrame Instance.new("UICorner", heroPoseBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(heroPoseBtn, "cardBg") heroPoseBtn.MouseButton1Click:Connect(function() setHeroPose(not heroPoseActive) end) -- Przycisk Camera 70 / 120 (płynnie) cameraFovBtn = Instance.new("TextButton") cameraFovBtn.Name = "CameraFovButton" cameraFovBtn.Size = UDim2.new(0.5, -11, 0, 24) cameraFovBtn.Position = UDim2.new(0.5, 3, 0, 2) cameraFovBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) cameraFovBtn.Font = Enum.Font.GothamBold cameraFovBtn.Text = wideCameraActive and "Cam: 120" or "Cam: 70" cameraFovBtn.TextColor3 = wideCameraActive and Color3.fromRGB(80, 220, 120) or Color3.fromRGB(220, 220, 220) cameraFovBtn.TextSize = 10 cameraFovBtn.ZIndex = 10 cameraFovBtn.Parent = scriptsScrollFrame Instance.new("UICorner", cameraFovBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(cameraFovBtn, "cardBg") cameraFovBtn.MouseButton1Click:Connect(function() setCameraFov70_120(not wideCameraActive) end) -- Suwak FOV (70 - 120) w 2. menu local sliderCard = Instance.new("Frame") sliderCard.Name = "FovSliderCard" sliderCard.Size = UDim2.new(1, -16, 0, 26) sliderCard.Position = UDim2.new(0, 8, 0, 30) sliderCard.BackgroundColor3 = Color3.fromRGB(32, 36, 46) sliderCard.ZIndex = 10 sliderCard.Parent = scriptsScrollFrame Instance.new("UICorner", sliderCard).CornerRadius = UDim.new(0, 6) registerThemedElement(sliderCard, "cardBg") sliderTitle = Instance.new("TextLabel") sliderTitle.Size = UDim2.new(0, 82, 1, 0) sliderTitle.Position = UDim2.new(0, 8, 0, 0) sliderTitle.BackgroundTransparency = 1 sliderTitle.Font = Enum.Font.GothamBold sliderTitle.Text = "FOV:" sliderTitle.TextColor3 = Color3.fromRGB(220, 220, 220) sliderTitle.TextSize = 9 sliderTitle.TextXAlignment = Enum.TextXAlignment.Left sliderTitle.ZIndex = 11 sliderTitle.Parent = sliderCard registerThemedElement(sliderTitle, "text") fovValueLabel = Instance.new("TextLabel") fovValueLabel.Size = UDim2.new(0, 30, 1, 0) fovValueLabel.Position = UDim2.new(1, -36, 0, 0) fovValueLabel.BackgroundTransparency = 1 fovValueLabel.Font = Enum.Font.GothamBold fovValueLabel.Text = tostring(math.round(cameraFovValue)) fovValueLabel.TextColor3 = Color3.fromRGB(255, 255, 255) fovValueLabel.TextSize = 10 fovValueLabel.TextXAlignment = Enum.TextXAlignment.Right fovValueLabel.ZIndex = 11 fovValueLabel.Parent = sliderCard registerThemedElement(fovValueLabel, "title") local sliderTrack = Instance.new("TextButton") sliderTrack.Name = "FovSliderTrack" sliderTrack.Size = UDim2.new(1, -128, 0, 8) sliderTrack.Position = UDim2.new(0, 88, 0.5, -4) sliderTrack.BackgroundColor3 = Color3.fromRGB(20, 22, 28) sliderTrack.Text = "" sliderTrack.AutoButtonColor = false sliderTrack.ZIndex = 11 sliderTrack.Parent = sliderCard Instance.new("UICorner", sliderTrack).CornerRadius = UDim.new(1, 0) fovSliderFill = Instance.new("Frame") fovSliderFill.Size = UDim2.new(0, 0, 1, 0) fovSliderFill.Position = UDim2.new(0, 0, 0, 0) fovSliderFill.BackgroundColor3 = Color3.fromRGB(80, 220, 120) fovSliderFill.BorderSizePixel = 0 fovSliderFill.ZIndex = 12 fovSliderFill.Parent = sliderTrack Instance.new("UICorner", fovSliderFill).CornerRadius = UDim.new(1, 0) fovSliderKnob = Instance.new("TextButton") fovSliderKnob.Name = "FovSliderKnob" fovSliderKnob.Size = UDim2.new(0, 12, 0, 12) fovSliderKnob.Position = UDim2.new(0, -6, 0.5, -6) fovSliderKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255) fovSliderKnob.Text = "" fovSliderKnob.AutoButtonColor = false fovSliderKnob.ZIndex = 13 fovSliderKnob.Parent = sliderTrack Instance.new("UICorner", fovSliderKnob).CornerRadius = UDim.new(1, 0) local draggingSlider = false local function updateSliderFromScreenX(screenX) local absPos = sliderTrack.AbsolutePosition.X local absSize = sliderTrack.AbsoluteSize.X if absSize <= 0 then return end local alpha = math.clamp((screenX - absPos) / absSize, 0, 1) setCameraFovValue(70 + alpha * (120 - 70), false) end sliderTrack.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingSlider = true updateSliderFromScreenX(input.Position.X) end end) fovSliderKnob.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingSlider = true end end) UserInputService.InputChanged:Connect(function(input) if draggingSlider and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then updateSliderFromScreenX(input.Position.X) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingSlider = false end end) -- Przycisk efektów drgań kamery podczas lotu w 2. menu camShakeBtn = Instance.new("TextButton") camShakeBtn.Name = "FlyCamShakeButton" camShakeBtn.Size = UDim2.new(1, -16, 0, 24) camShakeBtn.Position = UDim2.new(0, 8, 0, 60) camShakeBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) camShakeBtn.Font = Enum.Font.GothamBold camShakeBtn.Text = "Cam Shake: ON" camShakeBtn.TextColor3 = Color3.fromRGB(80, 220, 120) camShakeBtn.TextSize = 10 camShakeBtn.ZIndex = 10 camShakeBtn.Parent = scriptsScrollFrame Instance.new("UICorner", camShakeBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(camShakeBtn, "cardBg") camShakeBtn.MouseButton1Click:Connect(function() flyCamShakeActive = not flyCamShakeActive syncCamShakeUi() end) -- Przycisk Delete Music (usuwa przycisk muzyki z menu) deleteMusicBtn = Instance.new("TextButton") deleteMusicBtn.Name = "DeleteMusicButton" deleteMusicBtn.Size = UDim2.new(1, -16, 0, 24) deleteMusicBtn.Position = UDim2.new(0, 8, 0, 88) deleteMusicBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) deleteMusicBtn.Font = Enum.Font.GothamBold deleteMusicBtn.Text = musicDeleted and "Music Deleted" or "Delete Music" deleteMusicBtn.TextColor3 = musicDeleted and Color3.fromRGB(220, 80, 80) or Color3.fromRGB(235, 195, 95) deleteMusicBtn.TextSize = 10 deleteMusicBtn.ZIndex = 10 deleteMusicBtn.Parent = scriptsScrollFrame Instance.new("UICorner", deleteMusicBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(deleteMusicBtn, "cardBg") deleteMusicBtn.MouseButton1Click:Connect(function() deleteMusicFeature() end) -- Sekcja THEMES (AUTUMN THEME 🍂, WINTER THEME ❄️, SUMMER THEME ☀️, NORMAL THEME) themesHeader = Instance.new("TextLabel") themesHeader.Size = UDim2.new(1, -16, 0, 14) themesHeader.Position = UDim2.new(0, 8, 0, 116) themesHeader.BackgroundTransparency = 1 themesHeader.Font = Enum.Font.GothamBold themesHeader.Text = "THEMES" themesHeader.TextColor3 = Color3.fromRGB(255, 255, 255) themesHeader.TextSize = 10 themesHeader.TextXAlignment = Enum.TextXAlignment.Left themesHeader.ZIndex = 10 themesHeader.Parent = scriptsScrollFrame registerThemedElement(themesHeader, "title") local themeLayout = { { name = "AUTUMN THEME 🍂", x = 0, y = 132, w = 0.5, ox = 8, ow = -11 }, { name = "WINTER THEME ❄️", x = 0.5, y = 132, w = 0.5, ox = 3, ow = -11 }, { name = "SUMMER THEME ☀️", x = 0, y = 158, w = 0.5, ox = 8, ow = -11 }, { name = "NORMAL THEME", x = 0.5, y = 158, w = 0.5, ox = 3, ow = -11 }, } for _, tInfo in ipairs(themeLayout) do local tBtn = Instance.new("TextButton") tBtn.Name = "ThemeBtn_" .. tInfo.name tBtn.Size = UDim2.new(tInfo.w, tInfo.ow, 0, 22) tBtn.Position = UDim2.new(tInfo.x, tInfo.ox, 0, tInfo.y) tBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) tBtn.Font = Enum.Font.GothamBold tBtn.Text = tInfo.name tBtn.TextColor3 = Color3.fromRGB(220, 220, 220) tBtn.TextSize = 9 tBtn.TextTruncate = Enum.TextTruncate.AtEnd tBtn.ZIndex = 10 tBtn.Parent = scriptsScrollFrame Instance.new("UICorner", tBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(tBtn, "cardBg") themeButtons[tInfo.name] = tBtn tBtn.MouseButton1Click:Connect(function() applyTheme(tInfo.name, false) end) end -- Sekcja LANGUAGE SETTINGS 🌍 (ENGLISH 🇬🇧, POLSKI 🇵🇱, ORIGINAL 🇺🇸) languagesHeader = Instance.new("TextLabel") languagesHeader.Size = UDim2.new(1, -16, 0, 14) languagesHeader.Position = UDim2.new(0, 8, 0, 186) languagesHeader.BackgroundTransparency = 1 languagesHeader.Font = Enum.Font.GothamBold languagesHeader.Text = "LANGUAGE SETTINGS 🌍" languagesHeader.TextColor3 = Color3.fromRGB(255, 255, 255) languagesHeader.TextSize = 10 languagesHeader.TextXAlignment = Enum.TextXAlignment.Left languagesHeader.ZIndex = 10 languagesHeader.Parent = scriptsScrollFrame registerThemedElement(languagesHeader, "title") local languageLayout = { { code = "ENGLISH", label = "ENGLISH 🇬🇧", x = 0, y = 202, w = 0.5, ox = 8, ow = -11 }, { code = "POLSKI", label = "POLSKI 🇵🇱", x = 0.5, y = 202, w = 0.5, ox = 3, ow = -11 }, { code = "ORIGINAL", label = "ORIGINAL 🇺🇸", x = 0, y = 228, w = 1, ox = 8, ow = -16 }, } for _, lInfo in ipairs(languageLayout) do local lBtn = Instance.new("TextButton") lBtn.Name = "LangBtn_" .. lInfo.code lBtn.Size = UDim2.new(lInfo.w, lInfo.ow, 0, 22) lBtn.Position = UDim2.new(lInfo.x, lInfo.ox, 0, lInfo.y) lBtn.BackgroundColor3 = Color3.fromRGB(32, 36, 46) lBtn.Font = Enum.Font.GothamBold lBtn.Text = lInfo.label lBtn.TextColor3 = Color3.fromRGB(220, 220, 220) lBtn.TextSize = 9 lBtn.TextTruncate = Enum.TextTruncate.AtEnd lBtn.ZIndex = 10 lBtn.Parent = scriptsScrollFrame Instance.new("UICorner", lBtn).CornerRadius = UDim.new(0, 6) registerThemedElement(lBtn, "cardBg") languageButtons[lInfo.code] = lBtn lBtn.MouseButton1Click:Connect(function() setLanguage(lInfo.code) end) end local noteBox = Instance.new("Frame") noteBox.Name = "NoteBox" noteBox.Size = UDim2.new(1, -16, 0, 198) noteBox.Position = UDim2.new(0, 8, 0, 256) noteBox.BackgroundColor3 = Color3.fromRGB(32, 36, 46) noteBox.Active = false noteBox.ClipsDescendants = true noteBox.ZIndex = 10 noteBox.Parent = scriptsScrollFrame Instance.new("UICorner", noteBox).CornerRadius = UDim.new(0, 6) registerThemedElement(noteBox, "cardBg") noteLabel = Instance.new("TextButton") noteLabel.Size = UDim2.new(1, -14, 1, -10) noteLabel.Position = UDim2.new(0, 7, 0, 5) noteLabel.BackgroundTransparency = 1 noteLabel.Active = false noteLabel.AutoButtonColor = false noteLabel.Font = Enum.Font.Gotham noteLabel.Text = "" noteLabel.TextColor3 = Color3.fromRGB(205, 212, 225) noteLabel.TextSize = 9 noteLabel.TextWrapped = true noteLabel.TextXAlignment = Enum.TextXAlignment.Left noteLabel.TextYAlignment = Enum.TextYAlignment.Top noteLabel.ZIndex = 11 noteLabel.Parent = noteBox registerThemedElement(noteLabel, "note") attachLetterDimEffect( noteLabel, Color3.fromRGB(205, 212, 225), Color3.fromRGB(115, 122, 136) ) syncFovSliderVisuals(cameraFovValue) applyTheme(currentThemeName, true) setLanguage(currentLanguage) applyMinimizeState(true) setScriptsScreen(isScriptsScreenOpen, true) return flyToggleBtn, noclipToggleBtn end -- Podtrzymywanie pozy bohatera po wykonaniu animacji postaci w danym kroku symulacji RunService.Stepped:Connect(function(_, dt) local char = player.Character if not char then return end if noclipActive then for _, part in ipairs(char:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = false end end end local joint, rigType = findRightArmJoint(char) if joint then if not savedRightShoulderC0 then savedRightShoulderC0 = joint.C0 end local targetBlend = heroPoseActive and 1 or 0 local step = math.clamp((dt or 0.016) * 10, 0, 1) currentArmBlend = currentArmBlend + (targetBlend - currentArmBlend) * step if currentArmBlend > 0.002 then local raisedOffset = (rigType == "R6") and CFrame.Angles(math.rad(175), 0, 0) or CFrame.Angles(math.rad(165), 0, math.rad(-10)) local targetC0 = savedRightShoulderC0 * raisedOffset joint.C0 = savedRightShoulderC0:Lerp(targetC0, currentArmBlend) elseif not heroPoseActive and currentArmBlend <= 0.002 then currentArmBlend = 0 joint.C0 = savedRightShoulderC0 end end end) local function toggleFly() flying = not flying pulseStrokeColor(flying) local char = player.Character if not char or not char:FindFirstChild("HumanoidRootPart") then flying = false return end local root = char.HumanoidRootPart local humanoid = char:FindFirstChildOfClass("Humanoid") local lang = getLangPack() if flying then flyToggleBtn.Text = lang.flyOn flyToggleBtn.TextColor3 = Color3.fromRGB(80, 220, 120) if humanoid then humanoid.PlatformStand = true end bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bodyVelocity.Velocity = Vector3.new(0, 0, 0) bodyVelocity.Parent = root bodyGyro = Instance.new("BodyGyro") bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge) bodyGyro.P = 50000 bodyGyro.Parent = root else flyToggleBtn.Text = lang.flyOff flyToggleBtn.TextColor3 = Color3.fromRGB(220, 80, 80) if humanoid then humanoid.PlatformStand = false end if bodyVelocity then pcall(function() bodyVelocity:Destroy() end) end if bodyGyro then pcall(function() bodyGyro:Destroy() end) end if root then root.Velocity = Vector3.new(0, 0, 0) end end end local function toggleNoclip() noclipActive = not noclipActive pulseStrokeColor(noclipActive) local lang = getLangPack() if noclipActive then noclipToggleBtn.Text = lang.noclipOn noclipToggleBtn.TextColor3 = Color3.fromRGB(80, 220, 120) else noclipToggleBtn.Text = lang.noclipOff noclipToggleBtn.TextColor3 = Color3.fromRGB(220, 80, 80) local char = player.Character if char then for _, part in ipairs(char:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = true end end end end end RunService.RenderStepped:Connect(function(dt) pcall(function() if not flying then return end local char = player.Character if not char or not char:FindFirstChild("HumanoidRootPart") or not char:FindFirstChildOfClass("Humanoid") then if flying then toggleFly() end return end local root = char.HumanoidRootPart local humanoid = char:FindFirstChildOfClass("Humanoid") humanoid.PlatformStand = true local moveVector = Vector3.new(0, 0, 0) if controlModule then moveVector = controlModule:GetMoveVector() else moveVector = humanoid.MoveDirection end local activeCam = workspace.CurrentCamera or camera local camCFrame = activeCam.CFrame local camLook = camCFrame.LookVector local camRight = camCFrame.RightVector local targetVelocity = Vector3.new(0, 0, 0) if moveVector.Magnitude > 0.01 then targetVelocity = (camLook * (-moveVector.Z) + camRight * moveVector.X) * flySpeed end if bodyVelocity and bodyVelocity.Parent then bodyVelocity.Velocity = targetVelocity end if bodyGyro and bodyGyro.Parent then bodyGyro.CFrame = camCFrame end if flyCamShakeActive and activeCam then local speedRatio = math.clamp(targetVelocity.Magnitude / math.max(flySpeed, 1), 0.25, 1.5) local t = tick() * (14 + (flySpeed * 0.05)) local amp = 0.045 * speedRatio local shakeOffset = Vector3.new( math.sin(t * 1.13) * amp, math.cos(t * 1.47) * amp, math.sin(t * 0.89) * (amp * 0.5) ) local shakeTilt = CFrame.Angles( math.rad(math.sin(t * 1.3) * 0.22 * speedRatio), math.rad(math.cos(t * 0.95) * 0.22 * speedRatio), math.rad(math.sin(t * 1.65) * 0.35 * speedRatio) ) activeCam.CFrame = camCFrame * CFrame.new(shakeOffset) * shakeTilt end end) end) player.CharacterAdded:Connect(function(char) savedRightShoulderC0 = nil currentArmBlend = 0 if flying then toggleFly() end task.wait(1) local flyBtn, noclipBtn = createMobileGui() if flyBtn then flyBtn.MouseButton1Click:Connect(toggleFly) end if noclipBtn then noclipBtn.MouseButton1Click:Connect(toggleNoclip) end syncHeroPoseUi() end) local initialFlyBtn, initialNoclipBtn = createMobileGui() if initialFlyBtn then initialFlyBtn.MouseButton1Click:Connect(toggleFly) end if initialNoclipBtn then initialNoclipBtn.MouseButton1Click:Connect(toggleNoclip) end