Originally, this script was meant to work with Hopperbins; but due to the last update, Hopperbins break the game. Also, since they've been deprecated for a while, it is time to switch to Tools.
Here's the Hopperbin version:
bin = script.Parent
blah = true
local hat = nil
function onButton1Down(mouse)
if blah == true then
blah = false
local player = game.Players.LocalPlayer
if player == nil then return end
for _,m in ipairs(player.Character:GetDescendants()) do
if m.Name == "effect" then
m.Transparency = 0.33
wait(0.01)
m.Transparency = 0.67
wait(0.01)
m.Transparency = 1
wait(15)
m.Transparency = .99
wait(0.01)
m.Transparency = 0.67
wait(0.01)
m.Transparency = 0
end
end
end
wait(9)
blah = true
end
function onSelected(mouse)
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
bin.Selected:connect(onSelected)
Here is the Tool version attempt:
local Tool = script.Parent
local debounce = true
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
if player == nil then return end
for _,m in ipairs(player.Character:GetDescendants()) do
if m.Name == "effect" then
local d = m
local hat = nil
Tool.Equipped:connect(function(Mouse)
Mouse.Button1Down:connect(function()
if debounce == true then
debounce = false
d.Transparency = 0.33
wait(0.01)
d.Transparency = 0.67
wait(0.01)
d.Transparency = 1
wait(9)
d.Transparency = .99
wait(0.01)
d.Transparency = 0.67
wait(0.01)
d.Transparency = 0
end
wait(9)
debounce = true
end)
end)
end
end
