Advertisement
Ibrahimboy

Globe of moonlight

Oct 26th, 2024 (edited)
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local StarJug = game:GetObjects("rbxassetid://124302577272661")[1]
  3.  
  4. local speedTweenValue = Instance.new("NumberValue", StarJug)
  5.  
  6. local durability = 4
  7. local debounce = false
  8. StarJug:SetAttribute("Durability", durability)
  9.  
  10. StarJug.Parent = game.Players.LocalPlayer.Backpack
  11.  
  12. local character = game.Players.LocalPlayer.Character
  13. local humanoid = character:FindFirstChildOfClass("Humanoid")
  14.  
  15. local Animations = StarJug:WaitForChild("Animations")
  16. local LoadedAnims = {}
  17.  
  18. for _, anim in pairs(Animations:GetChildren()) do
  19. LoadedAnims[anim.Name] = humanoid:LoadAnimation(anim)
  20.  
  21. if anim.Name == "idle" then
  22. LoadedAnims[anim.Name].Priority = Enum.AnimationPriority.Idle
  23. LoadedAnims[anim.Name].Looped = true
  24. end
  25. end
  26.  
  27. StarJug.Equipped:Connect(function()
  28. LoadedAnims["equip"]:Play()
  29.  
  30. task.wait(LoadedAnims["equip"].Length)
  31.  
  32. if StarJug:IsDescendantOf(character) then
  33. LoadedAnims["idle"]:Play()
  34. end
  35. end)
  36.  
  37. StarJug.Unequipped:Connect(function()
  38. if LoadedAnims["idle"].IsPlaying then
  39. LoadedAnims["idle"]:Stop()
  40. end
  41. end)
  42.  
  43. local collisionClone
  44. StarJug.Activated:Connect(function()
  45. if debounce then return end
  46. debounce = true
  47.  
  48. LoadedAnims["open"]:Play()
  49.  
  50. if durability - 1 ~= 0 then
  51. durability = durability - 1
  52. StarJug:SetAttribute("Durability", durability)
  53. else
  54. StarJug:Destroy()
  55. end
  56.  
  57. character:SetAttribute("Starlight", true)
  58. character:SetAttribute("StarlightHuge", true)
  59.  
  60. local speedBoost, speedBoostFinished, mspaint_speed = 30, false, false
  61. if getgenv().mspaint_loaded then
  62. if collisionClone then collisionClone:Destroy() end
  63. mspaint_speed = true
  64.  
  65. local originalSpeed = getgenv().Linoria.Toggles.SpeedBypass.Value
  66. repeat task.wait()
  67. if not getgenv().Linoria.Toggles.SpeedBypass.Value then
  68. getgenv().Linoria.Toggles.SpeedBypass:SetValue(true)
  69. end
  70. until speedBoostFinished
  71. getgenv().Linoria.Toggles.SpeedBypass:SetValue(originalSpeed)
  72. else
  73. if not collisionClone then
  74. collisionClone = character.Collision:Clone() do
  75. collisionClone.CanCollide = false
  76. collisionClone.Massless = true
  77. collisionClone.Name = "CollisionClone"
  78. if collisionClone:FindFirstChild("CollisionCrouch") then
  79. collisionClone.CollisionCrouch:Destroy()
  80. end
  81.  
  82. collisionClone.Parent = character
  83. end
  84. end
  85.  
  86. task.spawn(function()
  87. while not speedBoostFinished do
  88. collisionClone.Massless = not collisionClone.Massless
  89. task.wait(0.21)
  90. end
  91.  
  92. collisionClone.Massless = true
  93. end)
  94. end
  95.  
  96. speedTweenValue.Value = 20
  97. TweenService:Create(speedTweenValue, TweenInfo.new(70, Enum.EasingStyle.Linear), {
  98. Value = 0
  99. }):Play()
  100.  
  101. local conn; conn = speedTweenValue:GetPropertyChangedSignal("Value"):Connect(function()
  102. character:SetAttribute("SpeedBoost", speedTweenValue.Value)
  103. end)
  104.  
  105. task.wait(999999)
  106.  
  107. speedBoostFinished = true
  108. conn:Disconnect()
  109. collisionClone:Destroy()
  110.  
  111. character:SetAttribute("Starlight", false)
  112. character:SetAttribute("StarlightHuge", false)
  113. character:SetAttribute("SpeedBoost", 0)
  114. debounce = false
  115. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement