Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local TweenService = game:GetService("TweenService")
- -- shits to load the trail
- local function createTrailPart(position)
- local trailPart = Instance.new("Part")
- trailPart.Size = Vector3.new(1, 1, 1)
- trailPart.Color = Color3.fromRGB(255, 0, 0)
- trailPart.Material = Enum.Material.Neon
- trailPart.Anchored = true
- trailPart.CanCollide = false
- trailPart.Transparency = 0.5
- trailPart.Position = position
- trailPart.Parent = workspace
- return trailPart
- end
- local function createTween(part, targetPosition)
- local tweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
- local tween = TweenService:Create(part, tweenInfo, {Position = targetPosition})
- tween:Play()
- end
- -- updates the trail
- local function updateTrail()
- local trailParts = {}
- local trailLength = 10
- for i = 1, trailLength do
- local part = createTrailPart(character.HumanoidRootPart.Position)
- table.insert(trailParts, part)
- end
- while true do
- -- Moves thingys
- for i = trailLength, 2, -1 do
- createTween(trailParts[i], trailParts[i - 1].Position)
- end
- -- Moves humanoidd part 🤓
- createTween(trailParts[1], character.HumanoidRootPart.Position - character.HumanoidRootPart.CFrame.LookVector * 2)
- -- the size for the fucking traid :D
- for i = 1, trailLength do
- trailParts[i].Size = Vector3.new(1, 1, 1) * (1 - (i - 1) / trailLength) -- smth
- trailParts[i].Transparency = 0.5 * (1 - (i - 1) / trailLength) -- smth
- end
- -- wait thingy shii
- wait(0.1)
- end
- end
- updateTrail()
Add Comment
Please, Sign In to add comment