Advertisement
antoniorigo4

stickbug local

Sep 21st, 2020 (edited)
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. local gui = Instance.new("ScreenGui",owner.PlayerGui)
  2. local sound = Instance.new("Sound",owner.PlayerGui)
  3. sound.SoundId = "rbxassetid://5522191549"
  4. sound.Looped = true
  5. sound:Play()
  6. local viewport = Instance.new("ViewportFrame",gui)
  7. local camera = Instance.new("Camera",viewport)
  8. viewport.Size = UDim2.new(0,216,0,257)
  9. viewport.Position = UDim2.new(0,164,0,198)
  10. camera.CFrame = CFrame.new(0.168392479, 6.86267376, 6.93328285, 1, 1.29796365e-06, -1.64955854e-05, -1.13686838e-13, 0.996918678, 0.0784430504, 1.65465717e-05, -0.0784430504, 0.996918678)--haha i found funny number in 9th argument
  11. --camera.CoordinateFrame = CFrame.new(-17.3940487, 10.5356951, 53.7283134, 0.998806536, -0.0172648448, 0.04569057, -0, 0.935445368, 0.353471518, -0.0488436669, -0.353049666, 0.934328735)
  12. --camera.Focus = CFrame.new(-17.4854298, 9.82875252, 51.8596573, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  13. --camera.focus = CFrame.new(-17.4854298, 9.82875252, 51.8596573, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  14. viewport.CurrentCamera = camera
  15. local main = Instance.new("Part",viewport)
  16. main.Anchored = true
  17. main.Size = Vector3.new(10, 10, 0.05)
  18. main.Position = Vector3.new(0,6,0)--
  19. main.Orientation = Vector3.new(0,180,0)
  20. local texture = Instance.new("Texture",main)
  21. texture.Texture = "rbxassetid://5717043287"
  22. -- Script by HungryBoy02
  23.  
  24. local Frames = 81 --Amount of frames in gif
  25. local currentFrame = 1
  26.  
  27. local rows = 17
  28. local columns = 5
  29.  
  30. local currentRow,CurrentColumn = 0,0
  31.  
  32. local linear = false
  33.  
  34. local fps = 18 -- Max 30
  35. local full60fps = false
  36.  
  37. local size = main.Size -- The gif should be on the front of the part
  38.  
  39. texture.StudsPerTileU = columns*size.X
  40. texture.StudsPerTileV = rows*size.Y
  41.  
  42. while true do
  43. if not full60fps then wait(1/fps) else game:GetService("RunService").Stepped:Wait() end
  44. if linear then
  45. texture.OffsetStudsU = texture.OffsetStudsU + size.X
  46. if texture.OffsetStudsU > texture.StudsPerTileU then
  47. texture.OffsetStudsU = 0
  48. end
  49. else
  50. CurrentColumn = CurrentColumn + 1
  51. if CurrentColumn > columns then
  52. CurrentColumn = 1
  53. currentRow = currentRow + 1
  54. end
  55. if currentFrame > Frames then
  56. currentRow,CurrentColumn,currentFrame = 1,1,1
  57. end
  58. texture.OffsetStudsU = size.X*(CurrentColumn-1)
  59. texture.OffsetStudsV = size.Y*(currentRow-1)
  60. currentFrame = currentFrame+1
  61. end
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement