Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = Instance.new("Tool")
- tool.Name = 'ISA'
- tool.Grip = CFrame.new(9.53674316e-07, 4.76837158e-07, 0, -1.19209346e-07, 5.9604595e-08, 1, 1.67637531e-08, 1, -5.96045915e-08, -1, 1.67637459e-08, -1.19209346e-07)
- tool.Parent = owner.Backpack
- local handle = Instance.new("Part")
- handle.Name = 'Handle'
- handle.Size = Vector3.new(1, 4.8, 6.4)
- handle.CFrame = CFrame.new(11.84, 5.7, -2.576)
- handle.Anchored = false
- handle.CanCollide = true
- handle.Parent = tool
- local sg = Instance.new("SurfaceGui")
- sg.Face = 'Left'
- sg.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
- sg.PixelsPerStud = 100
- sg.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- sg.Parent = handle
- local wrap = Instance.new("Frame")
- wrap.Size = UDim2.new(1,0,1,0)
- wrap.ClipsDescendants = true
- wrap.BackgroundTransparency = 1
- wrap.Parent = sg
- local theme = Instance.new("Sound")
- theme.SoundId = 'rbxassetid://13608974888'
- theme.Volume = 2
- theme.Parent = handle
- theme.Looped = true
- tool.Equipped:Connect(function()
- theme:Resume()
- end)
- tool.Unequipped:Connect(function()
- if tool.Parent ~= workspace then
- theme:Pause()
- end
- end)
- local anim_c = 0
- local sprites = {
- 14677665459,
- 14677665370,
- 14677665257,
- 14677665058,
- 14677664863,
- 14677664753,
- 14677664618,
- 14677664510,
- 14677664365,
- 14677664221,
- 14677664084,
- 14677663991,
- 14677663892,
- 14677663770,
- 14677663648,
- 14677663487,
- 14677663266,
- }
- local custom_res = {
- [17] = {
- columns = 3,
- rows = 2,
- },
- }
- local warperFramerate = 30
- local lastFrame = 0
- local columns = 3 -- horizontal
- local rows = 3 -- vertical
- local frame_max = columns*rows
- local frames = 150
- local anims = {}
- for i,v in pairs(sprites) do
- local anim = Instance.new("ImageLabel")
- anim.Size = UDim2.new(1,0,1,0)
- anim.Image = 'rbxassetid://' .. v
- anim.BackgroundTransparency = 1
- anim.Visible = false
- anim.Size = UDim2.new(columns,0,rows,0)
- for ii,vv in pairs(custom_res) do
- if i == ii then
- anim.Size = UDim2.new(vv.columns,0,vv.rows,0)
- end
- end
- anim.ZIndex = 1
- anim.Visible = true
- anim.Parent = wrap
- table.insert(anims,anim)
- end
- local current_anim = nil
- local last_anim = nil
- local function updateAnim()
- local currentFrame = lastFrame%frames
- if currentFrame == 0 then
- currentFrame = frames
- end
- local current_sprite = anims[math.ceil(currentFrame/frame_max)]
- if current_sprite ~= current_anim then else return end
- last_anim = current_anim
- current_anim = current_sprite
- end
- local function UpdateWarper()
- task.wait(1/warperFramerate)
- lastFrame = lastFrame + 1
- local currentFrame = lastFrame%frames
- if currentFrame == 0 then
- currentFrame = frames
- end
- currentFrame = currentFrame%frame_max
- if currentFrame == 0 then
- currentFrame = frame_max
- end
- updateAnim()
- local CurrentColumn = currentFrame
- local CurrentRow = 1
- repeat
- if CurrentColumn>columns then
- CurrentColumn = CurrentColumn - columns
- CurrentRow = CurrentRow + 1
- end
- until not(CurrentColumn>columns)
- current_anim.Position = UDim2.new(-(CurrentColumn-1),0,-(CurrentRow-1),0)
- current_anim.ZIndex = 2
- if last_anim then
- last_anim.ZIndex = 1
- last_anim = nil
- end
- end
- while true do UpdateWarper() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement