Advertisement
KrYn0MoRe

isa tool [infinite soul abyss]

Sep 3rd, 2023
825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.21 KB | None | 0 0
  1. local tool = Instance.new("Tool")
  2. tool.Name = 'ISA'
  3. 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)
  4. tool.Parent = owner.Backpack
  5.  
  6. local handle = Instance.new("Part")
  7. handle.Name = 'Handle'
  8. handle.Size = Vector3.new(1, 4.8, 6.4)
  9. handle.CFrame = CFrame.new(11.84, 5.7, -2.576)
  10. handle.Anchored = false
  11. handle.CanCollide = true
  12. handle.Parent = tool
  13.  
  14. local sg = Instance.new("SurfaceGui")
  15. sg.Face = 'Left'
  16. sg.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
  17. sg.PixelsPerStud = 100
  18. sg.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  19. sg.Parent = handle
  20.  
  21. local wrap = Instance.new("Frame")
  22. wrap.Size = UDim2.new(1,0,1,0)
  23. wrap.ClipsDescendants = true
  24. wrap.BackgroundTransparency = 1
  25. wrap.Parent = sg
  26.  
  27. local theme = Instance.new("Sound")
  28. theme.SoundId = 'rbxassetid://13608974888'
  29. theme.Volume = 2
  30. theme.Parent = handle
  31. theme.Looped = true
  32.  
  33. tool.Equipped:Connect(function()
  34.     theme:Resume()
  35. end)
  36.  
  37. tool.Unequipped:Connect(function()
  38.     if tool.Parent ~= workspace then
  39.         theme:Pause()
  40.     end
  41. end)
  42.  
  43. local anim_c = 0
  44.  
  45. local sprites = {
  46.     14677665459,
  47.     14677665370,
  48.     14677665257,
  49.     14677665058,
  50.     14677664863,
  51.     14677664753,
  52.     14677664618,
  53.     14677664510,
  54.     14677664365,
  55.     14677664221,
  56.     14677664084,
  57.     14677663991,
  58.     14677663892,
  59.     14677663770,
  60.     14677663648,
  61.     14677663487,
  62.     14677663266,
  63. }
  64.  
  65. local custom_res = {
  66.     [17] = {
  67.         columns = 3,
  68.         rows = 2,
  69.     },
  70. }
  71.  
  72. local warperFramerate = 30
  73. local lastFrame = 0
  74. local columns = 3 -- horizontal
  75. local rows = 3 -- vertical
  76. local frame_max = columns*rows
  77. local frames = 150
  78.  
  79. local anims = {}
  80.  
  81. for i,v in pairs(sprites) do
  82.     local anim = Instance.new("ImageLabel")
  83.     anim.Size = UDim2.new(1,0,1,0)
  84.     anim.Image = 'rbxassetid://' .. v
  85.     anim.BackgroundTransparency = 1
  86.     anim.Visible = false
  87.    
  88.     anim.Size = UDim2.new(columns,0,rows,0)
  89.     for ii,vv in pairs(custom_res) do
  90.         if i == ii then
  91.             anim.Size = UDim2.new(vv.columns,0,vv.rows,0)
  92.         end
  93.     end
  94.    
  95.     anim.ZIndex = 1
  96.     anim.Visible = true
  97.     anim.Parent = wrap
  98.     table.insert(anims,anim)
  99. end
  100.  
  101. local current_anim = nil
  102. local last_anim = nil
  103.  
  104. local function updateAnim()
  105.     local currentFrame = lastFrame%frames
  106.     if currentFrame == 0 then
  107.         currentFrame = frames
  108.     end
  109.     local current_sprite = anims[math.ceil(currentFrame/frame_max)]
  110.    
  111.     if current_sprite ~= current_anim then else return end
  112.    
  113.     last_anim = current_anim
  114.     current_anim = current_sprite
  115. end
  116.  
  117. local function UpdateWarper()
  118.     task.wait(1/warperFramerate)
  119.  
  120.     lastFrame = lastFrame + 1
  121.     local currentFrame = lastFrame%frames
  122.     if currentFrame == 0 then
  123.         currentFrame = frames
  124.     end
  125.    
  126.     currentFrame = currentFrame%frame_max
  127.    
  128.     if currentFrame == 0 then
  129.         currentFrame = frame_max
  130.     end
  131.    
  132.     updateAnim()
  133.    
  134.     local CurrentColumn = currentFrame
  135.     local CurrentRow = 1
  136.     repeat
  137.         if CurrentColumn>columns then
  138.             CurrentColumn = CurrentColumn - columns
  139.             CurrentRow = CurrentRow + 1
  140.         end
  141.     until not(CurrentColumn>columns)
  142.    
  143.     current_anim.Position = UDim2.new(-(CurrentColumn-1),0,-(CurrentRow-1),0)
  144.     current_anim.ZIndex = 2
  145.     if last_anim then
  146.         last_anim.ZIndex = 1
  147.         last_anim = nil
  148.     end
  149. end
  150.  
  151. while true do UpdateWarper() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement