Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- part1 = Instance.new("Part", owner.Character.Head)
- part1.Size = Vector3.new(1,1,1)
- Weld4 = Instance.new("Weld")
- Weld4.Parent = owner.Character.Head
- Weld4.Part0 = owner.Character.Head
- Weld4.Part1 = part1
- Weld4.C1 = CFrame.new(0,0,0.1)
- part1.Transparency = 1
- local decal = Instance.new("Texture", part1)
- decal.Texture = "http://www.roblox.com/asset/?id=7551612432"
- decal.Face = Enum.NormalId.Front
- decal.Transparency = 0
- local Frames = 44 --Amount of frames in gif
- local currentFrame = 1
- local rows = 7
- local columns = 7
- local currentRow,CurrentColumn = 0,0
- local linear = false
- local fps = 10 -- Max 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
Add Comment
Please, Sign In to add comment