Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --
- --
- --
- --
- clerp = function(c1,c2,al)
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
- local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
- for i,v in pairs(com1) do
- com1[i] = lerp(v,com2[i],al)
- end
- return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
- end;
- local getHue = function(Hue)
- local section = Hue % 1 * 3
- local secondary = 0.5 * math.pi * (section % 1)
- if section < 1 then
- return Color3.new(1, 1 - math.cos(secondary), 1 - math.sin(secondary))
- elseif section < 2 then
- return Color3.new(1 - math.sin(secondary), 1, 1 - math.cos(secondary))
- else
- return Color3.new(1 - math.cos(secondary), 1 - math.sin(secondary), 1)
- end
- end
- local Colors = {'Red','Green','Blue'}
- local Player = game.Players.LocalPlayer
- local Char = Player.Character
- local Part = Char.Head
- local Run = game:service'RunService'
- local Orbs = {}
- local Num = 1
- local check = 1
- local Credit = false
- Rotate = function()
- math.randomseed(math.random(Num,tick()))
- check = check + 1
- for i = 1, #Orbs do
- coroutine.wrap(function()
- pcall(function()
- if Part == nil then
- Part = game.Players.LocalPlayer.Character:WaitforChild'Head'
- end
- local Orb = Orbs[i]
- if Orb == nil or Orb.Parent == nil then
- for Count = 1, #Orbs do
- if Orbs[Count] == Orb then
- table.remove(Orbs,Count)
- return
- end
- end
- end
- if Credit == false then
- game:service'Chat':Chat(Orb,'Made by iiQeQ for '..Player.Name,Colors[math.random(1,#Colors)])
- if Num == 2 or Num == 4 then
- Credit = true
- end
- end
- local Light = Orb.PointLight
- Num = Num + .5
- local cframe = CFrame.new(Part.Position.X,Part.Position.Y,Part.Position.Z) * CFrame.Angles(math.sin((90)*(i/.25)+(#Orbs*2)),math.rad((360/#Orbs)*i+(Num/#Orbs)),math.cos((180/#Orbs)*i+(#Orbs*2))) * CFrame.new(0,0,2.5+#Orbs/1.5)
- Orb.CFrame = clerp(Orb.CFrame,cframe,.025)
- Orb.Rotation = Vector3.new(math.rad(tick()*#Orbs),0, math.rad(tick()-#Orbs*Num)) --(math.rad(tick()*#Orbs),#Orbs+Num, math.rad(tick()-#Orbs*Num))
- if check % 2 == 0 then
- local Copy = Orb:Clone()
- Copy:ClearAllChildren()
- Copy.Size = Vector3.new(.25,.25,.25)
- Copy.Parent = Orb.Parent
- delay(2,function()
- for d = 1, 10 do
- Copy.size = Copy.Size + Vector3.new(.05,.05,.05)
- Copy.Transparency = Copy.Transparency + .05
- Run.Heartbeat:wait()
- end
- Copy:Destroy()
- end)
- end
- Light.Color = getHue(tick()/2)
- Orb.BrickColor = BrickColor.new(Light.Color.r,Light.Color.g,Light.Color.b)
- end)
- end)()
- end
- end
- Player.Chatted:connect(function(msg)
- pcall(function()
- if msg:sub(1,1) == '|' then
- loop = tonumber(msg:sub(2))
- for i = 1, loop do
- Run.RenderStepped:wait()
- local Orb = Instance.new('Part')
- Orb.BrickColor = BrickColor.White()
- Orb.Size = Vector3.new(1,1,1)
- Orb.FormFactor = 'Custom'
- Orb.Shape = 'Block'
- Orb.Name = math.rad(math.sin(tick()))
- Orb.Anchored = true
- Orb.CanCollide = false
- Orb.BottomSurface,Orb.TopSurface = 'Smooth','Smooth'
- Orb.Transparency = .5
- Orb.CFrame = Part.CFrame
- local Click = Instance.new('ClickDetector',Orb)
- Click.MaxActivationDistance = math.huge
- local Light = Instance.new('PointLight',Orb)
- Light.Shadows = true
- Light.Range = 8
- Light.Brightness = 5
- table.insert(Orbs,Orb)
- Orb.Parent = workspace
- Click.MouseHoverEnter:connect(function(plr)
- if plr == Player then
- for i = 1, 5 do
- Orb.Size = Orb.Size + Vector3.new(.05,.05,.05)
- Run.RenderStepped:wait()
- end
- end
- end)
- Click.MouseHoverLeave:connect(function(plr)
- if plr == Player then
- for i = 1, 5 do
- Orb.Size = Orb.Size + Vector3.new(-.05,-.05,-.05)
- Run.RenderStepped:wait()
- end
- end
- end)
- Click.MouseClick:connect(function(plr)
- if plr == Player then
- Orb:Destroy()
- -- Lasso:Destroy()
- end
- end)
- end
- else--_G
- game:service'Chat':Chat(Orbs[math.random(1,#Orbs)],msg,Colors[math.random(1,#Colors)])
- end -- Nil value
- --Setfenv
- end)--Getfenv
- end)
- Run.RenderStepped:connect(Rotate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement