Here is the script maybe someone can see something I don't, after all, I'm a novice. This local script originally was in a hopperbin and then had a script, vector3value, part with a spotlight and script inside it, as well as a billboard gui with an image label inside it.
enabled = true
---------------------------------
wait(1)
local tool = Instance.new("Tool")
local Tool = tool
Tool.Parent = game.Players.LocalPlayer.Backpack
local play = game.Players.LocalPlayer
local char = play.Character
local sound = Instance.new("Sound")
sound.Name = "SongShine2"
sound.Volume = 0.15
sound.SoundId = "http://www.roblox.com/asset/?id=176251596"
sound.Parent = char.Head
local mouse = play:GetMouse()
db = true
Tool.Activated:connect(function(mouse)
mouse.Button1Down:connect(function()
local tim = tonumber(string.sub(game.Lighting.TimeOfDay, 0, 2))
if tim >= 7 and tim <= 18 then else return end
if not db then return end
db = false
sound:play()
local model = Instance.new("Model")
local sparkle = Instance.new("Part")
sparkle.Parent = model
model.Name = ""..play.Name.."'s Sunshine!"
model.Parent = game.Workspace
local act = Instance.new("Vector3Value")
act.Value = 0
act.Value = char.Torso.Position
act.Parent = model
local rand = math.random(8,15)
print(1)
local colors = {Color3.new(243/255,227/255,0), Color3.new(243/255, 154/255, 0), Color3.new(243/255, 185/255, 10/255), Color3.new(243/255, 203/255, 43/255), Color3.new(227/255, 227/255, 131/255)}
function spark()
local sparkle = Instance.new("Part")
sparkle.Parent = model
local gui = Instance.new("BillboardGui")
local size = math.random(10,50)/10
gui.Parent = sparkle
gui.size = math.random(10,50)/10
gui.Size = UDim2.new(size, 0, size, 0)
gui.AbsolutePosition = Vector2.new(0,0)
gui.Adornee = sparkle
gui.Enabled = true
gui.Size = UDim2{2,0},{2,0}
gui.Archivable = true
gui.AutoLocalize = true
gui.ZIndexBehavior = "Global"
local img = Instance.new("ImageLabel")
img.Parent = gui
img.AbsoluteSize = Vector2.new(4,4)
img.BackgroundColor3 = Color3.new(255,255,255)
img.BackgroundTransparency = 1
img.LayoutOrder = 0
img.Size = UDim2.new{1,0},{1,0}
img.SizeConstraint = "RelativeXY"
img.Visible = true
img.ZIndex = 1
img.Archivable = true
img.ImageId = "http://www.roblox.com/asset?id=18641204"
img.ScaleType = "Stretch"
img.AutoLocalize = true
for i = 1, 36 do
wait(0.01)
gui.img.Rotation = gui.ImageLabel.Rotation + 10
end
sparkle.Position = act.Value + Vector3.new(math.random(-30,30), math.random(5,15), math.random(-30,30))
end
local z = model:GetChildren()
for i= 1, #z do
if z[i]:IsA("BasePart") and z[i].Name ~= "Sparkle" then
local c = math.random(1, #colors)
z[i].Light.Color = colors[c]
z[i].Light.Enabled = true
end
end
print(2)
local zy = game.Players:GetPlayers()
for i= 1, #z do
if z[i].Character and z[i].Character:findFirstChild("Torso") and (z[i].Character.Torso.Position - act.Value).magnitude < 40 then
local ff = Instance.new("ForceField")
ff.Name = "SunShield"
ff.Parent = z[i].Character
game.Debris:AddItem(ff, 18)
end
end
local count = 0
while true do
wait(0.1)
count = count + 1
if count >= 5 then
spark()
count = 0
end
z()
local Light = Instance.new("PointLight")
Light.Parent = sparkle
for i= 1, #z do
if z[i]:IsA("BasePart") and z[i].Name ~= "Sparkle" then
z[i].Light.Brightness = z[i].Light.Brightness + (math.random(-1,1)/10)
z[i].Light.Range = z[i].Light.Range+ math.random(-1,1)/3
z[i].Light.Angle = z[i].Light.Angle + math.random(-1,1)
end
end
end
for i = 1, rand do
local shine = sparkle:clone()
local rapos = char.Torso.Position + Vector3.new(math.random(-35,35),math.random(25,25),math.random(-35,35))
local ratarg = char.Torso.Position + Vector3.new(math.random(-45,45),math.random(0,0),math.random(-45,45))
shine.CFrame = CFrame.new(rapos, ratarg)
shine.Parent = model
end
wait()
act.Disabled = false
wait(24)
model:Destroy()
wait(10)
db = true
end)
end)
tool.Unequipped:connect(function(mouse)
end)
