Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- part1 = Instance.new("Part", owner.Character.Head)
- part1.Size = Vector3.new(7.5,7.5,0.05)
- part1.Anchored = true
- part1.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,2.5,-5)
- local decal = Instance.new("Texture", part1)
- decal.Texture = "http://www.roblox.com/asset/?id=8435594085"
- decal.Face = Enum.NormalId.Front
- decal.Transparency = 0
- local Frames = 318
- local currentFrame = 1
- local rows = 11
- local columns = 30
- local currentRow,CurrentColumn = 0,0
- local linear = false
- local fps = 30
- local full60fps = false
- local size = part1.Size
- decal.StudsPerTileU = columns*size.X
- decal.StudsPerTileV = rows*size.Y
- while true do
- if not full60fps then wait(1/fps) else game:GetService("RunService").Stepped:Wait() end
- if linear then
- decal.OffsetStudsU = decal.OffsetStudsU + size.X
- if decal.OffsetStudsU > decal.StudsPerTileU then
- decal.OffsetStudsU = 0
- end
- else
- CurrentColumn = CurrentColumn + 1
- if CurrentColumn > columns then
- CurrentColumn = 1
- currentRow = currentRow + 1
- end
- if currentFrame > Frames then
- currentRow,CurrentColumn,currentFrame = 1,1,1
- end
- decal.OffsetStudsU = size.X*(CurrentColumn-1)
- decal.OffsetStudsV = size.Y*(currentRow-1)
- currentFrame = currentFrame+1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement