Bu kodda mısır boyutu çok fazla ve ayarlanamıyor hatalı bir kod düzgün hale getir --…
- User
Bu kodda mısır boyutu çok fazla ve ayarlanamıyor hatalı bir kod düzgün hale getir
-- Roblox servislerini al local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService")
-- Buton ve ilgili UI elemanlarını referans al local button = script.Parent local parentFrame = button.Parent -- Butonun bulunduğu ana Frame local cropsFrame = parentFrame:FindFirstChild("Crops") local moneyFrame = parentFrame:FindFirstChild("Money")
-- Crops ve Money Frame'lerinin bulunup bulunmadığını kontrol et if not cropsFrame or not moneyFrame then warn("Crops veya Money frame bulunamadı!") return end
local cropsImage = cropsFrame:FindFirstChild("ImageLabel") local moneyImageFrame = moneyFrame:FindFirstChild("Frame") local moneyImage = moneyImageFrame and moneyImageFrame:FindFirstChild("ImageLabel")
-- ImageLabel'lerin bulunup bulunmadığını kontrol et if not cropsImage or not moneyImage then warn("Crops ImageLabel veya Money ImageLabel bulunamadı!") return end
-- Ayarlanabilir parametreler local numClones = 10 -- Oluşturulacak klon sayısı local delayBetweenClones = 0.05 -- Klonlar arasındaki süre farkı (saniye) local cloneDuration = 1 -- Her klonun animasyon süresi (saniye) local waveHeight = 30 -- Dalga yüksekliği (piksel cinsinden) local waveFrequency = 4 -- Dalga frekansı local cloneScaleFactor = 0.33 -- Klonun orijinal boyutuna oranı (1: aynı boyut, 0.33: üçte biri)
-- Klon oluşturma fonksiyonu local function createClone() local clone = cropsImage:Clone() clone.Visible = true clone.BackgroundTransparency = 1 -- Arka planı şeffaf yap clone.ImageTransparency = 0 -- İkonun görünür olmasını sağla clone.Parent = parentFrame.Parent -- Klonu 'MainFrame'in parent'ına (muhtemelen ScreenGui) yerleştir return clone end
-- Animasyon işlemi için coroutine kullanmak local function animateClone(clone, endPos, duration, waveHeight, waveFrequency) local tweenInfo = TweenInfo.new( duration, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, -- Tekrar sayısı false, -- Tersine çevrilmez 0 -- Gecikme süresi )
local tweenGoal = { Position = endPos, ImageTransparency = 1, -- Şeffaflaşma } local tween = TweenService:Create(clone, tweenInfo, tweenGoal) tween:Play() -- Dalgalanma efekti eklemek için her frame'de pozisyonu güncelle local elapsed = 0 local initialPosition = clone.Position local connection connection = RunService.RenderStepped:Connect(function(delta) elapsed = elapsed + delta local progress = elapsed / duration if progress >= 1 then connection:Disconnect() clone:Destroy() return end -- Dalga hesaplaması (sine fonksiyonu kullanarak yukarı-aşağı hareket) local waveOffset = math.sin(progress * waveFrequency * math.pi) * waveHeight -- Yeni pozisyonu hesapla clone.Position = UDim2.new( initialPosition.X.Scale, initialPosition.X.Offset, initialPosition.Y.Scale, initialPosition.Y.Offset + waveOffset ) end)end
-- Butona tıklama olayını bağla button.MouseButton1Click:Connect(function() for i = 1, numClones do -- Klon oluşumunda hafif gecikme ekle delay(i * delayBetweenClones, function() local clone = createClone()
- Assistant