TheYoutuber_Pro

qwgf

Jan 15th, 2022 (edited)
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. luigi={0}
  2. zombie={7162313292,10,8,74}
  3. virus={0}
  4.  
  5. gifdata = zombie
  6.  
  7. part = Instance.new("Part", script)
  8. part.Size = Vector3.new(15,10,0)
  9. part.Anchored = true
  10. part.Transparency = 1
  11. part.CFrame = owner.Character.PrimaryPart.CFrame * CFrame.new(0,3.5,-10) * CFrame.Angles(0,math.rad(180),0)
  12.  
  13.  
  14. gif = Instance.new("Texture", part)
  15. gif.Texture = 'rbxassetid://'..gifdata[1]
  16.  
  17. local Frames = gifdata[4]
  18. local currentFrame = 1
  19.  
  20. local rows = gifdata[3]
  21. local columns = gifdata[2]
  22.  
  23. local currentRow,CurrentColumn = 0,0
  24.  
  25. local linear = false
  26.  
  27. local fps = 20 -- Max 30
  28. local full60fps = false
  29.  
  30. local size = part.Size -- The gif should be on the front of the part
  31.  
  32. gif.StudsPerTileU = columns*size.X
  33. gif.StudsPerTileV = rows*size.Y
  34.  
  35. while true do
  36. if not full60fps then wait(1/fps) else game:GetService("RunService").Stepped:Wait() end
  37. if linear then
  38. gif.OffsetStudsU = gif.OffsetStudsU + size.X
  39. if gif.OffsetStudsU > gif.StudsPerTileU then
  40. gif.OffsetStudsU = 0
  41. end
  42. else
  43. CurrentColumn = CurrentColumn + 1
  44. if CurrentColumn > columns then
  45. CurrentColumn = 1
  46. currentRow = currentRow + 1
  47. end
  48. if currentFrame > Frames then
  49. currentRow,CurrentColumn,currentFrame = 1,1,1
  50. end
  51. gif.OffsetStudsU = size.X*(CurrentColumn-1)
  52. gif.OffsetStudsV = size.Y*(currentRow-1)
  53. currentFrame = currentFrame+1
  54. end
  55. end
Add Comment
Please, Sign In to add comment