Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local gui = Instance.new("ScreenGui",owner.PlayerGui)
- local sound = Instance.new("Sound",owner.PlayerGui)
- sound.SoundId = "rbxassetid://5522191549"
- sound.Looped = true
- sound:Play()
- local viewport = Instance.new("ViewportFrame",gui)
- local camera = Instance.new("Camera",viewport)
- viewport.Size = UDim2.new(0,216,0,257)
- viewport.Position = UDim2.new(0,164,0,198)
- 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
- --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)
- --camera.Focus = CFrame.new(-17.4854298, 9.82875252, 51.8596573, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- --camera.focus = CFrame.new(-17.4854298, 9.82875252, 51.8596573, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- viewport.CurrentCamera = camera
- local main = Instance.new("Part",viewport)
- main.Anchored = true
- main.Size = Vector3.new(10, 10, 0.05)
- main.Position = Vector3.new(0,6,0)--
- main.Orientation = Vector3.new(0,180,0)
- local texture = Instance.new("Texture",main)
- texture.Texture = "rbxassetid://5717043287"
- -- Script by HungryBoy02
- local Frames = 81 --Amount of frames in gif
- local currentFrame = 1
- local rows = 17
- local columns = 5
- local currentRow,CurrentColumn = 0,0
- local linear = false
- local fps = 18 -- Max 30
- local full60fps = false
- local size = main.Size -- The gif should be on the front of the part
- texture.StudsPerTileU = columns*size.X
- texture.StudsPerTileV = rows*size.Y
- while true do
- if not full60fps then wait(1/fps) else game:GetService("RunService").Stepped:Wait() end
- if linear then
- texture.OffsetStudsU = texture.OffsetStudsU + size.X
- if texture.OffsetStudsU > texture.StudsPerTileU then
- texture.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
- texture.OffsetStudsU = size.X*(CurrentColumn-1)
- texture.OffsetStudsV = size.Y*(currentRow-1)
- currentFrame = currentFrame+1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement