Repository navigation
Expand file tree
/
Copy pathStarJug.lua
More file actions
117 lines (91 loc) · 3.5 KB
/
Copy pathStarJug.lua
File metadata and controls
117 lines (91 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
-- i made it very quick and i was lazy so dont mess the very bad code
local TweenService = game:GetService("TweenService")
local StarJug = game:GetObjects("rbxassetid://119885581324516")[1]
local speedTweenValue = Instance.new("NumberValue", StarJug)
local durability = 4
local debounce = false
StarJug:SetAttribute("Durability", durability)
StarJug.Parent = game.Players.LocalPlayer.Backpack
local character = game.Players.LocalPlayer.Character
local humanoid = character:FindFirstChildOfClass("Humanoid")
local Animations = StarJug:WaitForChild("Animations")
local LoadedAnims = {}
for _, anim in pairs(Animations:GetChildren()) do
LoadedAnims[anim.Name] = humanoid:LoadAnimation(anim)
if anim.Name == "idle" then
LoadedAnims[anim.Name].Priority = Enum.AnimationPriority.Idle
LoadedAnims[anim.Name].Looped = true
end
end
StarJug.Equipped:Connect(function()
LoadedAnims["equip"]:Play()
task.wait(LoadedAnims["equip"].Length)
if StarJug:IsDescendantOf(character) then
LoadedAnims["idle"]:Play()
end
end)
StarJug.Unequipped:Connect(function()
if LoadedAnims["idle"].IsPlaying then
LoadedAnims["idle"]:Stop()
end
end)
local collisionClone
StarJug.Activated:Connect(function()
if debounce then return end
debounce = true
LoadedAnims["open"]:Play()
if durability - 1 ~= 0 then
durability = durability - 1
StarJug:SetAttribute("Durability", durability)
else
StarJug:Destroy()
end
character:SetAttribute("Starlight", true)
character:SetAttribute("StarlightHuge", true)
local speedBoost, speedBoostFinished, mspaint_speed = 30, false, false
if getgenv().mspaint_loaded then
if collisionClone then collisionClone:Destroy() end
mspaint_speed = true
local originalSpeed = getgenv().Linoria.Toggles.SpeedBypass.Value
repeat task.wait()
if not getgenv().Linoria.Toggles.SpeedBypass.Value then
getgenv().Linoria.Toggles.SpeedBypass:SetValue(true)
end
until speedBoostFinished
getgenv().Linoria.Toggles.SpeedBypass:SetValue(originalSpeed)
else
if not collisionClone then
collisionClone = character.Collision:Clone() do
collisionClone.CanCollide = false
collisionClone.Massless = true
collisionClone.Name = "CollisionClone"
if collisionClone:FindFirstChild("CollisionCrouch") then
collisionClone.CollisionCrouch:Destroy()
end
collisionClone.Parent = character
end
end
task.spawn(function()
while not speedBoostFinished do
collisionClone.Massless = not collisionClone.Massless
task.wait(0.21)
end
collisionClone.Massless = true
end)
end
speedTweenValue.Value = 35
TweenService:Create(speedTweenValue, TweenInfo.new(70, Enum.EasingStyle.Linear), {
Value = 0
}):Play()
local conn; conn = speedTweenValue:GetPropertyChangedSignal("Value"):Connect(function()
character:SetAttribute("SpeedBoost", speedTweenValue.Value)
end)
task.wait(35)
speedBoostFinished = true
conn:Disconnect()
collisionClone:Destroy()
character:SetAttribute("Starlight", false)
character:SetAttribute("StarlightHuge", false)
character:SetAttribute("SpeedBoost", 0)
debounce = false
end)