The only other hats with scripts that aren’t exclusive to admins are the sound hats, and they do not reference the SpecialMesh in the hat, so this update wouldn’t break those scripts. This would affect the Rbadam’s Smokestack specifically due to the fact that it references the SpecialMesh in the hat. However, this could easily be fixed with some simple if thens, so the hat can work with the new update and with the original SpecialMesh in a part.
--Script by Mah_Bucket
local now = os.date("*t")
local newmesh = "rbxassetid://2399307491" -- updated mesh for better texturing
local hw --= true
local tg --= true
local xm --= true
local bd --= true
local pt --= true
local vt --= true
local af --= true
if now.month == 10 and now.day > 21 then --Candy Day
hw = true
elseif now.month == 11 and now.day > 19 then --Eating Too Much Day
tg = true
elseif now.month == 12 and now.day > 17 and now.day < 28 then --Free Stuff Day
xm = true
elseif now.month == 8 and now.day == 27 then --Roblox's Birthday!
bd = true
elseif now.month == 3 and now.day > 11 and now.day < 20 then --Hunt Short Irishmen Day
pt = true
elseif now.month == 2 and now.day > 8 and now.day < 17 then --Chocolate and Tears Day
vt = true
elseif now.month == 4 and now.day == 1 then --April Fool's!
af = true
end
local emitter = script.Parent:WaitForChild("ParticleEmitter") -- default smoke emitter
local burst = script.Parent:WaitForChild("Burst") -- bursting emitter
if script.Parent.ClassName=="Part" then
mesh = script.Parent:WaitForChild("Mesh") -- the hat
else
mesh = script.Parent -- the hat
end
-- holiday cheer
function snowBlower()
local snow1 = script.Parent:WaitForChild("Snowflake1")
local snow2 = script.Parent:WaitForChild("Snowflake2")
while true do
wait(math.random() * 5)
snow1.Enabled = false
snow2.Enabled = true
wait(math.random() * 5)
snow1.Enabled = true
snow2.Enabled = false
-- occasionally blow a ton of snow
if math.random() > 0.97 then
snow1.Enabled = false
wait(4)
snow1:Emit(22)
wait(math.random())
snow2:Emit(22)
wait(2)
end
end
end
-- falliday cheer
function leafBlower()
local leaf1 = script.Parent:WaitForChild("Leaf1")
local leaf2 = script.Parent:WaitForChild("Leaf2")
while true do
wait(math.random() * 5)
leaf1.Enabled = false
leaf2.Enabled = true
wait(math.random() * 5)
leaf1.Enabled = true
leaf2.Enabled = false
-- occasionally blow a ton of leaves
if math.random() > 0.97 then
leaf1.Enabled = false
wait(4)
leaf1:Emit(22)
wait(math.random())
leaf2:Emit(22)
wait(2)
end
end
end
-- irish pride
function cloverBlower()
local leaf1 = script.Parent:WaitForChild("Clover1")
local leaf2 = script.Parent:WaitForChild("Clover2")
while true do
wait(math.random() * 5)
leaf1.Enabled = false
leaf2.Enabled = true
wait(math.random() * 5)
leaf1.Enabled = true
leaf2.Enabled = false
-- occasionally blow a ton of clovers
if math.random() > 0.97 then
leaf1.Enabled = false
wait(4)
leaf1:Emit(22)
wait(math.random())
leaf2:Emit(22)
wait(2)
end
end
end
-- check holidays
if hw then
emitter.Enabled = false
emitter = script.Parent:WaitForChild("Hallow") -- use this orange smoke
if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://307022809" else mesh.TextureID = "rbxassetid://307022809" end -- halloween hat texture
elseif tg then
if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://318670022" else mesh.TextureID = "rbxassetid://318670022" end -- thanksgiving hat texture
spawn(leafBlower)
elseif xm then
emitter.Enabled = false
emitter = script.Parent:WaitForChild("Snowflake3") -- use this snow
spawn(snowBlower)
elseif bd then
emitter.Enabled = false
emitter = script.Parent:WaitForChild("Confetti") -- confetti is the hip way to pollute
if mesh:IsA("SpecialMesh") then mesh.MeshId = newmesh end
if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://2399316028" else mesh.TextureID = "rbxassetid://2399316028" end -- birthday hat texture
local age = Instance.new("Part") -- part showing Roblox's age
age.CanCollide = false
age.Transparency = 1
age.TopSurface = 0
age.BottomSurface = 0
age.Size = Vector3.new(.6,.5,.1)
age.CFrame = script.Parent.CFrame - Vector3.new(0,.175,.43)
age.CustomPhysicalProperties = PhysicalProperties.new(0,.3,.5)
local gui = Instance.new("SurfaceGui")
gui.CanvasSize = Vector2.new(60,50)
gui.LightInfluence = 1
local text = Instance.new("TextLabel")
text.BackgroundTransparency = 1
text.Size = UDim2.new(1,0,1,0)
text.TextScaled = true
text.TextColor3 = Color3.fromRGB(210,45,32)
text.Text = now.year - 2006 -- Roblox's age. What an old guy!
local weld = Instance.new("WeldConstraint")
weld.Part0 = script.Parent
weld.Part1 = age
age.Parent = script.Parent
gui.Parent = age
text.Parent = gui
weld.Parent = script.Parent
elseif pt then
if mesh:IsA("SpecialMesh") then mesh.MeshId = newmesh end
if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://2399447918" else mesh.TextureID = "rbxassetid://2399447918" end -- pattie's hat texture
spawn(cloverBlower)
elseif vt then
emitter.Enabled = false
emitter = script.Parent:WaitForChild("Heart") -- use this lovely smoke
if mesh:IsA("SpecialMesh") then mesh.MeshId = newmesh end
if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://2399448372" else mesh.TextureID = "rbxassetid://2399448372" end -- valentine hat texture
elseif af then
emitter.Enabled = false
emitter = script.Parent:WaitForChild("Hats") -- use this not smoke
script.Parent.Smokescreen.Enabled = true
script.Parent.Transparency = 1
end
-- turn emitter off and on periodically for more variation
while true do
wait(0.6)
emitter.Enabled = false
wait(1.8)
emitter.Enabled = true
-- occasionally we like to burst some smoke for a different effect
local rando = math.random()
if rando > 0.97 then
emitter.Enabled = false
wait(4)
burst.Enabled = true
wait(2)
burst.Enabled = false
emitter.Enabled = true
elseif rando > 0.969 then --very rare effect just to give people something to be excited about
emitter.Enabled = false
wait(4)
for i,v in pairs(script.Parent:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(math.random(6,10))
wait(.5)
end
end
wait(2)
emitter.Enabled = true
end
end
The only thing that must be added to fix the hat is another part in the hat to blow the smoke properly. Using a MeshPart for the hat makes the smoke come out of the entire hat rather than just the middle as it does currently. Also, MeshId cannot be edited with the script if the hat is a MeshPart, so some of the textures would look broken since they are on the wrong mesh. This just makes it stupidly complicated, as there would now have to be 2 MeshParts, one with the new mesh’s MeshId, and one with the standard one. One of them is visible depending on the event, for example, the birthday event uses the new mesh, and no event uses the standard mesh. This is the best solution I could think of.