Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- luigi={0}
- zombie={7162313292,10,8,74}
- virus={0}
- gifdata = zombie
- part = Instance.new("Part", script)
- part.Size = Vector3.new(15,10,0)
- part.Anchored = true
- part.Transparency = 1
- part.CFrame = owner.Character.PrimaryPart.CFrame * CFrame.new(0,3.5,-10) * CFrame.Angles(0,math.rad(180),0)
- gif = Instance.new("Texture", part)
- gif.Texture = 'rbxassetid://'..gifdata[1]
- local Frames = gifdata[4]
- local currentFrame = 1
- local rows = gifdata[3]
- local columns = gifdata[2]
- local currentRow,CurrentColumn = 0,0
- local linear = false
- local fps = 20 -- Max 30
- local full60fps = false
- local size = part.Size -- The gif should be on the front of the part
- gif.StudsPerTileU = columns*size.X
- gif.StudsPerTileV = rows*size.Y
- while true do
- if not full60fps then wait(1/fps) else game:GetService("RunService").Stepped:Wait() end
- if linear then
- gif.OffsetStudsU = gif.OffsetStudsU + size.X
- if gif.OffsetStudsU > gif.StudsPerTileU then
- gif.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
- gif.OffsetStudsU = size.X*(CurrentColumn-1)
- gif.OffsetStudsV = size.Y*(currentRow-1)
- currentFrame = currentFrame+1
- end
- end
Add Comment
Please, Sign In to add comment